custom framework build failing with no full bitcode error
Hi Everyone, I am very new to iOS so this might be a stupid question, but please help me out. I am using the BlueCryptor for doing some encryptions in my custom framework. I added the BlueCryptor to the framework through SwiftPackages->AddNewPackage. All the functionality is working fine.
I am using my framework in an app which needs bitcode to be enabled. So I added this user-defined build setting in my fraework: BITCODE_GENERATION_MODE(https://medium.com/@heitorburger/static-libraries-frameworks-and-bitcode-6d8f784478a9)
Now the build is failing with :
ld: bitcode bundle could not be generated because '/Users/ds/Library/Developer/Xcode/DerivedData/customFramework-excnpjvylyjcgnahfenjtaqmjjmf/Build/Products/Release-iphoneos/Cryptor.o' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build file '/Users/ds/Library/Developer/Xcode/DerivedData/customFramework-excnpjvylyjcgnahfenjtaqmjjmf/Build/Products/Release-iphoneos/Cryptor.o' for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
The only way I can think of to use this this way is to use the Xcode project that's included in the release and then add it to your framework by dragging the project file into your project. Once you've added it to your framework, you can edit the BlueCryptor project settings to enable bitcode generation. The sequence of steps would be as follows:
- Clone the BlueCryptor project from Github.
- Open the BlueCryptor project file using Xcode.
- Modify the build settings for the Cryptor-iOS build to enable bitcode generation.
- Save the changes and then build and test the project to ensure all is well.
- Close the project.
- Open your framework project in Xcode.
- Drag the BlueCryptor project file into your framework.
At this point, you should be able to build your framework. Let me know if you have any questions.