Linker Errors for iOS 9 and Above After Disabling Bit Code

I have included the openssl library using cocoa pods in my project. It works fine in xcode 7.1, simulator 7.0 and above. But when I try to install on a physical iOS device, you will get the following problem:

You must rebuild it with the bit code turned on (Xcode setting ENABLE_BITCODE), get the updated library from the provider, or disable the bit code for this purpose. for arm64 architecture clang: error: linker command with exit code 1 (use -v to invoke the call)

After setting bitocde resolution to NO, I can run the project on the iOS 7/8 device.

But while I try to run my application on a device of iOS version 9 or later, I get a few errors from the dependency that I added to my project.

enter image description here

Thanks in advance for any suggestion.

+5
source share
2 answers

Finally back to my mistake

When the application uses the openssl library. The developer needs to set the enable bit mode as several values ​​for the target and the project.

1. Debugging the application

While debugging the enable bit code for Debug should be NO , and Release should be YES .

2. App release

In this case, the Enable bit for debugging should be YES , and the Release mode should be NO .

I followed these steps so that I can debug the application and successfully navigate to the Appstore with an error.

Hope this answer helps others.

+3
source

You need to either check copy files if needed when you drag it, or add the path to your library search path parameter in the assembly, if you want to manually add lib, for one of them. It’s best to assume that you are missing some dependency library, such as c, C ++, z (maybe it runs in C ++) in your project or lib podspec is not included, so it’s best to try to manually add it

+2
source

Source: https://habr.com/ru/post/1260071/


All Articles