ARM64 architecture support to build on ARM based Mac¶
Since iOS SDK build 2.6.105, all iOS SDK frameworks support both iOS Simulator architecture slices: x86_64 to build on Intel Mac and arm64 to build on Mac M1 and other ARM based Mac.
Therefore, an architectures supported for building on a certain platform should be set in Podfile
to use iOS SDK frameworks:
platform :ios, '9.1'
use_frameworks!
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
config.build_settings["VALID_ARCHS[sdk=iphonesimulator*]"] = "arm64 x86_64"
config.build_settings["VALID_ARCHS[sdk=iphoneos*]"] = "arm64"
config.build_settings["VALID_ARCHS[sdk=ipados*]"] = "arm64"
config.build_settings["ARCHS"] = "arm64 x86_64"
end
end
end
target 'MyObjCApplication' do
pod 'FPWCSApi2'
pod 'FPWebRTC'
end
target 'MySwiftApplication' do
pod 'FPWCSApi2Swift'
pod 'FPWebRTC'
end