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:
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?
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.
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
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.
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:
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?