在远程计算机上执行`flutter Run'使XcodeBuild失败
我通过SSH连接到Mac,并将iPhone物理连接到它。 现在,我想在该Mac上运行flutter Run
在iPhone上测试我的应用程序。
在Mac上以图形方式登录时,flutter Run
执行没有问题。
但是在SSH上,Flutter Run
在Xcodebuild
阶段中失败。它会产生通用错误消息
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,
xcodebuild
需要访问已存储在登录键链中的项目。当以MAC登录以图形方式登录时,键链已自动解锁。但是,当仅登录SSH时,钥匙扣仍然锁定。
键链以后可以通过以下命令解锁
,
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
Afterwards,
flutter run
succeeds