| 53 | } |
| 54 | } |
| 55 | _onToken(token: string) { |
| 56 | this._APNSToken = token; |
| 57 | if (this._getTokenQeueue.length > 0) { |
| 58 | this._getTokenQeueue.forEach((item) => { |
| 59 | item.resolve(token); |
| 60 | }); |
| 61 | this._getTokenQeueue.splice(0); |
| 62 | } |
| 63 | if (onTokenCallbacks.size > 0) { |
| 64 | onTokenCallbacks.forEach((cb) => { |
| 65 | cb(token); |
| 66 | }); |
| 67 | } else { |
| 68 | MessagingCore._messageQueues._onToken.push(token); |
| 69 | } |
| 70 | } |
| 71 | _onNotificationTap(message: any, remoteMessage: UNNotificationResponse, completionHandler: () => void) { |
| 72 | if (onNotificationTapCallbacks.size > 0) { |
| 73 | const msg = deserialize(message); |