令牌pushwoosh是零

时间:2015-03-03 16:46:55

标签: objective-c pushwoosh

在我的应用程序中,pushNotificationManager给我一个pushToken等于nil ...只有IOS 8.1.3 ....设备是ipad3。使用其他设备(或其他IOS版本)我的测试就可以了..

我使用此代码调用getPushToken ...

[[PushNotificationManager pushManager] getPushToken]

在我的appDelegate中我有

-(void) settingPushwoosh:(NSDictionary *)launchOptions {
    // set custom delegate for push handling, in our case - view controller
    PushNotificationManager * pushManager = [PushNotificationManager pushManager];
    pushManager.delegate = self;

    // handling push on app start
    [[PushNotificationManager pushManager] handlePushReceived:launchOptions];

    // make sure we count app open in Pushwoosh stats
    [[PushNotificationManager pushManager] sendAppOpen];

    // register for push notifications!
    [[PushNotificationManager pushManager] registerForPushNotifications];
}

1 个答案:

答案 0 :(得分:0)

收到推送令牌时是否收到委托回叫?有时您需要稍等一下,因为这是异步操作。