3

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.

  1. Why is it behaving like that?
  2. Is it, because it is a debug version and needs Xcode?
  3. 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: enter image description here

So the solution is to run the app with:

flutter run --release

1 Answer 1

6
  1. 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."
  2. Yes
  3. 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.
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, that helped me a lot. I just tried it with a 'normal' flutter app and not the example app of a plugin project. If i try to start the debug version of this 'normal' app without xCode, it even shows a text, that debug can only run with xCode. Because I can't poste an image here in this commend i will edit my question and add a screenshot of this text.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.