0
我試圖讓我的應用程序準備好推送通知,我在應用程序委託中插入以下代碼,但當我在設備上運行應用程序時(iPhone 3Gs-iOS 5.1.1)應用程序啓動正常但白色的「推送警報」如何要求用戶允許的通知!推送通知 - registerForRemoteNotification失敗
有人可以幫忙嗎?
來自德國的問候!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[application registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|
UIRemoteNotificationTypeAlert|
UIRemoteNotificationTypeSound];
// Override point for customization after application launch.
return YES;
}
謝謝,現在警報正在彈出! 但現在我變成以下錯誤:尚未存儲設備令牌。 (代碼:115,版本:1.0.67) –
你應該看看蘋果的文檔。你從哪裏得到錯誤?你在appDelegate中實現了委託方法嗎? – Sebrassi