9

少し奇妙な問題があります...

私のAppDelegate.mには、次のものがあります。

-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{    
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:NO];
    // Override point for customization after application launch.


    // Enable test flight reporting; https://testflightapp.com/sdk/doc/0.8.3/
    [TestFlight takeOff:@"myTestFlightToken"];

    // Let the device know we want to receive push notifications
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
     (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];

    return YES;
}

-(void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
{
    NSString *tokenAsString = [[deviceToken description] 
                                 stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];

    NSLog(@"Device token: %@", deviceToken);
    User.currentUserPushNotificationToken = tokenAsString;
    [TestFlight passCheckpoint: [NSString stringWithFormat: @"Registered for remote notifications %@", deviceToken]];
}

-(void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
{
    NSLog(@"Failed to get token, error: %@", error);
    [TestFlight passCheckpoint: [NSString stringWithFormat: @"Failed to register for remote notifications %@", error]];    
}

私のチームは、Test Flightを使用して、開発者と利害関係者の間でアドホックビルドを配布しています。

自分のiPhone4でアプリをビルドすると、プッシュ通知を許可するかどうかを尋ねられ、アプリは[設定]>[通知]>[通知センター]にも表示されます。

ここまでは順調ですね...

開発IPAを作成してチーム間で配布すると、他のユーザーはプッシュ通知を許可するかどうかを尋ねられず、これは[設定]>[通知...]に表示されません。

なぜこれが起こるのか誰かが考えることができますか?

アップデート

配布用に、アプリ名の代わりにバンドルIDに「*」が付いたチームプロビジョニングプロファイルを使用してアプリを構築しています。これが問題になる可能性がありますか?これは、Appleが自動的に生成するチームプロビジョニングプロファイルです。

4

1 に答える 1

7

はい、それが問題です。プッシュ通知のアプリ識別子にワイルドカード文字を含めることはできません(そうしないと、すべてのアプリにプッシュされます!)。

于 2012-05-22T02:39:29.787 に答える