Flutter won't build iOS release - DONE - ios

The thing is that I try to build a iOS release for a flutter app but it crashes I search for results about the errors but found nothing hope someone could help.
NOTE : The app launch and works perfectly on both IOS and Android but doesn't build on any of them. here is my post about the Android problem :
Android post
You can find below the result of my "flutter doctor -v" and "flutter build ios -v".
flutter doctor -v :
[✓] Flutter (Channel stable, v1.9.1+hotfix.5, on Mac OS X 10.15 19A602, locale en-FR)
• Flutter version 1.9.1+hotfix.5 at /Users/axel/flutter
• Framework revision 1aedbb1835 (4 days ago), 2019-10-17 08:37:27 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /Users/axel/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_202-release-1483-b49-5587405)
• 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.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 40.2.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.39.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.5.1
[✓] Connected device (2 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10
(API 29) (emulator)
• iPhone 11 Pro • DB06E423-957F-41AA-99D0-05735D90C30B • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-1 (simulator)
• No issues found!
flutter build ios -v :
[ +118 ms] "flutter ios" took 19,172ms.
Encountered error while building for device.
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 BuildIOSCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:94:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:490:18)
#3 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#4 _rootRunUnary (dart:async/zone.dart:1132:38)
#5 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#6 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#7 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#8 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#9 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#10 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
#11 _rootRun (dart:async/zone.dart:1124:13)
#12 _CustomZone.run (dart:async/zone.dart:1021:19)
#13 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#14 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#15 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#16 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#17 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#18 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)

Ok i found the problem, First i wasn't working with the stable flutter version i was with 1.10.x and going back to flutter 1.9.x-prefix.x made it run back again but the build din't work anymore, the thing that was making the build crash was that with the latest xCode version and since i was working with firebase cloud messaging i need to add back the mobile provision back in xCode part of my flutter app. – Axel Frau just now Edit Delete
i followed this tutorial : Firebase Cloud messaging to do this as on the project i'm working on somebody else did it before me.

Related

Flutter build ios error: Encountered error while building for device

I encounter an error while I try to build my app for ios by flutter build ios. The error is related with flutter_tools packages. I tried to clean up my project with:
flutter clean
Delete Podfile.lock and re-run pod install in ios/ directory
Delete ios/Pods directory
I don't have other ideea what to do. Here is my entire error log:
[+1019 ms] "flutter ios" took 14,767ms.
[ +4 ms] Encountered error while building for device.
[ +2 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _BuildIOSSubCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:256:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:1157:12)
<asynchronous suspension>
#3 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1009:27)
<asynchronous suspension>
#4 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#5 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#6 CommandRunner.runCommand (package:args/command_runner.dart:197:13)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:278:9)
<asynchronous suspension>
#8 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#9 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#10 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:234:5)
<asynchronous suspension>
#11 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:9)
<asynchronous suspension>
#12 run.<anonymous closure> (package:flutter_tools/runner.dart:62:12)
<asynchronous suspension>
#13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#14 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#15 runInContext (package:flutter_tools/src/context_runner.dart:73:10)
<asynchronous suspension>
#16 main (package:flutter_tools/executable.dart:90:3)
<asynchronous suspension>
[ +196 ms] ensureAnalyticsSent: 107ms
[ ] Running shutdown hooks
[ ] Shutdown hook priority 4
[ ] Shutdown hooks complete
[ ] exiting with code 1
And here is my flutter doctor --verbose :
[✓] Flutter (Channel stable, 2.0.1, on macOS 11.2.2 20D80 darwin-x64, locale en-GB)
• Flutter version 2.0.1 at /Users/ovidiuusvat/Flutter/flutter
• Framework revision c5a4b4029c (4 days ago), 2021-03-04 09:47:48 -0800
• Engine revision 40441def69
• Dart version 2.12.0
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/ovidiuusvat/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)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] Connected device (3 available)
• SM G970F (mobile) • RF8MA07GHKP • android-arm64 •
Android 11 (API 30)
• iPad Pro (12.9-inch) (4th generation) (mobile) • 7E3ECED2-13E7-465A-A1A1-077EF6EFFEE9 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• Chrome (web) • chrome • web-javascript •
Google Chrome 88.0.4324.192
• No issues found!
For me the solutions for your error was flutter create .

