Search code examples
iosxcodeflutterflutter-ios

Error running flutter test iOS app without xCode


I am able to run a flutter app from xCode, however when I try to run the app on its own without xcode from the homescreen, I get the following errors, any ideas would be appreciated. Thank you

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

Solution

  • See https://docs.flutter.dev/development/ios-14#launching-debug-flutter-without-a-host-computer

    Launching debug Flutter without a host computer

    Also due to changes in debugger mechanisms, once a Flutter debug application is installed on the device (either by using flutter run a Flutter-enabled IDE, or from Xcode), the application can no longer be re-launched by tapping the application’s icon in the home screen in iOS 14 on physical devices.