在远程计算机上执行`flutter Run'使XcodeBuild失败

发布于 2025-02-04 23:55:39 字数 822 浏览 1 评论 0原文

我通过SSH连接到Mac,并将iPhone物理连接到它。 现在,我想在该Mac上运行flutter Run在iPhone上测试我的应用程序。

在Mac上以图形方式登录时,flutter Run执行没有问题。

但是在SSH上,Flutter RunXcodebuild阶段中失败。它会产生通用错误消息

Xcode build的错误输出:
2022-06-07 08:39:37.623 xcodebuild [6002:21187] xtype:com.apple.fonts无法访问。
2022-06-07 08:39:37.623 XcodeBuild [6002:21187] XTYPE:XTFontstaticRegistry。 **构建失败**

Xcode的输出:
非零退出代码

失败命令pasasecriptexecution

我能够通过flutter run -verbose来收集以下错误消息

target debug_ios_bundle_flutter_assets失败:异常:失败codeSign
< project_folder>/build/ios/debug-iphoneos/app.framework/app:errsecinternalcomponent

发生了什么事?

为什么登录SSH时构建失败?

I am connected to a mac via ssh and physically connected an iPhone to it.
Now I wanted to run flutter run on that mac to test my app on the iPhone.

When logging in graphically on the mac, flutter run executes without a problem.

But over ssh, flutter run fails in the xcodebuild stage. It produces a generic error message

Error output from Xcode build:
2022-06-07 08:39:37.623 xcodebuild[6002:21187] XType: com.apple.fonts is not accessible.
2022-06-07 08:39:37.623 xcodebuild[6002:21187] XType: XTFontStaticRegistry is enabled.
** BUILD FAILED **

Xcode's output:
Command PhaseScriptExecution failed with a nonzero exit code

I was able to gather the following error message via flutter run --verbose

Target debug_ios_bundle_flutter_assets failed: Exception: Failed to codesign

<project_folder>/build/ios/Debug-iphoneos/App.framework/App: errSecInternalComponent

What is going on?

Why does the build fail when logged in over ssh?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

带上头具痛哭 2025-02-11 23:55:39

事实证明,xcodebuild需要访问已存储在登录键链中的项目。
当以MAC登录以图形方式登录时,键链已自动解锁。但是,当仅登录SSH时,钥匙扣仍然锁定。

键链以后可以通过以下命令解锁

security unlock-keychain login.keychain  

flutter Run成功

As it turns out, xcodebuild required access to an item that has been stored in the login keychain.
When graphically logging in on the mac, the keychain has been automatically unlocked. But when only logged in over ssh, the keychain remains locked.

The keychain can be unlocked via the following command

security unlock-keychain login.keychain  

Afterwards, flutter run succeeds

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文