have been struggling for few days... Basically I have build a compiled released framework and distribute it with cocoaPods. The problem is that then archiving this framework
Add the following code at the end of the podfile
def enable_bitcode_in(config)
cflags = config.build_settings['OTHER_CFLAGS'] || ['$(inherited)']
if config.name == 'Release'
cflags << '-fembed-bitcode'
config.build_settings['BITCODE_GENERATION_MODE'] = 'bitcode'
else # 'Debug'
cflags << '-fembed-bitcode-marker'
config.build_settings['BITCODE_GENERATION_MODE'] = 'marker'
end
config.build_settings['OTHER_CFLAGS'] = cflags
end
def enable_bitcode_for(targets)
targets.each do |target|
target.build_configurations.each do |config|
enable_bitcode_in(config)
end
end
end
post_install do |installer|
enable_bitcode_for(installer.pods_project.targets)
end
If you're using pods, try adding this to the Podfile (it resolved the same issue for me):
post_install do |installer|
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
end