3

I develop application for APNS. My code is work fine with one device and i got apple push notification for device as well. But when i run that application for device i got device token and through that token i will able to do all process. Now my problem is when i install same app for other device, the following methods could not work.

application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken 

application:(UIApplication *)app didFailToRegisterForRemoteNotificationsWithError:(NSError *)err

That means i did not get device token for other device. But yes when i install application for that device that app registered in notification section in device setting.

What to do and what i missed that why those method can not run for other devices with valid configured pro-vising profile?

Rajneesh071
  • 30,846
  • 15
  • 61
  • 74
Tirth
  • 7,801
  • 9
  • 55
  • 88
  • Have you registered for the notifications? Have you created the appropriate certificate for signing the app? – Praveen S Jul 05 '12 at 06:25
  • @PraveenS, yes.. my code is properly working for one device only... using proper configured provisional profile (the provision profile also already configured for multiple devices as well for cross checking APNS for multiple devices.). But i still not understand why those methods not running for other device ... ,also i check manually using breakpoints. – Tirth Jul 05 '12 at 06:37
  • Possible Duplicate [http://stackoverflow.com/questions/9719049/ipad-didnt-call-didregisterforremotenotificationswithdevicetoken](http://stackoverflow.com/questions/9719049/ipad-didnt-call-didregisterforremotenotificationswithdevicetoken) – Malek_Jundi Jul 05 '12 at 06:59
  • please check this post to get device token in ios 9 http://stackoverflow.com/a/39849892/3269536 – jenish Oct 04 '16 at 10:34

1 Answers1

5

I got my problem... Actually i not checking internet connection of other devices is proper or not. Due to internet connection problem those methods are not been worked. So thanks to apple provide me information through this http://developer.apple.com/library/ios/#technotes/tn2265/_index.html link provide me much information.

Tirth
  • 7,801
  • 9
  • 55
  • 88