Push notification via Parse with TestFlight

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----"];
    //-- Set Notification
    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)];
    }

    //--- your custom code
    return YES;
}





- (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
    // Store the deviceToken in the current installation and save it to Parse.
    PFInstallation *currentInstallation = [PFInstallation currentInstallation];
    [currentInstallation setDeviceTokenFromData:deviceToken];
    [currentInstallation saveInBackground];
}

- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo {
    [PFPush handlePush:userInfo];
}

, . Push-

+4
1

: push / ( ). , push- ( ). .

+5

All Articles