小编qas*_*oui的帖子

错误:使用 OneSignal 推送注册时遇到错误:错误域=OneSignalError Code=400”

我在将一个信号集成到我的 iOS 应用程序时遇到了一个问题,我遵循了离子指南和一个信号中的所有内容,但收到此错误

错误:在使用 OneSignal 推送注册过程中遇到错误:错误域=OneSignalError Code=400 "(null)" UserInfo={returned={ errors = ( "app_id not found。您可能缺少 Content-Type: application/json 标头。 "); }}

我确定app_id是正确的

任何机构帮助这是我的代码:

platform.ready().then(() => {


  // Okay, so the platform is ready and our plugins are available.
  // Here you can do any higher level native things you might need.
  statusBar.styleDefault();
  splashScreen.hide();

if(platform.is('ios')){
    console.log('platform is ios using onsignail for ios');
    this.oneSignal.startInit('bae0c3e1-bc4e-49ab-9274-18635XXXXX', );

this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.InAppAlert);

this.oneSignal.handleNotificationReceived().subscribe(() => {
    // do something when notification is received
});

this.oneSignal.handleNotificationOpened().subscribe(() => {
    // …
Run Code Online (Sandbox Code Playgroud)

xcode push-notification ionic-framework onesignal

7
推荐指数
1
解决办法
2535
查看次数