0

I'm on a MacBook Air 2025 M4 (Apple Silicon) using Flutter 3.35.5 on channel stable, Xcode 26.0.1, and CocoaPods 1.16.2.

Actual Setup:

Component Version
macOS 15.0 Sequoia
CPU Apple M4 (ARM64)
Flutter 3.35.5 on channel stable
Dart 3.9.2
DevTools 2.48.0
CocoaPods 1.16.2
Xcode 26.0.1 Build 17A400

Since updating Flutter from 3.24 → 3.35, iOS builds consistently fail with the following errors (not matter if simulation or real device, also ios version no matter):

fatal error: 'Flutter/Flutter.h' file not found

Error logs:

app_links
/Users/myuser/.pub-cache/hosted/pub.dev/app_links-6.4.1/ios/app_links/Sources/app_links/AppLinksIosPlugin.swift
/Users/myuser/.pub-cache/hosted/pub.dev/app_links-6.4.1/ios/app_links/Sources/app_links/AppLinksIosPlugin.swift:1:8 Unable to find module dependency: 'Flutter'
import Flutter
       ^

flutter_native_splash
/Users/myuser/.pub-cache/hosted/pub.dev/flutter_native_splash-2.4.6/ios/flutter_native_splash/Sources/flutter_native_splash/include/flutter_native_splash/FlutterNativeSplashPlugin.h
/Users/myuser/.pub-cache/hosted/pub.dev/flutter_native_splash-2.4.6/ios/flutter_native_splash/Sources/flutter_native_splash/include/flutter_native_splash/FlutterNativeSplashPlugin.h:1:9 'Flutter/Flutter.h' file not found

flutter_secure_storage
Clang dependency scanner failure: While building module 'flutter_secure_storage' imported from flutter_secure_storage-7125a5c1.input:1:
In file included from <module-includes>:1:
In file included from /Users/myuser/Documents/mycompany/auftrag/AppName/name-app/ios/Pods/Headers/Public/flutter_secure_storage/flutter_secure_storage-umbrella.h:13:
/Users/myuser/Documents/mycompany/auftrag/AppName/name-app/ios/Pods/Headers/Public/flutter_secure_storage/FlutterSecureStoragePlugin.h:11:9: fatal error: 'Flutter/Flutter.h' file not found
flutter_secure_storage-7125a5c1.input:1:1: fatal error: could not build module 'flutter_secure_storage'


Unable to find module dependency: 'flutter_secure_storage'

/Users/myuser/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/ios/Classes/SwiftFlutterSecureStoragePlugin.swift
/Users/myuser/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/ios/Classes/SwiftFlutterSecureStoragePlugin.swift:8:8 Unable to find module dependency: 'Flutter'
import Flutter
       ^

path_provider_foundation
/Users/myuser/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/darwin/path_provider_foundation/Sources/path_provider_foundation/messages.g.swift
/Users/myuser/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/darwin/path_provider_foundation/Sources/path_provider_foundation/messages.g.swift:10:10 Unable to find module dependency: 'Flutter'
  import Flutter
         ^

sign_in_with_apple
Clang dependency scanner failure: While building module 'sign_in_with_apple' imported from sign_in_with_apple-b77ac708.input:1:
In file included from <module-includes>:1:
In file included from /Users/myuser/Documents/mycompany/auftrag/AppName/name-app/ios/Pods/Headers/Public/sign_in_with_apple/sign_in_with_apple-umbrella.h:13:
/Users/myuser/Documents/mycompany/auftrag/AppName/name-app/ios/Pods/Headers/Public/sign_in_with_apple/SignInWithApplePlugin.h:1:9: fatal error: 'Flutter/Flutter.h' file not found
sign_in_with_apple-b77ac708.input:1:1: fatal error: could not build module 'sign_in_with_apple'


Unable to find module dependency: 'sign_in_with_apple'

/Users/myuser/.pub-cache/hosted/pub.dev/sign_in_with_apple-7.0.1/ios/Classes/SignInWithAppleAvailablePlugin.swift
/Users/myuser/.pub-cache/hosted/pub.dev/sign_in_with_apple-7.0.1/ios/Classes/SignInWithAppleAvailablePlugin.swift:6:8 Unable to find module dependency: 'Flutter'
import Flutter
       ^

