错误运行Flutter测试iOS应用没有XCode
我能够从Xcode运行一个Flutter应用程序,但是当我尝试在没有Xcode的情况下自行运行该应用程序时,我会收到以下错误,任何想法都将不胜感激。谢谢
Error loading metadata for com.xyz.test: Error Domain=ASDErrorDomain
Code=513 "Loading failed for '/private/var/containers/Bundle/Application/1EAB1C0A-F552-4093-BC0A-AF5959366360'"
UserInfo={NSDebugDescription=Loading failed for '/private/var/containers/Bundle/Application/1EAB1C0A-F552-4093-BC0A-AF5959366360',
NSUnderlyingError=0x104c48080 {Error Domain=MIInstallerErrorDomain Code=78
"Failed to read iTunesMetadata.plist from /private/var/containers/Bundle/Application/1EAB1C0A-F552-4093-BC0A-AF5959366360/iTunesMetadata.plist"
UserInfo={NSLocalizedDescription=Failed to read iTunesMetadata.plist from /private/var/containers/Bundle/Application/1EAB1C0A-F552-4093-BC0A-AF5959366360/iTunesMetadata.plist,
LegacyErrorString=InvalidiTunesMetadataPlist, FunctionName=+[MIStoreMetadata metadataFromPlistAtURL:error:], SourceFileLine=650, NSUnderlyingError=0x104cb8cb0
{Error Domain=NSCocoaErrorDomain Code=260 "The file “iTunesMetadata.plist” couldn’t be opened because there is no such file." UserInfo={NSFil
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
与iOS中的Android不同,您无法在调试模式下真正安装该应用程序。当您使用IDE在调试模式下启动
flutter Run
时,您将能够与应用程序进行交互,但是关闭应用程序或拔下设备后,它将不会再次运行。在这些情况下,我已经观察到不同的行为:
这些行为取决于iOS版本。
关闭您的应用程序后,它就无法在不从IDE跑步的情况下从HomeScreen打开它。
这是苹果确保设备安全的方法。
Unlike Android in iOS, you cannot truly install the app in debug mode. When you initiate the
flutter run
in debug mode using IDE, you will be able to interact with your app but once you close the app or unplug your device it will not run again.I have observed different behaviours in these cases:
These behaviour depends on iOS version.
Once your app is closed, it can't be opened again from the Homescreen like Android without running from IDE.
This is Apple's approach to keeping the device secure.
参见
See https://docs.flutter.dev/development/ios-14#launching-debug-flutter-without-a-host-computer