Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7577651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:14:35+00:00 2026-05-30T17:14:35+00:00

I have read ray’s awsome tutorials on apns from there http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12 http://www.raywenderlich.com/3525/apple-push-notification-services-tutorial-part-2 and i

  • 0

I have read ray’s awsome tutorials on apns from there
http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
http://www.raywenderlich.com/3525/apple-push-notification-services-tutorial-part-2

and i have implemented them with development certificate and every thing is working fine, but now when i have implemented it with production certificate, the device token has stop generating. i have created new App Id for production and also new Production Push SSL Certificate and i have also created the .pem files but some how the device token is not generating, plz. guide me in this coz i am stuck here, even this notification is not being called

- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
{
    NSString* oldToken = [dataModel deviceToken];

    NSString* newToken = [deviceToken description];
    newToken = [newToken stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];
    newToken = [newToken stringByReplacingOccurrencesOfString:@" " withString:@""];

    NSLog(@"My token is: %@", newToken);

    [dataModel setDeviceToken:newToken];
    [[NSNotificationCenter defaultCenter] postNotificationName:@"TokenRecieved" object:nil];

    if ([dataModel joinedChat] && ![newToken isEqualToString:oldToken])
    {
        [self postUpdateRequest];
    }
} 

plz. guide

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:14:36+00:00Added an answer on May 30, 2026 at 5:14 pm

    One reason of this type of behavior can be that you have not registered your application for RemoteNotifications. To register it for apns you will need to write following code in your Application Delegate’s didFinishLaunchingWithOptions method.

    [application registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeBadge ];
    

    It will register your device for Badge and Alert kind of notification. To verify whether application is registered or not you can go in settings>notification>your application if its their with these two kind of notification types then your application will be ready to call the delegate method and receive notification(if the switch in settings is on).

    Moreover, it would be helpful if you implement application:didFailToRegisterForRemoteNotificationsWithError: method and log errors if any.

    Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read Ray Wenderlich's awesome tutorials on apple push-notifications from here and here
I have read the GOLD Homepage ( http://www.devincook.com/goldparser/ ) docs, FAQ and Wikipedia to
Have read thru other source, such as: https://discussions.apple.com/message/7844057#7844057 Seems there is no way to
I have read the post http://iosdevelopertips.com/video/display-youtube-videos-without-exiting-your-application.html And YouTube player runs successfully. But every time
I have read (or perhaps heard from a colleague) that in .NET, TransactionScope can
I have read tutorials and several stack overflow posts that suggest I should use
i have read the thread Google Goggles API . and From NotAnotherCodeBlog have created
I have read some topic regarding with my question but there code doesn't work
I have read Answers to C++ interview questions among which there is one that
I have read the section on header injections as described here: http://guides.rubyonrails.org/security.html . But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.