Skip to content

Commit a9b2016

Browse files
rajveermalviyagnprice
authored andcommitted
ios: Add workaround for package:firebase_messaging when building with Xcode 16
Without this workaround iOS build currently fails with the following error: Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'firebase_messaging FLTFirebaseMessagingPlugin': '/Users/rajveer/Projects/zulip-flutter/ios/Pods/Headers/Public/Firebase/Firebase.h' /Users/rajveer/.pub-cache/hosted/pub.dev/firebase_messaging-15.0.4/ios/Classes/FLTFirebaseMessagingPlugin.h:11:8 Upstream issue and the workaround comment: firebase/flutterfire#13323 firebase/flutterfire#13323 (comment) Docs: https://developer.apple.com/documentation/xcode/build-settings-reference#Allow-Non-modular-Includes-In-Framework-Modules The documentation states that enabling this setting may result in issues later on, which is why this workaround should only be temporary until firebase_messaging is patched with the correct fix.
1 parent 977d27b commit a9b2016

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

ios/Flutter/Debug.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
22
#include "Generated.xcconfig"
3+
#include "Zulip.xcconfig"

ios/Flutter/Release.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
22
#include "Generated.xcconfig"
3+
#include "Zulip.xcconfig"

ios/Flutter/Zulip.xcconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Configuration settings file format documentation can be found at:
2+
// https://help.apple.com/xcode/#/dev745c5c974
3+
4+
// TODO(firebase/flutterfire#13323): remove this flag
5+
//
6+
// This flag is added to work around the iOS build failing
7+
// on Xcode 16. Remove it when `package:firebase_messaging`
8+
// is patched with a fix to build successfully on Xcode 16:
9+
// https://github.com/firebase/flutterfire/issues/13323
10+
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES=YES

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4949
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5050
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
51+
B3AF53A72CA20BD10039801D /* Zulip.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Zulip.xcconfig; path = Flutter/Zulip.xcconfig; sourceTree = "<group>"; };
5152
/* End PBXFileReference section */
5253

5354
/* Begin PBXFrameworksBuildPhase section */
@@ -78,6 +79,7 @@
7879
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
7980
9740EEB21CF90195004384FC /* Debug.xcconfig */,
8081
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
82+
B3AF53A72CA20BD10039801D /* Zulip.xcconfig */,
8183
9740EEB31CF90195004384FC /* Generated.xcconfig */,
8284
);
8385
name = Flutter;

0 commit comments

Comments
 (0)