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 6080985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:07:26+00:00 2026-05-23T11:07:26+00:00

I am trying to send push notification via PushMeBaby app according to [this tutorial

  • 0

I am trying to send push notification via PushMeBaby app according to [this tutorial ,][1] but I don’t know why it does not work ! I install iPusher App from itunes and worked fine ! here is my code :

- (id)init {
    self = [super init];

    if(self != nil) {
        self.deviceToken = @"5ce090e5 78d38a8a 149dbe46 cbe87e2e dc6c6d2a 4b97e3b7 a5d3f4c2 b09faad2";

        self.payload = @"{\"aps\":{\"alert\":\"You got a new message!\",\"badge\":5,\"sound\":\"beep.wav\"},\"acme1\":\"bar\",\"acme2\":42}";

        self.certificate = [[NSBundle mainBundle] 
                            pathForResource:@"aps_developer_identity" ofType:@"cer"];
    }
    return self;

}

URBan AirShip code :

 (void)application:(UIApplication*)application  
didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken  
{  
    // TODO: Pass the token to our server  
    // Convert the token to a hex string and make sure it's all caps  
    NSMutableString *tokenString = [NSMutableString stringWithString:[[deviceToken description] uppercaseString]];  
    [tokenString replaceOccurrencesOfString:@"<" withString:@"" options:0 range:NSMakeRange(0, tokenString.length)];  
    [tokenString replaceOccurrencesOfString:@">" withString:@"" options:0 range:NSMakeRange(0, tokenString.length)];  
    [tokenString replaceOccurrencesOfString:@" " withString:@"" options:0 range:NSMakeRange(0, tokenString.length)];  

    // Create the NSURL for the request  
    NSString *urlFormat = @"https://go.urbanairship.com/api/device_tokens/%@";  
    NSURL *registrationURL = [NSURL URLWithString:[NSString stringWithFormat:  
                                                   urlFormat, tokenString]];  
    // Create the registration request  
    NSMutableURLRequest *registrationRequest = [[NSMutableURLRequest alloc]  
                                                initWithURL:registrationURL];  
    [registrationRequest setHTTPMethod:@"PUT"];  

    // And fire it off  
    NSURLConnection *connection = [NSURLConnection connectionWithRequest:registrationRequest  
                                                                delegate:self];  
    [connection start];  




    NSLog(@"We successfully registered for push notifications");  
}  

- (void)application:(UIApplication*)application  didFailToRegisterForRemoteNotificationsWithError:(NSError*)error  
{  
    // Inform the user that registration failed  
    NSString* failureMessage = @"There was an error while trying to / register for push notifications.";  
    UIAlertView* failureAlert = [[UIAlertView alloc] initWithTitle:@"Error"  
                                                           message:failureMessage  
                                                          delegate:nil  
                                                 cancelButtonTitle:@"OK"  
                                                 otherButtonTitles:nil];  
    [failureAlert show];  
    [failureAlert release];  
}  






- (void)connection:(NSURLConnection *)connection  
didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge  
{  
    // Check for previous failures  
    if ([challenge previousFailureCount] > 0)  
    {  
        // We've already tried - something is wrong with our credentials  
        NSLog(@"Urban Airship credentials invalid");  
        return;  
    }  

    // Send our Urban Airship credentials  
    NSURLCredential *airshipCredentials = [NSURLCredential credentialWithUser:@"<GY__T8X4Rg6onkJSO8o0Bg>"  
                                                                     password:@"<Z_fhEasrQ6emwFcWMyiKrA>"  
                                                                  persistence:NSURLCredentialPersistenceNone];  
    [[challenge sender] useCredential:airshipCredentials  
           forAuthenticationChallenge:challenge];  
} 
  • 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-23T11:07:27+00:00Added an answer on May 23, 2026 at 11:07 am

    I have read through the tutorial you’ve followed on mobiforge and it is wrong on so many levels!

    If you want to use Push Notifications, then there really is no better way than to use Urban Airship

    Here are a pair of tutorials which will get you up and running using Urban Airship: Part 1 & Part 2 (I can also verify these work properly as I have followed them many times)

    If you would like avoid using a third party and instead have access to your own PHP capable server then here is another pair of tutorials which will help you get setup: Part 1 & Part 2

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

Sidebar

Related Questions

I'm trying to send a push notification to APNs using Erlang. This is the
I'm trying so send push notifications ton my iPhone (APNS). I read this post
I trying to use apns-csharp library to send push notification from .NET, I created
I am trying to send push notifications to iPhone via python as described here
I'am trying to send push notification from my localhost to my iDevices all work
I am trying to use PushMeBaby sample APN Server application to send push notifications
I'm trying to deploy a Rails3 app to Heroku, but am getting this 'Rake
I followed this tutorial for push notification. http://mobiforge.com/developing/story/programming-apple-push-notification-services . In my didFinishLaunchingWithOptions i have
I am new in Android and trying to develop an app with push notification.
Trying to send some email in my C# app. I am behind a proxy

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.