As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Lodi:
The push token being set to false is done on the device and is not handled via Kinvey at any point, unfortunately. If you are disabling push on the device, or are uninstalling the program, it may send out a call to the APNS server to set the token to false for your program.
Can you give me a bit more information about how you're testing this device, what you've changed that might make it's device token invalid, etc?
Thanks,
Damien,
I have double and triple checked that the notifications are turned on the phone. I am getting notifications from other apps with the same settings turned on. Actually these are the default with all settings available Sounds, Badges, show on lock screen.
How I am testing is loading via xCode and running tests. I have tried while in debug mode hooked to xCode and disconnected.
Anything would help.
Thanks
Lodi:
Can you please confirm what version of the iOS library you're using (You need 1.28 + for it to work as intended) and what platform you're targeting for me? Can you also post the code that you're using to enable push on the device?
Thanks,
The app has Kinvey 1.28. Targeting iOS 7 and 8 but currently testing on 8 right now. Code is below:
All in the AppDelegate:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0){
UIUserNotificationType noteTypes = UIUserNotificationTypeBadge |
UIUserNotificationTypeSound | UIUserNotificationTypeAlert;
UIUserNotificationSettings *noteSettings =
[UIUserNotificationSettings settingsForTypes:noteTypes categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:noteSettings];
[[UIApplication sharedApplication] registerForRemoteNotifications];
}else{
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound)];
}
(void) [[KCSClient sharedClient] initializeKinveyServiceForAppKey:@“XXXXXXXXXX”
withAppSecret:@“XXXXXXXXXXXXXXXXXXXXXX”
usingOptions:nil];
[KCSPush registerForPush];
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{
[[KCSPush sharedPush] application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken completionBlock:^(BOOL success, NSError *error) {
//if there is an error, try again laster
if(success == YES){
NSLog(@"## Worked success: %hhd", success);
}else{
NSLog(@"## PUSH REG ERROR: %@", error.description);
}
}];
// Additional registration goes here (if needed)
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
[[KCSPush sharedPush] application:application didReceiveRemoteNotification:userInfo];
application.applicationIconBadgeNumber = application.applicationIconBadgeNumber+1;
[[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInt:440] forKey:@"homeViewMode"];
}
- (void) application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error{
[[KCSPush sharedPush] application:application didFailToRegisterForRemoteNotificationsWithError:error];
NSLog(@"%@, %@", error, error.localizedDescription);
}
Lodijones
Have been working on this for weeks now and going in circles. Yesterday had push notifications working via console but just today it is not working unless I send to all users. I am testing by adding a condition of == to email. I am finding the console and the push notifications to be horribly inconsistent. If a delete a user and test via email it shows "sent to 1". Any ideas? I have several accounts on the same test phone so the _messaging tokens for several devices.
I have run the UrbanAirship script and the same phone token returns fine sometimes and false on the next day. Nothing is changing in the code we are using for notifications.
https://go.urbanairship.com/api/device_tokens/<DEVICE TOKEN YOU'RE TESTING>