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 all 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
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
2 changes: 1 addition & 1 deletion packages/admob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "c077731efbf8edf7b393e17d3e3878e9e7f621da",
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "c077731efbf8edf7b393e17d3e3878e9e7f621da",
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/app-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"url": "https://github.com/invertase/react-native-firebase/tree/master/packages/app-types"
},
"license": "Apache-2.0",
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "c077731efbf8edf7b393e17d3e3878e9e7f621da",
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"type": "opencollective",
"url": "https://opencollective.com/react-native-firebase"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "c077731efbf8edf7b393e17d3e3878e9e7f621da",
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "c077731efbf8edf7b393e17d3e3878e9e7f621da",
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/crashlytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"stacktrace-js": "^2.0.0"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "c077731efbf8edf7b393e17d3e3878e9e7f621da",
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "c077731efbf8edf7b393e17d3e3878e9e7f621da",
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dynamic-links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "c077731efbf8edf7b393e17d3e3878e9e7f621da",
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "c077731efbf8edf7b393e17d3e3878e9e7f621da",
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"devDependencies": {
"@react-native-firebase/private-tests-firebase-functions": "^0.0.1"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "c077731efbf8edf7b393e17d3e3878e9e7f621da",
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/iid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "c077731efbf8edf7b393e17d3e3878e9e7f621da",
"publishConfig": {
"access": "public"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/in-app-messaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"peerDependencies": {
"@react-native-firebase/app": "*"
},
"gitHead": "93c6b38f6d5e8f015aab585d7d4c18674f4a63cd",
"gitHead": "c077731efbf8edf7b393e17d3e3878e9e7f621da",
"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
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void hasPermission(Promise promise) {
.call(getExecutor(), () -> NotificationManagerCompat.from(getReactApplicationContext()).areNotificationsEnabled())
.addOnCompleteListener(task -> {
if (task.isSuccessful()) {
promise.resolve(task.getResult());
promise.resolve(task.getResult() ? 1 : 0);
} else {
rejectPromiseWithExceptionMap(promise, task.getException());
}
Expand Down
87 changes: 86 additions & 1 deletion packages/messaging/e2e/messaging.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,86 @@ describe('messaging()', () => {
return Promise.resolve();
}
});

it('sets the value', async () => {
should.equal(firebase.messaging().isAutoInitEnabled, true);
await firebase.messaging().setAutoInitEnabled(false);
should.equal(firebase.messaging().isAutoInitEnabled, false);
});
});

describe('isDeviceRegisteredForRemoteMessages', () => {
android.it('returns true on android', () => {
should.equal(firebase.messaging().isDeviceRegisteredForRemoteMessages, true);
// check deprecated method also
should.equal(firebase.messaging().isRegisteredForRemoteNotifications, true);
});
it('defaults to false on ios before registering', () => {
if (device.getPlatform() === 'ios') {
should.equal(firebase.messaging().isDeviceRegisteredForRemoteMessages, false);
// check deprecated method also
should.equal(firebase.messaging().isRegisteredForRemoteNotifications, false);
}
});
});

describe('unregisterDeviceForRemoteMessages', () => {
android.it('resolves on android', async () => {
await firebase.messaging().unregisterDeviceForRemoteMessages();
// check deprecated method also
await firebase.messaging().unregisterForRemoteNotifications();
});
});

describe('hasPermission', () => {
android.it('returns true android (default)', async () => {
should.equal(await firebase.messaging().hasPermission(), true);
});
it('returns -1 on ios (default)', async () => {
if (device.getPlatform() === 'ios') {
should.equal(await firebase.messaging().hasPermission(), -1);
}
});
});

describe('unregisterDeviceForRemoteMessages', () => {
android.it('resolves on android', async () => {
await firebase.messaging().unregisterDeviceForRemoteMessages();
// check deprecated method also
await firebase.messaging().unregisterForRemoteNotifications();
});
});

describe('requestPermission', () => {
android.it('resolves 1 on android', async () => {
should.equal(await firebase.messaging().requestPermission(), 1);
});
});

describe('getAPNSToken', () => {
android.it('resolves null on android', async () => {
should.equal(await firebase.messaging().getAPNSToken(), null);
});
it('resolves null on ios if using simulator', async () => {
if (device.getPlatform() === 'ios') {
should.equal(await firebase.messaging().getAPNSToken(), null);
}
});
});

describe('unsupported web sdk methods', () => {
it('useServiceWorker should not error when called', () => {
firebase.messaging().useServiceWorker();
});
it('usePublicVapidKey should not error when called', () => {
firebase.messaging().usePublicVapidKey();
});
});

describe('getInitialNotification', () => {
it('returns null when no initial notification', async () => {
should.equal(await firebase.messaging().getInitialNotification(), null);
});
});

describe('getToken()', () => {
Expand Down Expand Up @@ -91,9 +171,14 @@ 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);
if (device.getPlatform() === 'ios') {
await firebase.messaging().registerDeviceForRemoteMessages();
// call deprecated method also
await firebase.messaging().registerForRemoteNotifications();
}
const token = await firebase.messaging().getToken();
await TestsAPI.messaging().sendToDevice(token, {
data: {
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