Skip to content

feat(messaging): ios & android messaging updates & fixes #3339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 47 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
f26b73d
messaging receiver updates / initial notification handling
Ehesp Mar 16, 2020
5d93f21
Attach Notification to RemoteMessage
Ehesp Mar 17, 2020
4b2d535
-
Ehesp Mar 17, 2020
e2c1042
-
Ehesp Mar 17, 2020
860c070
6.4.0-rc0
Ehesp Mar 17, 2020
6332dee
Merge branch 'master' of github.com:invertase/react-native-firebase
Ehesp Mar 18, 2020
6fb5634
Merge branch 'master' into @ehesp/messaging-update
Ehesp Mar 18, 2020
89407c1
Update ios permissions api
Ehesp Mar 18, 2020
6cbc963
iOS Messaging Refactor
Ehesp Mar 19, 2020
ebb8eb2
-
Salakar Mar 20, 2020
8f4178b
-
Salakar Mar 20, 2020
8cd582e
-
Salakar Mar 20, 2020
ffbef8f
Ensure android notification color resource is always set
Ehesp Mar 23, 2020
59d9fea
-
Salakar Mar 24, 2020
0bedfc5
rework iOS observables
Salakar Mar 24, 2020
0b052d6
add support for #1814
Salakar Mar 24, 2020
bc99205
enable onMessage foreground test for iOS
Salakar Mar 24, 2020
af723d0
ios - finalise bg/foreground/open events + cleanup
Salakar Mar 25, 2020
567901c
-
Salakar Mar 25, 2020
4a24d80
6.4.0-rc1
Salakar Mar 25, 2020
4dc074e
6.4.0-rc1
Salakar Mar 25, 2020
5b399d6
Merge branch 'master' into @ehesp/messaging-update
Salakar Mar 25, 2020
16c702e
fix linting issue from master
Salakar Mar 25, 2020
806f706
gitignore testing app scratch files
Salakar Mar 25, 2020
d78f355
gitignore testing app scratch files
Salakar Mar 25, 2020
6de4ba8
Fix bad type
Ehesp Mar 25, 2020
f03d0bc
iOS - only handle willPresentNotification for FCM messages
Salakar Mar 25, 2020
725446b
6.4.0-rc2
Salakar Mar 25, 2020
50cab3e
6.4.0-rc2
Salakar Mar 25, 2020
e860a3c
tests: call registerDeviceForRemoteMessages prior to get token for ios
Salakar Mar 25, 2020
249e7ef
fix: use updated terminology in `unregistered` error
Salakar Mar 25, 2020
081523e
derp
Salakar Mar 25, 2020
ce69e82
Merge branch 'master' into @ehesp/messaging-update
Salakar Mar 25, 2020
e54f4ec
fix: gracefully handle `registerForRemoteNotifications` if running on…
Salakar Mar 26, 2020
e31dfd5
Merge remote-tracking branch 'origin/@ehesp/messaging-update' into @e…
Salakar Mar 26, 2020
5b56e10
Merge branch 'master' into @ehesp/messaging-update
Salakar Mar 26, 2020
3580c21
ios: inject `isHeadless` prop into React root view
Salakar Mar 26, 2020
e95453c
Merge remote-tracking branch 'origin/@ehesp/messaging-update' into @e…
Salakar Mar 26, 2020
60f2b3a
6.4.0-rc3
Salakar Mar 26, 2020
92da0d2
6.4.0-rc3
Salakar Mar 26, 2020
d1954a6
attempt to fix CI
Salakar Mar 26, 2020
8103984
attempt to fix CI
Salakar Mar 26, 2020
341d23a
reject with error on getAPNSToken if registerDeviceForRemoteMessages …
Salakar Mar 26, 2020
63f707b
only call completionHandler on didReceiveNotificationResponse respons…
Salakar Mar 26, 2020
8e36baa
-
Salakar Mar 26, 2020
c077731
6.4.0-rc4
Salakar Mar 26, 2020
2d537d9
reset versions to 6.3.4 for merge
Salakar Mar 26, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -550,3 +550,7 @@ GoogleService-Info.plist

