0
我們的應用程序在iOS6上沒有任何問題,但在iOS7上,在收到多個推送通知時,應用程序凍結並必須強制關閉應用程序。當收到多個推送通知時,應用程序凍結
我們實現了didReceiveRemoteNotification並在UIAlertView和Post NSNotfication中顯示通知給指定的視圖控制器。我們甚至嘗試刪除NSNotification,但應用程序仍然凍結。
- (void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
UIApplicationState state = [application applicationState];
if (state == UIApplicationStateActive){
NSString *message = [[userInfo objectForKey:@"aps"] objectForKey:@"alert"];
[UserHelper showError:@"" withMessage:message];
[[NSNotificationCenter defaultCenter] postNotificationName:kNotifyNotification object:nil userInfo:userInfo];
}
}
這是推送通知
{
NewsFeedItemGUID = "6d4a3eeb-12bf-4371-896c-230b11217c52";
"_" = OKt9EVHaEeOu3QAbIbyL6A;
aps = {
alert = "a1 a1 completed the profile Affection Type Revealed in Love & Lust, Level 1";
};
}
{
NewsFeedItemGUID = "bcc72f7c-a9d3-4d2d-bcfe-b36573baee93";
"_" = "OZ-hEVHaEeOOAZDiugJkgA";
aps = {
alert = "a1 a1 just completed Level 1 in Love & Lust";
};
}
我們編輯應用程序既iOS6的(4.6.2的XCode)和iOS7(XCode7.0.1),但問題仍然存在結構。我們還沒有iOS7相關推送通知方法,這些似乎是導致問題?任何幫助,建議將不勝感激。
其din't FREEZ當我發表評論一切都在didReceiveRemoteNotification – Arsalan
比APN不是一個問題..檢查這2個函數'NSString * message = [[userInfo objectForKey:@「aps」] objectForKey:@「alert」]; [UserHelper showError:@「」withMessage:message];'你必須在那裏做錯事 – Dinesh