iOs build failed in codemagic VM : Error (Xcode): ‘Flutter/Flutter.h’ file not found


I’m newer on flutter and on mobile dev in general.

In local machine, I can successfully build the iOS debug version on the iOS simulator, and the application launches correctly. However, when I attempt to build the release version using Codemagic’s workflow, I encounter the following issues:

Saved export options to /Users/builder/export_options.plist

> flutter build ipa --release --export-options-plist /Users/builder/export_options.plist
Resolving dependencies...
  audio_video_progress_bar 0.11.0 (2.0.1 available)
  awesome_notifications 0.8.2 (0.9.0 available)
! dio 5.4.0 (overridden)
  firebase_auth 4.15.3 (4.16.0 available)
  fl_chart 0.65.0 (0.66.0 available)
! flutter_dio_http_cache 0.3.1 (overridden)
  flutter_inappwebview 5.8.0 (6.0.0 available)
  google_api_headers 2.0.3 (3.7.0 available)
  intl 0.18.1 (0.19.0 available)
  jiffy 6.2.1 (6.2.2 available)
  matcher 0.12.16 (0.12.16+1 available)
  material_color_utilities 0.5.0 (0.8.0 available)
! meta 1.11.0 (overridden)
  package_info_plus 4.2.0 (5.0.1 available)
  path 1.8.3 (1.9.0 available)
! photo_manager 3.0.0-dev.5 (overridden)
  syncfusion_flutter_calendar 23.2.7 (24.1.44 available)
  syncfusion_flutter_core 23.2.7 (24.1.44 available)
  syncfusion_flutter_datepicker 23.2.7 (24.1.44 available)
  test_api 0.6.1 (0.7.0 available)
  web 0.3.0 (0.4.0 available)
! win32 5.2.0 (overridden)
Got dependencies!
17 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.

Archiving ag.amaya.farmer...
Automatically signing iOS for device deployment using specified development team in Xcode project: ********
Running pod install...                                            305.5s
Running Xcode build...                                          
Xcode archive done.                                         290.4s
Failed to build iOS app
Error (Xcode): 'Flutter/Flutter.h' file not found
/Users/builder/clone/farmer/ios/Runner/GeneratedPluginRegistrant.h:9:8

Error (Xcode): failed to emit precompiled header '/Users/builder/Library/Developer/Xcode/DerivedData/Runner-cwhdghwkfsecylfzzbdiegifniyg/Build/Intermediates.noindex/ArchiveIntermediates/Runner/PrecompiledHeaders/Runner-Bridging-Header-swift_1OA4SU7K8SZ1N-clang_1ELA9HQ0UON1L.pch' for bridging header '/Users/builder/clone/farmer/ios/Runner/Runner-Bridging-Header.h'

Encountered error while archiving for device.

Build failed

Before successfully building locally, I encountered the same error. However, I resolved it by cleaning the project, rebuilding the iOS folder (with the Runner backup), and the problem disappeared.

On Codemagic, I accessed the VM remotely to attempt the same steps, but the result remains negative.

Flutter doctor output:

[✓] Flutter (Channel stable, 3.16.5, on macOS 14.2 23C64 darwin-arm64, locale en-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.84.1)

The same configuration is present on the Codemagic machine.”

thanks in advance

I’m trying to build my flutter application release version for iOs using codemagic
build is failed : Error (Xcode): ‘Flutter/Flutter.h’ file not found

I’m expecting a successful build for release iOs version

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img