Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linker errors for iOS 9 and above after disabling bitcode

I have integrated openssl library using cocoa pods in my project. It is working fine in xcode 7.1, simulator 7.0 and above. But when I am trying to install in physical iOS device, getting the below mentioned issue:

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)

After setting up the enable bitocde to NO, I can able to run the project in iOS 7/8 device.

But while I am trying to run my application in iOS 9 or later version device, I am getting multiple errors from the dependency I have added to my project.

enter image description here

Thanks in advance for any suggestion.

like image 955
sumit kumar Avatar asked Nov 21 '16 10:11

sumit kumar


2 Answers

Finally get something fixed on my error

When a application uses openssl library. Developer need to set the enable bitcode mode as multiple values for both target and project .

1.While Debugging the application

While debugging the enable bitcode for Debug should be NO and Release should be YES .

2.While Releasing the application

In this case the Enable bitcode for debug should be YES and Release mode should be NO.

I followed these above steps so that i could able to debug the application and pushed to Appstore successfully with out getting any error.

Hope this answer will help others.

like image 116
sumit kumar Avatar answered Sep 18 '22 10:09

sumit kumar


You have to either check copy files if needed when you drag it or else you have to add the path into your library search path in build setting if you want manually adding the lib, for the pod one, my best guess is that you missing some dependency library like c, c++, z (maybe it run in c++) in your project or the lib's podspec doesnt included, so best is try to manually adding it

like image 25
Tj3n Avatar answered Sep 18 '22 10:09

Tj3n