Push "remoteRegistration" not being received after build .2115

Ok thank you, I find apple one of the most convoluted and frustrating companies to work with. Everything is overkill with them! Will go through all the steps again to see if I have missed anything.

Another question: How do we get the values of the ios push setup:

notification =
{
iphone =
{
types = { “badge”, “sound”, “alert” }
}
}

Need to know if the user enabled or disabled the push notifications.

Regards,

Trent

I don’t know that you can with Corona SDK.

So how do you know if the user has disabled push notifications? Or does the OS/app cancel any received push notifications automatically if the user has disabled them?

Regards,

Trent

When a user disables push notifications, the OS update’s the servers so they don’t send them to you at all.

Ah ok. Thank you.

Regards,

Trent

I’m experiencing the same issue on build 2189. Any word from Corona on this as this is holding up releasing our apps.

Regards,

Trent

Trent, this was solved in build 2155 on Jan 25, 2014. 

You could be hitting a different issue, or you may have some local setup issue creating problems.  Without seeing some code, its going to be hard to help. 

Hi Rob,

Here is my code, when testing on my iPhone 4S (v7.1) I don’t get the remoteRegistration event at all, not even an error. This same code works on my Android Galaxy Tab 10.1.

local function onNotification( event )
    if event.type == “remote” then
        print(“we received a push notification!”)
        if event.alert == nil then
            native.showAlert(“visitor id Mobile”, “event.alert was nil!!!”, {“OK”})
        else
            local notificationString = event.alert
            local strLen = notificationString:len()
            vMobileNumber = notificationString:match("%b()")
            local numLen = vMobileNumber:len()
            local alertString = notificationString:sub(1,(strLen - numLen))
            vMobileNumber = vMobileNumber:sub(2,(numLen - 1))
            system.vibrate()
            native.showAlert(“visitor id Mobile”, alertString, {“OK”, “Call”, “SMS”}, onNotificationClick)
        end – if
    elseif ( event.type == “remoteRegistration” ) then
        if event.token ~= nil then
            DT.deviceToken = event.token
            if string.sub( system.getInfo(“model”), 1, 2 ) == “iP” then
                registerVIDDevice()
            end – if
        else
            DT.deviceToken = nil
            native.showAlert(“visitor id Mobile”, “No token returned from remote registration”, {“OK”})
        end – if
    end – if
end – function

Runtime:addEventListener( “notification”, onNotification )

EDIT: Sorry I forgot to mention that my Galaxy tab is running the app on an older version of Corona, not the 2189 build.

Regards,

Trent

Hi Rob,

Any word on this? Is there something wrong with my code?

Regards,

Trent

I don’t see anything immediately wrong.  Push notifications (at least on iOS) are one of the most complex things to setup and test because there are so many pieces that have to be just right.  If there is a glitch in your certificate/keys or the provisioning profile or the iTunes setup it won’t work and there is practically no feedback as to the cause. 

Since it’s working on Android, which is (while still difficult) somewhat easier to deal with than IOS in this matter, I’m less likely to think it’s your code but something in the setup along the way.

Rob

Ok thank you, I find apple one of the most convoluted and frustrating companies to work with. Everything is overkill with them! Will go through all the steps again to see if I have missed anything.

Another question: How do we get the values of the ios push setup:

notification =
{
iphone =
{
types = { “badge”, “sound”, “alert” }
}
}

Need to know if the user enabled or disabled the push notifications.

Regards,

Trent

I don’t know that you can with Corona SDK.

So how do you know if the user has disabled push notifications? Or does the OS/app cancel any received push notifications automatically if the user has disabled them?

Regards,

Trent

When a user disables push notifications, the OS update’s the servers so they don’t send them to you at all.

Ah ok. Thank you.

Regards,

Trent