diff --git a/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/ios/Flutter/Debug.xcconfig b/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/ios/Flutter/Debug.xcconfig index e8efba114687..ec97fc6f3021 100644 --- a/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/ios/Flutter/Debug.xcconfig +++ b/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/ios/Flutter/Debug.xcconfig @@ -1,2 +1,2 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/ios/Flutter/Release.xcconfig b/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/ios/Flutter/Release.xcconfig index 399e9340e6f6..c4855bfe2000 100644 --- a/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/ios/Flutter/Release.xcconfig +++ b/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/ios/Flutter/Release.xcconfig @@ -1,2 +1,2 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/packages/firebase_in_app_messaging/firebase_in_app_messaging/ios/firebase_in_app_messaging/Package.swift b/packages/firebase_in_app_messaging/firebase_in_app_messaging/ios/firebase_in_app_messaging/Package.swift index b37c1755877a..80d79d0f4f59 100644 --- a/packages/firebase_in_app_messaging/firebase_in_app_messaging/ios/firebase_in_app_messaging/Package.swift +++ b/packages/firebase_in_app_messaging/firebase_in_app_messaging/ios/firebase_in_app_messaging/Package.swift @@ -14,7 +14,8 @@ enum ConfigurationError: Error { case invalidFormat(String) } -let firebaseInAppMessagingDirectory = String(URL(string: #file)!.deletingLastPathComponent().absoluteString +let firebaseInAppMessagingDirectory = String(URL(string: #file)!.deletingLastPathComponent() + .absoluteString .dropLast()) func loadFirebaseSDKVersion() throws -> String { @@ -34,7 +35,12 @@ func loadFirebaseSDKVersion() throws -> String { } func loadPubspecVersions() throws -> (packageVersion: String, firebaseCoreVersion: String) { - let pubspecPath = NSString.path(withComponents: [firebaseInAppMessagingDirectory, "..", "..", "pubspec.yaml"]) + let pubspecPath = NSString.path(withComponents: [ + firebaseInAppMessagingDirectory, + "..", + "..", + "pubspec.yaml", + ]) do { let yamlString = try String(contentsOfFile: pubspecPath, encoding: .utf8) let lines = yamlString.split(separator: "\n") @@ -98,7 +104,7 @@ let package = Package( .target( name: "firebase_in_app_messaging", dependencies: [ - .product(name: "FirebaseInAppMessaging", package: "firebase-ios-sdk"), + .product(name: "FirebaseInAppMessaging-Beta", package: "firebase-ios-sdk"), // Wrapper dependency .product(name: "firebase-core-shared", package: "flutterfire"), ], diff --git a/packages/firebase_in_app_messaging/firebase_in_app_messaging/ios/firebase_in_app_messaging/Sources/firebase_in_app_messaging/FirebaseInAppMessagingPlugin.m b/packages/firebase_in_app_messaging/firebase_in_app_messaging/ios/firebase_in_app_messaging/Sources/firebase_in_app_messaging/FirebaseInAppMessagingPlugin.m index 68ea56d2ed57..64519a1ca9db 100644 --- a/packages/firebase_in_app_messaging/firebase_in_app_messaging/ios/firebase_in_app_messaging/Sources/firebase_in_app_messaging/FirebaseInAppMessagingPlugin.m +++ b/packages/firebase_in_app_messaging/firebase_in_app_messaging/ios/firebase_in_app_messaging/Sources/firebase_in_app_messaging/FirebaseInAppMessagingPlugin.m @@ -4,8 +4,13 @@ #import "FirebaseInAppMessagingPlugin.h" -#import +@import FirebaseInAppMessaging; + +#if __has_include() #import +#else +#import +#endif NSString *const kFLTFirebaseInAppMessagingChannelName = @"plugins.flutter.io/firebase_in_app_messaging"; @@ -53,11 +58,11 @@ - (NSDictionary *_Nonnull)pluginConstantsForFIRApp:(FIRApp *)firebase_app { } - (NSString *_Nonnull)firebaseLibraryName { - return LIBRARY_NAME; + return @LIBRARY_NAME; } - (NSString *_Nonnull)firebaseLibraryVersion { - return LIBRARY_VERSION; + return @LIBRARY_VERSION; } - (NSString *_Nonnull)flutterChannelName { diff --git a/packages/firebase_in_app_messaging/firebase_in_app_messaging/ios/firebase_in_app_messaging/Sources/firebase_in_app_messaging/include/FirebaseInAppMessagingPlugin.h b/packages/firebase_in_app_messaging/firebase_in_app_messaging/ios/firebase_in_app_messaging/Sources/firebase_in_app_messaging/include/FirebaseInAppMessagingPlugin.h index c2957b10e7f9..37ba0b5579d2 100644 --- a/packages/firebase_in_app_messaging/firebase_in_app_messaging/ios/firebase_in_app_messaging/Sources/firebase_in_app_messaging/include/FirebaseInAppMessagingPlugin.h +++ b/packages/firebase_in_app_messaging/firebase_in_app_messaging/ios/firebase_in_app_messaging/Sources/firebase_in_app_messaging/include/FirebaseInAppMessagingPlugin.h @@ -6,7 +6,12 @@ #import #import + +#if __has_include() #import +#else +#import +#endif @interface FirebaseInAppMessagingPlugin : FLTFirebasePlugin @end