-1

I've created an iPhone app in objective-c with Xcode 5. It's a simple redirect to an app on AppStore via button (UIbutton and its IBAction). Can I open directly this app if it's already installed on iOS? Because in spite of this app is already available on iPhone it's carry on to open it via AppStore!

Alex
  • 85
  • 1
  • 11

3 Answers3

1

If it is your app, or you know it well and it has a custom url scheme, you may use Application::canOpenUrl: (link) to check for its existence and Application::openUrl: to launch the application.

This will not be possible for third party applications that do not have, or of which you don't know a custom url scheme.

Jochem
  • 2,995
  • 16
  • 18
  • I've all the access on Apple Developer Area of the app (not App that redirect!) I want to open, but I read all web guides I can't understand where I can find the url scheme of the app I want to open... – Alex Sep 02 '14 at 14:23
  • Well, as I wrote, you need to *know* the url scheme of the app you direct to. This can be done if that app is yours or if that url scheme is somehow made available by the creators. Once again: not all apps have custom url schemes configured. – Jochem Sep 02 '14 at 15:27
  • Thanks a lot, I find it in URL Scheme (row) of app info.plist file! – Alex Sep 02 '14 at 15:31
0

you need to use URL schemes, a method for sending and receiving data between applications. A physical device is required for testing this app.look at this example .sample example try this example . if you face any issue let me know about that.

Sport
  • 8,570
  • 6
  • 46
  • 65
0

Yeah! Problem solved...I had to use only URL Scheme of the App I want to open, and insert inside openurl method, -> https://stackoverflow.com/a/24033837/3706995

Community
  • 1
  • 1
Alex
  • 85
  • 1
  • 11