4

This was always impossible in iOS6 and below however with the new multitasking API's etc in iOS7 I was wondering if it has become possible. I am developing an app that is for personal security... The user needs to be able to trigger an "an" inside of the app when in background mode... The shake function would be the best approach however so far it seems impossible..

Any help would be greatly appreciated. T

hgwhittle
  • 9,316
  • 6
  • 48
  • 60
Taylor Abernethy Newman
  • 1,162
  • 1
  • 11
  • 22

1 Answers1

2

The background tasking feature is not what you think. Apple heavily regulates it's use. You're probably thinking of the new iOS 7 background feature called "Background fetch". You can count on being activated for partial background execution as a batch job every few hours.

The new background fetch feature is to be used when: "The app regularly downloads and processes small amounts of content from the network."

This will let you update the state of your app in the background so that the new iOS 7 multitasking feature lets you see an updated state of the app in that view. There is no iOS 7 background state that does what you want.

Joel Fischer
  • 6,521
  • 5
  • 35
  • 46
  • 1
    Thanks for that. I am currently also "polling" the user location and status of battery etc every 5 minutes to a server so this new background fetch will work for that (Cleaner than the current solution of keeping the app in suspended mode with a location call every 5 minutes).. Is there no way at all to trigger an event inside the app from the background? Not even listening on private API's... Basically this app will have a small userbase so can adhoc if needed and bypass app store approval.. – Taylor Abernethy Newman Oct 11 '13 at 01:39
  • 1
    If you're talking about using private APIs b/c you don't have to worry about apple approval, perhaps VOIP? Otherwise location may be your best bet. I haven't investigated private APIs for this kind of thing. – Joel Fischer Oct 11 '13 at 01:50
  • @TaylorAbernethyNewman have you found something. I am working on such things too. – Arpit Kulsreshtha May 06 '14 at 11:04
  • @ArpitKumarKulshrestha, unfortunately I haven't been able to solve this issue... I was investigating a workaround by taking accelerometer data and analysing it in the background but that started to become too much... Best of luck to you though, be interested to hear if you amange to make something work. T – Taylor Abernethy Newman May 06 '14 at 22:27