ios 6.0.2 breaks Push Notifications in Corona

We’re getting tons of support tickets from our users that has updated their device to 6.0.2. Push notifications has stopped working. We did some internal testing here, and indeed, when installing our Corona built game MindFeud on an ios 6.0.1 or 6.0.0 (or earlier) device, push works fine, but on 6.0.2 it does not. We have tested by downloading directly from the AppStore onto the devices.

Our servers never receive the device_token from 6.0.2 devices.

A small piece of code never hurts!

local function onNotification( event ) if event.type == "remoteRegistration" and event.token then registerDeviceToken(event.token) -- Send to our servers... end end Runtime:addEventListener( "notification", onNotification ) [import]uid: 21746 topic_id: 34429 reply_id: 334429[/import]

Haakon, when you say something is broken, I believe you. I know you put in the due diligence to try everything before you bring it up here on the forums. And like the other thread, I’m going to ask you to create a small sample and file a bug report. I’m not asking this to be a pain to you. I’m asking, because that’s the best way to get information into our bug tracking system for the engineers to schedule and work on.

I’m also emailing this (and your other facebook) post to the team to look at.

[import]uid: 199310 topic_id: 34429 reply_id: 136850[/import]

Hello @lost45,

We ask for code not because the APIs “weren’t tested”, but rather because it helps us determine if the issue is A) a Corona issue, B) a developer issue, or C) a 3rd-party interface issue. Facebook, for example, and despite the “myth”, is notorious for breaking their own system functionality on a whim and changing some seemingly obscure and unrelated checkbox in their developer portal that nobody can comprehend. Research in various forums confirms this… we have no reason to just blame somebody else.

Providing code helps us, and ultimately it helps everybody. Imagine if you walked into a doctor and said “I’m sick.” Sick how? Where does it hurt? When did it start? How long has it been occurring? We don’t ask for code because we’re trying to pass the blame or imply that Corona users are “wrong” and we’re “right”… we ask for it because we want to resolve the issue a.s.a.p. and we need more info to work off than just “this is broken!”.

I hope you can understand.

Regards,
Brent [import]uid: 200026 topic_id: 34429 reply_id: 136865[/import]

I agree that being asked to provide code can be a pain… *however* there have been quite a few times that I thought I’ve found a bug in Corona, only to find out (while I was writing a test-case) that it was a coding error on my part that was causing the problem… or that in the process I found a workaround for the bug.
[import]uid: 70847 topic_id: 34429 reply_id: 136866[/import]

Hi,

this is push notifications we’re talking about. There’s eally no way to write a test project for you since it involves too many parties (app, apple, certificates & provisioning etc). Besides, there’s just one way to implement it - the way you have done it in your own push notifications sample project.

In this case, all I can do is inform you that in a few days, more than 150 different users have filed a support ticket in our Tender app support. They used to get Push Notifications in MindFeud. Then they updated their device to 6.0.2, and they no longer receive push messages.

I can pick up one of our devices which does not have 6.0.2 on it, download MindFeud from the AppStore and push notifications work fine. When I do the same with a 6.0.2-updated device, push notifications no longer work.

EDIT: I could not find a Push Notifications sample code project. But your very own blog post explains how to set up and test push notifications: http://www.coronalabs.com/blog/2011/12/21/push-notifications-for-ios-in-corona-sdk/

EDIT 2: Removed all the fuzz from the thread, keeping only the relevant sections. After some more testing, push notifications work with new builds. I’ll file a ticket with Apple, this might be related to something on their side. At the same time, I’ll submit an app update using daily build 990 (we cant use 996 due to the Facebook publish_actions permission issue as reported in a different thread) to see if a new version on the app store helps. [import]uid: 21746 topic_id: 34429 reply_id: 136874[/import]

Now look here Brent, there’s no need to be a #@%#$% about it… digging your heels in regarding the actual source code that exhibits the problem, bad mouthing people and their work habits, questioning their intelligence — even mocking them? Very unprofessional, amateurish, even juvenile Brent. Please try and show a little decorum. You know, you get more flies with honey than you do with vinegar.

