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:
/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
-
flutter clean + flutter pub get
-
pod install --repo-update
-
Deleted DerivedData
-
Verified Generated.xcconfig exists
-
Verified FLUTTER_ROOT path is correct
-
Tried both in Podfile use_frameworks! :linkage => :static and modular headers
-
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
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