Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter gets stuck on "Running Xcode build... " when building for iOS

I have an existing Flutter project which has been working fine for two years. But now all of a sudden, when I try to build or run it on iOS, it always gets stuck on Running Xcode build... .

flutter build ios --debug
Running "flutter pub get" in MyApp...                           0.6s
Building org.example.myapp for device (ios)...
Automatically signing iOS for device deployment using specified development team in Xcode project: 36U5A9XK2Z
Running pod install...                                              1.6s
Running Xcode build...                                                  
(This is taking an unexpectedly long time.)       ⣻

Before this would only take 1-2 minutes, and now I've tried waiting up to 2 hours, so obviously something is very wrong. Other existing apps build just fine.

I have tried "the usual suspects":

  • flutter clean.
  • Delete ~/Library/Developer/XCode/DerivedData.
  • Restart the computer.
  • Delete podfile.lockand run pod install again.
  • Removed some "difficult" plugins (i.e. everything Firebase-related and all Swift-based plugins).

Nothing seems to help. Same thing happens if I try to run the app from within XCode or IntelliJ. Version info below.

Flutter 1.22.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7891006299 (7 weeks ago) • 2020-12-10 11:54:40 -0800
Engine • revision ae90085a84
Tools • Dart 2.10.4```

XCode 11.1
OSx 10.15.1
like image 951
Magnus Avatar asked Nov 22 '25 20:11

Magnus


1 Answers

You could try deleting the ios folder on the project and generate an iOS build again by running flutter create --platforms=ios [PROJECT_PATH]. That should generate an iOS project from your Flutter code. After that, you could try running flutter build ios again.

like image 142
Omatt Avatar answered Nov 24 '25 09:11

Omatt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!