似乎在将Xcode 12更新为Beta 5之后,使用Firebase/Analytics Pane 时,SwiftUI预览不再起作用。预览因错误而失败:

linker command failed with exit code 1 (use -v to see invocation)

----------------------------------------

SchemeBuildError: Failed to build the scheme "Boo"

linker command failed with exit code 1 (use -v to see invocation)


Link Boo (arm64):
ld: in /Users/../Boo/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(FIRAnalyticsConnector_e321ed8e3db06efc9803f6c008e67a34.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/.../Boo/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
有什么建议如何解决这个问题?

最佳答案

以下解决方法(在Apple Developer论坛上归功于用户)对我有效:
对于具有Firebase Analytics的任何目标,将“arm64”添加到调试方案的排除架构中。
显然,如果您需要调试到实际的iOS设备,这将给您带来问题。但是,当您需要在设备上进行测试时,可以将其删除。

关于ios - 使用Firebase/Analytics Pane 时,SwiftUI预览无法正常工作,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/63503160/

10-09 07:58