Wednesday, October 17, 2018

Make the framework bitcodable


  • In the project build settings:
    ENABLE_BITCODE = YES
    BITCODE_GENERATION_MODE = bitcode
  • In the Podfile
  • ...
    use_frameworks!

    target 'ProjectName' do

        pod 'PodName'

        target 'ProjectName Tests' do
            inherit! :search_paths
            pod 'PodName'
        end
        
        post_install do |installer|
            installer.pods_project.targets.each do |target|
                target.build_configurations.each do |config|
                    config.build_settings['ENABLE_BITCODE'] = 'YES'
                    config.build_settings['BITCODE_GENERATION_MODE'] = 'bitcode'
                end
            end
        end

    end