Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly does Flutter build iOS do? Is this really necessary?

I would like to fully understand this command and what happens behind the scenes. Here are a few pieces of information I've understood so far but somehow I cannot connect the dots:

  • When deploying an iOS we need to go through these steps:
  1. build a flutter app in release mode, which will make an .app file/folder
  2. archive & sign the .app file which will convert it into .ipa
  3. send the signed .ipa to the appstore
  • flutter apps can have 3 modes: 1. debug 2. release 3. profile
  • running flutter build ios creates a build/ios folder, including the Release-iphoneos/Runner.app
  • Xcode creates its own .app in ~/Library/Developer/Xcode/DerivedData/Runner-...

Now, questions:

  1. Is the build/ios/Release-iphoneos/Runner.app that Xcode converts into .ipa? I'm asking since I know that Xcode creates its own .app in ~/Library/Developer/Xcode/DerivedData, so I'm not sure if Xcode just copies build/ios/Release-iphoneos/Runner.app in here: ~/Library/Developer/Xcode/DerivedData/ or not
  2. What happens if I don't run flutter build ios before? Will Xcode use only a debug mode of my app? If so, how come it removes the debug flag in the upper right corner? enter image description here
  3. When I clean my build folder in Xcode (shift+cmd+K) and then I archive the app and it will still build a new .app and then it converts it to .ipa. What mode was this .app created in? Was it a release app? If so, again, why is it necessary to run flutter build ios before and why not just archive it from the Xcode?

Thanks to everyone who tries to unleash this big mystery for me and for everyone else wondering.

like image 420
Tomas Baran Avatar asked May 17 '20 12:05

Tomas Baran


People also ask

What does Flutter build iOS do?

Flutter transforms the app development process. Build, test, and deploy beautiful mobile, web, desktop, and embedded apps from a single codebase.

What does Flutter build do?

For engineering managers and businesses, Flutter allows the unification of app developers into a single mobile, web, and desktop app team, building branded apps for multiple platforms out of a single codebase.

Is Flutter good for iOS?

Of course, you can also create your own components, and for this, Flutter is truly excellent. Creating good looking custom UI elements is very easy, and you will have them working on both Android and iOS. This makes Flutter a perfect choice for mobile apps with advanced, custom UI designs.

Why do I need Xcode for Flutter?

With Xcode, you'll be able to run Flutter apps on an iOS device or on the simulator.


1 Answers

The reason you should run a flutter build ios before archive is because archive uses the last build configuration from the results of running flutter build ios.

like image 106
Gregory Ray Avatar answered Oct 12 '22 10:10

Gregory Ray