Hey, @Sunny, which daily build did you use? I’d like to mention that a device build with push notification worked on iOS fine when built with daily build 1114. I installed a device build on a cleanly wiped iPod5 yesterday, and it prompted me if I want to receive push notifications from the app the first time I launched the app – and it’s working as expected.
Naomi
Edit: Woops, I just realized this thread is under Corona Cloud sub-forum. Maybe something is broken with Corona Cloud? My push notification implementation does not involve Corona Cloud…
thanks for your reply.you’re right about the subject, don’t want to use corona cloud
I don’t have my computer right now.
I’m going to try with a wiped iphone to make a test.
Cloud and Corona SDK are separate when it comes to things like that. Corona Cloud is a push sender that you can use your Corona SDK app to register with to receive push notifications.
launchArgs will only be set if you have received a push notification and your app is not launched. You should not get a “remote” notification event in this case as launchArgs has the information. If your app is backgrounded you should get a notification “remote” event. Are you sure you want to check your launchArgs inside the event handler and not in your main.lua’s main chunk?
I am having troubles with this. If my app is not active or backgrounded (I understand iOS has 5 states of an app), I do receive the push message but when starting the app, I do not get actions for the remote event (for example a native.showAlert or setting badgenumber)
[lua]–This native popup should show when the app opens / is open and the app was active, inactive, in the background or suspended?
However if I look in my iOS messagecenter and tap on the received push message, the app does start / get active and shows a native.showAlert. But you can’t expect that all users enter the app via the push message.
This is quite confusing and I’ll try to make sense of this.
Your app can be either
a) not in memory. That is someone killed it, or it hasn’t started since the last reboot.
b) in memory but backgrounded.
c) Active in the foreground.
If you’re active in the foreground, your app should get a notification event of type “remote”.
If your app is backgrounded and you interact with a push notification (swiping the lock while it’s on the lock screen, tapping the notification in the notification center), the OS will bring your app to the foreground and you will get a “remote” event.
If your app is not running and needs cold started and you start it by interacting with the push message, your launchArguments will be set and you will not get a notification event.
If your app is not running and you start it by tapping on it’s icon and not by interacting with a notification, you will not get any notification event or any launch arguments.
That’s clear. I make a server interaction than later to show messages when app is not started via the notification. This also is necessary to set the right badgenumber.
Hey, @Sunny, which daily build did you use? I’d like to mention that a device build with push notification worked on iOS fine when built with daily build 1114. I installed a device build on a cleanly wiped iPod5 yesterday, and it prompted me if I want to receive push notifications from the app the first time I launched the app – and it’s working as expected.
Naomi
Edit: Woops, I just realized this thread is under Corona Cloud sub-forum. Maybe something is broken with Corona Cloud? My push notification implementation does not involve Corona Cloud…
thanks for your reply.you’re right about the subject, don’t want to use corona cloud
I don’t have my computer right now.
I’m going to try with a wiped iphone to make a test.
Cloud and Corona SDK are separate when it comes to things like that. Corona Cloud is a push sender that you can use your Corona SDK app to register with to receive push notifications.
launchArgs will only be set if you have received a push notification and your app is not launched. You should not get a “remote” notification event in this case as launchArgs has the information. If your app is backgrounded you should get a notification “remote” event. Are you sure you want to check your launchArgs inside the event handler and not in your main.lua’s main chunk?
I am having troubles with this. If my app is not active or backgrounded (I understand iOS has 5 states of an app), I do receive the push message but when starting the app, I do not get actions for the remote event (for example a native.showAlert or setting badgenumber)
[lua]–This native popup should show when the app opens / is open and the app was active, inactive, in the background or suspended?
However if I look in my iOS messagecenter and tap on the received push message, the app does start / get active and shows a native.showAlert. But you can’t expect that all users enter the app via the push message.
This is quite confusing and I’ll try to make sense of this.
Your app can be either
a) not in memory. That is someone killed it, or it hasn’t started since the last reboot.
b) in memory but backgrounded.
c) Active in the foreground.
If you’re active in the foreground, your app should get a notification event of type “remote”.
If your app is backgrounded and you interact with a push notification (swiping the lock while it’s on the lock screen, tapping the notification in the notification center), the OS will bring your app to the foreground and you will get a “remote” event.
If your app is not running and needs cold started and you start it by interacting with the push message, your launchArguments will be set and you will not get a notification event.
If your app is not running and you start it by tapping on it’s icon and not by interacting with a notification, you will not get any notification event or any launch arguments.
That’s clear. I make a server interaction than later to show messages when app is not started via the notification. This also is necessary to set the right badgenumber.