试图在 Xcode 12 (beta 5) 中构建一个大型(并在 Xcode 11 上工作!)项目以准备 iOS 14。代码库以前是 Obj-C,但现在包含 Obj-C 和 Swift,并使用了Obj-C 和/或 Swift 也是如此。
我已经使用 Xcode 12 支持(目前是 1.10.0.beta 2)拉取了 Cocoapods 的新测试版。
Pod 安装成功。当我进行构建时,我在 pod 框架上收到以下错误:
为 iOS 模拟器构建,但链接为 iOS 构建的目标文件,用于架构 arm64
当我lipo -info在框架上运行时,它有:armv7s armv7 i386 x86_64 arm64。
以前,该项目的有效架构设置为:armv7、armv7s 和 arm64。
根据 Apple 的文档,在 Xcode 12 中,该设置将消失。Architectures 设置为 $(ARCHS_STANDARD)。我在排除的架构中没有设置任何内容。
任何人都知道这里可能发生什么?我还没有能够用一个更简单的项目来重现这个。
我们的项目是一个Objective-c项目。
由于我们正在使用,react-native-firebase我们不能再 use_frameworks!在 cocoapods 中使用。
问题是我们有一个swift pod 依赖项(PromiseKit),要使用 swift 依赖项use_frameworks!,据我所知,我们必须使用。
我想要做的是两全其美,也就是:
use_frameworks!以便react-native-firebase工作和PromiseKit快速依赖。当前 Podfile:
platform :ios, '10.0'
target 'TestApp' do
use_frameworks!
# swift pod
pod 'PromiseKit'
# react-native-firebase
pod 'Firebase/Core', '~> 5.3.0'
pod 'Firebase/DynamicLinks', '~> 5.3.0'
pod 'Firebase/Messaging', '~> 5.3.0'
end
Run Code Online (Sandbox Code Playgroud)
我注意到自Cocoapods 1.5以来,有此命令:modular_headers => true或use_modular_headers我感觉可能与我正在寻找的解决方案相关或不相关,但我似乎无法将这些点联系起来。
如果我删除use_frameworks!(即使我用 替换它use_modular_headers!),我会收到此错误:
我尝试在模拟器中运行该项目,遇到了一些问题并解决了,最终出现以下错误,尝试了很多方法,但无法解决。我该如何解决这个问题,请给我一些想法,我是ios开发的新手。
CPU:M1专业版
系统:macOS12.3
Xcode: 13.4
原生反应:0.62.2
以下是错误信息:
Showing Recent Errors Only
Build target tolernPowerBankApp of project demo with configuration Debug
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_OIDURLQueryComponent", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OBJC_CLASS_$_GTMSessionFetcher", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OBJC_CLASS_$_OIDAuthorizationRequest", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OIDResponseTypeCode", referenced from:
-[GIDSignIn authenticateInteractivelyWithOptions:] in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OBJC_CLASS_$_OIDAuthState", referenced from:
objc-class-ref in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OBJC_CLASS_$_OIDAuthorizationService", referenced from:
objc-class-ref in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o)
"_OIDOAuthErrorResponseErrorKey", referenced from:
+[GIDAuthentication handleTokenFetchEMMError:completion:] in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o)
"_OBJC_CLASS_$_SKDescriptorMapper", referenced from:
objc-class-ref in …Run Code Online (Sandbox Code Playgroud) ios ×2
xcode ×2
apple-m1 ×1
cocoapods ×1
react-native ×1
swift ×1
xcode12 ×1
xcode12beta5 ×1
xcode12beta6 ×1