Skip to content

Commit

Permalink
fix(messaging): TNSFirebaseMessaging is not defined
Browse files Browse the repository at this point in the history
fixes: #112
  • Loading branch information
triniwiz committed Aug 6, 2022
1 parent bf6c2c5 commit 9e129bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
6 changes: 3 additions & 3 deletions packages/firebase-messaging/index.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ export class Messaging implements IMessaging {
}

get showNotificationsWhenInForeground(): boolean {
return TNSFirebaseMessaging.showNotificationsWhenInForeground;
return NSCFirebaseMessagingCore.showNotificationsWhenInForeground;
}

set showNotificationsWhenInForeground(value: boolean) {
TNSFirebaseMessaging.showNotificationsWhenInForeground = value;
NSCFirebaseMessagingCore.showNotificationsWhenInForeground = value;
}

get _onMessage() {
Expand Down Expand Up @@ -75,7 +75,7 @@ export class Messaging implements IMessaging {
}

getAPNSToken() {
return TNSFirebaseMessaging.APNSTokenToString(this.native.APNSToken);
return NSCFirebaseMessagingCore.APNSTokenToString(this.native.APNSToken);
}

hasPermission(): Promise<AuthorizationStatus> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
declare class TNSFirebaseMessaging extends NSObject {
declare class NSCFirebaseMessagingCore extends NSObject {
static APNSTokenToString(tokenData: NSData): string;

static alloc(): TNSFirebaseMessaging; // inherited from NSObject
static alloc(): NSCFirebaseMessagingCore; // inherited from NSObject

static new(): TNSFirebaseMessaging; // inherited from NSObject
static new(): NSCFirebaseMessagingCore; // inherited from NSObject

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

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

static showNotificationsWhenInForeground: boolean;
}

declare class TNSFirebaseMessagingLoader extends NSObject {
static alloc(): TNSFirebaseMessagingLoader; // inherited from NSObject

static new(): TNSFirebaseMessagingLoader; // inherited from NSObject
}

0 comments on commit 9e129bc

Please sign in to comment.