While building on both platforms, I noticed the following:
app.ipa 190MB,
Runner - 427,3Mb
Apk 7,2MB
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.5 18F132, locale en-IT)
• Flutter version 1.12.13+hotfix.5 at /Users/cosminrus/Utils/flutter
• Framework revision 27321eb (3 months ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/cosminrus/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3, Build version 11C29
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.41.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.7.1
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
Flutter build sizes depends on the build execution is being used. For context, JIT and AOT are the both logics being used by Flutter to be really powerful.
JIT: Allows to do hot reload and see real time changes, the cons is that huge build size.
AOT: Builds on native code allowing Flutter to run full speed, build sizes are smaller.
You'd notice this on Android as well while checking its size on debug vs release mode.
To get a better idea of how much your app's size is going to be, run the following commands on terminal:
Android
flutter build apk --split-per-abi
and check the output file sizes.
iOS
flutter build ios && tar -zcf build/app.ipa build/ios/iphoneos/Runner.app && ls -lh build/app.ipa
If you want to dig into reducing file size, follow this LINK. And if you want to know why iOS builds are larger, check this LINK.
There's an official DOCS for build sizes if you're interested.
Related
When upgrade flutter has an exception and the application can't run again how can I solve it?
In file included from
/Users/raitotec/developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.12+4/ios/Classes/FLTSharedPreferencesPlugin.m:5:
/Users/raitotec/developer/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.12+4/ios/Classes/FLTSharedPreferencesPlugin.h:5:9
: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
flutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-SA)
• Flutter version 1.22.5 at /Users/raitotec/developer/flutter
• Framework revision 7891006299 (9 months ago), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/raitotec/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.0
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 50.0.1
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (1 available)
• iPhone 12 mini (mobile) • A9648508-3B05-4468-B593-477288FC7370 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
try flutter clean then flutter pub upgrade
Had a similar issue.
After pub upgrade, (long story short) the app was not working as before.
The file pubspec.yaml contains the dependencies(packages) used by the app, usually the min version of the added packages.
The file pubspec.lock, contains all the dependencies(packages) of the app, with the exact version of each dependency.
When you run pub upgrade it fetches the newest versions of all the dependencies and updates the pubspec.lock,
so for example, a dependency in pubspec.yaml may states version 1.0, after the pub upgrade the used version can be 1.1(in the pubspec.lock)
Although this file should not included in the commits, if you have access to the previous version of it, you can compare it with the one after the pub upgrade` and revert it where needed.
Downgrading a dependency solved the problem for me.
I am receiving this message with a rejection when I submit my app for review on the App Store:
"Specifically, your app displayed a white, blank screen when we launched your app."
When I test the app on device, everything appears to be working fine. I have tried the following to test:
flutter build ios
flutter run
flutter build ios --release
flutter run
Test with VSCode's run feature.
Run in xcode onto physical device both in Debug and Release schema settings
If I archive, and upload the same build to Testflight, the app can be installed and ran without issue on several different devices.
While all of these methods work on my physical iphone, when I run
flutter build ios --release
open xcode
archive
upload with Organizer in xcode
The app is rejected by Apple. I searched around and found nothing that solves my issues. Any suggestions or good next steps?
flutter doctor:
[✓] Flutter (Channel stable, 1.22.6, on macOS 11.1 20C69 darwin-x64, locale en-US)
• Flutter version 1.22.6 at /Users/matthewkrager/flutter
• Framework revision 9b2d32b605 (5 days ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/matthewkrager/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
✗ Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.9.1
[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.52.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.18.1
[✓] Connected device (2 available)
Steps to Reproduce
Simply trying to publish my app to ios store. Already available on Play store.
I cannot archive in Xcode, constantly running into issues. Currently have these issues when attempting to archive:
When attempting to run pod install in the ios directory, I continue to get this warning (which according to my research seems to be more of an error):
I tried following everything in this very long thread thread to resolve this issue, but nothing has worked.
I was able to remove another warning by uncommenting line #2 in the Podfile, platform :ios, '9.0'.
I have tried closing Xcode while making changes, and have tried restarting my computer.
I can flutter run and the app will work correctly on my iPhone when it is connected to my macbook.
Other threads from which I've tried everything:
https://github.com/flutter/flutter/issues/42974
https://github.com/flutter/flutter/issues/20685
https://github.com/flutter/flutter/issues/48103
https://github.com/X-Wei/flutter_catalog/issues/26
https://github.com/flutter/flutter/issues/28870
Expected results:
I can successfully archive in Xcode.
Actual results:
Flutter doctor seems to indicate everything is fine, but I continue to get this errors when trying to archive.
AdministorsMBP4:mem_plus_plus matt$ flutter doctor --verbose
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.3 19D76, locale en-US)
• Flutter version 1.12.13+hotfix.5 at /Users/matt/development/flutter
• Framework revision 27321ebbad (9 weeks ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /Users/matt/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.1, Build version 11A1027
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 37.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[!] IntelliJ IDEA Community Edition (version 2019.2.4)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[✓] Connected device (1 available)
• Takkeezi’s iPhone • {redacted} • ios • iOS 12.4.4
Try to this.
flutter clean
pod install
build project
Check a pods module
Pod file
After upgrade flutter, the performance of iOS Simulator became so bad. for example, slow to launch and slow to show keyboard.
I ran flutter doctor. Here is my result.
$ flutter doctor -v
[✓] Flutter (Channel master, v1.9.8-pre.35, on Mac OS X 10.14.6 18G87, locale ja-JP)
• Flutter version 1.9.8-pre.35 at /Users/rafekun/Developer/flutter
• Framework revision 1363528eee (4 days ago), 2019-08-31 05:26:41 -0400
• Engine revision cd858489cc
• Dart version 2.5.0 (build 2.5.0-dev.4.0 36985859e4)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
• Android SDK at /Users/rafekun/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.3, Build version 10G8
• CocoaPods version 1.7.5
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 38.2.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.37.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.3.0
[✓] Connected device (1 available)
• iPhone Xʀ • B3C345C3-5AB0-4627-B854-2C90016A3B69 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator)
• No issues found!
If you are experiencing slowness, low FPS, laggy scrolling on specific (newer) devices in Xcode simulator that's because Apple dropped support for OpenGL and Flutter SDK does not support the new Metal API in simulators.
But the official stable support will be available soon, until that if you need 60 FPS, switch to the master channel of Flutter SDK by running this in terminal and rebuild your app:
flutter channel master
sources:
iOS Simulator gradually becomes very slow & unusable
Investigate enabling Metal on iOS simulators above version 13.0.
Will Flutter use Metal on iOS Simulators?
I'm using Flutter with Android-Studio, everything was working great (i.e. compiling and deploying to iOS simulators except until I installed Fastlane Tools. The building process now is broken somehow! I'm not sure if it's from Fastlane or something else though, but now I'm stuck and cannot deploy to iOS anymore.
Steps taken/tried already:
Removing XCode & CommandLineTools (using this post: Complete removal old XCode)
Reinstalling XCode 9.2 (from AppStore)
Reinstalling CommandLineTools for XCode 9.2 (dl from developer tools page)
Reinstalling/updating ios-deply using:
npm install -g ios-deploy --unsafe-perm=true
Error log is on PasteBin to reduce post size:
https://pastebin.com/HQdJYLBr
Flutter doctor report:
[✓] Flutter (on Mac OS X 10.13.3 17D102, locale en-AE, channel alpha)
• Flutter version 0.0.22-pre.1 at /Users/user999/github/flutter
• Framework revision 553fc4264e (3 weeks ago), 2018-03-01 09:30:25 -0800
• Engine revision 6921873c71
• Tools Dart version 2.0.0-dev.16.0
• Engine Dart version 2.0.0-edge.da1f52592ef73fe3afa485385cb995b9aec0181a
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /Users/user999/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.2, Build version 9C40b
• ios-deploy 1.9.2
• CocoaPods version 1.4.0
[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] IntelliJ IDEA Community Edition (version 2017.3.4)
• Flutter plugin version 21.2.3
• Dart plugin version 173.4548.30
[✓] Connected devices
• iPhone X • 2AD97E20-6FB5-4086-BDC0-EBE6138FBD79 • ios • iOS 11.2 (simulator)
Any suggestions, please?
This answer is for the ones who are still trying to work with Xcode 9.2. Starting April, 2020, all apps submitted to the App Store will need to be built with Xcode 11. So don't try to build your Flutter IOS App with XCode 9.2.
Flutter is also changing rapidly therefore, it is better to use the latest XCode version to avoid any deprecated API issue.
For reference visit:
https://github.com/firebase/firebase-ios-sdk/issues/4125