A Cordova plugin to launch external applications from your Cordova-based iOS application.
Compatible with Cordova >= 2.5.0
- Install cordova-plugman.
cd
into your project directory.- Execute the following command:
plugman --platform ios --project . --plugin https://github.com/sbahal/external-app-launcher.git
plugman --uninstall --platform ios --project . --plugin org.cordova.plugins.ExternalAppLauncher
externalApp.launch([appUrlScheme, storeUrl, alertMessage, alertType]);
where,
appUrlScheme
: the URL scheme of the app that you wish to launch
storeUrl
: the URL to be redirected to in case the external app is not found
alertMessage
: the message to be displayed to the user in case the external app is not found
alertType
: the type of alert to be presented to the user
externalApp.alertType.OK
: to just display an alert message, orexternalApp.alertType.OK_CANCEL
: to redirect the user to the specified store
externalApp.launch(['com.foo.MyApp', '', 'Please download the latest version of this app from the store', externalApp.alertType.OK]);
externalApp.launch(['com.foo.MyApp', 'https://foo.com', 'Please download the latest version of this app from the store', externalApp.alertType.OK_CANCEL]);