I know that there are many questions like this, but I have tried several things, and I still can not get Push notifications to work with Parse with applications installed on a test flight.
If I connect my phone and download the application through Xcode, it works great. But if I load the same assembly in Testflight and try to send push, nothing will happen.
Some people said that the certificate of production and the certificate of the developer. Or it could be sandbox tokens. But I'm not sure how to fix these problems.
I have already added SSL and SSL certificates for Parse.
PS. Im Building a Developer Provisioning Profile, and I export AD HOC Developer.
My application delegation code ...
#import "AppDelegate.h"
#import <Parse/Parse.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[Parse setApplicationId:@"----I have mine in----"
clientKey:@"----I have mine in----"];
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
{
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
[[UIApplication sharedApplication] registerForRemoteNotifications];
}
else
{
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
}
return YES;
}
- (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
[currentInstallation setDeviceTokenFromData:deviceToken];
[currentInstallation saveInBackground];
}
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo {
[PFPush handlePush:userInfo];
}
, .
Push-