0

I'm trying to create a little reminder-app for my special needs ;-) Is there a way to tell iOS to wake my app up from the background at a specific time/in regular intervals?

The app would then decide to turn on the screen or play a sound, if required.

So far I can't figure out how to do this. All I can find on iOS 7 multitasking is about playing music, downloading data etc. Nothing time based...

pnuts
  • 58,317
  • 11
  • 87
  • 139
Boris
  • 8,551
  • 25
  • 67
  • 120

2 Answers2

2

As far as I know, it is not possible.

The closest you can get to that is by sending either a local or a push notification.

Guilherme
  • 7,839
  • 9
  • 56
  • 99
  • When browsing the app store there are lots of alarm clock apps. How do they do it? Or do they only work while the app is in the foreground (which would be pretty useless). Apple's own timer-app can do this as well... – Boris Feb 14 '14 at 12:08
  • I've never used any alarm app, but I don't believe any of them can self-load on screen. It's most likely they send a notification or an alert. I don't remember how exactly is the Apple's alarm, but I guess it shows an UIAlert. Keep in mind that many features in Apple's apps use private/undocumented libraries and frameworks, and you shouldn't use them if you intend to send your app to the AppStore. – Guilherme Feb 14 '14 at 12:15
0

Take a look at local notifications: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction.html

The main class is UILocalNotification, documented at https://developer.apple.com/library/ios/documentation/iphone/Reference/UILocalNotification_Class/Reference/Reference.html

Daniel Martín
  • 7,815
  • 1
  • 29
  • 34
  • Hm, that doesn't actually wake my app up, does it? As far as I can see the user gets notfied and only he decides if the app gets opened or not. – Boris Feb 14 '14 at 12:12
  • You are not allowed to wake the app up without the users consent. – 67cherries Feb 14 '14 at 14:55