heyr
heyr

Reputation: 5784

When I run flutter build IOS gets stuck in the middle of process

Whenever I run flutter build IOS, it seems to work fine, however when it gets to the point of "Building Dart Code", it just gets stuck there forever. I was however been able to run flutter build apk successfully before this.

This is the flutter doctor -v output:

[✓] Flutter (Channel beta, v0.11.3, on Mac OS X 10.13.6 17G65, locale en-GB)
    • Flutter version 0.11.3 at /Users/../flutter
    • Framework revision 72bf075e8d (4 days ago), 2018-11-09 20:36:17 -0800
    • Engine revision 5646e86a6f
    • Dart version 2.1.0 (build 2.1.0-dev.9.3 9c07fb64c4)

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/../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: /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/bin/java
    • Java version Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
    • 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 1.9.2
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 30.0.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[!] Android Studio
    • Android Studio at /Applications/Android/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    ✗ Android Studio not found at /Applications/Android/Contents
    • Try updating or re-installing Android Studio.

[✓] VS Code (version 1.24.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.20.0

[✓] Connected device (1 available)
    • .. iPhone • 77afb908fc6c490d3fca62cdde9a74ab4e45b4f0 • ios • iOS 11.4.1

! Doctor found issues in 1 category.

I will also post where exactly gets stuck:

-MacBook-Pro:flutterLoginApp-master4OK ..$ flutter build ios
Building Login for device (ios-release)... Automatically signing iOS for device deployment using specified development team in Xcode project: ...
Starting Xcode build... ├─Building Dart code... 1.6s //and just gets stuck here forever ...

Upvotes: 3

Views: 9606

Answers (3)

Larry Aasen
Larry Aasen

Reputation: 515

According to the solution posted here, https://github.com/flutter/flutter/issues/24139, you can redirect the output to a file with something like > build.log to fix this issue. Try flutter run --release > build.log

Upvotes: 1

hacksy
hacksy

Reputation: 840

Current beta version(0.11.3) is not working and gets stuck when building the release version on ios. The fix for now is downgrade your flutter version or change to master branch while the beta version is stuck.

You can do this using flutter channel master and then flutter upgrade on your terminal.

Upvotes: 5

heyr
heyr

Reputation: 5784

I have switched to master channel and run: flutter build ios --release and all started to work fantastically fantastic.

Upvotes: 3

Related Questions