开发者

How to show alerts from the application when it is not running?

开发者 https://www.devze.com 2022-12-25 14:22 出处:网络
I have an application in which I have to show the alerts for user specied reminders, I am able to show these reminders when my application is running but my problem is

I have an application in which I have to show the alerts for user specied reminders, I am able to show these reminders when my application is running but my problem is i have to show thsese reminders to the user when my application is not running? is it possible to show the alerts or remindsers when the application is running?

what i obsered in iphone native applications(messages, emails) it whill show no of unread or new messages at the top right tip of the icon on the desktop and it will keep on updates these co开发者_StackOverflow中文版unt. Can I impplement these king of alerts to my applications? if yes how? it not is there any other to show the alerts when application is not running?


Have a look at Push Notifications. Otherwise this it is not possible.


You'll note that the applications that do this were all written by Apple. As of V3.x of the iPhone, no third party applications can run in the background.

The official way to support this kind of functionality is to use Push Notifications. This requires a server-side component. Push notifications allow you to update the "unread count" or display messages exactly as you describe.


  • Above both answers are right.
  • Actually, you can never ever display alerts when application is terminated.
  • Remember that "iPhone" doesn't allow any background processing.
  • The alerts that you see are push notifications - which are sent from apple server to iphone.
  • Basically you need to study about push notifications.
  • Push notifications are sent from server to iPhone only when it is registered.
  • ( application registers for push notifications - which you can see in settings ).
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号