Is it possible to run a background application on iOS?

This is strange, I need to create an iOS application that runs in the background on the iOS device, but cannot be visible on the device’s main screen. Perhaps the application should appear in Settings to configure several settings, but basically you need to run it behind the scenes.

I do not need to publish this application in the application store , this is a strictly corporate application for my company.

Does anyone know how this behavior can be achieved? Profile Configuration? API's? etc.?

Edit: Jailbreaking for this device is not an option for us. We must keep the devices as they are.

+4
source share
5 answers

background

There are several ways to get a constant background:

a) The quiet sound JRG-Developer speaks of

b) Using startBackgroundTaskWithExpirationHandler + turning on / off the location manager (this will reset the remaining time to 600 seconds)

Make the application invisible

You can use SBAppTags in Info.plist (look at this: How to remove an application icon programmatically from a jailbroken iPhone iPhone application )

This will make your icon invisible on the home screen.

+4
source

I don’t know how you can solve the criteria not be visible on the home screen , but there are certain services that are allowed to work in the background continuously, in particular:

  • Background sound (even quiet sound)

While it is really very hacky, not to mention jailbreaking devices, this might be your best bet.

While it is unlikely / very difficult to go through the review process, for some reason you need to (try) publish this application on the App Store, some applications are even available on the App Store that take advantage of this hack, for example PasteBot .

You should definitely read their entry here on how to work with the Cut and Paste features in the background:

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

Another one of the ready-made ideas, why not use Android devices instead that support multitasking?

+3
source

Two methods:

  • Jailbreak

    . The Jailbroken iPhone is essentially a Mac, and you can use all the programming tricks for Mac UNIX - create a daemon (you can even ask launchd to do this) or something else. You can customize your own Cydia source. See the saurik website for a step-by-step guide and set up an experimental server using Ubuntu (which also used apt)

  • It is not possible to use jailbreak, but it will depend on what your application does. You can try using corporate push notifications.

+2
source

Given that this cannot be done on invulnerable phones, I would suggest the following:

  • create a directory application or a phone list application, something that is specific to your company.

  • connect to the web service once a day to register the device ID (so that you know that the user has not deleted the application)

  • inform users that they must constantly open the application (and if the user device does not register on the same day, send them an email asking them to start the application).

Now you can send back everything you want using the application. If they kill him, you will find out the next day when you have a script to look at the logs.

If you think this is a terrible idea, it is, but that’s all you can get in iOS right now.

EDIT: You can send a notification every day - say in AM - to make sure the user opened the application if it was not running.

+1
source

In my experience, this kind of behavior cannot be achieved on iOS. When an application enters the background, it is active only for a short certain period of time. After that, he goes into a hybernate state. It stops working. Thus, the behavior you mentioned cannot be achieved without abusing the iOS workflow. That's why some call iOS multitasking as invalid multitasking. It can only help jailbreak. This was for one occasion. The second, when the application is not visible on the main screen, is again impossible. It must be on the springboard to run.

-2
source

Source: https://habr.com/ru/post/1484732/


All Articles