Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to launch another app in iOS 8 using Swift?

Tags:

ios

swift

ios8

Is it possible to launch any app from within another app?

For example, in my application, I want the user to push a button and launch another app (don't close the current app, just open another app and switch to it).

How can I do it in iOS 8 using Swift?

like image 835
Grant Chen Avatar asked Jul 14 '14 02:07

Grant Chen


1 Answers

The only way to do this is to use a deep link, which the developer of an app must have created.

The iOS SDK does not allow your app to interact with other apps unless it uses the new Extensions framework introduced with iOS 8. However, this extension only allows you to provide content and capabilities of your own app within another: you cannot force another app to open.

What you've described is only possible with deep links that are fairly uncommon and must be defined by the developer of the app you are trying to open.

So, for example, a link in your app could open the Pocket application, which allows you to save articles for later reading, with a pocket:// link (as opposed to http:// or https://) and, similarly, the Pebble Smartwatch application can be opened with a pebble:// link. However, these are links that are defined by the developers of those applications and this technique does not apply to all apps.

like image 155
AstroCB Avatar answered Oct 13 '22 11:10

AstroCB