简体   繁体   中英

Running app processes indefinitely in the background

I want to make a Test app that continuously increases an int by one after it is first opened and doesn't stop if it is closed in the background or completely closed (when you double tap the home button and swipe up on an apps screen on an iphone, I don't know what it's called).

I know that certain apps can run even though the user is currently not looking at it, but how do i get an app to run indefinitely in the background?

What I am looking for is similar to the way the game Tiny Towers (you build a tower and it earns money over time) keeps profits while it is offscreen or completely closed.

您需要为info.plist文件提供一个规范,例如UIBackgroundModes ,要完全终止该应用程序,您可以设置一个广播接收器。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM