Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to have a running background app on iOS

This is a strange one, I have a need to create an iOS app that runs in the background on an iOS device, but can not be visible on the Home screen of the device. The app may need to show up in Settings to configure a few options, but it mostly needs to run behind the scenes.

I do not need to publish this app on the app store, it is strictly an enterprise app for my company.

Does anyone know how this kind of behavior might be achieved? Configuration profiles? API's? etc?

Edit: Jailbreaking the device is not really an option for us. We have to keep the devices as they are.

like image 774
Brian Avatar asked Feb 17 '23 08:02

Brian


2 Answers

Backgrounding

There are several methods to get permanent background execution:

a) Silent audio which is mentioned by JRG-Developer

b) Usage of beginBackgroundTaskWithExpirationHandler + turning location manager on/off (it will reset remaining time to 600 seconds)

Making app invisible

You can use SBAppTags in Info.plist (take a look at this: How to remove app icon programatically from jail broken iPhone app?)

It will make your icon not visible on Home screen.

like image 100
Victor Ronin Avatar answered Feb 18 '23 22:02

Victor Ronin


I've no idea how you can tackle the not be visible on the home screen criteria, but there are certain services that are allowed to be run in the background continuously, notably:

  • Background Audio (even silent audio)

While this is indeed very hacky, short of jailbreaking the devices, this may be your best bet.

While it's unlikely / very difficult to get past the review process, in the event for some reason you do need to (attempt) to publish this app to the App Store, some apps are even available on the App Store which take advantage of this hack, such as PasteBot.

You should definitely read their write-up here about getting their app's Cut-and-Paste functionality to work while in the background:

http://tapbots.com/blog/pastebot/pastebot-music-in-background

Another out-of-the-box idea, why not use Android devices instead, which do support multitasking?

like image 27
JRG-Developer Avatar answered Feb 18 '23 22:02

JRG-Developer