Bit-code enabled error during compilation in xcode - ios

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.

Related

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.

Bitcode errors on Release build configuration but not Archive

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?

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

Google maps SDK is not working

I am trying to use google maps SDK in my project. I just used my existing framework (drag and drop). But when I am running project, I got this error:
ld: /Work/myProject/GoogleMaps.framework/GoogleMaps(GTMStringEncoding.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 arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have checked bit code in build settings and it was in YES. I can't find solution for this.

Parse Library missing bitcode?

I'm am building to an iphone running iOS9 on xcode 7.1.1 The project uses the parse framework and I get this linker error
ld: '/Users/alexanderbollbach/Desktop/motorvate-ios2-master/Pods/ParseFacebookUtils/libParseFacebookUtilsLib.a(PFFacebookAuthenticationProvider.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'm aware of the new bitcode requirements and the app-thining paradigm but am unfamiliar with how to implement it. Is this something on parses end or can I resolve it myself?
Are you using pod to integrate parse ? if yes than it should be resolved ...
delete your derived data and make clean-rebuild again
see here the discussion
https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/254

Resources