Is it possible to make a background service app in iOS which is invisible to user and hidden from springboard?

575 Views Asked by At

I want to make a background service app in iOS just like we have Intent-filter in android(without an activity) which in invisible to user but still exits on the device.

I need to keep a database file in this service app which user only need to instal in the device, but is not launchable or visible to user.

I've tried using SBAppTags in info.plist and it successfully hides the app icon from springboard but only for simulator and not for real iPhone device. As of iOS 8, Apple has closed off the SBAppTags feature so that one cannot use that to hide apps from springboard. Is there anything else that can be used in iOS similar to this?

In android, I've created Intent-filter for the service app which only needs to be installed once from the play store and thereafter remains invisible to user.

If anyone has done something similar in iOS, please comment below.

1

There are 1 best solutions below

0
On

Background service is a feature provided by Android.

In iOS, the best you can do is create a task, eg. a download task and handover it to the OS, when the app enters in background.

But, this background task will only run for max 30 sec or so(you can never predict). And can be killed by the OS anytime, without any notification.

    let session = URLSession(configuration: URLSessionConfiguration.default)

    if let downloadURL = URL(string: "YOUR FILE URL"){
        let downloadTask = session.dataTask(with: downloadURL)
        downloadTask.resume()
    }

Also if you want to use background service for specific tasks like VOIP, you need to add it to your Capabilities

Configure background modes

Download task documentation

Background Modes documentation