Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build Flutter app in release mode for iOS

I have Android Studio with Flutter plugin installed. Flutter SDK is also installed on my Mac through Android Studio and I know path to it.

I want to run my app in release mode on real iOS device. Not only to hide "slow mode" banner that can be done using this code as I know

new MaterialApp(   debugShowCheckedModeBanner: false,   ... 

but also to check how my app works.

I found this instructions https://flutter.io/ios-release/ but still can't build app in release mode.

Each time I try to run flutter command in terminal, I got:

flutter: command not found

I think that it is because I had installed Flutter SDK from Android Studio and I should update some pathes. So what are my steps to build flutter app in release mode using Xcode?

like image 844
moonvader Avatar asked Mar 28 '18 09:03

moonvader


People also ask

Can you make Flutter apps for iOS?

Flutter is a multi-platform application development framework that enables you, among other platforms, to develop iOS and Android apps from the same source code. However, you need to use Xcode to build an iOS app and Xcode will only work on macOS. You cannot get away with Linux or Windows.


1 Answers

Even after running flutter build ios, Xcode always ran the Debug version (slow mode).

To solve this, I had to change the Build Configuration of the Run schema:

  1. Click on Runner, and Edit scheme

enter image description here

  1. Select Release for the Build Configuration of the Run schema

enter image description here

Hoping this is helpful.

like image 86
Lucas Avatar answered Sep 17 '22 15:09

Lucas