[AC-5958] Notification not working with new SDK 7.4.0
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Done |
Resolution Date | 2018-10-18T19:33:19.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Pankti Pancholi |
Assignee | Jan Vennemann |
Created | 2018-10-09T13:11:03.000+0000 |
Updated | 2018-10-18T19:33:19.000+0000 |
Description
@jvennemann
I am having this issue with 7.4.1 and all new sdk only, If you try with 7.2.0 It is not happening, and Without using 7.4.1 my app is crashing and freezing so it has something to do with this new update only, as I am converting push messages to alert when app is open, Everything is working fine with 7.4.1 until I update SDK apart from crash and freeze in ios 12
Hello, Please share a sample project for us to test the issue on our end. Which platform are you trying on? Thanks.
Hello, Is there any update on this?
[~ppancholi], i looked through the log but i can't see anything unusual. To help you i need in-depth description of what i should do and what is expected to happen. For example here is what i did:
Create an adhoc dist of your app and installed it on my device
Open app and allow notification and location request
Receive alert that the app could not register for push notification with error message: Failed to register for push notifications! no valid "aps-environment" entitlement string found for application.
What is the expected behavior?- To check default behaviour please go for current app from app store and perform following steps, Once you open app after few minutes, You will see alert message saying Welcome to Bcc etc etc.. If app is open, Suppose app is not open but installed on device and user has allowed notifications it will come as (notifications from app)push messages in background, After that When you click on three line menu on top left side corner and go to profile it will take you to tour with images, You can skip the tour and it will open register window, You don't have to register, Use pankti@wearecircus.ca and I will provide you authentication code to connect or you can register by your email to make profile. When you click on connect button after entering email you will get alert saying connection code will send to your email, basically when app is open on device we are processing push messages coming from our API to show as an alert and when app is not open it will come as a notifications on device, With new SDK, it is not displaying push messages to alert it is providing simple blank alert..however, when app is close it will give proper notification It is working fine with old titanium SDK on all version of iOS but not with new SDK which is in my app-project which I am using to avoid crash on iOS 12 , Note: If you test current app from app store on iOS 12 it, will crush after it launch and you need to reopen it to go further , You will be fine if you test it on older iOS In controller, find file index.js where I have code which is processing on push messages to display as alert when app is open
@jvennemann Please let me know if there is any update on this as I can not do release with new titanium SDK which will resolve the crush issue for users, I am sending you new project folder, in which you can check this through development certificate as well so, You don't have to generate adhoc/Distribution package to test it
Thank you for trying hard to resolve issues with new SDK but I really need to do new release with new titanium sdk which will resolve app crush issue as people are sending bug reports for the app on this, And I can not push new release because of this push messages, I tried to resolve it with all available different option from my side but it is coming from new titanium SDK 7.4.1 and I can not really do anything form my side, Your help is much needed , @jvennemann please let me know if there is any update on this ticket,
I now got the project to run with push notifications enabled. However when i enter the email and click the connect button i don't see any alert popping up at all. I also tested with [Pusher](https://github.com/noodlewerk/NWPusher) and send a push notification to your app. This is the log output i get so push messages seem be properly received.
Output when sending a push notification with Pusher:
An alert was opened with only BCC and no message but this was due to the message payload being different than what you use to create your alert. Please check your server side implementation and test with pusher as it seems to me that push notifications are working perfectly fine.
Thanks for reply, I can definitely check that on server side but than, how come it is working fine right now with 7.2 SDK of titanium, Please check logs for that as well , I am receiving push messages properly when app is not open but I am processing it to show as an alert when app is open and it is getting only title BCC, I don't know for what reason, I checked this things form my side and everything seems to work fine
Have you tried adding the debug output to
pushCallback
and inspected what you actually receive there? The message is blank because you are assigning an undefined value. Make sure the payload of your push message matches the property path you assign to the message property.I did debug and I have check code as well but I am not able to figure out why it is sending undefined, everything is good with my code and second question to you is why it is not happening with titanium SDK 7.2.0
After going through the recent changes i found that the format of the data received in < 7.4.0 was wrong and was changed in 7.4.0. You should Just have to change your code to the following and you should see the message again:
Please see TIMOB-26349 and TIMOB-26399 for more info.
It is working fine now, I appreciate your help