notification when program is in background iOS 4

萝らか妹 提交于 2019-12-10 18:35:53

问题


We are looking for a way to timeout an iPhone application, and have tried several methods:

NSTimer that resets after an action LocalNotification that resets after an action

Both are close, but suffer from unique issues:

NSTimer: When the phone sleeps, the timer will not fire LocalNotification: When the app is in the background, the notification is displayed, we don't have a way to have the application have to receive the notification.

Asking the group if this sounds correct, or if there is maybe some point above that I am missing that would allow this to work.

Thanks in advance!


回答1:


You do realize that when your app is in a suspended state, you won't receive any notifications -- and this is right in the documentation. There are only 3 classes of applications that can receive notifications: Audio applications (like iPod and analogues), location based applications, and voip apps. Your plist has to be set up correctly if your app is one of those applications.



来源:https://stackoverflow.com/questions/3249151/notification-when-program-is-in-background-ios-4

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