Skip to content

Commit 0631c0a

Browse files
committed
Added plugin to launch external apps
1 parent 82b512f commit 0631c0a

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

iOS/ExternalAppLauncher/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# External App Launcher
2+
3+
A Cordova plugin to launch external applications from your Cordova-based iOS application.
4+
5+
### Steps to install
6+
7+
1. Install [cordova-plugman](https://github.com/apache/cordova-plugman).
8+
2. ```cd``` into your project directory.
9+
3. Execute the following command:
10+
11+
```
12+
plugman --platform ios --project . --plugin https://github.com/sbahal/external-app-launcher.git
13+
```
14+
15+
### Steps to uninstall
16+
17+
```
18+
plugman --uninstall --platform ios --project . --plugin org.cordova.plugins.ExternalAppLauncher
19+
```
20+
21+
### Usage
22+
23+
```
24+
externalApp.launch([appUrlScheme, storeUrl, alertMessage, alertType]);
25+
```
26+
where,
27+
```appUrlScheme```: the URL scheme of the app that you wish to launch
28+
```storeUrl```: the URL to be redirected to in case the external app is not found
29+
```alertMessage```: the message to be displayed to the user in case the external app is not found
30+
```alertType```: the type of alert to be presented to the user
31+
* ```externalApp.alertType.OK```: to just display an alert message, or
32+
* ```externalApp.alertType.OK_CANCEL```: to redirect the user to the specified store
33+
34+
### Example
35+
36+
```
37+
externalApp.launch('com.foo.MyApp', '', 'Please download the latest version of this app from the store', externalApp.alertType.OK);
38+
externalApp.launch('com.foo.MyApp', 'https://foo.com', 'Please download the latest version of this app from the store', externalApp.alertType.OK_CANCEL);
39+
```

0 commit comments

Comments
 (0)