Application which work in background only iPhone

大憨熊 提交于 2019-12-11 08:45:00

问题


I have requirement for an application which work in background only.

When first time application install on device then after installation that will be go to background. And after two minutes a view will popup on screen.

Now problem is that after installation how to redirect application into background?

i get answer for this that if we want to send our app into background then we have to open another app like as safari. so i get this solution.

Now problem is that how show a view after two minutes from background. I have to create as a demo not for app store. So if anyone have any solution then suggest me.

Thanks


回答1:


iOS is not designed to run code in the background. There are a few exceptions, for example a music streaming app, or a GPS navigation app, but in general it cannot be done.

Instead, you should run your app on a server in the cloud, and send a push notification to the phone when you want something to happen on the phone. You may also be able to achieve this with "local notifications", depending on what you're trying to do.




回答2:


It is not possible to do so in iOS. You can't send an app into the background

If you want your app to get displayed, the only way to do so is through push (from server) or local (from phone) notifications, and the user has to explicitly accept it.

Unfortunately, you can't make it open automatically.



来源:https://stackoverflow.com/questions/9678710/application-which-work-in-background-only-iphone

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