concept UrbanAirship in category ios

appears as: UrbAirship
iOS in Practice

This is an excerpt from Manning's book iOS in Practice.

There are various ways to develop the functionality necessary to create push notifications that are pushed to devices through Apple servers. UrbanAirship has an easy-to-use process to facilitate push notifications, and you’ll use it in this technique.

Figure 8.5. Creating a new app in UrbanAirship account
Method to prepare the notification-specific data to send to UrbanAirship
+(void)sendAPNWithMsg:(NSString*)msg;
{
    NSString *url = @"https://go.urbanairship.com/api/push/broadcast/";
    NSString *payload = [NSString
                     stringWithFormat:@"{\"aps\":{\"alert\":\"%@\"}}",
                        msg];

    NSString *resp = [APNSender HTTPPost:url body:payload];
    NSLog(@"Response: %@", resp);
}