我第一次玩APNS,我嘗試運行一個iOS 5.0.1設備的概念驗證,並且didFailToRegisterForRemoteNotificationsWithError
被解僱。我知道它已經被解僱了,因爲我表現出UIAlertView
通知錯誤:didFailToRegisterForRemoteNotificationsWithError被觸發,如何獲取更多信息?
- (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];
}
我如何獲得有關錯誤的詳細信息?