我第一次使用 APNS,我尝试使用 iOS 5.0.1 设备运行概念验证,结果didFailToRegisterForRemoteNotificationsWithError
被触发。我知道它已被解雇,因为我显示UIAlertView
通知错误:
- (void)application:(UIApplication*)application
didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
{
// Inform the user that registration failed
NSString* failureMessage = @"There was an error while trying to \
register for push notifications.";
UIAlertView* failureAlert = [[UIAlertView alloc] initWithTitle:@"Error"
message:failureMessage
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[failureAlert show];
[failureAlert release];
}
如何获取有关错误的更多信息?