This error always happens whenever I add a new Package via Swift Package Manager in Xcode:
Cannot fetch library
I've already configured my GitHub Auth Token setting in Xcode and registered my GitHub account.
My macOS version is Monterey 12.1, my Xcode version is 13.1, my command-line tools are 13.1, and I'm using an M1 chipset Mac.
Configure Dependency Rule 📏
tl;dr
I encountered this issue today and managed to resolve the Package by changing the Dependency Rule from Branch -> master to Up to Next Major Version and checking their latest Release versions from GitHub.
Other Dependency Rules
We can also try changing from Branch to other rules depending on our application:
Up to Next Major Version: Useful for getting the latest major stable release.
Up to Next Minor Version: Useful for getting the very latest releases.
Range of Versions: Useful for resolving dependencies specific to a particular dependency chain (careful configuration).
Exact Version: Useful for pinning a version to a particular working release, or fork.
Commit: Useful for pinning a Package to a commit rather than a release version.
Xcode SPM "Add Package" prompt
I tried to simulate your problem, Xcode and command-line version are the same. I was able to add SnapKit into my project without problems. Try this workaround:
Project -> Package Dependencies -> + -> paste the link: https://github.com/SnapKit/SnapKit -> Dependency rule set to Up To Next Major -> Add Package.
It should add a new package. Currently in version 5.0.1 If you have still a problem, just click Add Anyway, build the project and send a screenshot of the error.
Related
I created project using flutter sdk version 1.7.8. After long time when I run the build it was giving me errors in sdk files. So I just downloaded new version of flutter sdk (2.2). I have changed environment path to latest sdk version, but when I run project it still giving me error related to older sdk version.
Here is the error
/C:/flutter_windows_v1.7.8+hotfix.4-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_slidable-0.4.9/lib/src/widgets/slidable.dart:786:46: Error: Method not found: 'TypeMatcher'.
return context.ancestorStateOfType(const TypeMatcher());
This is my environment variable
Why it is giving error related to version 1.78, although I have provided version 2.2 in my environment variable.
I think the one of the plugins that you are using is deprecated when you upgrade flutter you mostly need to upgrade the plugins as well.
and you need to change your pubspec.yaml file also and change the dart version .
so run flutter clean first.
change dart version. then try to run if it doesnt work still you need to upgrade plugins and remove the deprecated plugin.
OR
You might have the old Path in your IDE (Android Studio, VS CODE ) ETC.
I tried to install gcc 5.2 (already installed dependencies successfully) from source file on my computer one week ago, but it failed at make phase or make install phase because of missing some ****.h files, whatever, i can not remember clearly.
I searched the reason online, and looks like it is because i did not installed Command Line Tools for Xcode. But I already have Xcode 7.1.1 and i think it includes the Command Line Tool. I find it from File -> New -> project -> OS X Application -> Command Line Tool. I can also use gcc --version in the terminal.
So do i need to install Command Line Tools separately? If I need, and why?
did you try to download it like described in the attached images:
If you have installed Xcode you have installed command line tools too. Xcode installs command line tools automatically the first time you open it ("Installing additional components" is the message you see on the screen).
Actually xcode cannot function without the command line tools (build, git etc).
short answer: no, you don't.
this is the official description for the Command Line Tools for Xcode (from the https://developer.apple.com/download/all/):
This package enables UNIX-style development via Terminal by installing command line developer tools, as well as macOS SDK frameworks and headers. Many useful tools are included, such as the Apple LLVM compiler, linker, and Make. If you use Xcode, these tools are also embedded within the Xcode IDE.
long answer: it depends.
for example, if you're using homebrew package manager it requires CLT
(from homebrew member comment https://github.com/Homebrew/brew/issues/10714#issuecomment-786663987)
The reason we need the Command Line Tools rather than just Xcode.app is for a few reasons:
The CLT contains more SDKs than Xcode - Xcode usually only contains one SDK, and it may be newer than your OS, while the CLT always has a compatible SDK. Having a matching SDK is very important for some formulae.
The CLT is in a fixed location /Library/Developer/CommandLineTools while Xcode is not. This matters as some formulae (including Python) bake in paths into files at compile-time - if they pointed to Xcode then it will only work for people who have Xcode installed in the same place.
I am using Visual Studio 2015 RTM, and I am working on a Cordova project. My project works fine for Android, but I cannot get it to build for IOS. I have figured out what the problem is, but I cannot figure out how to fix it.
When I build for IOS it is sending the build to the remote build agent installed on my Mac computer, but it is returning the following error:
Could not find module 'Q'. Please Go to Tools --> Options --> Tools
for Apache cordova --> Cordova Tools --> Clear Cordova Cache and try
building again.
Following it's suggestion and clearing the Cordova cache does not help. I did some research and have found that it is a bug in the cordova_ios library. Here is a link to the commit that fixed the error https://github.com/apache/cordova-ios/commit/ed272032878959c90eb28ccc1490e96fb7b69287.
Basically what the issue is that the check_reqs.js file is require 'Q' (uppercase) instead of 'q' (lowercase).
I can work around the problem (and confirm that this is the problem) by doing the following:
Copy my Cordova project over to my Mac computer.
At the command line add IOS as a Cordova platform.
Go to the /platforms/ios/cordova/lib/check_reqs.js file and change line 25 to be a lowercase 'q'.
Build and run the project on the Mac.
What I don't know is how to fix this in Visual Studio so I can build from Visual Studio? I have tried doing NPM updates on the computer that Visual Studio is installed on, but that has not fixed it. I have also tried to manually add the IOS platform to my project via the Cordova command line, and then changing the same file that I change on the Mac, but that does not fix it either.
It looks like this issue if fixed in the latest version of the cordova_ios library, I just cannot figure out how to get Visual Studio and/or the remote build agent on my Mac to use the latest version of the cordova_ios library.
Update
It looks like this is a bug that other people are seeing with Cordova. There are discussion about it here and here. I can reproduce this on my Mac computer. If I create a new Cordova project and add the iOS platform and try to build it for iOS I receive this error. I can then correct the issue by opening the check_reqs.js file and changing the uppercase 'Q' to a lowercase 'q'. However when I build from Visual Studio it sends the project across to the Mac with the incorrect check_req.js file and the build fails. I cannot figure out how to correct this issue when doing a iOS build from Visual Studio.
If your OSX machine has case a case sensitive filesystem you can hit this though a fix is in the works. (Most people do not turn on case sensativity.)
The fix you reference has not yet been released publicly. You can watch for a "platform" release here: http://cordova.apache.org/
Once the platform is released it is very likely a Cordova CLI update will also occur (ex: 5.1.2) so you can just update to that version via the config designer.
However, as an alternative you can add the following into your config.xml file to cause Cordova to use a different iOS platform version and then do a "clean" in VS to force it to take effect:
<engine name="ios" spec="3.9.0" />
3.8.0 is the currently released version.
A "DISCUSS" thread is already going for an iOS release - it should be out in the next couple of weeks.
You can try using the Git URI to get edge - but that could be buggy so exercise care:
<engine name="ios" spec="https://github.com/apache/cordova-ios.git" />
I think we should simply do a patch release of Cordova with this bug fix. Will start a thread on the mailing list to see if a quick release is possible.
Did you already try re-installing vs-tac? Here's the doc:
https://msdn.microsoft.com/library/dn771551(v=vs.140).aspx#vstac
What version of node do you have installed on the MAC machine? I have 0.12.2 and the require(Q) gets satisfied without any errors. Can you try installing a newer version of Node? Let me know.
According to "pub --help" the "upgrade" command is used to:
Upgrade the current package's dependencies to latest versions.
However, I just had to run "pub upgrade" several times to reach the current latest versions of packages that my pubspec.yaml depends on. It seemed like each run upgraded only incrementally. What am I missing?
Specific example I observed was mustache: ">=0.1.5", which was first upgraded to 0.1.6 and on a second run to 0.1.7.
pub version: Pub 1.1.0-dev.5.11
It should upgrade all dependencies to the latest version available, or the latest version allowed in pubspec.yaml (see the Pub Package Manager docs).
But if it jumps only over one new version per upgrade, try to fill in the bug
I have never seen that behavior. It should go straight to the highest available (not-dev) release that fulfills your dependency constraints.
You can see this behaviour if a new version of your dependency lands between your 2 runs.
Looking at the versions of mustache (click on the Versions tab) you can see if a new version has landed during your test. It may explain what you observed.
I am using Xcode 4.2.1 and I have this problem running an existing application on the iOS simulator:
svn: The path '.' appears to be part of a Subversion 1.7 or greater
working copy. Please upgrade your Subversion client to use this
working copy.
/Users/me/Library/Developer/Xcode/DerivedData/myproject-dxfzldckuqdmlrghowwkdrbgoigy/Build /Intermediates/myproject.build/Debug-iphonesimulator/MyProject.build/Script-9567AEA113C59633000AA291.sh: No Subversion revision found at /Users/me/Library/Developer/Xcode/DerivedData/myproject-dxfzldckuqdmlrghowwkdrbgoigy/Build/Intermediates/myproject.build/Debug-iphonesimulator/MyProject.build/Script-9567AEA113C59633000AA291.sh line 32.
Building revision
Command /bin/sh failed with exit code 1
I have a Subversion server 1.7.1 installed and also on the client side I upgraded to 1.7.1.
I did a svn upgrade and then I get this error in Xcode.
If I repeat the svn upgrade on the terminal I get the message Can't upgrade '...' as it is not a pre-1.7 working copy directory.
So what is wrong? How an I solve the problem?
Xcode doesn't yet support SVN 1.7. Only 1.6 is supported. In order to fix your problem, you'll need to switch to using an SVN 1.6 compatible working copy.
Since SVN 1.7 client is unable to work with 1.6 working copies at all, you'll need to remove SVN 1.7.x from your client and revert to 1.6. (Or perhaps just adjust your PATH so the SVN 1.6 tools are first.) Once 1.6 is back, delete or move aside your existing working copy and check out a fresh copy with SVN 1.6. Now Xcode should be able to work with your working copy.
Note that you can freely use SVN 1.6 client with an SVN 1.7 server. Some of the newer features won't be available, but it will work. There's no need to downgrade the server or your server-side repositories.
Keep an eye on the Xcode release notes in updates as I'm sure Apple will note when Xcode is capable of using SVN 1.7. When a 1.7 compatible release of Xcode becomes available, it should then be safe to upgrade your client to 1.7 and migrate your working copy again.
There is a post that appears to imply that you can fool XCode into using svn 1.7 client by changing your PATH and setting up a couple of soft links in strategic places. Unfortunately, the post is in Chinese. Fortunately, Google translate and the presence of UNIX commands make it possible to decrypt what the post is saying. I will try it in the next few days, and update the answer if anything useful comes out of this exercise.
EDIT: I tried the steps from the post, and it worked. Here is what I did:
Downloaded and installed svn client 1.7.2 into /opt/subversion
Added /opt/subversion/bin to my PATH in .bash_profile
Created a backup directory /Developer/usr/bin/orig.svn
Moved /Developer/usr/bin/svn* to /Developer/usr/bin/orig.svn
Ran ln -s /opt/subversion/bin/svn* /Developer/usr/bin/
After that I re-started XCode, went to Organizer, and was able to attach a working copy of a checkout created with svn 1.7.2 client. Organizer showed a green dot next to the repository, displayed a list of revisions, etc., so at this point I believe that the trick has worked.
You can download and install a binary package from http://www.wandisco.com/subversion/download#osx
The package will install to /opt/subversion while the xcode version of SVN is installed in /usr/bin. If you prepend /opt/subversion/bin to your path variable, it will be chosen instead of the xcode version.
If you don't want to mess with your path, you can just alias one version or the other. man alias for details.