我使用的服务器链接是http://stefan.hafeneger.name/download/PushMeBabySource.zip
我使用 PushMeBaby 服务器和我的证书以及配置文件来推送应用程序,第一次运行应用程序时它会在设备上以警报形式给出通知并在控制台中打印语句。但是,当我多次运行应用程序进行测试时,它只返回设备令牌,以下方法根本不执行。请帮助我解决这个问题。
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
for (id key in userInfo) {
NSLog(@”key: %@, value: %@”, key, [userInfo objectForKey:key]);
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@”alert” message:key delegate:self cancelButtonTitle:@”ok” otherButtonTitles:nil];
[alert show];
/*if(key)
{
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@”alert” message:@”this is in application” delegate:self cancelButtonTitle:@”ok” otherButtonTitles:nil];
[alert show];
}*/
}
}
请尽快帮助我