in APP_PATH/ios/App/Pods/GoogleSignIn/Frameworks/GoogleSignIn.
framework/GoogleSignIn(GIDEMMErrorHandler_3a47e13d8ca81b41e9cdb7ef5468004a.o),
building for iOS Simulator,but linking in object file built for iOS, file
'APP_PATH/ios/App/Pods/GoogleSignIn/Frameworks/GoogleSignIn.framework/GoogleSignIn'
for architecture arm64
解决办法:
1.打开应用程序,右键单击 xcode,单击“获取信息”并选中“在 Rosetta 中打开”
2.在 iOS 的工程目录下,打开工程,找到 podfile 文件并编辑,加入
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
# Add these lines for Xcode 14 builds
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["DEVELOPMENT_TEAM"] = "6YKFG4HV8F"
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
end
添加此代码后安装 pod,执行
pod install
3.在工程的设置中并在“构建设置”中添加arm64并找到排除的架构
结束