OneSignal Ioni c 4 app_id не найден - PullRequest
       74

OneSignal Ioni c 4 app_id не найден

1 голос
/ 11 апреля 2020

Я настраиваю уведомления pu sh с сигналом о сигнале и сигналом для моего приложения ioni c.

Я все сделал правильно, но устройство не отображается при сигнале.

когда я запускаю приложение, я вижу в журналах:

2020-04-11 12:23:46.106 3541-3541/com.decouikit.news I/OneSignal: Location permissions not added on AndroidManifest file
2020-04-11 12:23:46.358 3541-4383/com.decouikit.news I/OneSignal: Device registered, push token = e3Gv3m0dEIM:APA....
2020-04-11 12:23:51.553 3541-4393/com.decouikit.news W/OneSignal: OneSignalRestClient: POST RECEIVED JSON: {"errors":["app_id not found. You may be missing a Content-Type: application/json header."]}
2020-04-11 12:23:51.562 3541-4394/com.decouikit.news W/OneSignal: Failed last request. statusCode: 400
    response: {"errors":["app_id not found. You may be missing a Content-Type: application/json header."]}
2020-04-11 12:24:06.720 3541-4475/com.decouikit.news W/OneSignal: OneSignalRestClient: POST RECEIVED JSON: {"errors":["app_id not found. You may be missing a Content-Type: application/json header."]}
2020-04-11 12:24:06.722 3541-4476/com.decouikit.news W/OneSignal: Failed last request. statusCode: 400
    response: {"errors":["app_id not found. You may be missing a Content-Type: application/json header."]}
2020-04-11 12:24:36.901 3541-4922/com.decouikit.news W/OneSignal: OneSignalRestClient: POST RECEIVED JSON: {"errors":["app_id not found. You may be missing a Content-Type: application/json header."]}
2020-04-11 12:24:36.903 3541-4923/com.decouikit.news W/OneSignal: Failed last request. statusCode: 400
    response: {"errors":["app_id not found. You may be missing a Content-Type: application/json header."]}
2020-04-11 12:25:22.069 3541-4961/com.decouikit.news W/OneSignal: OneSignalRestClient: POST RECEIVED JSON: {"errors":["app_id not found. You may be missing a Content-Type: application/json header."]}
2020-04-11 12:25:22.071 3541-4962/com.decouikit.news W/OneSignal: Failed last request. statusCode: 400
    response: {"errors":["app_id not found. You may be missing a Content-Type: application/json header."]}
...

app.component.ts:

constructor(
 private oneSignal: OneSignal,
 public platform: Platform,
 public bookmark: BookmarkService,
 public statusBar: StatusBar, public splashScreen: SplashScreen) {
 this.initializeApp();
 this.pages = [
   ...
 ];
}

initializeApp() {
    let self = this;
    this.platform.ready().then(() => {
    this.statusBar.styleDefault();
    this.statusBar.overlaysWebView(true);
    this.splashScreen.hide();

    window["plugins"].OneSignal.setLogLevel({logLevel: 4, visualLevel: 4});
    var notificationOpenedCallback = function (jsonData) {
        console.log('notificationOpenedCallback: ' + JSON.stringify(jsonData));
    };

    window["plugins"].OneSignal
        .startInit("ec1c1xxx-3b89-xxxx-8416-xxxxxxa9e85", "304xxxxx11")
        .handleNotificationOpened(notificationOpenedCallback)
        .endInit();
    self.defaultLoad();
});

}

...