How to register device token in Urban Airship for Push Notification? - iphone

I am using Urban airship for sending push notification, and i successfully achieved this. Now i am stuck an issue that before registering device token into urban airship i couldn't able to send broadcast, if i am wrong on this then how can i can send notifications into many devices in which my app is installed without registering their device tokens?

hey You have to register your app as In production, connecting to real push servers. and check out this link http://docs.urbanairship.com/build/push/index.html
it may be helpful to you

The broadcast should work in development mode as well.
When you login to "go" do you see your "Device Tokens" listed under your app? The other thing that could be a problem is if you have recently switch your app from development to production - if you try and send device tokens to APNS that are not mis-matched (production device tokens sent to sandbox vice-versa) you'll run in to this issue and likely see some sporadic results.
If you are in dev mode, you could simply delete the existing device tokens then get a few re-registered, then retry a broadcast.

Related

Appcelerator cloud push notification in iOS

I have implement the cloud push notification in iOS using this tutorial iOS push notification tutorial. I have did everything as per the above documentation. No error occur while registration.
In cloud console I can see 1 iOS client clients subscribed to push notifications. Everything seems fine but I cant able to receive the push notification.(even I have restarted my iPhone)
I have sent a push notification from cloud console, but I cant able to receive the push notification in my iPhone. Can anyone help me to solve this issue?
Thanks in Advance
Make sure you have the correct gateway selected on the server side.
The easiest way is to check your mobileprovisioning profile and look for "aps-environment" string. If it is set to "development" you need to use Development (aka Sandbox) gateway. If it is set to "production" you need to use Apple Push Production gateway.
This link might be interesting too:
http://www.pushwoosh.com/programming-push-notification/appcelerator-titanium-push-notification/
There are might be VERY small chance that firewall or router blocking push notifications, but this could be easily detected by switching your device from WiFi to 3G.
It might be an issue with your certificate. You should enable push notifications in the p12 certificate and it should be configured properly in ACS settings. Please refer Appcelerator Cloud Push Notification in iOS

Understanding details of Apple Push Notification Service

Is it true that we can use any component for our own server component? I mean it can be a Java or C# TCP/IP client which connects with Apple servers to push notifications. This can also be a console application, is that right?
Also, is it right that we have to push notifications for APN server, with each and every deviceTokens registered on our own server?
You can use whatever language you want and you will have to send push notifications for every registered device token. You should also investigate apple's feedback API's which you should periodically check to see which of your devices are no longer registered because sending a push has no feedback and you will not know if it is being received or not. If you use a service such as Urban Airship the setup will be much much easier to start and they have helpful API's to give them a group of device tokens or to do a mass push to all registered device tokens.
You are right on both accounts. You can write your own method to send it, and you must send it to each device id.
framework that might help you:
http://www.easyapns.com/

How device receives push notification? - iphone sdk

I want to ask you guys
How device receives push notification?
Is our device continuously connected to apple's server?
Many Thanks,
Nav
Device does not remain connected. In fact the app might not even be running any more.
The mechanism is as follows:
Your application has to register for notifications.
When it registers you get a token, which you send to your server.
When you wish to send a push notification, your server connects to Apple server and sends a message to the previously registered token.
Simple :)
For more details see:
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9

iPhone Push Notification Reliablity

How reliable do you find push notification on the iPhone to be? Does it improve when moving from the sandbox to production server?
I am testing (with the sandbox of course) and have found that notifications are often delayed or not received at all. I am not talking about sending multiple messages and only the last one arriving, as the documentation indicates, but any notification never showing up.
Also, I noticed that if I send a notification with an alert, and then send one with just a badge number, that the second notification will close the alert even after it's already opened. Does this happen between apps as well? For instance, if I send an alert for my app, and then the Facebook app sends a badge, will the Facebook badge close my alert window?
I have no development experience with iPhone apps, but I do know that if you have an unofficial unlocked phone (by using pwnage tool/blackrain etc) then the PUSH notifications might NEVER go through. In fact, it does go through, but to another user's iPhone.
This is because when an iPhone is unofficially network unlocked, it uses the Unique ID of some random individual's iPhone, which causes Push notifications to arrive on either phone (and yes, sometimes also on the unlocked phone it was intended for, but usually not)
Not sure if this is the case with you though, but AFAIK the service is pretty reliable if you follow Apple's rules. :)
The push notification seams better on production. You can always test it using ad-hoc distrbution which uses the production chanel to send the notifications.
I can confirm that production push notifications using
Production Push Notification Certificate
Adhoc Distribution Mobile Provisioning
TestFlight deployment
Production APNS server
works well, no need to publish your app to test production notifications
Production push notifications are not always received. If notifications are machine gunned 1 second apart the first one is received and the rest are not sent, thats my experience.
Where as on a windows phone, they are all received using the windows notification service.

Testing Apple Push Notifications Feedback - no items received

How to test feedback.sandbox.push.apple.com? Everything goes right, but I receive empty list.
How to make it consider the device token as inactive?
I installed the application to iPhone using Xcode, received some push notifications, then removed it from iPhone and send some more notifications. But even on the next day feedback.sandbox.push.apple.com returns just empty set.
Issues with Using the Feedback Service
If you remove your app from your device and then send a push notification to it, you would expect to have the device token rejected, and the invalidated device token should appear on the feedback service. However, if this was the last push-enabled app on the device, it will not show up in the feedback service. This is because deleting the last app tears down the persistent connection to the push service before the notice of the deletion can be sent.
You can work around this by leaving at least one push-enabled app on the device in order to keep the persistent connection up. Just install any free push-enabled app from the App Store and you should then be able to delete your app and see it appear in the feedback service.
source:
http://developer.apple.com/library/ios/technotes/tn2010/tn2265.html#TNTAG34
I far as I found, Apple push notification feedback service doesn't work properly on sandbox mode. You should try it on ad-hoc or production mode.