@capacitor/app-launcher
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.2.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/app-launcher@0.2.0...@capacitor/app-launcher@0.2.1) (2020-12-20) | ||
### Bug Fixes | ||
* support deprecated types from Capacitor 2 ([#139](https://github.com/ionic-team/capacitor-plugins/issues/139)) ([2d7127a](https://github.com/ionic-team/capacitor-plugins/commit/2d7127a488e26f0287951921a6db47c49d817336)) | ||
# [0.2.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/app-launcher@0.1.0...@capacitor/app-launcher@0.2.0) (2020-12-02) | ||
@@ -8,0 +19,0 @@ |
@@ -10,3 +10,3 @@ { | ||
"name": "canOpenUrl", | ||
"signature": "(options: { url: string; }) => Promise<{ value: boolean; }>", | ||
"signature": "(options: CanOpenURLOptions) => Promise<CanOpenURLResult>", | ||
"parameters": [ | ||
@@ -16,6 +16,6 @@ { | ||
"docs": "", | ||
"type": "{ url: string; }" | ||
"type": "CanOpenURLOptions" | ||
} | ||
], | ||
"returns": "Promise<{ value: boolean; }>", | ||
"returns": "Promise<CanOpenURLResult>", | ||
"tags": [ | ||
@@ -27,4 +27,7 @@ { | ||
], | ||
"docs": "Check if an app can be opened with the given URL.\n\nOn iOS you must declare the URL schemes you pass to this method by adding\nthe LSApplicationQueriesSchemes key to your app's Info.plist file.\nThis method always returns false for undeclared schemes, whether or not an appropriate\napp is installed. To learn more about the key, see\n[LSApplicationQueriesSchemes](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/plist/info/LSApplicationQueriesSchemes).", | ||
"complexTypes": [], | ||
"docs": "Check if an app can be opened with the given URL.\n\nOn iOS you must declare the URL schemes you pass to this method by adding\nthe `LSApplicationQueriesSchemes` key to your app's `Info.plist` file.\nLearn more about configuring\n[`Info.plist`](https://capacitorjs.com/docs/ios/configuration#configuring-infoplist).\n\nThis method always returns false for undeclared schemes, whether or not an\nappropriate app is installed. To learn more about the key, see\n[LSApplicationQueriesSchemes](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/plist/info/LSApplicationQueriesSchemes).", | ||
"complexTypes": [ | ||
"CanOpenURLResult", | ||
"CanOpenURLOptions" | ||
], | ||
"slug": "canopenurl" | ||
@@ -34,3 +37,3 @@ }, | ||
"name": "openUrl", | ||
"signature": "(options: { url: string; }) => Promise<{ completed: boolean; }>", | ||
"signature": "(options: OpenURLOptions) => Promise<OpenURLResult>", | ||
"parameters": [ | ||
@@ -40,6 +43,6 @@ { | ||
"docs": "", | ||
"type": "{ url: string; }" | ||
"type": "OpenURLOptions" | ||
} | ||
], | ||
"returns": "Promise<{ completed: boolean; }>", | ||
"returns": "Promise<OpenURLResult>", | ||
"tags": [ | ||
@@ -52,3 +55,6 @@ { | ||
"docs": "Open an app with the given URL.", | ||
"complexTypes": [], | ||
"complexTypes": [ | ||
"OpenURLResult", | ||
"OpenURLOptions" | ||
], | ||
"slug": "openurl" | ||
@@ -59,4 +65,70 @@ } | ||
}, | ||
"interfaces": [], | ||
"enums": [] | ||
"interfaces": [ | ||
{ | ||
"name": "CanOpenURLResult", | ||
"slug": "canopenurlresult", | ||
"docs": "", | ||
"tags": [], | ||
"methods": [], | ||
"properties": [ | ||
{ | ||
"name": "value", | ||
"tags": [], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "boolean" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "CanOpenURLOptions", | ||
"slug": "canopenurloptions", | ||
"docs": "", | ||
"tags": [], | ||
"methods": [], | ||
"properties": [ | ||
{ | ||
"name": "url", | ||
"tags": [], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "OpenURLResult", | ||
"slug": "openurlresult", | ||
"docs": "", | ||
"tags": [], | ||
"methods": [], | ||
"properties": [ | ||
{ | ||
"name": "completed", | ||
"tags": [], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "boolean" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "OpenURLOptions", | ||
"slug": "openurloptions", | ||
"docs": "", | ||
"tags": [], | ||
"methods": [], | ||
"properties": [ | ||
{ | ||
"name": "url", | ||
"tags": [], | ||
"docs": "", | ||
"complexTypes": [], | ||
"type": "string" | ||
} | ||
] | ||
} | ||
], | ||
"enums": [], | ||
"typeAliases": [] | ||
} |
@@ -5,6 +5,9 @@ export interface AppLauncherPlugin { | ||
* | ||
* On iOS you must declare the URL schemes you pass to this method by adding | ||
* the LSApplicationQueriesSchemes key to your app's Info.plist file. | ||
* This method always returns false for undeclared schemes, whether or not an appropriate | ||
* app is installed. To learn more about the key, see | ||
* On iOS you must declare the URL schemes you pass to this method by adding | ||
* the `LSApplicationQueriesSchemes` key to your app's `Info.plist` file. | ||
* Learn more about configuring | ||
* [`Info.plist`](https://capacitorjs.com/docs/ios/configuration#configuring-infoplist). | ||
* | ||
* This method always returns false for undeclared schemes, whether or not an | ||
* appropriate app is installed. To learn more about the key, see | ||
* [LSApplicationQueriesSchemes](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/plist/info/LSApplicationQueriesSchemes). | ||
@@ -14,7 +17,3 @@ * | ||
*/ | ||
canOpenUrl(options: { | ||
url: string; | ||
}): Promise<{ | ||
value: boolean; | ||
}>; | ||
canOpenUrl(options: CanOpenURLOptions): Promise<CanOpenURLResult>; | ||
/** | ||
@@ -25,7 +24,15 @@ * Open an app with the given URL. | ||
*/ | ||
openUrl(options: { | ||
url: string; | ||
}): Promise<{ | ||
completed: boolean; | ||
}>; | ||
openUrl(options: OpenURLOptions): Promise<OpenURLResult>; | ||
} | ||
export interface CanOpenURLOptions { | ||
url: string; | ||
} | ||
export interface CanOpenURLResult { | ||
value: boolean; | ||
} | ||
export interface OpenURLOptions { | ||
url: string; | ||
} | ||
export interface OpenURLResult { | ||
completed: boolean; | ||
} |
import type { AppLauncherPlugin } from './definitions'; | ||
declare const AppLauncher: AppLauncherPlugin; | ||
export * from './definitions'; | ||
export { AppLauncher }; |
@@ -5,3 +5,4 @@ import { registerPlugin } from '@capacitor/core'; | ||
}); | ||
export * from './definitions'; | ||
export { AppLauncher }; | ||
//# sourceMappingURL=index.js.map |
import { WebPlugin } from '@capacitor/core'; | ||
import type { AppLauncherPlugin } from './definitions'; | ||
import type { AppLauncherPlugin, CanOpenURLOptions, CanOpenURLResult, OpenURLOptions, OpenURLResult } from './definitions'; | ||
export declare class AppLauncherWeb extends WebPlugin implements AppLauncherPlugin { | ||
canOpenUrl(_options: { | ||
url: string; | ||
}): Promise<{ | ||
value: boolean; | ||
}>; | ||
openUrl(_options: { | ||
url: string; | ||
}): Promise<{ | ||
completed: boolean; | ||
}>; | ||
canOpenUrl(_options: CanOpenURLOptions): Promise<CanOpenURLResult>; | ||
openUrl(_options: OpenURLOptions): Promise<OpenURLResult>; | ||
} |
{ | ||
"name": "@capacitor/app-launcher", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "The AppLauncher API allows to open other apps", | ||
@@ -46,6 +46,6 @@ "main": "dist/esm/index.js", | ||
"devDependencies": { | ||
"@capacitor/android": "^3.0.0-alpha.7", | ||
"@capacitor/core": "^3.0.0-alpha.7", | ||
"@capacitor/docgen": "^0.0.10", | ||
"@capacitor/ios": "^3.0.0-alpha.7", | ||
"@capacitor/android": "^3.0.0-alpha.10", | ||
"@capacitor/core": "^3.0.0-alpha.9", | ||
"@capacitor/docgen": "0.0.14", | ||
"@capacitor/ios": "^3.0.0-alpha.9", | ||
"@ionic/eslint-config": "^0.3.0", | ||
@@ -63,3 +63,3 @@ "@ionic/prettier-config": "~1.0.1", | ||
"peerDependencies": { | ||
"@capacitor/core": "^3.0.0-alpha.6" | ||
"@capacitor/core": "^3.0.0-alpha.9" | ||
}, | ||
@@ -82,3 +82,3 @@ "prettier": "@ionic/prettier-config", | ||
}, | ||
"gitHead": "78c1981920988ec84c17bbc61b1da1df9743571c" | ||
"gitHead": "481260d148b920b85755dd5f9b65df0bb0db4244" | ||
} |
@@ -12,2 +12,18 @@ # @capacitor/app-launcher | ||
## Example | ||
```typescript | ||
import { AppLauncher } from '@capacitor/app-launcher'; | ||
const checkCanOpenUrl = async () => { | ||
const { value } = await AppLauncher.canOpenUrl({ url: 'com.getcapacitor.myapp' }); | ||
alert('Can open url: ', value); | ||
}; | ||
const openPortfolioPage = async () => { | ||
await AppLauncher.openUrl({ url: 'com.getcapacitor.myapp://page?id=portfolio' }); | ||
}; | ||
``` | ||
## API | ||
@@ -19,2 +35,3 @@ | ||
* [`openUrl(...)`](#openurl) | ||
* [Interfaces](#interfaces) | ||
@@ -29,3 +46,3 @@ </docgen-index> | ||
```typescript | ||
canOpenUrl(options: { url: string; }) => Promise<{ value: boolean; }> | ||
canOpenUrl(options: CanOpenURLOptions) => Promise<CanOpenURLResult> | ||
``` | ||
@@ -35,13 +52,16 @@ | ||
On iOS you must declare the URL schemes you pass to this method by adding | ||
the LSApplicationQueriesSchemes key to your app's Info.plist file. | ||
This method always returns false for undeclared schemes, whether or not an appropriate | ||
app is installed. To learn more about the key, see | ||
On iOS you must declare the URL schemes you pass to this method by adding | ||
the `LSApplicationQueriesSchemes` key to your app's `Info.plist` file. | ||
Learn more about configuring | ||
[`Info.plist`](https://capacitorjs.com/docs/ios/configuration#configuring-infoplist). | ||
This method always returns false for undeclared schemes, whether or not an | ||
appropriate app is installed. To learn more about the key, see | ||
[LSApplicationQueriesSchemes](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/plist/info/LSApplicationQueriesSchemes). | ||
| Param | Type | | ||
| ------------- | ----------------------------- | | ||
| **`options`** | <code>{ url: string; }</code> | | ||
| Param | Type | | ||
| ------------- | --------------------------------------------------------------- | | ||
| **`options`** | <code><a href="#canopenurloptions">CanOpenURLOptions</a></code> | | ||
**Returns:** <code>Promise<{ value: boolean; }></code> | ||
**Returns:** <code>Promise<<a href="#canopenurlresult">CanOpenURLResult</a>></code> | ||
@@ -56,3 +76,3 @@ **Since:** 1.0.0 | ||
```typescript | ||
openUrl(options: { url: string; }) => Promise<{ completed: boolean; }> | ||
openUrl(options: OpenURLOptions) => Promise<OpenURLResult> | ||
``` | ||
@@ -62,7 +82,7 @@ | ||
| Param | Type | | ||
| ------------- | ----------------------------- | | ||
| **`options`** | <code>{ url: string; }</code> | | ||
| Param | Type | | ||
| ------------- | --------------------------------------------------------- | | ||
| **`options`** | <code><a href="#openurloptions">OpenURLOptions</a></code> | | ||
**Returns:** <code>Promise<{ completed: boolean; }></code> | ||
**Returns:** <code>Promise<<a href="#openurlresult">OpenURLResult</a>></code> | ||
@@ -73,2 +93,33 @@ **Since:** 1.0.0 | ||
### Interfaces | ||
#### CanOpenURLResult | ||
| Prop | Type | | ||
| ----------- | -------------------- | | ||
| **`value`** | <code>boolean</code> | | ||
#### CanOpenURLOptions | ||
| Prop | Type | | ||
| --------- | ------------------- | | ||
| **`url`** | <code>string</code> | | ||
#### OpenURLResult | ||
| Prop | Type | | ||
| --------------- | -------------------- | | ||
| **`completed`** | <code>boolean</code> | | ||
#### OpenURLOptions | ||
| Prop | Type | | ||
| --------- | ------------------- | | ||
| **`url`** | <code>string</code> | | ||
</docgen-api> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23564
211
119
1