Xcode 增加模拟器编译
Build Setting
搜索 arch
添加 arm64 x86_64
,Excluded Architectures
中的 ios模拟器 添加 arm64
如果是Cocoapods
工程,Pods
项目也一样处理, 可以在podfile
文件添加如下代码,pod install
时自动帮我们添加
inhibit_all_warnings!
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
编译报错如下
fatal error: module map file '/Users/xx/Library/Developer/Xcode/DerivedData/appName-dlfsufpvhbudwheonmniwqwatgky/Build/Products/Debug-iphonesimulator/FirebaseCoreInternal/FirebaseCoreInternal.modulemap'
not found
则需要把含有-fmodule-map-file
的编译设置全部删除(包含Pods
项目),再pod install
执行下,再次编译就成功了
-fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.modulemap"
-fmodule-map-file="${PODS_ROOT}/Headers/Public/FBLPromises/PromisesObjC.modulemap"
-fmodule-map-file="${PODS_ROOT}/Headers/Public/GoogleUtilities/GoogleUtilities.modulemap"
-fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
-Xcc
-fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.modulemap"
-Xcc
-fmodule-map-file="${PODS_ROOT}/Headers/Public/FBLPromises/PromisesObjC.modulemap"
-Xcc
-fmodule-map-file="${PODS_ROOT}/Headers/Public/GoogleUtilities/GoogleUtilities.modulemap"
-Xcc
-fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"