We are creating a framework to distribute to other application, our framework contains multiple third party library with pods. We are able to successfully generate the framework.
But we are getting error when that framework is used and generating Ad hoc build.
Below is the pod file for the framework project
pod 'Alamofire', '> 4.9.0'
pod 'RealmSwift', '> 3.19.0'
pod 'ObjectMapper', '> 3.5.1'
pod 'ObjectMapper+Realm', '> 0.6'
pod 'ZIPFoundation', '> 0.9.9' #(0.9.9)
pod 'NMSSH', '> 2.3.1'
post_install do |installer|
installer.pods_project.targets.each do |target|
if ['ObjectMapper','ObjectMapper+Realm','Alamofire'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
target.build_configurations.each do |config|
# set valid architecture
# config.build_settings['VALID_ARCHS'] = 'arm64 armv7 armv7s i386 x86_64'
# build active architecture only (Debug build all) # config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0' config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" config.build_settings['ENABLE_BITCODE'] = 'YES'
if config.name == 'Release' || config.name == 'Pro' config.build_settings['BITCODE_GENERATION_MODE'] = 'bitcode'
else # Debug
config.build_settings['BITCODE_GENERATION_MODE'] = 'marker'
end
cflags = config.build_settings['OTHER_CFLAGS'] || ['$(inherited)']
if config.name == 'Release' || config.name == 'Pro'
cflags << '-fembed-bitcode'
else # Debug
cflags << '-fembed-bitcode-marker'
end
config.build_settings['OTHER_CFLAGS'] = cflags
end
end
end