MCPcopy Create free account
hub / github.com/NativeScript/firebase / _onToken

Method _onToken

packages/firebase-messaging-core/index.ios.ts:55–70  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 2

forEachMethod · 0.65
pushMethod · 0.65

Tested by

no test coverage detected