【发布时间】:2020-06-04 02:19:53
【问题描述】:
我的 Xcode 命令行工具和 MacOS 升级后,我的项目无法使用 Xcode 构建。
运行npx react-native run-ios工作正常,可以唤醒模拟器调试。
在 Xcode 上构建时,我收到此错误:
Undefined symbols for architecture x86_64:
"___isOSVersionAtLeast", referenced from:
-[GDTCORApplication init] in libGoogleDataTransport.a(GDTCORPlatform.o)
___28-[GDTCORStorage storeEvent:]_block_invoke.22 in libGoogleDataTransport.a(GDTCORStorage.o)
-[GDTCORStorage appWillForeground:] in libGoogleDataTransport.a(GDTCORStorage.o)
___35-[GDTCORStorage appWillBackground:]_block_invoke in libGoogleDataTransport.a(GDTCORStorage.o)
-[GDTCORStorage appWillTerminate:] in libGoogleDataTransport.a(GDTCORStorage.o)
+[GULSecureCoding unarchivedObjectOfClasses:fromData:error:] in libGoogleUtilities.a(GULSecureCoding.o)
+[GULSecureCoding archivedDataWithRootObject:error:] in libGoogleUtilities.a(GULSecureCoding.o)
...
ld: symbol(s) not found for architecture x86_64
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
【问题讨论】:
-
太棒了,现在部分解决了我的问题,现在当我使用
npm run ios时,它只适用于工具链 Swift 5.2.1(一些依赖项是使用 carthage 构建的);反之亦然,Xcode 只能使用最新的工具链构建。
标签: ios xcode react-native cocoapods command-line-tool