Push Notifications with Urban Airship

9 thoughts on “Push Notifications with Urban Airship

  1. These two lines are giving me errors like stray
    [[UIApplication sharedApplication]
    11 registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
    12 UIRemoteNotificationTypeSound |
    13 UIRemoteNotificationTypeAlert)];?
    14
    15 – (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)_deviceToken {

    :43: error: stray ‘357’ in program

    :43: error: stray ‘273’ in program

    :43: error: stray ‘277’ in program

    45: error: wrong type argument to unary minus

    :45: error: expected ‘;’ before ‘:’ token

    total of 10 errors

  2. Did you copy and paste? Probably got some invisible characters from the paste.

    Try deleting the line entirely and retyping it.

  3. I see and thats fixed but I also get a Unary Minus expected ;

    Is this because the deviceToken wasnt declared or what

    see when I try to close the method after didregister it gives me a lot of errors of how device token is not in orgnaized structure etc.

    Any help.

  4. Evening

    Many thanks for the tutorial. I have been trying to get the UA Push Notification going for a while now – with no luck. Then I came across your site and thought excellent, here we go.

    I got the same errors above as I did a build.

    What I did was copy and paste the appropriate code from:

    http://urbanairship.com/docs/apns_test_client.html

    That fixed all the stray stuff, but am still getting the Unary Minus expected. I put the :

    NSString *deviceToken;
    …..
    @property (nonatomic, retain) NSString *deviceToken;

    in the header file and I still have my errors. The are two errors on the line, the Unary Minus and Expected : before : token.

    So close, but so far away.

    Any help would be appreciated.

    Regards

    Iain

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.