notifications doesn't show/ doesn't scheduled in Simulator but works in device Problem on Simulator 4.3?

爱⌒轻易说出口 提交于 2019-12-25 08:28:02

问题


I have Implemented a reminder application.

[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
    int count = [[[UIApplication sharedApplication] scheduledLocalNotifications] count];  
    NSLog(@"count is %d",count);

All are works fine notification alert raises when it's scheduled time arives.

Suddenly today notifications are not showing . and they didn't scheduled

notifications count also remains same even i set the notification,

But when i exicuted the application in my device, it works perfectly, notificaton count increases, Notification alert raises perfectly

But not work in simulator...

Why Notifications doesn't work on simulator..?

I have used Xcode 4.1

iPhone 4.3 simulator

What happen?


回答1:


Trash your /Users/{Your name}/Library/Application Support/iPhone Simulator/ directory and rebuild the projects you are having trouble with.

Solved by follow question iPhone: iOS 4.3 SDK Simulators stuck up and crashing:

Thank u @Kiby Todd...

Make Sure we put a copy of "User's" folder existed in iPhone Simulator folder

Re paste User Folder in iPhone Simulator



来源:https://stackoverflow.com/questions/10431086/notifications-doesnt-show-doesnt-scheduled-in-simulator-but-works-in-device-p

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!