flutter issue on MacOS 14 Sonoma and XCode 15, unable to distribute any app

681 Views Asked by At

two weeks ago I made the upgrade to Mac OS14 Sonoma and XCode 15. I have several apps developed on flutter:

flutter doctor 

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.8, on macOS 14.0 23A344 darwin-x64, locale en-IT)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.83.1)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

No issue on android branch but when a lot of headaches on iOS, I normally use the following command to generate the ipa:

 flutter build ipa --export-method ad-hoc  --no-tree-shake-icons

Only Runner.xcarchive is generated, below the specific error. Other misfunctioanlities are: missing DisplayName, missing Version & Build ...

I already overcomed other errors due to Build Phases or wrong path.

The strange behaviours are the following:

  • I can simulate the App on iPhone Simulator from Visual Studio Code
  • Using XCode directly and opening the xcworkspace I can also build and run normally on iPhone simulator.
  • Using XCode, if I try archive for 'Any iOS Device' I can but when I try to distribute it I've only Custom possibility, no Ad-Hoc

See attached images:

enter image description here enter image description here enter image description here

Please let me know if you have any other suggestions or if I need to downgrade back to Ventura to build and deploy all my apps.

Thank you in advance for any help.

Archiving com.****.**** ...
Automatically signing iOS for device deployment using specified development team in Xcode project: *********
Running Xcode build...
 └─Compiling, linking and signing...                       108.5s
Xcode archive done.                                         610.3s
Built ....../Runner.xcarchive.
Invalid iOS archive. Does not contain Info.plist.

To update the settings, please refer to https://docs.flutter.dev/deployment/ios

Building ad-hoc IPA...                                              3.2s
Encountered error while creating the IPA:
error: exportArchive: exportOptionsPlist error for key "method": expected one of {}, but found ad-hoc

Try distributing the app in Xcode: "open ....../build/ios/archive/Runner.xcarchive"
1

There are 1 best solutions below

0
On

After several flutter cleans, pod cleans and Build Phases tries I successfully able to create .ipa files.

I atttach here my working build phase sequence. s