firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.73k stars 3.98k forks source link

firebase_app_check: Fails to compile with Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module #13502

Closed jonmountjoy closed 1 month ago

jonmountjoy commented 1 month ago

Is there an existing issue for this?

Which plugins are affected?

App Check

Which platforms are affected?

iOS

Description

If I add this library, my app will no longer compile. This seems like the same error as we faced with Firestore described here: https://github.com/firebase/flutterfire/issues/13323 solved by @russellwheatley - where these libraries weren't updated for the latest Xcode version.

Reproducing the issue

flutter create appcheckfoo cd appcheckfoo flutter pub add firebase_app_check

Edit ios/Podfile so that you have: platform :ios "14.0"

flutter build ios

You'll get this:

appcheckfoo: flutter build ios
Building com.example.appcheckfoo for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: XYZ
Running pod install...                                             10.7s
Running Xcode build...
 └─Compiling, linking and signing...                         5.3s
Xcode build done.                                           36.1s
Failed to build iOS app
Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'firebase_app_check.FLTAppCheckProvider': '/tmp/appcheckfoo/ios/Pods/Headers/Public/Firebase/Firebase.h'
/Users/jonmountjoy/.pub-cache/hosted/pub.dev/firebase_app_check-0.3.1/ios/Classes/FLTAppCheckProvider.h:4:8

Encountered error while building for device.

Firebase Core version

3.6.0

Flutter Version

3.24.3

Relevant Log Output

No response

Flutter dependencies

Expand Flutter dependencies snippet
```yaml - firebase_app_check_platform_interface 0.1.0+38 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_app_check_web 0.1.3+2 [_flutterfire_internals firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins web] - firebase_auth_platform_interface 7.4.7 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_auth_web 5.13.2 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web] - firebase_core_platform_interface 5.3.0 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.18.1 [firebase_core_platform_interface flutter flutter_web_plugins meta web] - firebase_crashlytics_platform_interface 3.6.44 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_platform_interface 5.1.31 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - firebase_storage_web 3.10.3 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http meta web] ```

Additional context and comments

appcheckfoo: flutter doctor -v [✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348 darwin-arm64, locale en-GB) • Flutter version 3.24.3 on channel stable at /Users/jonmountjoy/fvm/versions/3.24.3 • Upstream repository https://github.com/flutter/flutter.git • Framework revision 2663184aa7 (5 weeks ago), 2024-09-11 16:27:48 -0500 • Engine revision 36335019a8 • Dart version 3.5.3 • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/jonmountjoy/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = /Users/jonmountjoy/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 16A242d • CocoaPods version 1.15.2

jonmountjoy commented 1 month ago

Upgrading to firebase_app_check: 0.3.1 -> ^0.3.1+3 solved the problem. Sorry about that. Leaving this here for others....