Getting error in receiving push notification using apple push notification service in ios - ios5

I have developed a application that uses appcelerator cloud service and APN everything working fine I was able to register the device for push notification and even able to successfully send notification but in the receiving path of the notification I am getting error like UILocalNotification keyed archive array contains invalid classes: *** -[NSKeyedUnarchiver decodeObjectForKey:]: data to unarchive contains class (NSDecimalNumberPlaceholder) which has not been allowed. Ignoring.
I am not able to trace what this error try to say please help me out.
Thanks
Pushpa

Just ran into this as well. It seemed to consistently happen for me when you set the badge in the APNS payload to a negative number. See if this goes away if you add a check on your server to make sure the badge is always set to >=0.
Hope that helps.
Cheers,
Ashu

Related

Checking for other UIRemoteNotifications waiting, inside didReceiveRemoteNotifications

In didReceiveRemoteNotification, is it possible to see if there are other/older push notifications that haven't been responded to?
I have a scenario where each notification contains different data, and unless you exit app and select every single notification for your app. You app wont be able to get to that data.
I'm thinking that iOS must be storing that information in an array somewhere, but haven't been able to find anything through Google.
Advice please? Last chance saloon would be re-writing it to poll a server for notifications.
You cannot guarantee that your app will ever receive any push notification sent to it. The only way it does is if it is running when it receives the message or if the notification is used to launch your app.
I would recommend implementing a web service on your server that allows your app to pull down the data it needs from these notifications when it is running.

Push notification data when app is not running?

When the app is not running and user receives, say 5 push notifications, are those push notifications saved somewhere? Or is that data gone? I need to access all 5 push notifications when the app runs the next time.
To clarify, I already understand that you can access the push notification that caused the app to run. What I'm asking is to get all push notifications since the app got terminated.
The APNS service will only retain the most recent pushed message to a device - assuming there is still at least one other app installed AND the user allows push notifications for it, then this one stored message will be delivered the next time the user has an Internet connection.
For better information on the quality of service that Apple has implemented for the APNS service, see my other answer here:
Clarification on Apple APNS

How to test if Geoloqi push notifications are working or not?

For normal push notifications, when something new is added to a site, a push notification is sent to the device.
So if I want to test if push notifications work how do I do that?
I tried creating triggers and Geonotes on the console with the present location I receive on my iPhone. And then tried running the triggers hoping to receive a push notification, but unfortunately I am not getting any push notification.
What am I doing wrong?
I hope someone can help me with this.
You can use the message/send method to test sending a message directly to a device.
The simplest way is to log in to your own Geoloqi account from within your app, and then use the API console to send a message to your device. You can of course also send messages to other accounts, just take a look at the doc page for message/send.

Adding PushNotification service to an iPhone app

I am trying to implement Push Notification from server site in my application since many day but I am unable to get push notification service in my application. but I am getting this error:
error : Domain=NSCocoaErrorDomain Code=3000 'no valid' aps- environment' entitlement string found for application UserInfor=0x170140 {NSLOcalizedDescription=no valid 'aps- environment' entitlement string found for application}
Can any one help me out to resolve this error?
Or give me some more clear steps what I am missing in my application.
Actually I have to Send notification on some changes in my Server side application. Like If some one post a Blog on the site it should be shown in every app holder. For this we need to generate the JSON. So my main worry is how to connect my Server or my JSON updates with PushNotification service. I Think now it's more clear.
Thank you.
perhaps this will help you:
http://blog.boxedice.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/
and try to do a bit of googling!!

How can I debug Apple push notifications not being received?

I'm using apn_on_rails to integrate Apple's Push Notifications with my service.
For a while, notifications seemed to be sent without issue. But now the notifications don't seem to be making it to people's iPhones/iPads.
According to our database, the notifications are being sent (apn_on_rails has a sent_at field that gets updated when the notification is sent). But no one (myself included) actually get the notifications.
Any ideas where to even start looking to debug this?
Notifications are not displayed if the app is running.
You can check the error response of the sending.