evgenyneu / keychain-swift

Helper functions for saving text in Keychain securely for iOS, OS X, tvOS and watchOS.
MIT License
2.82k stars 345 forks source link

Bitcode enabled? #137

Closed javen123 closed 3 years ago

javen123 commented 3 years ago

I'm including the pod in a custom framework with Xcode 11.7 and trying to build for release and I'm getting KeychainSwift' was built without full bitcode.

My podfile:

target 'MyProject' do

use_frameworks!
enable_bitcode_for_prebuilt_frameworks!
workspace 'MyProject.xcworkspace'
project 'MyProject.xcodeproj'

pod 'KeychainSwift','~> 19.0.0',:binary => true

end

I've also placed the flags prior to the target with the same result. Please advise.

evgenyneu commented 3 years ago

No idea sorry. What's the exact error message so I can DuckDuckGo it?

javen123 commented 3 years ago

Fortunately I've found the solution. In the podfile you need to add

installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
        config.build_settings['BITCODE_GENERATION_MODE'] = 'bitcode'
        config.build_settings['ENABLE_BITCODE'] = 'YES'
    end
end

(https://stackoverflow.com/questions/54082111/compiled-framework-provides-bitcode-error-when-archiving)

evgenyneu commented 3 years ago

Awesome, thanks for sharing the solution here.