My application is easily receiving less then 256 bytes in Push Notifications but as for iOS 8 it is capable of receiving 2K payload in Push Notifications, I am unable to receive that.
On server side i am using Asp.net and Following is my payload:
{"aps":{"alert":"ASD SAD SA DAS DSDSADSAD E36DCB20B9497BB75BE6BF0C47718C73E8D80A6B734F296BD768DC5C4DB261BCE36DCB20B9497BB75BE6BF0C47718C73E8D80Assdds","id":"5","type":"n","sound":"default","category":"1"}}
I am using iPhone 5S with iOS 8.1 for testing.
On iOS side i am using the below code
UIApplication *application = [UIApplication sharedApplication];
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)])
{
UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert |
UIUserNotificationTypeBadge |
UIUserNotificationTypeSound);
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes categories:nil];
[application registerUserNotificationSettings:settings];
[application registerForRemoteNotifications];
}
else
{
// Register for Push Notifications before iOS 8
[application registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeAlert |
UIRemoteNotificationTypeSound)];
}