capacitor/ios upgrade 5.0.5 => 5.7.2; onesignal-cordova-plugin upgrade 5.0.0-beta-02 => 5.1.0
This commit is contained in:
@@ -6,7 +6,7 @@ import { Observable } from 'rxjs';
|
||||
//import 'rxjs/add/operator/map';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { SessionDataProviderService } from '../store/session-data-provider.service';
|
||||
import {Router} from "@angular/router";
|
||||
import { Router } from "@angular/router";
|
||||
import OneSignal from 'onesignal-cordova-plugin';
|
||||
|
||||
@Injectable({
|
||||
@@ -46,7 +46,8 @@ export class OnesignalService {
|
||||
OneSignal.Debug.setAlertLevel(0);
|
||||
|
||||
// NOTE: Update the init value below with your OneSignal AppId.
|
||||
OneSignal.init(this.AppId);
|
||||
//OneSignal.init(this.AppId);
|
||||
OneSignal.initialize(this.AppId);
|
||||
|
||||
// Location permissions enable geotagging in the OneSignal dashboard to send notifications to users based on their location
|
||||
OneSignal.Location.setShared(true);
|
||||
@@ -74,11 +75,12 @@ export class OnesignalService {
|
||||
|
||||
// Prompts the user for notification permissions.
|
||||
// * Since this shows a generic native prompt, we recommend instead using an In-App Message to prompt for notification permission (See step 7) to better communicate to your users what notifications they will get.
|
||||
OneSignal.Notifications.requestPermission(function(accepted) {
|
||||
/*OneSignal.Notifications.requestPermission(function(accepted) {
|
||||
console.log("User accepted notifications: " + accepted);
|
||||
});
|
||||
});*/
|
||||
OneSignal.Notifications.requestPermission(true); // @param {boolean} fallbackToSettings
|
||||
|
||||
//OneSignal.User.addAlias("external_id", member_uid);
|
||||
//OneSignal.User.addAlias("external_id", member_uid);
|
||||
OneSignal.login(member_uid);
|
||||
// OneSignal.getUser().addEmail(emailAddress, emailAuthHash);
|
||||
// Auth hashes are expected to be a HMAC on a SHA-256 of the OneSignal REST API Key and the <protected_field_value>
|
||||
@@ -102,4 +104,4 @@ export class OnesignalService {
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user