Oh wait, did I say Brent? I meant haakon, ahahahaha

[import]uid: 79933 topic_id: 34429 reply_id: 136876[/import]

Funny. There’s no intelligence being questioned nor any of the other things you imply, mpappas. You must read something else than what I wrote.

If you have a better idea on how to actually test push notifications and write a test project for it that makes it simple, feel free to share it. The complexity of handling push notifications makes it - in my opinion - impossible to put up some code to test. There’s really only that piece of code I pasted, the rest is configuration. [import]uid: 21746 topic_id: 34429 reply_id: 136877[/import]

Sincerely, thank you for the detailed reports Haakon. This is the kind of details (build numbers, test devices, OS versions, etc.) which should help determine what is causing this problem. If you get a response from Apple, see different behavior in your updated app in the store, or turn up any other details, please post to this thread, as it will be easiest to track progress here.

Thanks, and Happy New Year,
Brent
[import]uid: 200026 topic_id: 34429 reply_id: 136903[/import]

Hello @lost45,
Fair enough, the doctor analogy wasn’t great. And I noted above that Haakon HAS provided useful details which are appreciated. I was merely explaining why we ask for code samples whenever possible… and I realize it’s not realistic for every possible bug, but if a re-producable test case can be provided, it helps the engineers figure out the problem much faster.

This is a fairly serious issue (bug) and we recognize it. The next step is determining if it’s a Corona issue or an iOS 6.0.2. issue. Today is New Year’s Eve and tomorrow New Year’s Day. After that, I will personally “push” this issue (pardon the pun) with the engineering team.

Brent [import]uid: 200026 topic_id: 34429 reply_id: 136941[/import]

Haakon, do you know what build your live app is using? I have 6.0.2 on my iPhone 5 and I’m getting push notifications with an app built with 993.

Thanks
[import]uid: 199310 topic_id: 34429 reply_id: 136943[/import]

Rob, pretty sure it was 984. I’ll do some testing with that now. [import]uid: 21746 topic_id: 34429 reply_id: 136947[/import]

Haakon, can you help me understand the problem a little bit better. In the top post it appears that you never get a remoteRegistration event. But later it sounds like existing players no longer get push notifications, not that new players can’t get them.

Can you clarify this for us? I did a test going back to 971 and my app is able to receive new push notifications, but because this device is already registered, I can’t really test the remoteRegistration event.

Edit: I installed your app on my iPhone 5 w/ 6.0.2 and it never prompted me to allow Push Notifications, and I don’t believe I’ve seen any from it either. I did install it on a 6.0.1 device and I did get prompted to allow Push Notifications.

[import]uid: 199310 topic_id: 34429 reply_id: 137057[/import]

Rob, thanks for checking this out thoroughly, it’s much appreciated.

We have tested A LOT on our side now, and new builds works perfectly in both ios 6.0.1 and 6.0.2. We’re using 990. I have no clue as to why it does not work when the app is being downloaded from the appstore, but I feel pretty confident that releasing an update will fix the issue. We’ve uploaded a new version to Apple. When it is live, if push still does not work, then we can start digging deeper.

So let’s just leave it for now. I’ve requested an expedited review, hope to see the new version live in a few days time. :slight_smile:

The Facebook issue, however, prevents us from using builds 991 and higher, so I hope you can have someone check it asap. Just use your own test project and change publish_stream to publish_actions and see how things start failing… [import]uid: 21746 topic_id: 34429 reply_id: 137078[/import]

Haakon, when you say something is broken, I believe you. I know you put in the due diligence to try everything before you bring it up here on the forums. And like the other thread, I’m going to ask you to create a small sample and file a bug report. I’m not asking this to be a pain to you. I’m asking, because that’s the best way to get information into our bug tracking system for the engineers to schedule and work on.

I’m also emailing this (and your other facebook) post to the team to look at.

