Search code examples
iphoneobjective-cxcode4

Launch iPhone Application with Identifier


I'm trying to Launch an application within my App.
For example: If I press a Button in my testApp1, it should Open up testApp2.
Is there any Way to do this with the App Identifier??

I heard something about a undocumented method called launchApplicationWithIdentifier: suspend: but that doesn't work for me, or i'm using it wrong.
I tried this:
[UIApplication launchApplicationWithIdentifier:@"com.test.testApp2" suspend:NO]
But it didn't work.


Solution

  • Better use [[UIApplication sharedApplication] openUrl:]. You'll need set a custom URL scheme in your second app for that. Check this tutorial or simply do a search with "iphone custom URL schemes". There's a lot of good tutorials.