What I’ve verified

  1. flutter clean + flutter pub get
  2. pod install --repo-update
  3. Deleted DerivedData
  4. Verified Generated.xcconfig exists
  5. Verified FLUTTER_ROOT path is correct
  6. Tried both in Podfile use_frameworks! :linkage => :static and modular headers
  7. Tried flutter build ios --no-codesign

Still, the same errors appear.

Observations

  • I couldn't find a solution with ChatGPT or searching in the Internet like on Stackoverflow
  • Since Flutter 3.35, Flutter.framework is no longer under .../engine/ios/Flutter.framework, but instead part of .../engine/ios/Flutter.xcframework/ios-arm64/Flutter.framework
  • After pod install, there is no Pods/Flutter/Flutter.xcframework folder at all.
  • Running flutter build ios does not generate the framework either — Flutter seems to depend on dynamic build-time injection, but the plugins expect static headers at build time.
  • On my Windows machine, the exact same project and plugin versions build perfectly (obviously without actual iOS compilation).

Podfile

platform :ios, '15.0'

ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. Run flutter pub get first."
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks! :linkage => :static
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
      config.build_settings['HEADER_SEARCH_PATHS'] ||= ['$(inherited)', '${PODS_ROOT}/../Flutter/Flutter.framework/Headers']
      config.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= ['$(inherited)', '${PODS_ROOT}/../Flutter']
      config.build_settings['DEFINES_MODULE'] = 'YES'
    end
  end
end

pubspec.yaml

name: myapp
description: "blablabla description"
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1

environment:
  sdk: ^3.5.4

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  intl: ^0.20.2
  http: ^1.2.2
  flutter_secure_storage: ^9.2.4
  provider: ^6.1.2
  flutter_launcher_icons: ^0.14.2
  cupertino_icons: ^1.0.8
  flutter_native_splash: ^2.4.4
  animated_text_kit: ^4.2.2
  sign_in_button: ^4.0.1
  google_sign_in: ^7.2.0
  email_validator: ^3.0.0
  flutter_bloc: ^9.1.1
  equatable: ^2.0.7
  app_links: ^6.4.1
  sign_in_with_apple: ^7.0.1
  jwt_decoder: ^2.0.1
  flutter_dotenv: ^6.0.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^6.0.0

flutter_native_splash:
  android: true
  ios: true
  color: "#0AA1F2"
  image: "assets/logo_splash.png"
  android_12:
    image: assets/logo_splash.png
    icon_background_color: "#0AA1F2"
    image_dark: assets/logo_splash.png
    icon_background_color_dark: "#0AA1F2"

flutter:
  fonts:
    - family: Coolvetica
      fonts:
        - asset: assets/fonts/coolvetica/Coolvetica-Italic.otf
          style: italic
        - asset: assets/fonts/coolvetica/Coolvetica-Regular-Crammed.otf
          weight: 300
        - asset: assets/fonts/coolvetica/Coolvetica-Regular-Condensed.otf
          weight: 400
        - asset: assets/fonts/coolvetica/Coolvetica-Regular.otf
          weight: 500
        - asset: assets/fonts/coolvetica/Coolvetica-Heavy-Compressed.otf
          weight: 600
  uses-material-design: true
  generate: true
  assets:
    - assets/icon.png
    - assets/icon_nobg.png
    - assets/buttons/apple_icon_x2.png
    - assets/buttons/google_icon_x2.png
    - .env

flutter_launcher_icons:
  android: true
  ios: true
  image_path: "assets/icon.png"
  adaptive_icon_background: "assets/icon.png"
  adaptive_icon_foreground: "assets/icon.png"
3
  • Did you tried? "flutter cache repair" may your cache damaged Commented Oct 8 at 18:51
  • Yes. I have tried, no matter what Cache i clean/repair. Commented Oct 9 at 5:14
  • Updating all packages to the latest version helps? Commented Oct 10 at 12:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.