Home > Back-end >  Error running flutter test iOS app without xCode
Error running flutter test iOS app without xCode

Time:04-22

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

CodePudding user response:

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:

  1. Unplug the USB cable closes the app
  2. Unplug the USB cable the app remains open

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.

CodePudding user response:

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.

  • Related