Persistent call detection on iOS - ios

I have written an Android application which, even after termination, still runs a service that listens for phone state transitions. This way, the application was able to detect new phone calls and trigger a certain event, for example the dialog partner's number was stored in a database.
Now I am eager to implement this application on iOS as well, but I cannot figure out if it is even possible to listen for phone calls in a similar way. For all I know so far about iOS, whenever my application is terminated by either the user or the OS, it is not possible anymore to detect new phone calls.
Is there any way I can achieve this, or have I already reached a dead end?
EDIT: As it was said to be too broad:
I want to detect both incoming and outgoing calls at any time. It there a way to do this on iOS 10? I do not want code, I just want to know if it is possible.

Please investigate further App Sandbox principe that Apple is using.
In short:
App Sandbox is Based on a Few Straightforward Principles By limiting
access to sensitive resources on a per-app basis, App Sandbox provides
a last line of defense against the theft, corruption, or deletion of
user data, or the hijacking of system hardware, if an attacker
successfully exploits security holes in your app. For example, a
sandboxed app must explicitly state its intent to use any of the
following resources using entitlements:
Hardware (Camera, Microphone, USB, Printer) Network Connections
(Inbound or Outbound) App Data (Calendar, Location, Contacts) User
Files (Downloads, Pictures, Music, Movies, User Selected Files) Access
to any resource not explicitly requested in the project definition is
rejected by the system at run time. If you are writing a sketch app,
for example, and you know your app will never need access to the
microphone, you simply don’t ask for access, and the system knows to
reject any attempt your (perhaps compromised) app makes to use it.
On the other hand, a sandboxed app has access to the specific
resources you request, allows users to expand the sandbox by
performing typical actions in the usual way (such as drag and drop),
and can automatically perform many additional actions deemed safe,
including:
Invoking Services from the Services menu Reading most world readable
system files Opening files chosen by the user The elements of App
Sandbox are entitlements, container directories, user-determined
permissions, privilege separation, and kernel enforcement. Working
together, these prevent an app from accessing more of the system than
is necessary to get its job done.

Related

Publish IOS App to Appstore with SSID ( wifi) discovery/connect through app

I was trying to get a specific info before a IOS App development task which I searched but couldn't find anything relevant.
Wanted to know whether this requirement restricts (non compliance issue as per publish guidelines) the app to be published in App Store with features as below
User scans and lists all available wifi connections in a tableview
Selects one of the Wifi connection and connects on button click
Stores the password and SSID for future connections.
Would there be any compliance issue related to the same functionalities when submitting to IOS app store. One of my colleague have advised me about the same but not able to explain why? Which I tried to find out searching the internet, but too specific to find anything relevant. Deeply appreciate an Expert advise on this.
Thanks in advance.
I can't find anything in the Review Guidelines that would object your app idea: https://developer.apple.com/app-store/review/guidelines
A couple of areas where you should have a more detailed look:
2.5.1 Apps may only use public APIs.
2.5.9 Apps that alter the functions of standard switches, such as the Volume Up/Down and Ring/Silent switches, or other native user
interface elements or behaviors will be rejected.
5.1 Privacy
Technically, I'm not sure if it's even possible to change the WIFI not via the settings app, so I'd have a look their first. (https://apple.stackexchange.com/questions/1592/is-there-an-ipod-app-to-easily-switch-wifi-on-and-off)
I don't believe I've ever seen an app or a way to change SSID outside the Settings app. I explored a way to detect network changes, connects, disconnects, which work fine while the app is running. I was never able to influence how the user connected, just that a change happened. It also falls apart pretty quickly when the user backgrounds the app. Trying to keep a background task open long enough to poll the current connection fails pretty fast.
I wish Apple would provide some system level notification of Wifi connect events. This could be very useful to developers that want a little more control than Background App Refresh events.

Can I set an app to run when the device is Idle on iOS?

I work as a software developer, but I am absolutely new to Apple in general. We have the following case in a project, and we have not been able to figure out a solution for it, I would really appreciate some advise to find a solution (or drop the case if not possible)
A (potential) customer with multiple retail stores is interested in having a very simple app to display some content (this could an image or html, nothing too complicated) and periodically update this content from a server (this requirement is important). So it is very simple case, to use the device screen as advertising space
But here is the catch, users should be able to go out of this app and check out the device's system and other apps, and then the content should come back on the foreground when the device is idle. So basically we need something like a screensaver app that fetches the content (images) from a server and keeps them updated.
We have been looking at the guided access mode, but we are not sure it fulfills the requirements, because of the following issues
- Allowing the user to check out the device system and other apps. As far as we understood guided access restricts the device to one app.
- Re-launch the app (or bring it to the foreground) when the device has been idle for a period of time.
Note that we should account for a variety of devices (iPhone and iPads) with different OS versions
I appreciate your help and ideas. Thanks.
Apple does not allow apps to run continuously in the background except for a small limited group of exceptions. (music playing apps, for example.)
It's possible to set up your app to pretend to be a music playing app, and stay running in the background, but that means you will not be allowed on the app store.
Your client may be able to use the enterprise program to create apps for use in their retail stores. Enterprise apps don't have to go through the app store approval process.
I did this for a client recently (for an enterprise app.) As I recall I would have the app request background processing as soon as it moved to the background, and when it was notified that it's background time was ending, I would play a short "silence" sound and request another block of background time. Unfortunately it was work for hire and the contract ended, so I did not retain the source code.

iOS App/Service Restrictions

This question is speaking in more general terms rather than a specific issue, but is it possible for an App to have the ability to activate and deactivate service? I know it would take cooperation from the carrier, but in theory could you have an app that essentially controls your ability to turn your service off and on? I realize there are apps that block certain features like internet access, but I'm talking about completely cutting the phones service or reactivating it all together. Is this something that could be done, or is iOS to sandboxed to allow for such access?

Is it possible to get a unique identifier for an ios device from a browser, in a controlled environment?

This is (a very simplified version of) the scenario with which I am faced:
I have an existing web application which manages jobs. We are now purchasing a number of ios devices (iphones and ipads) and I need the web application to know which specific device (regardless of the user) is updating information through the web application (as well as getting the GPS co-ordinates, but I think I have that covered with the geolocation API).
I have control of all the devices, they will all come to me before being distributed and will return to me periodically, so I can modify/restrict etc., but I can't jailbreak.
I have no experience of ios, but if there is a way to do this without needing an app, that would be the best choice.
You can use HTML5 storage to create and save a GUID the first time user accesses your website and send it with subsequent requests.

Sharing information between apps

There are two applications. How can they share information? Can we use a common database for them? Perhaps we can pass parameters from one application to another?
You cannot directly share any resources; every app is in its own "sandbox" and cannot access the resources of any any other app.
You can send data back and forth between apps a couple of ways, however.
If you want everything to stay on the device then you can implement application:openURL:sourceApplication:annotation: in both apps and provide a custom URL handler for both. The user will experience the device switching between the apps as they launch each other.
If you are willing to use a server and internet connection, then both apps can read and write the same server resource. When each app launches or becomes active, it can check for updated information on the server.

Resources