apps-sdk 1.0.61 → 1.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -48,13 +48,12 @@ class NotificationsPush {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
const { status: existingStatus } = await Notifications.getPermissionsAsync();
|
|
51
|
+
let finalStatus = existingStatus;
|
|
51
52
|
if (existingStatus !== 'granted') {
|
|
52
|
-
const{status} = await Notifications.requestPermissionsAsync();
|
|
53
|
-
|
|
54
|
-
Networking.sendEvent('action', 'allow_notifications');
|
|
55
|
-
}
|
|
53
|
+
const { status } = await Notifications.requestPermissionsAsync();
|
|
54
|
+
finalStatus = status;
|
|
56
55
|
}
|
|
57
|
-
if (
|
|
56
|
+
if (finalStatus === 'granted') {
|
|
58
57
|
token = (await Notifications.getExpoPushTokenAsync({"projectId": Constants.expoConfig.extra.eas.projectId})).data;
|
|
59
58
|
console.log('Notification token',token);
|
|
60
59
|
if(token) {
|
package/src/libraries/Session.js
CHANGED
|
@@ -21,8 +21,8 @@ class Session {
|
|
|
21
21
|
await this.storeSessionStructure();
|
|
22
22
|
await this.checkUserID();
|
|
23
23
|
this.sessionID = this.generateSessionID();
|
|
24
|
-
await this.checkFirstOpen();
|
|
25
24
|
await Networking.executeInit();
|
|
25
|
+
await this.checkFirstOpen();
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
storeSessionStructure = async () => {
|