UILocalNotification isn't working at all

后端 未结 3 1579
故里飘歌
故里飘歌 2020-12-09 04:20

I\'m having some really irritating problems with UILocalNotification.

While finishing up an app that I\'ve nearly completed, I noticed that I couldn\'

3条回答
  •  囚心锁ツ
    2020-12-09 04:41

    UILocalNotifications are only displayed automatically if the app is not running (or running in background). If the app is running and a local notification fires, UIApplicationDelegate’s - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification method gets called and the system doesn’t display anything (nor does it play a sound). If you want to display the notification, create an UIAlertView yourself in the delegate method.

提交回复
热议问题