# generated file
RNFBVersion.m

app.playground.js
app.admob.js
app.smartreply.js
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
]
}
},
"version": "6.3.4"
"version": "6.4.0-rc2"
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"cross-env": "^5.2.0",
"eslint": "^6.1.0",
"flow-bin": "^0.100.0",
"firebase-admin": "^8.10.0",
"genversion": "^2.1.1",
"husky": "^1.3.1",
"lerna": "3.17.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/admob/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/admob",
"version": "6.3.4",
"version": "6.4.0-rc2",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - Google AdMob is an easy way to monetize mobile apps with targeted, in-app advertising.",
"main": "lib/index.js",
Expand Down Expand Up @@ -29,7 +29,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "725446b0be12e66e86a1d043fcc013d8f486781a",
"publishConfig": {
"access": "public"
}
Expand Down
5 changes: 1 addition & 4 deletions packages/analytics/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,10 +670,7 @@ export namespace FirebaseAnalyticsTypes {
* @param name Event name must not conflict with any Reserved Events.
* @param params Parameters to be sent and displayed with the event.
*/
logEvent(
name: string,
params?: { [key: string]: string | number | boolean },
): Promise<void>;
logEvent(name: string, params?: { [key: string]: string | number | boolean }): Promise<void>;

/**
* If true, allows the device to collect analytical data and send it to
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/analytics",
"version": "6.3.4",
"version": "6.4.0-rc2",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - The analytics module provides out of the box support with Google Analytics for Firebase. Integration with the Android & iOS allows for in-depth analytical insight reporting, such as device information, location, user actions and more.",
"main": "lib/index.js",
Expand All @@ -24,7 +24,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "725446b0be12e66e86a1d043fcc013d8f486781a",
"publishConfig": {
"access": "public"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/app-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/app-types",
"version": "6.3.4",
"version": "6.4.0-rc2",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "@react-native-firebase/app-types",
"files": [
Expand All @@ -13,7 +13,7 @@
"url": "https://github.com/invertase/react-native-firebase/tree/master/packages/app-types"
},
"license": "Apache-2.0",
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "725446b0be12e66e86a1d043fcc013d8f486781a",
"publishConfig": {
"access": "public"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/app",
"version": "6.3.4",
"version": "6.4.0-rc2",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Storage and more.",
"main": "lib/index.js",
Expand Down Expand Up @@ -53,15 +53,15 @@
"react-native": "*"
},
"dependencies": {
"@react-native-firebase/app-types": "6.3.4",
"@react-native-firebase/app-types": "6.4.0-rc2",
"opencollective-postinstall": "^2.0.1",
"superstruct": "^0.6.2"
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/react-native-firebase"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "725446b0be12e66e86a1d043fcc013d8f486781a",
"publishConfig": {
"access": "public"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/auth",
"version": "6.3.4",
"version": "6.4.0-rc2",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - The authentication module provides an easy-to-use API to integrate an authentication workflow into new and existing applications. React Native Firebase provides access to all Firebase authentication methods and identity providers.",
"main": "lib/index.js",
Expand All @@ -24,7 +24,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "725446b0be12e66e86a1d043fcc013d8f486781a",
"publishConfig": {
"access": "public"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/crashlytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/crashlytics",
"version": "6.3.4",
"version": "6.4.0-rc2",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - Firebase Crashlytics is a lightweight, realtime crash reporter that helps you track, prioritize, and fix stability issues that erode your app quality. React Native Firebase provides automatic crash reporting for both native and JavaScript errors, including unhandled promise rejections.",
"main": "lib/index.js",
Expand Down Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"stacktrace-js": "^2.0.0"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "725446b0be12e66e86a1d043fcc013d8f486781a",
"publishConfig": {
"access": "public"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/database/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/database",
"version": "6.3.4",
"version": "6.4.0-rc2",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in realtime to every connected client. React Native Firebase provides native integration with the Android & iOS Firebase SDKs, supporting both realtime data sync and offline capabilities.",
"main": "lib/index.js",
Expand All @@ -27,7 +27,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "725446b0be12e66e86a1d043fcc013d8f486781a",
"publishConfig": {
"access": "public"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/dynamic-links/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/dynamic-links",
"version": "6.3.4",
"version": "6.4.0-rc2",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - Dynamic Links",
"main": "lib/index.js",
Expand All @@ -25,7 +25,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "725446b0be12e66e86a1d043fcc013d8f486781a",
"publishConfig": {
"access": "public"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/firestore/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/firestore",
"version": "6.3.4",
"version": "6.4.0-rc2",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - Cloud Firestore is a NoSQL cloud database to store and sync data between your React Native application and Firebase's database. The API matches the Firebase Web SDK whilst taking advantage of the native SDKs performance and offline capabilities.",
"main": "lib/index.js",
Expand Down Expand Up @@ -29,7 +29,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "725446b0be12e66e86a1d043fcc013d8f486781a",
"publishConfig": {
"access": "public"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/functions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/functions",
"version": "6.3.4",
"version": "6.4.0-rc2",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - Cloud Functions for Firebase lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests. React Native Firebase supports integration with production and locally emulated Cloud Functions with a simple API interface.\n\n",
"main": "lib/index.js",
Expand Down Expand Up @@ -29,7 +29,7 @@
"devDependencies": {
"@react-native-firebase/private-tests-firebase-functions": "^0.0.1"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "725446b0be12e66e86a1d043fcc013d8f486781a",
"publishConfig": {
"access": "public"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/iid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/iid",
"version": "6.3.4",
"version": "6.4.0-rc2",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - Firebase Instance ID provides a unique identifier for each instance of your app and a mechanism to authenticate and authorize actions for it (for example: sending FCM messages).",
"main": "lib/index.js",
Expand All @@ -26,7 +26,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "725446b0be12e66e86a1d043fcc013d8f486781a",
"publishConfig": {
"access": "public"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/in-app-messaging/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-firebase/in-app-messaging",
"version": "6.3.4",
"version": "6.4.0-rc2",
"author": "Invertase <[email protected]> (http://invertase.io)",
"description": "React Native Firebase - Firebase In-App Messaging helps you engage your app's active users by sending them targeted, contextual messages that encourage them to use key app features. React Native Firebase provides support for both native Android & iOS integration with a simple JavaScript API.",
"main": "lib/index.js",
Expand Down Expand Up @@ -29,7 +29,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "725446b0be12e66e86a1d043fcc013d8f486781a",
"publishConfig": {
"access": "public"
}
Expand Down
13 changes: 7 additions & 6 deletions packages/messaging/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,26 @@ project.ext {
apply from: file("./../../app/android/firebase-json.gradle")

def autoInitEnabled = "true"
def defaultNotificationChannelId = ""
def defaultNotificationColor = ""
def notificationChannelId = ""
def defaultNotificationColor = "@color/white";
def notificationColor = defaultNotificationColor


if (rootProject.ext && rootProject.ext.firebaseJson) {
if (rootProject.ext.firebaseJson.isFlagEnabled("messaging_auto_init_enabled") == false) {
autoInitEnabled = "false"
}
defaultNotificationChannelId = rootProject.ext.firebaseJson.getStringValue("messaging_android_notification_channel_id", "")
defaultNotificationColor = rootProject.ext.firebaseJson.getStringValue("messaging_android_notification_color", "")
notificationChannelId = rootProject.ext.firebaseJson.getStringValue("messaging_android_notification_channel_id", "")
notificationColor = rootProject.ext.firebaseJson.getStringValue("messaging_android_notification_color", defaultNotificationColor)
}

android {
defaultConfig {
multiDexEnabled true
manifestPlaceholders = [
firebaseJsonAutoInitEnabled: autoInitEnabled,
firebaseJsonNotificationChannelId: defaultNotificationChannelId,
firebaseJsonNotificationColor: defaultNotificationColor
firebaseJsonNotificationChannelId: notificationChannelId,
firebaseJsonNotificationColor: notificationColor
]
}
lintOptions {
Expand Down
2 changes: 1 addition & 1 deletion packages/messaging/e2e/messaging.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('messaging()', () => {
}
});

android.it('receives messages when the app is in the foreground', async () => {
it('receives messages when the app is in the foreground', async () => {
const spy = sinon.spy();
const unsubscribe = firebase.messaging().onMessage(spy);
const token = await firebase.messaging().getToken();
Expand Down
36 changes: 24 additions & 12 deletions packages/messaging/ios/RNFBMessaging.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@

/* Begin PBXBuildFile section */
2744B98621F45429004F8E3F /* RNFBMessagingModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 2744B98521F45429004F8E3F /* RNFBMessagingModule.m */; };
DA26951322C6AFFC00241B22 /* RNFBMessagingDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DA26951222C6AFFC00241B22 /* RNFBMessagingDelegate.m */; };
27F24640242AA29F0098906C /* RNFBMessaging+UNUserNotificationCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F2463F242AA29E0098906C /* RNFBMessaging+UNUserNotificationCenter.m */; };
27F24643242AA2EE0098906C /* RNFBMessaging+AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F24642242AA2EE0098906C /* RNFBMessaging+AppDelegate.m */; };
27F24646242AA30E0098906C /* RNFBMessaging+FIRMessagingDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F24645242AA30E0098906C /* RNFBMessaging+FIRMessagingDelegate.m */; };
27F2464D242AA7330098906C /* RNFBMessaging+NSNotificationCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 27F2464C242AA7330098906C /* RNFBMessaging+NSNotificationCenter.m */; };
DA446E5222CA48690066A0A3 /* RNFBMessagingSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = DA446E5122CA48690066A0A3 /* RNFBMessagingSerializer.m */; };
DA446E5522CA4FB30066A0A3 /* RNFBMessagingAppDelegateInterceptor.m in Sources */ = {isa = PBXBuildFile; fileRef = DA446E5422CA4FB30066A0A3 /* RNFBMessagingAppDelegateInterceptor.m */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -29,12 +31,16 @@
2744B98221F45429004F8E3F /* libRNFBMessaging.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNFBMessaging.a; sourceTree = BUILT_PRODUCTS_DIR; };
2744B98421F45429004F8E3F /* RNFBMessagingModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNFBMessagingModule.h; path = RNFBMessaging/RNFBMessagingModule.h; sourceTree = SOURCE_ROOT; };
2744B98521F45429004F8E3F /* RNFBMessagingModule.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RNFBMessagingModule.m; path = RNFBMessaging/RNFBMessagingModule.m; sourceTree = SOURCE_ROOT; };
DA26951222C6AFFC00241B22 /* RNFBMessagingDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNFBMessagingDelegate.m; sourceTree = "<group>"; };
DA26951422C6B00A00241B22 /* RNFBMessagingDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNFBMessagingDelegate.h; sourceTree = "<group>"; };
27F2463E242AA29E0098906C /* RNFBMessaging+UNUserNotificationCenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNFBMessaging+UNUserNotificationCenter.h"; sourceTree = "<group>"; };
27F2463F242AA29E0098906C /* RNFBMessaging+UNUserNotificationCenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNFBMessaging+UNUserNotificationCenter.m"; sourceTree = "<group>"; };
27F24641242AA2EE0098906C /* RNFBMessaging+AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNFBMessaging+AppDelegate.h"; sourceTree = "<group>"; };
27F24642242AA2EE0098906C /* RNFBMessaging+AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNFBMessaging+AppDelegate.m"; sourceTree = "<group>"; };
27F24644242AA30E0098906C /* RNFBMessaging+FIRMessagingDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNFBMessaging+FIRMessagingDelegate.h"; sourceTree = "<group>"; };
27F24645242AA30E0098906C /* RNFBMessaging+FIRMessagingDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNFBMessaging+FIRMessagingDelegate.m"; sourceTree = "<group>"; };
27F2464B242AA7330098906C /* RNFBMessaging+NSNotificationCenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNFBMessaging+NSNotificationCenter.h"; sourceTree = "<group>"; };
27F2464C242AA7330098906C /* RNFBMessaging+NSNotificationCenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RNFBMessaging+NSNotificationCenter.m"; sourceTree = "<group>"; };
DA446E5022CA485C0066A0A3 /* RNFBMessagingSerializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNFBMessagingSerializer.h; sourceTree = "<group>"; };
DA446E5122CA48690066A0A3 /* RNFBMessagingSerializer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNFBMessagingSerializer.m; sourceTree = "<group>"; };
DA446E5322CA4F2E0066A0A3 /* RNFBMessagingAppDelegateInterceptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNFBMessagingAppDelegateInterceptor.h; sourceTree = "<group>"; };
DA446E5422CA4FB30066A0A3 /* RNFBMessagingAppDelegateInterceptor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNFBMessagingAppDelegateInterceptor.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -61,12 +67,16 @@
children = (
2744B98421F45429004F8E3F /* RNFBMessagingModule.h */,
2744B98521F45429004F8E3F /* RNFBMessagingModule.m */,
DA26951222C6AFFC00241B22 /* RNFBMessagingDelegate.m */,
DA26951422C6B00A00241B22 /* RNFBMessagingDelegate.h */,
DA446E5022CA485C0066A0A3 /* RNFBMessagingSerializer.h */,
DA446E5122CA48690066A0A3 /* RNFBMessagingSerializer.m */,
DA446E5322CA4F2E0066A0A3 /* RNFBMessagingAppDelegateInterceptor.h */,
DA446E5422CA4FB30066A0A3 /* RNFBMessagingAppDelegateInterceptor.m */,
27F2463E242AA29E0098906C /* RNFBMessaging+UNUserNotificationCenter.h */,
27F2463F242AA29E0098906C /* RNFBMessaging+UNUserNotificationCenter.m */,
27F24641242AA2EE0098906C /* RNFBMessaging+AppDelegate.h */,
27F24642242AA2EE0098906C /* RNFBMessaging+AppDelegate.m */,
27F24644242AA30E0098906C /* RNFBMessaging+FIRMessagingDelegate.h */,
27F24645242AA30E0098906C /* RNFBMessaging+FIRMessagingDelegate.m */,
27F2464B242AA7330098906C /* RNFBMessaging+NSNotificationCenter.h */,
27F2464C242AA7330098906C /* RNFBMessaging+NSNotificationCenter.m */,
);
path = RNFBMessaging;
sourceTree = "<group>";
Expand Down Expand Up @@ -139,9 +149,11 @@
buildActionMask = 2147483647;
files = (
2744B98621F45429004F8E3F /* RNFBMessagingModule.m in Sources */,
DA446E5522CA4FB30066A0A3 /* RNFBMessagingAppDelegateInterceptor.m in Sources */,
27F24643242AA2EE0098906C /* RNFBMessaging+AppDelegate.m in Sources */,
27F24640242AA29F0098906C /* RNFBMessaging+UNUserNotificationCenter.m in Sources */,
DA446E5222CA48690066A0A3 /* RNFBMessagingSerializer.m in Sources */,
DA26951322C6AFFC00241B22 /* RNFBMessagingDelegate.m in Sources */,
27F2464D242AA7330098906C /* RNFBMessaging+NSNotificationCenter.m in Sources */,
27F24646242AA30E0098906C /* RNFBMessaging+FIRMessagingDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,27 @@
*
*/

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#import <Firebase/Firebase.h>
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>

NS_ASSUME_NONNULL_BEGIN


@interface RNFBMessagingAppDelegateInterceptor : NSObject <UIApplicationDelegate>
@interface RNFBMessagingAppDelegate : NSObject <UIApplicationDelegate>

@property _Nullable RCTPromiseRejectBlock registerPromiseRejecter;
@property _Nullable RCTPromiseResolveBlock registerPromiseResolver;

+ (instancetype)sharedInstance;
+ (_Nonnull instancetype)sharedInstance;

- (void)observe;

- (void)setPromiseResolve:(RCTPromiseResolveBlock)resolve andPromiseReject:(RCTPromiseRejectBlock)reject;

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;

- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo;

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;

@end
Expand Down
Loading