I want to create an iOS app where my app simply polls a public REST API every minute, in background, and give me local push notification if data from REST API matches my condition. Is this something that is possible and allowed by Apple?
Asked
Active
Viewed 1,843 times
1
-
1Why don't you just save your "condition" in the server and make it notify you using push notifications that something changed? Or use a silent push notification to enable background downloading of new data? Unfortunately, the app cannot enable in the background by itself. Also note that this could lead to Apple review rejection, since fetching data every minute will make a huge impact in battery life. – Alejandro Iván Feb 15 '18 at 17:16
-
well, i dont have a server, it's just polling from a public rest api, and i do not plan on publishing my app, just for personal use though.. – user1955934 Feb 22 '18 at 02:59
1 Answers
1
No. You cannot execute in the background once every minute. Please check out Apple's documentation on background execution.

Jake
- 13,097
- 9
- 44
- 73
-
im just making a simple app for my own self use, is this still not possible? im not publishing it to app store or anything – user1955934 Feb 15 '18 at 16:49
-
Anything is possible, it's just figuring out a way around Apple's security. I've seen apps use location updates or background audio to get background time. You just have to be creative. – Jake Feb 15 '18 at 16:51