Xcode 12 - Flutter app iOS Build Error - Multiple commands produced / throwToolExit (package:flutter_tools/src/base/common.dart:14:3)

I'm compiling a flutter app for android and iOS. The project compiles and runs on android emulators but I get a build error when I try to build the iOS version via VSCode or Android Studio.
Here is the build error:
error: Multiple commands produce
'/Users/jdoe/Development/My-Great-App/my_great_app/build/ios/Debug-development-iphonesimulator/Runner.app/Runner':
1) Target 'Runner' has copy command from '/Users/jdoe/Development/My-Great-App/my_great_app/ios/Runner' to
'/Users/jdoe/Development/My-Great-App/my_great_app/build/ios/Debug-development-iphonesimulator/Runner.app/Runner'
2) Target 'Runner' has link command with output
'/Users/jdoe/Development/My-Great-App/my_great_app/build/ios/Debug-development-iphonesimulator/Runner.app/Runner'
[ +49 ms] Could not build the application for the simulator.
[ +3 ms] Error launching application on iPhone 8.
[ +5 ms] "flutter run" took 79,020ms.
[ +18 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:607:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:972:18)
#3 _rootRunUnary (dart:async/zone.dart:1198:47)
#4 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#5 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#7 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#8 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#9 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#10 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#11 RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#12 _rootRunUnary (dart:async/zone.dart:1198:47)
#13 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#14 _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#15 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#16 Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#17 Future._completeWithValue (dart:async/future_impl.dart:529:5)
#18 Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#19 _rootRun (dart:async/zone.dart:1190:13)
#20 _CustomZone.run (dart:async/zone.dart:1093:19)
#21 _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#22 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#23 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#24 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#25 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
Here is my environment:
jdoe#MacBook-Air My Great App % flutter doctor -v
[✓] Flutter (Channel beta, 1.22.0-12.1.pre, on Mac OS X 10.15.6 19G2021, locale en-CA)
• Flutter version 1.22.0-12.1.pre at /Users/toddherron1a/Development/flutter
• Framework revision 8b3760638a (12 days ago), 2020-09-15 17:47:13 -0700
• Engine revision 4654fc6cf6
• Dart version 2.10.0 (build 2.10.0-110.3.beta)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/toddherron1a/Library/Android/sdk
• 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_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.0, Build version 12A7209
• CocoaPods version 1.10.0.rc.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.49.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.14.1
[✓] Connected device (4 available)
• AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• iPhone 8 (mobile) • 6F348FD9-AA18-4290-84EA-FB7A1AFB9F9E • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
• Web Server (web) • web-server • web-javascript • Flutter Tools
• Chrome (web) • chrome • web-javascript • Google Chrome 85.0.4183.121
• No issues found!
Things I've tried:
flutter clean
pod update
Removing VALID_ARCH from Xcode
There is no facebook login in this app, so this solution wasn't applicable.
I'm a bit stuck and I'm continuing development on Android for the time being. Any thoughts or ideas for getting the iOS build to work would be most appreciated!
The problem turned out to be duplicate GoogleService-Info.plist files in Xcode's Copy Bundle Resources (Targets • Runner • Build Phases).
Once both copies were removed using the "-", the build worked.

Not able to install BoringSSL-GRPC (0.0.7) required by cloud_firestore

