Bitcode errors on Release build configuration but not Archive - ios

I have quite a complicated project structure consisting of many frameworks and dependencies.
I have a framework target which contains all the classes I include in my WatchKit extensions. This requires the framework be built with Bitcode support (which it is).
I have no trouble archiving my app from Xcode's Product menu, but when I try to build manually using the Release configuration, I run into this linker error.
ld: bitcode bundle could not be generated because '/Users/ricky/Library/Developer/Xcode/DerivedData/Coventry-ammghqykwgwisogpgstgfdmkzqjh/Build/Products/Release-watchos/Silverlake-Watch.framework/Silverlake-Watch' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build for architecture armv7k
clang: error: linker command failed with exit code 1 (use -v to see invocation)
There are then several other errors that stem from this framework not properly linking. Does anyone have any idea what would be causing different build behaviour between the Xcode Archive process and my manual Release build?

Related

Bit-code enabled error during compilation in xcode

I have created static iotivity framework(release) with bit code enabled in xcode-build settings for multiple .a files (each .a file will support for all architecture like armv7,arv7s, arm64, i386, x86_64) and header files by using scripts(https://www.raywenderlich.com/65964/create-a-framework-for-ios). When I try to integrate generated iotivity framework in sample project with bit code enabled, I am getting following error when building in device. Please let me know how to fix this.
iotivity.framework/iotivity(OCPlatform.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have generated FAT file which will support all architecture as said above. Is there any way to create FAT file with bit code enabled using terminal.

Unable to Archive iOS Project in XCode 9.2

I am trying to archive a project in Xcode (9.2) and I Get the below error.
ld: bitcode bundle could not be generated because '/Users/myUser/Documents/iOSApps/Test/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/Internal/libAWSCognitoIdentityProviderASF.a(AWSCognitoIdentityASF.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Based on other StackOverflow answers, I have set Enable BitCode -> No within my App Build Settings
Below is the image of the BitCode settings in the App. However, I still get the above error. Could some one please help me resolve this issue ?

Bitrise, Xcode9 (beta6): bitcode bundle could not be generated

One of the frameworks I use fails to get built with Bitrise with Xcode9beta stack. I must point out that this is Bitrise-specific issue. Or either, Bitrise/Eureka issue. Eureka is a particular instance of third-party framework.
Project is built well on the local machine, no bitcode-related issues whatsoever. But whenever I run CI, I get that typical log:
❌ ld: bitcode bundle could not be generated because '.../Frameworks/Eureka.framework/Eureka' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '.../Frameworks/Eureka.framework/Eureka' for architecture armv7
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
I followed these guidelines:
iOS library to BitCode
Flag is set.
I have also tried similar settings for head project/target, to no avail.
Any suggestions?
Seems to be a dependency (version) issue:
... was built without full bitcode. All frameworks and dylibs for bitcode must be generated ...
Might be enough to just upgrade the eureka dependency.
Another thing is that Xcode 9 (GM) is also available now, that alone might help.
Edit: a third option; you might have to disable Bitcode in the Xcode / xcodebuild command, as the default changed in Xcode 9 for some configs. See e.g. https://discuss.bitrise.io/t/xcode-archive-significantly-slower-on-xcode-9-0-x-stack-compared-to-xcode-8-3-x-stack/2708/2?u=viktorbenei
Without more log / info unfortunately it's quite hard to say with certainty.
If neither would help, you can also create an issue report at https://discuss.bitrise.io/c/issues/build-issues and the bitrise team will look into it ;)

Linker Command failed while Archieving

I'm using a third-party framework which helps me to connect a device(Frameworks device). I'm getting
MySignalsConnectKit' was built without full bitcode. All frameworks
and dylibs for bitcode must be generated from Xcode Archive or Install
build for architecture armv7 clang: error: linker command failed with
exit code 1 (use -v to see invocation)
error while trying to achieving. I can successfully build. I searched it but still can't solve the problem. Thank you!
Problem is probably because your third-party framework wasn't built with bitcode. If your application is archived with "Enable bitcode: YES" than all your frameworks must be built with bitcode also. Try to change it to NO, it may help. But then your archive will not contain bitcode. Better would be to get MySignalsConnectKit built with bitcode and use that build instead of one without bitcode.

Xcode 7 Fails to Archive

I am using Xcode 7.3.1.
My project runs perfectly on both iOS Simulator as well as my own iPhone. However, when archiving my project, I get the warnings and errors:
ld: warning: ignoring file /Users/parthsaxena/Desktop/Vantage/Vantage/Vantage/TextFieldEffects/TextFieldEffects.framework/TextFieldEffects, file was built for arm64 which is not the architecture being linked (armv7): /Users/parthsaxena/Desktop/Vantage/Vantage/Vantage/TextFieldEffects/TextFieldEffects.framework/TextFieldEffects
ld: bitcode bundle could not be generated because '/Users/parthsaxena/Desktop/Vantage/Vantage/Pods/FirebaseAppIndexing/Frameworks/FirebaseAppIndexing.framework/FirebaseAppIndexing(FIRAppIndexing.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
You may have noticed that I am using both the Firebase and TextFieldEffects frameworks in my project.
Is there any solution to this problem?
Your library was compiled without bitcode, but the bitcode option is enabled in your project settings. Say NO to Enable Bitcode in your target Build Settings and the Library Build Settings to remove the warnings.
For those wondering if enabling bitcode is required:
Note: For iOS apps, bitcode is the default, but optional. If you provide bitcode, all apps and frameworks in the app bundle need to include bitcode. For watchOS apps, bitcode is required.
https://developer.apple.com/library/prerelease/watchos/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html
Firebase doesn't support bitcode at the moment (the situation should change in a short time). You should set Build Settings -> Enable Bitcode to NO.
I was getting this error because i didn't have enough free space on my mac

Resources