[import]uid: 199310 topic_id: 34429 reply_id: 136850[/import]

Hello @lost45,

We ask for code not because the APIs “weren’t tested”, but rather because it helps us determine if the issue is A) a Corona issue, B) a developer issue, or C) a 3rd-party interface issue. Facebook, for example, and despite the “myth”, is notorious for breaking their own system functionality on a whim and changing some seemingly obscure and unrelated checkbox in their developer portal that nobody can comprehend. Research in various forums confirms this… we have no reason to just blame somebody else.

Providing code helps us, and ultimately it helps everybody. Imagine if you walked into a doctor and said “I’m sick.” Sick how? Where does it hurt? When did it start? How long has it been occurring? We don’t ask for code because we’re trying to pass the blame or imply that Corona users are “wrong” and we’re “right”… we ask for it because we want to resolve the issue a.s.a.p. and we need more info to work off than just “this is broken!”.

I hope you can understand.

Regards,
Brent [import]uid: 200026 topic_id: 34429 reply_id: 136865[/import]

I agree that being asked to provide code can be a pain… *however* there have been quite a few times that I thought I’ve found a bug in Corona, only to find out (while I was writing a test-case) that it was a coding error on my part that was causing the problem… or that in the process I found a workaround for the bug.
[import]uid: 70847 topic_id: 34429 reply_id: 136866[/import]

Hi,

this is push notifications we’re talking about. There’s eally no way to write a test project for you since it involves too many parties (app, apple, certificates & provisioning etc). Besides, there’s just one way to implement it - the way you have done it in your own push notifications sample project.

In this case, all I can do is inform you that in a few days, more than 150 different users have filed a support ticket in our Tender app support. They used to get Push Notifications in MindFeud. Then they updated their device to 6.0.2, and they no longer receive push messages.

I can pick up one of our devices which does not have 6.0.2 on it, download MindFeud from the AppStore and push notifications work fine. When I do the same with a 6.0.2-updated device, push notifications no longer work.

EDIT: I could not find a Push Notifications sample code project. But your very own blog post explains how to set up and test push notifications: http://www.coronalabs.com/blog/2011/12/21/push-notifications-for-ios-in-corona-sdk/

EDIT 2: Removed all the fuzz from the thread, keeping only the relevant sections. After some more testing, push notifications work with new builds. I’ll file a ticket with Apple, this might be related to something on their side. At the same time, I’ll submit an app update using daily build 990 (we cant use 996 due to the Facebook publish_actions permission issue as reported in a different thread) to see if a new version on the app store helps. [import]uid: 21746 topic_id: 34429 reply_id: 136874[/import]

Now look here Brent, there’s no need to be a #@%#$% about it… digging your heels in regarding the actual source code that exhibits the problem, bad mouthing people and their work habits, questioning their intelligence — even mocking them? Very unprofessional, amateurish, even juvenile Brent. Please try and show a little decorum. You know, you get more flies with honey than you do with vinegar.

Oh wait, did I say Brent? I meant haakon, ahahahaha

[import]uid: 79933 topic_id: 34429 reply_id: 136876[/import]

Funny. There’s no intelligence being questioned nor any of the other things you imply, mpappas. You must read something else than what I wrote.

If you have a better idea on how to actually test push notifications and write a test project for it that makes it simple, feel free to share it. The complexity of handling push notifications makes it - in my opinion - impossible to put up some code to test. There’s really only that piece of code I pasted, the rest is configuration. [import]uid: 21746 topic_id: 34429 reply_id: 136877[/import]

Sincerely, thank you for the detailed reports Haakon. This is the kind of details (build numbers, test devices, OS versions, etc.) which should help determine what is causing this problem. If you get a response from Apple, see different behavior in your updated app in the store, or turn up any other details, please post to this thread, as it will be easiest to track progress here.

Thanks, and Happy New Year,
Brent
[import]uid: 200026 topic_id: 34429 reply_id: 136903[/import]