I have tried almost everything. I've used vpn to install , I've tried downgrading cocoapods . Ive tried different versions of cloud_firestore too.It works well on android but there's something wrong with firebase because same problem is occurring in Firebase Auth package too
nothing seems to work
Steps to Reproduce
Create a new project and add latest cloud_firestore package
Run without debugging on an iOS emulator
Build will be failed with following error
Logs
issue starts from here
Downloading dependencies
-> Installing BoringSSL-GRPC (0.0.7)
> Git download
> Git download
$ /usr/bin/git clone https://github.com/google/boringssl.git
/var/folders/35/7c585fqj58s1xtl93svqy_xh0000gn/T/d20200731-5606-i9uho2 --template=
$ /usr/bin/git -C /var/folders/35/7c585fqj58s1xtl93svqy_xh0000gn/T/d20200731-5606-i9uho2
checkout
--quiet 1c2769383f027befac5b75b6cedd25daf3bf4dcf
[!] Error installing BoringSSL-GRPC
[!] /usr/bin/git -C /var/folders/35/7c585fqj58s1xtl93svqy_xh0000gn/T/d20200731-5606-i9uho2
checkout
--quiet 1c2769383f027befac5b75b6cedd25daf3bf4dcf
fatal: reference is not a tree: 1c2769383f027befac5b75b6cedd25daf3bf4dcf
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader.rb:142:in `rescue in
execute_command'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader.rb:139:in
`execute_command'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/base.rb:166:in `block
in executable'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:153:in
`target_git'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:148:in
checkout_commit' /Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:67:in download!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/base.rb:82:in block in download' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader.rb:157:in block in
ui_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader.rb:156:in ui_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/base.rb:80:in
download' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader.rb:108:in download_source'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader.rb:75:in
download_request' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/cache.rb:171:in download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/cache.rb:154:in block in uncached_pod' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/cache.rb:181:in in_tmpdir'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/cache.rb:153:in
uncached_pod' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/cache.rb:33:in download_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader.rb:42:in `download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/pod_source_installer.rb:117:in
`download_source'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/pod_source_installer.rb:69:in
install!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:557:in install_source_of_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:508:in block (2 levels) in install_pod_sources' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:86:in titled_section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:507:in block in install_pod_sources' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:490:in each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:490:in
install_pod_sources' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:249:in block in
download_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:248:in download_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:157:in install!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/install.rb:52:in run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:52:in run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in <top (required)>' /usr/local/bin/pod:23:in load'
/usr/local/bin/pod:23:in `
'
[ +187 ms] Error output from CocoaPods:
↳
[ ] Cloning into '/var/folders/35/7c585fqj58s1xtl93svqy_xh0000gn/T/d20200731-5606-i9uho2'...
fatal: reference is not a tree: 1c2769383f027befac5b75b6cedd25daf3bf4dcf
[!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no
platform was
specified. Please specify a platform for this target in your Podfile. See
https://guides.cocoapods.org/syntax/podfile.html#platform.
[ +4 ms] Error running pod install
[ +2 ms] Error launching application on iPhone 11 Pro.
[ +10 ms] "flutter run" took 17,886ms.
#0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:569:7)
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:723:18)
#3 _rootRunUnary (dart:async/zone.dart:1192:38)
#4 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#5 _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#7 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#8 Future._completeWithValue (dart:async/future_impl.dart:526:5)
#9 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#10 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#11 RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#12 _rootRunUnary (dart:async/zone.dart:1192:38)
#13 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#14 _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#15 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#16 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#17 Future._completeWithValue (dart:async/future_impl.dart:526:5)
#18 Future._asyncComplete. (dart:async/future_impl.dart:556:7)
#19 _rootRun (dart:async/zone.dart:1184:13)
#20 _CustomZone.run (dart:async/zone.dart:1077:19)
#21 _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#22 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1019:23)
#23 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#24 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#25 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
**Flutter Doctor**
seemants-MacBook-Pro:repos seemantsinha$ flutter doctor -v
[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.4 19E287, locale en-IN)
• Flutter version 1.17.5 at /Users/seemantsinha/Documents/flutter
• Framework revision 8af6b2f (4 weeks ago), 2020-06-30 12:53:55 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /Users/seemantsinha/Library/Android/sdk
• Platform android-29, build-tools 29.0.1
• ANDROID_HOME = /Users/seemantsinha/Library/Android/sdk
• 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.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4, Build version 11E146
• CocoaPods version 1.9.3
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 38.2.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1343-b01)
[✓] VS Code (version 1.47.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.12.2
[✓] Connected device (1 available)
• iPhone 11 Pro • BDF8B4F7-B661-49D6-BD82-70D364DEFB26 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator)
It just needs good internet speed as 1GB of data gets downloaded.
For me it took 30 minutes
Have patience
Please retry.
I'm able to see the commit at https://github.com/google/boringssl/commit/1c2769383f027befac5b75b6cedd25daf3bf4dcf so likely it was a spurious networking issue.

Flutter - iOS emulator not loading assets

