I am currently trying to build my project in Xcode 5. Build fails with error:
Dependency Analysis Error:
missing compiler specification <XCCompilerSpecification: Some memory address here :'com.apple.compilers.llvmgcc42':MISSING:Default> for file
for all code files in project.
The project used to be built in Xcode 4.6 with LLVM 4.2 and now Xcode 5 only supports LLVM 5. So there is obviously something related to that here.
I have set the build settings in Xcode 5 to use LLVM 5 and the build still fails for the same reason. Has anyone encountered this before and know how to stop Xcode 5 from looking for LLVM 4.2 which it no longer supports?
This question is as a result of iOS 6 vs 7 appearance build settings
I had a same problem and I found that under Project-> Build Rules, gcc compiler was being used which no longer exist with Xcode 5.
I found something similar in an old project I have today. What happened is that there was a subproject in my project and that one wasn't set to llvm5.
You may want to do a search in your directory to find a file specifying llvm 4.2, like such:
MyMac:~/path/to/my/project $ grep -rHin llvm *
MyProject.xcodeproj/project.pbxproj:334: GCC_VERSION = com.apple.compilers.llvmgcc42;
MyProject.xcodeproj/project.pbxproj:348: GCC_VERSION = com.apple.compilers.llvmgcc42;
If that's the case, try updating that subproject or removing it altogether, see if you can at least clean your build.
Hope this helps.
first, if you use virtual machine, maybe it's the problem when it doesn't have grant to access into your project
if not check your file Maybe you miss any file?
Related
i am trying to integrate ACS to my app and facing this issue
Failed to build module 'AzureCommunicationCalling'; this SDK is not
supported by the compiler (the SDK is built with 'Apple Swift version
5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)', while this compiler is 'Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3
clang-1400.0.29.51)'). Please select a toolchain which matches the
SDK.
it is working fine with another project
i tried adding 'AzureCommunicationUICalling', '1.1.0' to my xcode project with minimum deployment target 14.0 and expected to use it
Please try to install both compilers (5.6 and 5.7) on the build machine and then check.
Users with a similar issue were able to fix the issue by following the steps outlined in this SO thread. Quoting here for your convenience.
“You need to set the Build Settings > Build Options > Build Libraries
for Distribution option to Yes in your framework's build settings,
otherwise the swift compiler doesn't generate the necessary
.swiftinterface files which are the key to future compilers being
able to load your old library.
This ends up in your project.pbxproj file as:
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
Please try the above steps and let us know how it goes.
I'm using Carthage for setting up my project's RxSwift dependency. And recently, I tried to use XCFrameworks instead with the command carthage update --platform ios --use-xcframeworks. I've set up all that is needed to be set (eg. changing the .frameworks to .xcframeworks in the Link Binary With Libraries in the targets' Build Phase, etc). It worked and I can run or test in the simulator, until today that is. When I was trying to do the tests this morning, all of a sudden it failed (although it worked fine before) with the error No such module 'RxBlocking'. I've double-checked it and the xcframework has already been built in the Carthage/Build folder, and the xcframework has already been added to the test target's settings.
I've tried all of these but it all failed:
Setting the $(PROJECT_DIR)/Carthage/Build to the Framework Search Paths for the target
Deleting DerivedData/ and/or Carthage/ folders
Resetting the Mac
Can anybody help me to fix this? BTW, I'm on XCode 12.4 and Swift 5. Thanks.
This is actually because of the Apple tools that can't search for the correct Frameworks Search Path. The fix is in this link: https://github.com/ReactiveX/RxSwift/issues/2292#issuecomment-804045119
I am trying to implement integration of third party app into project as per instruciton https://github.com/Paytm-Payments/Paytm_iOS_App_Kit/tree/master/Swift/BitCodeDisabled/PaytmNativeSDK
I see the following error in build
Module compiled with Swift 4.2.1 cannot be imported by the Swift 5.0
compiler
I have tried toolchains https://medium.com/xcblog/switching-swift-versions-inside-xcode-using-toolchains-755b28831c43
The error changes to Reason: Incompatible library version: PaytmNativeSDK requires version 1.0.0 or later, but libswiftCore.dylib provides version 0.0.0
How do i setup XCode or the Library to make it work . There is no chance of the vendor updating the library for Swift 5.0 and make it available on POD.
For Carthage users: After upgrading to Xcode 10.2, I ran into this same issue with a framework that I had been importing using Carthage.
I resolved it by rebuilding the framework:
carthage update --no-use-binaries --platform iOS
The correct solution is download Xcode 10.1, and wait for Apple patch the bug fix.
Don't waste time on fix third-party bug.
The problem of my project is we are using Alamofire which is failed to update by Carthage.
The provider of this library should rebuild it with BUILD_LIBRARY_FOR_DISTRIBUTION = YES; (available in Xcode 11.3 in Build Settings -> Build Options). Already asked to do it in the corresponding GitHub issue. After that PaytmNativeSDK will be compatible with every next Swift version.
It looks like the issue has been fixed in 804152caae76245d96548eb74ea87a6150239407.
I wanted to use Swift 4.2 (which Xcode 10.2 should still support, I've set it in Swift Language Version), but it still gave me an error about the Swift 5.0 compiler. So after trying to clear everything like build folder, derived data and stuff, I came to the conclusion that it does not work on Xcode 10.2.
I reverted back to Xcode 10.1 which you can download here. This works. So until Apple fixes this bug I am forced to stay on Xcode 10.1.
The developers of the framework need to provide an update, which is built in Xcode 10.2.
Explanation for framework developers:
Even if you created the framework in Xcode 10.2 or with the default version used by CI, your users may still encounter such an error. You should make sure that Xcode 10.2 is your default command line tool. You can check it in terminal with the command xcodebuild -version.
Default version can be adjusted in Xcode -> Preferences -> Locations -> Command Line Tools.
This will happen if you have external libraries in your project thats still built using 4.2 compiler, whereas the new Xcode tries building your project in 5.0 compiler.
In my case, I had few libraries imported using Carthage. Luckily the libraries that I have used have released an updates in the past few days making it compatible with Swift 5.0 compilers. If those external libraries haven't updated it to support Swift 5.0 you may be out of luck for now.
On the way you might still face few issues and here are some best practices to avoid further issues.
Remove the cartfile.resolved and Carthage folder completely
Ensure you remove any copy of the libraries added to your project earlier.
Remove the embedded libraries and Linked frameworks and libraries from your Targets> Yourapp > General .
Product > Clean build folder
Update the Cart file and fetch the new sources using the Carthage update command
Now import the libraries back to your project.
Hopefully it works.
My problem with Carthage was related to the xcode phase that copys binaries in
"carthage copy-frameworks" phase.
I've a slightly different solution to the one commented in https://stackoverflow.com/a/55362536/721929, because that solution also updates dependencies versions in some cases.
So, I just executed "carthage build". I also include a cache clean for Carthage, to fix possible errors in subtasks (in my case, failing in git clone with "exit code 1")
rm -rf ~/Library/Caches/org.carthage.CarthageKit
carthage build --no-use-binaries --platform iOS --verbose
Just remove all the *.framework folders, fetch and generate then just Import the new framework folders to your project.
That's what helped me.
For Instance:
I updated xCode from 9.0.1 to 9.1. Everything was ok before, but now, I have this error when I try to build my project (with Carthage) :
module compiled with Swift 4.0 cannot be imported in Swift 3.2.2 (or 4.0.2 for SWIFT 4 users)
Don't need to let you know the module because it doesn't depend on it (because when I comment the import line concerned, the mistake his misplaced to the next import, so for another module).
I tried everything I saw :
Clean the project
Clean the Carthage folder
Clean Derived Data folder:
rm -rf ~/Library/Caches/org.carthage.CarthageKit/DerivedData
Update with Carthage: carthage update --platform iOS (with or not --no-use-binaries)
Update Modules
Build again
Close and Reopen Xcode
pray
Carthage (0.26.2) and MacOS (High Sierra) are up to date.
So, my last supposition (as I can read) is that Xcode 9.1 not allow us to use modules not build with Xcode 9.1. So I can come back to Xcode 9.0.1 but I will unable to deliver my project to Xcode 9.1 users. I cannot imagine to wait the update of all the modules. So do you have an idea, please ?
Thanks you !
Yes, you have to upgrade every framework you are using to 9.1.
"As I said, it doesn't depend on the module because if I comment one import, it's the import of another one who have troubles"
That's because the next one has the exact same problem. Just replace all your frameworks in the "Embedded Binaries" with versions that have been compiled with 9.1. To prove it to yourself, do it on the first one it complains about, and Xcode will then tell you the second one is now the problem, etc.
I have one hybrid Cordova project, which is running fine Xcode 5.1.1, but when I am trying to Archive the project in Xcode 8.2.1 with ‘Generic iOS Device’ I am getting the error ‘Cordova/CDV.h’ is not found.
I read many articles about this problem, but none could solve my problem. Most answers are telling to follow the below steps:
"Add this line to your Build Settings -> Header Search Paths:
$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include
"
I have did this but problem not solved, getting another error ‘ld: library not found for -lcrt1.3.1.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)’
Also I have changed the bitcode YES to NO in target Build Settings, but no fruitful result.
Project cordova version 3.4.0 where installed cordova version in machine 6.4.0
Has anybody experience with this kind of problem?
Please, can anyone help? I've been working on this for days.
I got it work by following below steps
In your Xcode project settings select TARGETS
Within TARGETS select the Build Settings tab
In the sub-options under the Build Settings tab be sure to select All
Scroll down to the Search Paths section
Locate Header Search Paths
Add the following configuration to the Release option (as a new value on its own line): $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include
Clean the project: Command + Shift + K
Restart Xcode
I wanted to report that the response provided by Vinay worked for me. I had to make sure I was in the share extension target, and I added it to the path exactly as suggested above in the Release option, and did not even have to do a clean to get it to regenerate the PCH.
BUT, I was puzzled by this after looking at the setting further and I realized this path was already in the setting. I edited it again, and removed the redundant path, hit 'run' again, and it loaded onto my iPhone and ran fine.
So, I believe that just setting this in the search path forced a recompile on the share extension PCH and all is working again.
I hope this helps others.
I know its too late to answer on this question but still many developers facing the above issue and as per the latest Cordova & ionic version below steps will work in the above error.
As per new update in Cordova some time due to some permission issue or directly run or build iOS platform it's unable to add below file or folders in your iOS project platform :
CordovaLib
so somehow above folder will not add in your project and that's why it's not building your iOS project.
To overcome this issue you need to remove iOS platform from your ionic project and again add it.
Remove iOS platform: sudo ionic cordova platform remove ios
Add it again: sudo ionic cordova platform add ios
By doing this cordova download CordovaLib folder from server and add it into your iOS project and after that users can able to build their project without any error.
recently I faced this issue and I solved by doing the above steps.
Hope this helps others.
Happy coding!
Seems like the "Cordova" folder isn't getting copied into the project during cordova platform add ios
So, you'll have to copy the "Cordova" source folder into your project manually. But you'll have to download the ios source packages from github first, which is located at:
https://github.com/apache/cordova-ios
After downloading the "cordova-ios-master.zip" package and unzipping it, copy the folder named "CordovaLib" into your project next to the Xcode project file:
PROJECT_FOLDER/platforms/ios/PROJECT_NAME
PROJECT_FOLDER/platforms/ios/PROJECT_NAME.xcodeproj
PROJECT_FOLDER/platforms/ios/PROJECT_NAME.xcworkspace
PROJECT_FOLDER/platforms/ios/cordova
PROJECT_FOLDER/platforms/ios/CordovaLib <------- here
PROJECT_FOLDER/platforms/ios/ios.json
PROJECT_FOLDER/platforms/ios/platform_www
PROJECT_FOLDER/platforms/ios/pods-debug.xcconfig
PROJECT_FOLDER/platforms/ios/pods-release.xcconfig
PROJECT_FOLDER/platforms/ios/www