我在M1模拟器上运行项目时遇到了问题(实际设备没有问题)。安装了GoogleSignIn pod后,该项目在模拟器上编译时出现以下错误 - https://tppr.me/JpMll
building for iOS Simulator, but linking in object file built for iOS, file '/......../GoogleSignIn.framework/GoogleSignIn' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
尝试了所有可能的解决方案(感觉它们都在 Xcode 版本 12 及以下),强制在 arm64 设置中指定也没有帮助:其他 Pod 无法运行(FirebaseAuth、Firebase/Analytics、Firebase/Firestore、Firebase/Storage)。
有一种感觉,需要强制启动仅针对“问题”Pod 的 arm64 引擎(在我的情况下,是 GoogleSignIn)。那么问题是,如何实现这一点,是否可能?
Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'iChat' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for iChat
pod 'Firebase/Analytics'
pod 'GoogleSignIn'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Storage'
pod 'SDWebImage'
end
Pod版本:
Installing AppAuth (1.4.0)
Installing BoringSSL-GRPC (0.0.7)
Installing Firebase (7.11.0)
Installing FirebaseAnalytics (7.11.0)
Installing FirebaseAuth (7.11.0)
Installing FirebaseCore (7.11.0)
Installing FirebaseCoreDiagnostics (7.11.0)
Installing FirebaseFirestore (7.11.0)
Installing FirebaseInstallations (7.11.0)
Installing FirebaseStorage (7.11.0)
Installing GTMAppAuth (1.2.1)
Installing GTMSessionFetcher (1.5.0)
Installing GoogleAppMeasurement (7.11.0)
Installing GoogleDataTransport (8.4.0)
Installing GoogleSignIn (5.0.2)
Installing GoogleUtilities (7.3.1)
Installing PromisesObjC (1.2.12)
Installing SDWebImage (5.11.1)
Installing abseil (0.20200225.0)
Installing gRPC-C++ (1.28.2)
Installing gRPC-Core (1.28.2)
Installing leveldb-library (1.22.1)
Installing nanopb (2.30908.0)