Image assets unable to load when using iOS simulator. This error always happen when running flutter run command, but after I re-run using hot restart (shift+r) all image assets load successfully. If I stop the program and re-run using flutter run command again, it's still showing the same error. This is only happen when running in iOS.
Currently i'm using stable channel.
Flutter 1.7.8+hotfix.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b712a172f9 (9 days ago) • 2019-07-09 13:14:38 -0700
Engine • revision 54ad777fd2
Tools • Dart 2.4.0
I've already tried using master channel still not working, return back to stable channel again still not working either. Before running flutter run command I also running flutter clean but it's not changing anything.
This is my pubspec.yaml looks like.
flutter:
uses-material-design: true
assets:
- assets/images/
this is what i get in the console.
flutter: ══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════════════════════════
flutter: The following assertion was thrown resolving an image codec:
flutter: Unable to load asset: assets/images/logo_idbalap.png
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 PlatformAssetBundle.load
package:flutter/…/services/asset_bundle.dart:221
flutter: <asynchronous suspension>
flutter: #1 AssetBundleImageProvider._loadAsync
package:flutter/…/painting/image_provider.dart:464
flutter: <asynchronous suspension>
flutter: #2 AssetBundleImageProvider.load
package:flutter/…/painting/image_provider.dart:449
flutter: #3 ImageProvider.resolve.<anonymous closure>.<anonymous closure>.<anonymous closure>
package:flutter/…/painting/image_provider.dart:316
flutter: #4 ImageCache.putIfAbsent
package:flutter/…/painting/image_cache.dart:160
flutter: #5 ImageProvider.resolve.<anonymous closure>.<anonymous closure>
package:flutter/…/painting/image_provider.dart:316
flutter: (elided 13 frames from package dart:async)
flutter:
flutter: Image provider: AssetImage(bundle: null, name: "assets/images/logo_idbalap.png")
flutter: Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#90c63(), name:
flutter: "assets/images/logo_idbalap.png", scale: 1.0)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
this is my flutter doctor -v response.
[✓] Flutter (Channel stable, v1.7.8+hotfix.3, on Mac OS X 10.14 18A391, locale en-ID)
• Flutter version 1.7.8+hotfix.3 at /Users/fakhrinf/Development/flutter
• Framework revision b712a172f9 (9 days ago), 2019-07-09 13:14:38 -0700
• Engine revision 54ad777fd2
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/fakhrinf/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.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-1343-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 10.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.0, Build version 10A255
• CocoaPods version 1.7.4
[✓] iOS tools - develop for iOS devices
• ios-deploy 1.9.4
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 37.0.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] VS Code (version 1.36.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.2.0
[✓] Connected device (1 available)
• iPhone 6 • 0271F90D-7FA8-4728-908A-25E08B56AC50 • ios • iOS 12.0 (simulator)
• No issues found!
Lastly I try to uninstall the app and run flutter clean and flutter run again. I got this error.
Flutter crash report; please file at https://github.com/flutter/flutter/issues.
## command
flutter run
## exception
ProcessException: ProcessException: Process "/usr/bin/xcrun" exited abnormally:
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Failed to load Info.plist from bundle at path /Users/fakhrinf/Library/Developer/CoreSimulator/Devices/0271F90D-7FA8-4728-908A-25E08B56AC50/data/Library/Caches/com.apple.mobile.installd.staging/temp.6jf6We/extracted/Payload/Runner.app
Failed to load Info.plist from bundle at path /Users/fakhrinf/Library/Developer/CoreSimulator/Devices/0271F90D-7FA8-4728-908A-25E08B56AC50/data/Library/Caches/com.apple.mobile.installd.staging/temp.6jf6We/extracted/Payload/Runner.app
Underlying error (domain=MIInstallerErrorDomain, code=35):
Failed to load Info.plist from bundle at path /Users/fakhrinf/Library/Developer/CoreSimulator/Devices/0271F90D-7FA8-4728-908A-25E08B56AC50/data/Library/Caches/com.apple.mobile.installd.staging/temp.6jf6We/extracted/Payload/Runner.app
Command: /usr/bin/xcrun simctl install 0271F90D-7FA8-4728-908A-25E08B56AC50 /Users/fakhrinf/Development/Mobile/idbalapflutter/build/ios/iphonesimulator/Runner.app
#0 runCheckedAsync (package:flutter_tools/src/base/process.dart:259:7)
<asynchronous suspension>
#1 SimControl.install (package:flutter_tools/src/ios/simulators.dart:128:16)
#2 IOSSimulator._setupUpdatedApplicationBundle (package:flutter_tools/src/ios/simulators.dart:415:31)
<asynchronous suspension>
#3 IOSSimulator.startApp (package:flutter_tools/src/ios/simulators.dart:315:15)
<asynchronous suspension>
#4 FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:371:54)
#5 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#6 _rootRunUnary (dart:async/zone.dart:1132:38)
#7 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#8 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#9 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#10 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#11 Future._complete (dart:async/future_impl.dart:473:7)
#12 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#13 _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async-patch/async_patch.dart:33:20)
#14 _rootRun (dart:async/zone.dart:1120:38)
#15 _CustomZone.run (dart:async/zone.dart:1021:19)
#16 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#17 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#18 _rootRun (dart:async/zone.dart:1124:13)
#19 _CustomZone.run (dart:async/zone.dart:1021:19)
#20 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#21 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#22 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#23 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#24 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#25 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
After many times dirty my flutter project by trying many things to solve the load assets issues, I decided to test it with new flutter project with --androidx flag on creation. I'm not really sure if it will affect anything in iOS but my project become error in iOS after I migrate my old project to androidx and publish it to playstore.
After creating the new project I copy my old pubspec.yaml, assets folder and lib folder, and it's works!

Flutter - iOS: Command /bin/sh failed with exit code 255

Good afternoon,
I try to run a Flutter project on iOS, previously successfully run on Android. However, I got an error:
"x86_64" is not an allowed value for option "ios-arch".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
Failed to build /Users/user123/Downloads/my_app.
Command /bin/sh failed with exit code 255
I tried different solutions offered here about a variety of errors "Command /bin/sh failed with exit code XXX". But, none of them helped.
Also, I checked solutions on GitHub:
https://github.com/flutter/flutter/issues/9814.
At the same time, it is not completely clear for me how to implement them into iOS project.
I will be appreciated for any support.
Sincerely,
Maryna
Update: these are the results of the commands:
$ flutter run --verbose
[ +53 ms] executing: [/Users/user143726/Downloads/flutter/] git rev-parse --abbrev-ref --symbolic #{u}
[ +60 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic #{u}
[ ] origin/beta
[ ] executing: [/Users/user143726/Downloads/flutter/] git rev-parse --abbrev-ref HEAD
[ +10 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] beta
[ ] executing: [/Users/user143726/Downloads/flutter/] git ls-remote --get-url origin
[ +8 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ ] executing: [/Users/user143726/Downloads/flutter/] git log -n 1 --pretty=format:%H
[ +12 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ ] 5ab9e70727d858def3a586db7fb98ee580352957
[ ] executing: [/Users/user143726/Downloads/flutter/] git log -n 1 --pretty=format:%ar
[ +13 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ ] 3 weeks ago
[ +1 ms] executing: [/Users/user143726/Downloads/flutter/] git describe --match v*.*.* --first-parent --long --tags
[ +14 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[ ] v0.8.2-0-g5ab9e7072
[ +508 ms] executing: /Users/user143726/Library/Android/sdk/platform-tools/adb devices -l
[ +32 ms] Exit code 0 from: /Users/user143726/Library/Android/sdk/platform-tools/adb devices -l
[ ] List of devices attached
[ +8 ms] executing: idevice_id -h
[ +98 ms] /usr/bin/xcrun simctl list --json devices
[ +449 ms] No connected devices.
[ ] Run 'flutter emulators' to list and start any available device emulators.
[ ] If you expected your device to be detected, please run "flutter doctor" to diagnose
[ ] potential issues, or visit https://flutter.io/setup/ for troubleshooting tips.
[ +18 ms] "flutter run" took 1,014ms.
#0 throwToolExit (package:flutter_tools/src/base/common.dart:26:3)
#1 RunCommand.validateCommand
(package:flutter_tools/src/commands/run.dart:239:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:350:11)
<asynchronous suspension>
#3 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:306:33)
<asynchronous suspension>
#4 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#5 _rootRun (dart:async/zone.dart:1124:13)
#6 _CustomZone.run (dart:async/zone.dart:1021:19)
#7 _runZoned (dart:async/zone.dart:1516:10)
#8 runZoned (dart:async/zone.dart:1463:12)
#9 AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#10 FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:297:20)
#11 CommandRunner.runCommand (package:args/command_runner.dart:194:27)
<asynchronous suspension>
#12 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:347:21)
<asynchronous suspension>
#13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#14 _rootRun (dart:async/zone.dart:1124:13)
#15 _CustomZone.run (dart:async/zone.dart:1021:19)
#16 _runZoned (dart:async/zone.dart:1516:10)
#17 runZoned (dart:async/zone.dart:1463:12)
#18 AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#19 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:303:19)
<asynchronous suspension>
#20 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109:29)
#21 new Future.sync (dart:async/future.dart:224:31)
#22 CommandRunner.run (package:args/command_runner.dart:109:11)
#23 FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:211:18)
#24 run.<anonymous closure> (package:flutter_tools/runner.dart:59:20)
<asynchronous suspension>
#25 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#26 _rootRun (dart:async/zone.dart:1124:13)
#27 _CustomZone.run (dart:async/zone.dart:1021:19)
#28 _runZoned (dart:async/zone.dart:1516:10)
#29 runZoned (dart:async/zone.dart:1463:12)
#30 AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#31 runInContext (package:flutter_tools/src/context_runner.dart:42:24)
<asynchronous suspension>
#32 run (package:flutter_tools/runner.dart:50:10)
#33 main (package:flutter_tools/executable.dart:52:9)
<asynchronous suspension>
#34 main (file:///b/build/slave/Mac_Flutter_Packaging/build/archive/flutter/packages/fl utter_tools/bin/flutter_tools.dart:8:3)
#35 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#36 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
$ flutter analyze
Analyzing my_app...
info • Unused import: 'package:my_app/main.dart' • test/widget_test.dart:10:8 • unused_import
1 issue found. (ran in 8.4s)
$ flutter doctor -v
[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.13.6 17G65, locale en)
• Flutter version 0.8.2 at /Users/user143726/Downloads/flutter
• Framework revision 5ab9e70727 (3 weeks ago), 2018-09-07 12:33:05 -0700
• Engine revision 58a1894a1c
• Dart version 2.1.0-dev.3.1.flutter-760a9690c2
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
• Android SDK at /Users/user143726/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.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_152-release-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.0, Build version 10A255
• ios-deploy 2.0.0
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 28.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[!] VS Code (version 1.27.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected devices
! No devices available
! Doctor found issues in 2 categories.
After lots of try i follow these steps to release ipa file :
Go to your trminal:
cd your-flutter-project
flutter run (That will launch the app to your connected or opened device )
Now,
come to again to your MAC terminal and type
flutter build apk (that will make the release apk)
For IOS,
flutter build ios
after complete the task you will see the path of your file package something like
/Users/Sanjeev/Documents/WorkSpaceForFlutter/myapp/build/ios/iph
oneos/Runner.app.
Now go to Xcode >Product >Archive you will get the screen below
This is how i resolve my issue
Command /bin/sh failed with exit code 255
I solve the problem with the following commands.
flutter clean
flutter build ios
After that I can create signed builds and also upload to App Stores.
This exit code (255) occurs from incorrectly Generated.xcconfig configuration like TRACK_WIDGET_CREATION, FLUTTER_FRAMEWORK_DIR, FLUTTER_BUILD_MODE
In archive ios release mode. So before archiving make sure to run flutter clean then flutter build ios for some reason flutter build ios --release doesn't work for me. Then lastly go to Xcode and archive the ios app
Commands
flutter clean then
flutter build ios
Hope it helps.
This issue happened to me after building a release version. It seems that iOS emulators does not support release versions.
If you want to run your app on an emulator you will need to build a debug version
flutter clean
flutter build ios --debug
For me, it happenned that I was opening .xcodeproj (WRONG) file instead of .xcworkspace (RIGHT)
For me helped:
Disconnect all physical phone's from mac.
Close Xcode.
In terminal command
flutter clean
Start Xcode by running Runner.xcworkspace, that you have inside your project folder /yourProjectFolder/ios/Runner
Choose menu Product - Archive
That's it! After that build was successful. Appear windows where you can distribute app.

Resources