Skip to content

Commit 9e129bc

Browse files
committed
fix(messaging): TNSFirebaseMessaging is not defined
fixes: #112
1 parent bf6c2c5 commit 9e129bc

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

packages/firebase-messaging/index.ios.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ export class Messaging implements IMessaging {
3939
}
4040

4141
get showNotificationsWhenInForeground(): boolean {
42-
return TNSFirebaseMessaging.showNotificationsWhenInForeground;
42+
return NSCFirebaseMessagingCore.showNotificationsWhenInForeground;
4343
}
4444

4545
set showNotificationsWhenInForeground(value: boolean) {
46-
TNSFirebaseMessaging.showNotificationsWhenInForeground = value;
46+
NSCFirebaseMessagingCore.showNotificationsWhenInForeground = value;
4747
}
4848

4949
get _onMessage() {
@@ -75,7 +75,7 @@ export class Messaging implements IMessaging {
7575
}
7676

7777
getAPNSToken() {
78-
return TNSFirebaseMessaging.APNSTokenToString(this.native.APNSToken);
78+
return NSCFirebaseMessagingCore.APNSTokenToString(this.native.APNSToken);
7979
}
8080

8181
hasPermission(): Promise<AuthorizationStatus> {
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
declare class TNSFirebaseMessaging extends NSObject {
1+
declare class NSCFirebaseMessagingCore extends NSObject {
22
static APNSTokenToString(tokenData: NSData): string;
33

4-
static alloc(): TNSFirebaseMessaging; // inherited from NSObject
4+
static alloc(): NSCFirebaseMessagingCore; // inherited from NSObject
55

6-
static new(): TNSFirebaseMessaging; // inherited from NSObject
6+
static new(): NSCFirebaseMessagingCore; // inherited from NSObject
77

88
static onMessageCallback: (p1: NSDictionary<any, any>) => void;
99

@@ -15,9 +15,3 @@ declare class TNSFirebaseMessaging extends NSObject {
1515

1616
static showNotificationsWhenInForeground: boolean;
1717
}
18-
19-
declare class TNSFirebaseMessagingLoader extends NSObject {
20-
static alloc(): TNSFirebaseMessagingLoader; // inherited from NSObject
21-
22-
static new(): TNSFirebaseMessagingLoader; // inherited from NSObject
23-
}

0 commit comments

Comments
 (0)