gpt4 book ai didi

ios - Firebase 和 SwiftUI 实时预览的问题

转载 作者:行者123 更新时间:2023-12-01 15:30:31 24 4
gpt4 key购买 nike

由于我将 Firebase 添加到我的项目中,实时预览不再起作用。常规构建确实有效,只是没有实时预览。

我尝试关注所有这些 answer没有运气的解决方案和评论(尽管与 SwiftUI 无关,该问题也有相同的错误)。

诊断:

链接器命令失败,退出代码为 1(使用 -v 查看调用)

LinkDylibError:无法构建 UserViews.swift

链接失败:链接器命令失败,退出代码为 1(使用 -v 查看调用)

ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/SharedFrameworks-iphonesimulator'
Undefined symbols for architecture x86_64:
"___llvm_profile_runtime", referenced from:
___llvm_profile_runtime_user in FirebaseCore(FIRAppAssociationRegistration.o)
___llvm_profile_runtime_user in FirebaseCore(FIRComponentType.o)
___llvm_profile_runtime_user in FirebaseCore(FIRConfiguration.o)
___llvm_profile_runtime_user in FirebaseCore(FIRCoreDiagnosticsConnector.o)
___llvm_profile_runtime_user in FirebaseCore(FIRDiagnosticsData.o)
___llvm_profile_runtime_user in FirebaseCore(FirebaseCore-dummy.o)
___llvm_profile_runtime_user in FirebaseCore(FIROptions.o)
...
(maybe you meant: ___llvm_profile_runtime_user)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

试试 禁用方案的代码覆盖 .

这对我有用。

On Xcode 11.3 I've been able to get SwiftUI Previews building by simply disabling Code Coverage gathering for my scheme. The above solutions weren't working as I was still getting "failedToBuildDylib" errors for Firebase. In fact, the above fixes don't seem to be necessary at all, at least on my case. Hope this helps someone.



致: https://twitter.com/dannypier/status/1190312160557068293

关于ios - Firebase 和 SwiftUI 实时预览的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60440074/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com