Launching iOS application in background from another application - ios

I am not aware much of APIs of iOS and its internals.
However, i want to run an application A in the background (not to launch application A in foreground) from another application B and do some tasks like downloading of content.
I would like to communicate between the apps using URL schemes.
In Android, it is possible to trigger an Android service in the background using implicit/explicit intents (URL schemes). I am looking for similar kind of APIs/components in iOS.
If not the whole application execution or any custom logic. Can I just execute NSURLSession from URL schemes which are used as a background content transfer job in iOS?
Best Regards,
Saurav

No and Yes
No, You cannot run another app from your app in background, but you can open it into foreground
Yes
If app A and B is developed by you, you can trigger a push notification from App A to B. B on receiving can execute your download code in background

Related

Can I do a background api call when the app is terminated/killed by the user in react native?

Can I do a background api call when the app is terminated/killed by the user in react native?
I tried with react-native-background-actions & react-native-background-timer.
Working fine in android but not in IOS when user terminate/kill the app
iOS have stricter policies about allowing background tasks to run when the app is killed, probably thats why you are facing this issue. Its not impossible to achieve what you are trying to, however its not very reliable, given that apple have full control of these tasks and when/if they are executed. You can try https://github.com/transistorsoft/react-native-background-fetch, its very well documented and might do the job for you.

How to build an IOS application that works even when the user closes it

I'm new to the world of iOS programming.
My goal is to build an application that works even when it's in the background and even when the user eventually closes it, as its purpose is to send data to my web page.
After building the application and making it work in the background, I started searching on the Internet how to make the application work for iOS even when the user closes it.
Starting from the fact that I also developed in Android, I started to do research with the following keywords (service / swift / ios) and I learned that in iOS it is not possible to have an application that works as a 'service' as it happens on Android.
So I wonder, how do applications like Gmail, WhatsApp, iMessage, Telegram work even when they are not active in iOS multitasking?
If the user merely "closes" an app by switching to another app, or locking their iPhone, then iOS APIs such as URLSessionDownloadTask will continue to download data in the background. Apps that play background audio also continue to run when an app is merely closed (but not killed).
However, none of these app tasks will run if a user force closes an app (swipes up in the Springboard launcher).

IOS app without any UI

I have no knowledge of iOS. I need to know if it is possible to create an application without any views. The app should run a background service triggered by the app installation (or boot), and the service will run permanently.
If you click the app icon, nothing should happen.
Thank you
This is not possible. There is no such concept as a service type application or functionality in iOS.
The reason is, the UIApplication class provides a centralized point of control and coordination for apps running in iOS, which is a part of UIKit.
Also, there are restrictions to run the background service in iOS.See the below pic and this link to know more about background modes for apps.
Possible Method:
This is possible by writing exit(0); inside the didFinishLaunchingWithOptions after the iOS supporting background service is initiated. However, the App-Store will reject your app.

What's solution to make task background in iOS same service in Android?

I'm newbie iOS. I have been develop Phonegap for Android and iOS. My App is update data from server every 1hour. In Android, i use service to do that. My app in Android working very good. Now, i want to develop version for iOS, and i have problem when update data from server every 1hour. I was research but not find anyway for my app.I don't know what's solution to replace for service in Android. Can you help me, what's solution. This have been kill me. Thank you so much.
Short answer is NO as Apple has restriction on background task running especially cases like yours.
But if you are downloading small amount of content, you do have some other options. From IOS 4.0 or above, you can declare your app to run in background when you fall under the following categories:
Audio
Location updates
Voice over IP
Newsstand downloads
External accessory communication
Bluetooth networking
Bluetooth data sharing
Background fetch (IOS 7)
Remote notifications (IOS 7)
In order to do so, you need to flag your app in the info.plist for Required Background Modes option. Apple will review your app specific in this area once you declared the option.
For your case to download the data, the possible option is to use the new feature in IOS 7 that's the background fetch or remote notification above. The suggestion from DOM was not asking you to download the content through push notification. But instead to use push notification to wake up your application and start downloading new content.
If you don't want to use push notification, the only way to go is register for background fetch. However, no matter which option you want to use, each download will only last for 30 seconds. And after that, your app will put into suspension mode again.
you can have a look on the link here:
Declaring Your App’s Supported Background Tasks
I think your best bet would be to use the push services instead of having your app go get data. Making your app do it is unreliable with phonegap apps because you cant create a service interface and you can not guarantee that your app will be running. With push service though, if your app isn't running, it will be woken up in a manner of speaking.
Take a look at this great how-to article that also discusses what push provides you.

How to update Geofencing list of points in iOS into Background

I would create an iOS application with geofencing.
Can I send a new list of geofencing points to this app through Apple Server in Background or must I launch the app to update its list of points ?
More easily, can I from an external server change the geofence point without launching the app ?
Thanks you very much.
Best regards
Assuming your app doesn't use any of the available background modes, you can't change them remotely. The push notifications are received and shown by the OS, and only opening them will trigger your app to load and execute your code.

Resources