Recently I got a chance to explore possibility of creating an innovative car-phone application on iPhone.

This app should give access to all (deemed) useful functionality the user wants at one place.

As a first step, I set out to search for any such existing applications on App Store. To my surprise, I did not find a single iPhone application similar to what I had in mind. This raised my curiosity; is this deliberate or accidental?

I decided to spend some time to find out the facts. For designing the required application basic requirement were to use map, speed dials, received calls, dialled calls, application shortcuts, bluetooth, brightness etc in short configure and use, many useful features spanning across multiple apps natively, through a single click in one application.

When I dug up all the information and did some experiments I came across some useful information, which is worth sharing.

Installed Application List: in iOS, each application is sandboxed. It’s an Apple way to protect systems and users by limiting the privileges of an app to its intended functionality, increasing the difficulty for malicious software to compromise user’s systems. One application’s sandbox can’t get access to other installed application’s sandbox. So I didn’t get access to installed app list. Doing so will violate Apple’s Guideline for accessing private API. However there is way to check whether a particular application is installed on the device, using Custom URL scheme.

Application Shortcuts: In iOS, one application can’t launch any other application directly. There are restrictions to do that. One can launch an application using its URL, if you are aware of the URL. These URLs cannot be obtained programmatically. For Example, We can launch SMS application provided that mobile number is provided as a parameter so that we can send sms to that number. Same is the case with other applications. For Dialing – mobile number is required, for E-Mail application – email address is required, For Safari – Url is required and so on. If any application provides custom URL then it is possible to invoke that app by specifying it in Info.plist.

Call Log: Accessing recent call, dialled call log is one of the most important functionality in the desired app. I cannot access the call log using the SDK and approved APIs. Accessing call log was a supported feature in iOS 4. However now Apple has restricted some area in iPhone disk and we can’t get anything from that area.

Recording Call Log: There could be one possibility that as we don’t have access to Call Log, we can observe the calls that are arriving while the app is running using Core Telephony Framework. Using this framework we can obtain a user’s home cellular service provider-that is, the provider with whom the user has an account. Carrier can use this information to write applications that provide services only for their own subscribers. We can also use this framework to get information about current cellular calls. This framework can provide details about carrier, call Id, call state, current cellular calls etc. However  I cannot get the current call number. So we cannot get the list of all calls that are received while our application was running. Adjusting Brightness: Setting brightness in iOS is allowed. We can simply access it using UIScreen and can set brightness of our interest. Although I found out one restriction is that I can’t set auto brightness ON or OFF.  Apple’s official public APIs does not allow an iOS app to access General settings in settings app. So I can not change the toggle button inside settings app. This is allowed in Android as it is Open Source of course, I can do anything I want. But Apple has guidelines; I can’t do anything though it is possible. As all of us know, these guidelines are in place for a good reason.

Auto Rotation ON/OFF: When user rotates device, sometimes its needed in the application to make necessary changes in UI. Auto rotation On or Off is the required feature in the application. I can set which rotation mode the application will support. But According to Apple guideline I can’t dynamically set Auto rotation ON or OFF and can’t  get access to this toggle functionality. This is allowed in Android.

BlueTooth: To auto connect the application with Bluetooth Low Energy Enabled hardware, when device comes in the range is one of the functionality. According to Apple guideline i can’t silently enable, disable bluetooth. This is allowed in android. If the bluetooth is ON, i can search for peripheral devices for specific services and characteristics using Core Bluetooth framework.

System time and Date: I can get access to system time and date. Also android does support this.

Battery Status: I can get access to battery status and battery percentage. Any change in battery status is notified to the app and we can make necessary changes.

Weather status: To get weather report we need current location of the device. I use Core Location framework provided by Apple to get current location. I pass this coordinate to one public weather API to retrieve current weather conditions of that location.

Conclusion: In this exercise I have mainly focused on the things that are not allowed in iOS application development rather than the things that are allowed. After this exercise, I can imagine as to why App Store does not have any such apps.

All this was just before i chanced upon something, which made things more clear. 🙂

Enter Apple CarPlay

Krushnapal Rajput