This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Constants from "expo-constants"; | |
| import * as Notifications from "expo-notifications"; | |
| import * as Permissions from "expo-permissions"; | |
| import React, { useState, useEffect, useRef } from "react"; | |
| import { Text, View, Button, Platform } from "react-native"; | |
| Notifications.setNotificationHandler({ | |
| handleNotification: async () => ({ | |
| shouldShowAlert: true, | |
| shouldPlaySound: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const jwt = require("jsonwebtoken"); | |
| const http2 = require("http2"); | |
| const fs = require("fs"); | |
| const token = jwt.sign( | |
| { | |
| iss: "APPLE-TEAM-ID" | |
| iat: Math.round(new Date().getTime() / 1000), | |
| }, | |
| fs.readFileSync("./myapp_apns_key.p8", "utf8"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as Notifications from "expo-notifications"; | |
| import React, { useState, useEffect, useRef } from "react"; | |
| import { Text, View, Button, Platform } from "react-native"; | |
| Notifications.setNotificationHandler({ | |
| handleNotification: async () => ({ | |
| shouldShowAlert: true, | |
| shouldPlaySound: false, | |
| shouldSetBadge: false, | |
| }), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/node_modules/expo-notifications/build/NotificationsEmitter.js b/node_modules/expo-notifications/build/NotificationsEmitter.js | |
| index d537118..d4b8968 100644 | |
| --- a/node_modules/expo-notifications/build/NotificationsEmitter.js | |
| +++ b/node_modules/expo-notifications/build/NotificationsEmitter.js | |
| @@ -13,7 +13,13 @@ export function addNotificationsDroppedListener(listener) { | |
| return emitter.addListener(didDropNotificationsEventName, listener); | |
| } | |
| export function addNotificationResponseReceivedListener(listener) { | |
| - return emitter.addListener(didReceiveNotificationResponseEventName, listener); | |
| + const subscription = emitter.addListener(didReceiveNotificationResponseEventName, listener); |