1
我是iOS編程新手,在開發報亭應用程序時遇到了實際問題。 簡單地說,該應用程序似乎沒有收到報亭通知(在didReceiveRemoteNotification和didFinishLaunchingWithOptions中有NSLog,並且在XCode中運行應用程序期間沒有提供日誌)。我把所有的info.plist所需的設置,我也包括這在我的應用程序:iOS應用程序無法接收報刊亭通知
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// register for Push notification and don't use throttling for development
//[[UIApplication sharedApplication] unregisterForRemoteNotifications];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NKDontThrottleNewsstandContentNotifications"];
[[NSUserDefaults standardUserDefaults] synchronize];
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeNewsstandContentAvailability];
由於應用程序能夠處理正常的推Notifcations(警報,聲音等),我認爲它是所有關於節流,但是,正如我上面提到的,我將默認值設置爲不使用調節。我已經閱讀了一些Apple的指導方針,並通過許多論壇進行了搜索,發現我需要將我正在使用的設備設置爲在XCode組織中「啓用開發」。但是我找不到任何複選框或按鈕來設置它。我使用XCode 4.5。
任何人都可以幫助我解決這個問題嗎? 你有任何想法如何調試通知,並檢查他們消失的地方?
我剛剛發現,但我運行'[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeNewsstandContentAvailability]'enabledRemoteNotificationTypes仍然是0. – user1702601
我剛剛解決了它。這是關於iPad Store設置,並啓用應用程序的自動下載。 – user1702601