首页 > 解决方案 > 为什么带有firebase的nativescript运行失败?

问题描述

我尝试在真实设备上运行我的 nativescript firebase。但我收到以下错误。

Webpack compilation complete. Watching for file changes.
Webpack build done!
nativescript-plugin-firebase: building for same environment, not forcing prepare.
Updating runtime package.json with configuration values...
Project successfully prepared (ios)
Building project...
Xcode build...
/Users/michael/Library/Developer/Xcode/DerivedData/Notifier-evgqptqlgvcdmdeqgihzagdiotph/Build/Intermediates.noindex/ArchiveIntermediates/Notifier/InstallationBuildProductsLocation/Applications/Notifier.app/Frameworks/TKLiveSync.framework: errSecInternalComponent
Command CodeSign failed with a nonzero exit code
/Users/michael/Library/Developer/Xcode/DerivedData/Notifier-evgqptqlgvcdmdeqgihzagdiotph/Build/Intermediates.noindex/ArchiveIntermediates/Notifier/InstallationBuildProductsLocation/Applications/Notifier.app/Frameworks/NativeScript.framework: errSecInternalComponent
Command CodeSign failed with a nonzero exit code
/Users/michael/Library/Developer/Xcode/DerivedData/Notifier-evgqptqlgvcdmdeqgihzagdiotph/Build/Intermediates.noindex/ArchiveIntermediates/Notifier/InstallationBuildProductsLocation/Applications/Notifier.app/Frameworks/TNSWidgets.framework: replacing existing signature
/Users/michael/Library/Developer/Xcode/DerivedData/Notifier-evgqptqlgvcdmdeqgihzagdiotph/Build/Intermediates.noindex/ArchiveIntermediates/Notifier/InstallationBuildProductsLocation/Applications/Notifier.app/Frameworks/TNSWidgets.framework: errSecInternalComponent
Command CodeSign failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description

如果我使用 XCode 打开platforms/iOS/Notifier.xcworkspace 文件并单击播放,则应用程序启动并且推送通知有效。只有当我执行命令 'tns run ios' 我得到错误

吊舱版本:1.10.1

XCode 版本:12.2

tns 版本:7.1.2

有没有人有同样的问题?

标签: iosfirebasenativescript

解决方案


对于遇到这种情况的任何人,答案是 Apple 的安全性和钥匙串。最有可能的是,您通过 SSH 登录,它不会解锁钥匙串(或提供弹出窗口)。

在构建之前运行它:security unlock-keychain login.keychain

-p [Password]如果需要,您可以使用它来自动登录。


推荐阅读