From 9b9705ca23b430facc9fddb2982014b99b05c487 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Thu, 9 Mar 2023 14:04:48 +0100 Subject: [PATCH] Attempt to fix #711 Why get device token would fail without error message? --- src/utils/push/updateExpoToken.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/push/updateExpoToken.ts b/src/utils/push/updateExpoToken.ts index 25382180..16dab9c5 100644 --- a/src/utils/push/updateExpoToken.ts +++ b/src/utils/push/updateExpoToken.ts @@ -14,7 +14,8 @@ export const updateExpoToken = async (): Promise => { const getAndSetToken = () => Notifications.getExpoPushTokenAsync({ projectId: '3288313f-3ff0-496a-a5a9-d8985e7cad5f', - applicationId: 'com.xmflsct.app.tooot' + applicationId: 'com.xmflsct.app.tooot', + devicePushToken: { type: Platform.OS === 'android' ? 'android' : 'ios', data: 'unknown' } }).then(({ data }) => { setGlobalStorage('app.expo_token', data) return data