0

Not sure if this is possible, but I have seen a few people doing this via web URLs. Is it possible to set up a link via a button click to launch an app which is located on my ipad. Either an app downloaded via the app store or an app just added to my ipad via xcode?

This would be awesome if this is possible but not sure if you would have to exit the app entirely for the new app to launch, or can you just set the new app to load into a new view?

pnuts
  • 58,317
  • 11
  • 87
  • 139
WLyne86
  • 49
  • 1
  • 5
  • This question might help: http://stackoverflow.com/questions/7168845/ios-open-another-application-that-exists-on-the-phone – trojanfoe Jul 31 '12 at 09:43
  • iv just found a useful tutorial, looks like you can set up a url for your app using "URL scheme" which you can then pass into another app for the user to open the requested app on a button click – WLyne86 Jul 31 '12 at 09:51

1 Answers1

1

You'll need to determine the URL scheme the application is registered against and then use following

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:12313132"]];

For example, to open email application the URL scheme is mailto: for telephone it's tel: or telprompt:

atastrophic
  • 3,153
  • 3
  • 31
  • 50
  • Thanks for the feedback tGilani, I was about to have a go at this URL Scheme, add editing this in the plist. However, I have apps to which I have created from flash cs6, so do not carry the info.plist file. Is there a way to link to apps via the App ID? – WLyne86 Jul 31 '12 at 10:09
  • no idea but sure this url might help http://www.riaspace.com/2011/08/defining-custom-url-schemes-for-your-air-mobile-applications/ – atastrophic Jul 31 '12 at 10:18
  • just stumbled across this a minute ago, will let you know how it goes. I have just created a quick and simple ipa via flash cs6 and edited the xml file according to that sites instructions. So I will add the above code you posted earlier with the link to my URLScheme declared in the xml file. Fingers crossed – WLyne86 Jul 31 '12 at 10:57
  • if I have declared my URL Scheme as "Test".... Would I simply just pass in: NSURL *myURL = [NSURL URLWithString:@"Test://"]; [[UIApplication sharedApplication] openURL:myURL]; – WLyne86 Jul 31 '12 at 11:00