Ionic-native: Onesignal interfacing seems to be obsolete with Ionic 2

Created on 10 Oct 2016  Â·  5Comments  Â·  Source: ionic-team/ionic-native

The current initialisation is failing with onesignal API,
OneSignal.init('somekey', { googleProjectNumber: 'somenumber', autoRegister: true }) .subscribe();
It fails with a promise(failure) presenting an error as unable to call apply on undefined in zone.js .
I dint dig into the code much yet but I think there is some change in the one signal API, and it must be reflected in ionic native bindings to it
tested it both on beta 11 and RC of ionic both of them fail.

as a temporary workaround pulling the older commit from onesignal repo works
https://github.com/OneSignal/OneSignal-Cordova-SDK.git#ac8e1e558a425fa79695cec7482e36b05214faab

Most helpful comment

Another data point for adding a version flag to plugins.

All 5 comments

I've done some digging the one signal API has been significantly changed, and the current bindings in Ionic native are obsolete, the must be fixed!

Are you waiting for deviceready to fire?

On Oct 10, 2016 10:26 AM, "Anagani Sai Kiran" [email protected]
wrote:

The current initialisation is failing with onesignal API,
OneSignal.init('somekey',
{ googleProjectNumber: 'somenumber', autoRegister: true })
.subscribe();
It fails with a promise(failure) presenting an error as unable to call
apply on undefined in zone.js .
I dint dig into the code much yet but I think there is some change in the
one signal API, and it must be reflected in ionic native bindings to it
tested it both on beta 11 and RC of ionic both of them fail.

_as a temporary workaround_ pulling the older commit from onesignal repo
works
https://github.com/OneSignal/OneSignal-Cordova-SDK.git#
ac8e1e558a425fa79695cec7482e36b05214faab

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/driftyco/ionic-native/issues/667, or mute the thread
https://github.com/notifications/unsubscribe-auth/ANJ8dBbCWQAQONuRiaxmsnBAQ_52bYXcks5qykr_gaJpZM4KSn3K
.

@ihadeed Yes, I am, it worked untill i updated the plugin to a newer version. Like I mentioned earlier its seems like an obsolete integration, with one signal api, the way the api must be intialised has changed in one signal, correct me if I am worng thank you!

Another data point for adding a version flag to plugins.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rajanshahsa picture rajanshahsa  Â·  3Comments

ihadeed picture ihadeed  Â·  4Comments

wwallace picture wwallace  Â·  4Comments

jgw96 picture jgw96  Â·  3Comments

mateo666 picture mateo666  Â·  3Comments