I'm creating a flutter plugin and I just tried the example project that gets created by flutter it self. This example project is an app that shows the operation system and its version. If I start it from Xcode on my iPhone SE, it works fine. But if I close the app and open it without Xcode, that means that I tipp on the app icon to launche it, like every normal app, it doesn't start correctly. It is showing for not even a second a white screen, followed by a black screen and is closing the app right after this.
- Why is it behaving like that?
- Is it, because it is a debug version and needs Xcode?
- How can I put my example app on my iPhone without needing a connection to Xcode to start it?
Thanks in advance!
Edit: Thanks to the answer of Răzvan Puiu below, i know now that this is because xCode puts the app as a debug version on my iPhone. This debug version can only run with xCode. After I tried it with a 'normal' app and not the example app of a plugin project, i even got this text shown if i tried to start the debug version without xCode:
So the solution is to run the app with:
flutter run --release
CodePudding user response:
- I believe it behaves like that because you don't have an Apple developer account. "Without enrolling in the Apple Developer Program, your app will only last for 7 days on your device. After that, you’ll have to re-deploy it to your device via Xcode. If you’re enrolled in the Apple Developer Program, you won’t have this inconvenience."
- Yes
- You can run
flutter run --release
and then select your physical device. However the app will remain on your phone for only 7 days unless you have the Apple dev account.