遇到问题
Xcode:Building for 'iOS-simulator', but linking in
解决
iOS开发-Xcode跑模拟器报:Building for 'iOS-simulator', but linking in object file (/Users/XXXX/Desktop/XXXX/Po...
打开 TARGET → 项目→ Build Settings 找到Excluded Architectures配置(Debug、Release)Any iOS Simulator SDK ——> arm64
如果使用cocoapod也需要在cocoapod的Pods工程里面同样的位置加一条。
在podfile的 end后面加一段这个,pod install 一下
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
end
end