IOS Background service accessible from other applications - ios

Is it possible to create an IOS Background Service ? Can it also be accessible from other applications?

Not without jailbraking the phone. And most certainly not for distributing over the AppStore.
You could create an application (with UI) that would be accessible to other applications via custom URL schemes (you could even set URL callbacks with the same mechanisms).
But it would be up to the user if they would decide to run or kill this app. It would not be a typical 'background task'.

Related

What's the best way to create a custom sharing method on iOS?

A streaming app that I'm using on iOS has a share button that allows me to hook into the sharing app extension. I'd like to be able to send the URL string that it has to a custom API on my server.
Would I need to create an entire app just to have that custom sharing method, or is there another way?
If that's the only way, how can I get that app on my phone without going through the store?
It seems like when I create, build and install apps through Xcode, Apple intentionally breaks the app after a short while?

Is it possible to access File Provider of another iOS app

I'm developing an app that needs to interact with other apps (that are developed by other persons). In order to do that, I wanted to use their File Provider to read and write from that.
I know the group they're using, but I don't know the URL of the File Provider. I need a way to copy some files programmatically.
I tried:
let provider = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.app.ish.iSH")
But it just doesn't work because I don't have the App Group in my App Id.
The iOS apps are sandboxed partly to specifically prevent this kind of thing from happening. Typically we use inter application URLs to communicate between apps. On a standard (non-jailbroken) device I don't believe there's way to read another application's files when you didn't develop that other app and can't control the app group

Create AssistiveTouch-like UI in iOS (using private APIs)

I'm wondering if by using Apple's private API I would be able to run my app in the background and provide a pop-over UI like the AssistiveTouch feature does, which can be activated from any part of the OS.
My app wouldn't need to be distributed through the App Store, so I have some freedom to explore use of such private routes.

Create equivalent of Androids sync adapter on iOS

I got data on a webserver which I want to download to an iOS contact list. Is it possible to programatically create an account on iOS that works like the android "sync adapter" and is not one of the default account or an LDAP/CardDAV account?
Or can I have my application to periodically chech for updates on my webserver without the user having to manually start it. (i.e. running in the background and starting up automatically when the phone is restarted)
No, to both. The best you can do is create a configuration profile that the user can download to add an LDAP/CardDAV account—but you will need to run an actual LDAP or CardDAV server to have any kind of automatic contact syncing happen without the user opening your app. The Address Book framework on iOS only allows you to add and modify contacts within the existing accounts on the device, and the multitasking rules only allow your app to start in the background if it provides a VoIP service.
Use silverstripe-sync !
Source: SO

How to stop SMS Preview in programmatically

Can we able to make show preview off.In Settings-->messages-->show preview--> ON/OFF, this is the action we have to perform programmatically.
This falls outside of your application sandbox. From the docs:
The Application Sandbox For security reasons, iOS restricts
each application (including its preferences and data) to a unique
location in the file system. This restriction is part of the security
feature known as the application’s sandbox. The sandbox is a set of
fine-grained controls limiting an application’s access to files,
preferences, network resources, hardware, and so on. Each application
has access to the contents of its own sandbox but cannot access other
applications’ sandboxes.
You may find a way to do it, but it's an absolute no-go unless you're developing for jailbroken devices. If you do find a way to accomplish this and plan to submit to the App Store, Rest assured, Apple will find this functionality in the review process and would reject it based solely on this functionality.

Resources