Any way to automatically trigger launch of my app - iphone

Is there any way to automatically launch my app when the iPhone receives an external phone call?
Thanks

Is there any way? Maybe if you jailbreak it and dig around in the private frameworks, which is something I don't know much about. As for an officially documented method, you're very out of luck.
In iOS, to launch an app that is not currently running or suspended, you use a custom URL scheme. The OS comes standard with built in support for a few different schemes, tel being one of them. Supporting this scheme is what makes the Phone app launch automatically with a telephone number. According to the docs:
The handlers for these schemes are
fixed and cannot be changed. If your
URL type includes a scheme that is
identical to one defined by Apple, the
Apple-provided application is launched
instead of your application.
So, even if you were to explicitly support the scheme, the OS would trump your app with the phone app.

Related

An iOS App how to find all other application on the iPhone?

Bump, Chomp & Appsfire all can list other application on the iPhone, how to do it?
By using Google I found this link quite helpful, it says basically there are two ways to find if certain apps are installed without jailbreaking your device:
checking if a specific URL scheme is supported by the device => canOpenUrl:
comparing the devices currently running processes to known app executable names => sysctl()
Short answer, you can't.
Longer answer you can't without violating the dev agreement and risking app rejection.
There are two methods of doing this (on a non-jailbroken phone):
Check to see if custom URL schemes that are known to be used by certain apps are registered as described in http://www.iphonedevsdk.com/forum/iphone-sdk-development/37103-finding-out-what-apps-installed.html (this allows you to check for certain known apps, not get a list of all installed apps.
The way appsfire does with a desktop 'companion' app, that grabs this info from your iTunes and sends it to their server. (See this article as to why the appsfire developer pulled his app because apple wouldn't approve an update anymore).
Sorry I couldn't be of more help but that's apple!

iOS (Apple): Is there any way for the application to ask the OS to block the device in that application?

I would find useful, in some cases, and under the user's permission, to block the device so only the running application can be accessed unless the usrer's password (pattern or whatever is used to unlock the session) is introduced.
I guess the mecanism should be something like: The application asks the os to do this, the OS asks the user for permission and then the application asks the device to block the application on "exit" or standby (or both).
This would be useful for using an iPhone or iPad as a device for public use. One example could be a Library where visitors can see the book list and some previews in the device. In this case, you don't want the user to access any other resource/application in the system.
Does it make sense?
What your asking is there any type of kiosk mode for iOS devices.
The short answer in no. The longer answer is if you're using a Jail broken device you might be able to relaunch the app on exit, but it would take significant R&D.
I hade a client ask about this last week, after some investigation and thinking I told her,
It's best to look for a case that blocks the home button. Or some kind of security bracket. It'll be cheaper and easier.
Also any App you create with this functionality would be rejected form the App store.
If your looking for advice on programming Jail broken devices there is a Stack Exchange proposal you can follow.
Supposedly there's a way to have a "kiosk" mode with a .mobileconfig file. Both of these articles talk about it, basically covering the same territory:
http://joris.kluivers.nl/blog/2012/03/02/kiosk-mode-for-ios/
http://rick-hawkins.blogspot.ca/2012/01/turning-ipad-into-kiosk-device.html
I was looking into this again and found out that iOS already supports the feature. It is called Guided Access, it was incorporated on iOS 6, it does not require jailbreak and can be used for any app installed on the device.
It makes sense, but I don't think you can do that without jailbreaking the phone. In iOS, the home button cannot be overridden by applications. Besides there is cheaper hardware out there for kiosk-style applications.

Determine the app IDs of applications on iPhone

Does anyone know how to programmatically determine the application IDs of the apps on an iPhone? I.E. to determine what applications have been installed on an iPhone?
You cannot do this without Jailbreaking the phone. Apple 'sandboxes' each app, so it cannot see outside of its box. If you had a particular application in mind, and that application had a URL scheme, you could check to see if that scheme was supported (which would indicate the app was probably installed), but that's as close as you're going to get.

Possible to generate an iPhone application automatically from another iPhone application?

As title; is there any function that can achieve this?
Officially, no. Official apps must be compiled and signed on an OS X machine.
In practice, sort of - if you don't mind jailbreaking. For jailbroken phones, gcc and signing tools are available that run on the iPhone. So on jailbroken phones you could have an application that generated new applications. Apple wouldn't let you sell such an app in the App Store, though.
Theoretically maybe, practically no. If you want to sell it in the App store double no.
I would take a look at this link which quotes the SDK in saying:
3.3.2. [..] No interpreted code may be downloaded and used in an Application
except for code that is interpreted
and run by Apple’s Published APIs and
built-in interpreter(s).
and
3.3.3 Without Apple’s prior written approval, an Application may not
provide, unlock or enable additional
features or functionality through
distribution mechanisms other than the
App Store.
between those two restrictions I think it would be practically impossible to dynamically create any kind of application on the fly (with the possible exception of the pure JavaScript/HTML app concept mentioned in the article).
If your iPhone is jailbroken, install "CallMe" from Cydia.
That does exactly what you want: It generates small applications with the icon of a contact, and if you launch one of those small apps, that'll launch the phone app and call the phone number of the contact.

How do I make iPhone SpringBoard show two or more icons for one application bundle?

It seems like Info.plist file has an ability to declare different roles for the same application bundle through the UIRoleInfo key. SpringBoard can recognize these roles after installing an app and may display separate icons for each application role.
For instance, iPhone shows MobileSlideShow.app as 2 different programs: Photos and Camera.
Unfortunately, there is no official Apple documentation about the subject at the moment. Would anybody advise how to organize the same behavior in a custom app?
This feature is going to be used in the Enterprise product for ad hoc distribution.
This isn't a supported feature, so if you do this you might have a hard time getting your app through the approval process. I wouldn't recommend using it.
Have you tried it to see if it works? If it doesn't work, you could create a second app that does nothing but launch the first one, with a custom URL scheme. The first app can recognize when it is being launched with that URL. This is not ideal as you will see the second app launch & quit (though it should be really fast).