zeyneloz / onesignal-node

A Node.js Library for OneSignal push notification service
MIT License
207 stars 48 forks source link

Sending notifications to Android and IOS apps question #10

Closed LaloCastilla closed 6 years ago

LaloCastilla commented 6 years ago

We are using this package and it worked very well sending notifications to Android devices. After that, we tried to send notifications to both platforms, Android and IOS using the array method defined in the documentation like this:

// create a Client for a multiple apps
var myClient = new OneSignal.Client({
    userAuthKey: 'XXXXXX',
    apps: ['id1Android', 'idIOS'] // your app ids
});

It this correct? cause when we try to send notifications to both platforms an error ocurrs but when we try to send it individually it works with the following notation:

// create a new Client for a single app
var myClient = new OneSignal.Client({
    userAuthKey: 'XXXXXX',
    // note that "app" must have "appAuthKey" and "appId" keys
    app: { appAuthKey: 'XXXXX', appId: 'XXXXX' }
});
zeyneloz commented 6 years ago

What is the error you get while sending to the both platforms?