I cannot build the .ipa file


I’m developping an app with Flutter.
When I plug my iPhone and run the project, everything is good : I can use my app.
I want to deploy my app on the Apple Store with flutter build ipa.
When I run this command, I got errors :

Error output from Xcode build:
    objc[91511]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x20e856c10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1215802b8). One of the two
    will be used. Which one is undefined.
    objc[91511]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x20e856c60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x121580308). One of the two will be
    used. Which one is undefined.

Xcode's output:
    /Users/aymeric/Git/Baggou/mobile/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'cloud_firestore' not found
    @import cloud_firestore;
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete

Encountered error while archiving for device.

I tried to deintegrate all my pods, update them … but nothing works.

My flutter doctor :

[✓] Flutter (Channel stable, 2.5.0, on macOS 11.4 20F71 darwin-arm, locale fr-FR)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] Android Studio (version 4.1)
[✓] Android Studio (version 4.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2020.3.2)
[✓] VS Code (version 1.54.1)
[✓] Connected device (2 available)

! Doctor found issues in 1 category.

I don’t know if it’s relevant, but I use a MacBook Pro with the M1 chip.
Also, I already done this command for another flutter project with the same machine and it was working.

If you want to know my dependencies :

name: baggou
description: Ne restez plus sur la touche.

version: 0.0.40+42

  sdk: ">=2.7.0 <3.0.0"

    sdk: flutter

  # GetX
  get: "3.26.0"
  get_storage: any

  # Firebase
  firebase_core: "^1.3.0"
  firebase_analytics: "^8.1.2"
  firebase_auth: "^1.4.1"
  google_sign_in: "5.0.4"
  cloud_firestore: "^2.2.2"
  firebase_storage: "^8.1.3"
  firebase_messaging: "^10.0.2"

  # Dependencies
  fluttertoast: ^7.1.6
  loading: ^1.0.2
  carousel_slider: "3.0.0"
  image_picker: "0.7.4"
  flutter_launcher_icons: ^0.9.0
  persistent_bottom_nav_bar: "4.0.2"
    sdk: flutter
  cupertino_icons: ^1.0.2
  flutter_phoenix: "1.0.0"
  csc_picker: ^0.2.5
  url_launcher: any
  introduction_screen: "2.1.0"
  smooth_star_rating: "1.1.1"

  # Google Maps
  google_maps_flutter: "2.0.10"
  google_maps_place_picker: "2.1.0-nullsafety.3"
  flutter_credit_card: ^2.0.0

    sdk: flutter

  image_path: "assets/baggou-icon.png"
  android: true
  ios: true


I found the solution in Xcode. Need to set the correct version.
XCode screen

Answered By – Aymeric Le Feyer

Answer Checked By – Marilyn (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.