Closed williamrijksen closed 3 years ago
@jvandijk Based on #62, a functional test is still required. Can we do that?
But... Where is the release 2.2.0 for Android? The actual 2.1.1... shows me onesignal.getPermissionSubscriptionState is not a function
Thank you!
The 2.2.0 remove the depreciated idsAvailable without implement the remplacement method : getPermissionSubscriptionState, can we merge this PR ?
com.williamrijksen.onesignal-iphone-2.2.1.zip I've compile the module for iOS (since we need the last SDK version to remove the UIWebview error and stil need the player_id from OneSignal.
Use this code :
var e = onesignal.getPermissionSubscriptionState();
Ti.API.log("--- getPermissionSubscriptionState " + JSON.stringify(e));
It return on abject like this :
{
"subscriptionStatus": {
"userSubscriptionSetting": true,
"subscribed": true,
"userId": "THE PLAYER ID",
"pushToken": "THE PUSH TOKEN"
},
"permissionStatus": {
"status": 2,
"provisional": false,
"hasPrompted": true
},
"emailSubscriptionStatus": {
"emailAddress": null,
"emailUserId": null
}
}
Context
Replaces the idsavailable function by the get getPermissionSubscriptionState.
How to test
add the following code to your test device/application
Notes
Blocked by #62 This is a breaking change!