williamrijksen / com.williamrijksen.onesignal

Titanium Appcelerator Library for OneSignal Push Notifications Service
Other
51 stars 43 forks source link

7.5.0.GA - onesignal.idsAvailable is not fired - support #81

Closed antonioduran closed 4 years ago

antonioduran commented 5 years ago

Hello. Good afternoon.

Basically this part of code onesignal.idsAvailable is not executed with Titanium SDK 7.5.0.GA using the module version of iOS 2.1.1 https://github.com/williamrijksen/com.williamrijksen.onesignal/releases/download/2.1.1/com.williamrijksen.onesignal-iphone-2.1.1.zip, but if I use the version 2.0.0 of the module, the second time that I open the app is working pretty good as the code showed below, but the first time with 7.5.0.GA, and 2.0.0 is crashing the app also.

if (OS_IOS) {
     var onesignal = require('com.williamrijksen.onesignal');

     onesignal.promptForPushNotificationsWithUserResponse(function(y) {
          Ti.API.info(y);
          onesignal.idsAvailable(function(e) {
               Ti.API.info(e);
          }
     }
}

Please let me know whether you have any doubt or question. Thanks, and best, AD.

gurudey commented 5 years ago

7.4.x + 2.0.x = WORKS! 7.5.x + 2.1.x = NOT registering user with onesignal & crash.

chmiiller commented 5 years ago

Weird, I'm using it with 7.5.1 and 2.1.1 and it seems to work just fine. Gonna give it a try and let you know

chmiiller commented 5 years ago

Everything seems fine here...iOS users are successfully registered on One Signal app and the notification just arrived.

pitbot commented 5 years ago

Having the same issue. Using 7.5.1.GA and tried with modules v2.1.0 & 2.1.1 - neither register with OneSignal nor is idsAvailable ever fired.

gimdongwoo commented 5 years ago

I having same issue. Any updates?

pitbot commented 5 years ago

@gimdongwoo I have it working with 2.0.0 on SDK 7.5.1 now but obv would rather be on a later version.

gimdongwoo commented 5 years ago

I think this pr cause broken. https://github.com/williamrijksen/com.williamrijksen.onesignal/pull/77 @janvennemann

gimdongwoo commented 5 years ago

I want to rollback ios code to 2.0.1. I made 2.0.1 + update sdk version. https://github.com/gimdongwoo/com.williamrijksen.onesignal/releases/tag/2.0.2

jvandijk commented 5 years ago

The example as shown here indeed does NOT work anymore. You have to require the OneSignal module as early as possible on iOS. I advice to trigger it in the alloy.js. Afterwards somewhere else in the application code you can do the prompt. In this situation you'll be completely fine.

gimdongwoo commented 5 years ago

@jvandijk @janvennemann It’s not fine. This code looks like it works. But, No idsAvaliable, No registration. No new user on onesignal.com.

jvandijk commented 5 years ago

Screen Shot 2019-04-15 at 11 21 23

Here is a screenshot from OneSignal that shows version 2.1.1 of the library on TiSDK 7.5.1 on both Android and iOS. It shows the used OneSignal SDK versions and the fact that it's registering properly.

idsAvailable is deprecated, so that might also be an issue on itself.

gimdongwoo commented 5 years ago

@jvandijk On Android, I saw that registration is working. The reason is that Android has not changed its code since version 2.0.0.

Please remove the iOS user and trying to register a new one. Then the user will not be registered only iOS. I have tested this several times. Even if idsAvailable is deprecated, it still works in the latest SDK.

albert0m commented 4 years ago

this is happening to me too, I'm using TiSDK 8.1.2 on iOS 13. Anyone found a solution?

chmiiller commented 4 years ago

Sorry guys, IdsAvailable is not supported anymore from One Signal API and the new release 2.2.0 removes it. There's a PR #66 that's is supposed to improve this but I'm not so sure how. Maybe we can review that later? I think this issue might be closed for the moment.