@capgo/capacitor-intent-launcher 8.1.1 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -11
- package/android/build.gradle +1 -1
- package/android/src/main/java/app/capgo/capacitor/intentlauncher/IntentLauncherPlugin.java +1 -1
- package/dist/docs.json +97 -1
- package/dist/esm/definitions.d.ts +1178 -207
- package/dist/esm/definitions.js +995 -62
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +2 -1
- package/dist/esm/web.js +6 -3
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +1001 -65
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +1001 -65
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/IntentLauncherPlugin/IntentLauncherPlugin.swift +95 -2
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -6,20 +6,21 @@
|
|
|
6
6
|
<h2><a href="https://capgo.app/consulting/?ref=plugin_intent_launcher"> Missing a feature? We'll build the plugin for you 💪</a></h2>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
|
-
Launch Android intents and open system settings screens from your Capacitor app.
|
|
9
|
+
Launch Android intents and open system settings screens on Android and iOS from your Capacitor app.
|
|
10
10
|
|
|
11
11
|
## Why Capacitor Intent Launcher?
|
|
12
12
|
|
|
13
|
-
A simple, **free**, and **lightweight**
|
|
13
|
+
A simple, **free**, and **lightweight** intent launcher plugin for both Android and iOS:
|
|
14
14
|
|
|
15
|
-
- **System settings access** - Open any Android settings screen (WiFi, Bluetooth, Location, etc.)
|
|
16
|
-
- **
|
|
17
|
-
- **App
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
15
|
+
- **System settings access** - Open any Android settings screen (WiFi, Bluetooth, Location, etc.) or iOS settings screens
|
|
16
|
+
- **iOS settings support** - Open iOS settings screens including app settings, WiFi, Bluetooth, notifications, and more
|
|
17
|
+
- **App launching** - Open any installed application by package name (Android)
|
|
18
|
+
- **App icon retrieval** - Get application icons as base64-encoded images (Android)
|
|
19
|
+
- **Full intent support** - Pass extras, flags, data URIs, and MIME types (Android)
|
|
20
|
+
- **Activity results** - Receive result codes and data from launched activities (Android)
|
|
20
21
|
- **Zero dependencies** - Minimal footprint, no bloat
|
|
21
22
|
|
|
22
|
-
Perfect for apps that need to guide users to system settings
|
|
23
|
+
Perfect for apps that need to guide users to system settings on both platforms.
|
|
23
24
|
|
|
24
25
|
## Documentation
|
|
25
26
|
|
|
@@ -38,17 +39,32 @@ Works out of the box. No additional configuration required.
|
|
|
38
39
|
|
|
39
40
|
## iOS
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
Works out of the box. Use the `openIOSSettings()` method to open iOS settings screens.
|
|
43
|
+
|
|
44
|
+
**Important:** The only officially supported option by Apple is `IOSSettings.App` which opens your app's settings page. Other options use undocumented URL schemes (`App-prefs:`) that may break in future iOS versions or could potentially cause App Store rejection.
|
|
45
|
+
|
|
46
|
+
**Note:** The iOS Simulator will sometimes only open the Settings app, instead of the specified option. Test on a real device for accurate behavior.
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { IntentLauncher, IOSSettings } from '@capgo/capacitor-intent-launcher';
|
|
50
|
+
|
|
51
|
+
// Open app settings (officially supported by Apple)
|
|
52
|
+
await IntentLauncher.openIOSSettings({ option: IOSSettings.App });
|
|
53
|
+
|
|
54
|
+
// Open WiFi settings (may not work in all iOS versions)
|
|
55
|
+
await IntentLauncher.openIOSSettings({ option: IOSSettings.WiFi });
|
|
56
|
+
```
|
|
42
57
|
|
|
43
58
|
## Web
|
|
44
59
|
|
|
45
|
-
Not supported. This plugin uses
|
|
60
|
+
Not supported. This plugin uses native platform APIs.
|
|
46
61
|
|
|
47
62
|
## API
|
|
48
63
|
|
|
49
64
|
<docgen-index>
|
|
50
65
|
|
|
51
66
|
* [`startActivityAsync(...)`](#startactivityasync)
|
|
67
|
+
* [`openIOSSettings(...)`](#openiossettings)
|
|
52
68
|
* [`openApplication(...)`](#openapplication)
|
|
53
69
|
* [`getApplicationIconAsync(...)`](#getapplicationiconasync)
|
|
54
70
|
* [`getPluginVersion()`](#getpluginversion)
|
|
@@ -61,7 +77,7 @@ Not supported. This plugin uses Android-specific APIs.
|
|
|
61
77
|
<docgen-api>
|
|
62
78
|
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
63
79
|
|
|
64
|
-
Capacitor Intent Launcher Plugin for launching Android intents and opening system settings.
|
|
80
|
+
Capacitor Intent Launcher Plugin for launching Android intents and opening system settings on both Android and iOS.
|
|
65
81
|
|
|
66
82
|
### startActivityAsync(...)
|
|
67
83
|
|
|
@@ -82,6 +98,31 @@ Starts an Android activity for the given action.
|
|
|
82
98
|
--------------------
|
|
83
99
|
|
|
84
100
|
|
|
101
|
+
### openIOSSettings(...)
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
openIOSSettings(options: IOSSettingsParams) => Promise<IOSSettingsResult>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Opens iOS settings screen.
|
|
108
|
+
|
|
109
|
+
Note: The only officially supported option by Apple is `App` which opens your app's settings page.
|
|
110
|
+
Other options may work but are not guaranteed and could break in future iOS versions or cause App Store rejection.
|
|
111
|
+
|
|
112
|
+
Also note that the iOS Simulator will sometimes only open the Settings app,
|
|
113
|
+
instead of the specified option.
|
|
114
|
+
|
|
115
|
+
| Param | Type | Description |
|
|
116
|
+
| ------------- | --------------------------------------------------------------- | --------------------------------- |
|
|
117
|
+
| **`options`** | <code><a href="#iossettingsparams">IOSSettingsParams</a></code> | - The iOS settings option to open |
|
|
118
|
+
|
|
119
|
+
**Returns:** <code>Promise<<a href="#iossettingsresult">IOSSettingsResult</a>></code>
|
|
120
|
+
|
|
121
|
+
**Since:** 8.2.0
|
|
122
|
+
|
|
123
|
+
--------------------
|
|
124
|
+
|
|
125
|
+
|
|
85
126
|
### openApplication(...)
|
|
86
127
|
|
|
87
128
|
```typescript
|
|
@@ -163,6 +204,24 @@ Options for starting an activity.
|
|
|
163
204
|
| **`type`** | <code>string</code> | Optional MIME type for the intent data. | 1.0.0 |
|
|
164
205
|
|
|
165
206
|
|
|
207
|
+
#### IOSSettingsResult
|
|
208
|
+
|
|
209
|
+
Result from opening iOS settings.
|
|
210
|
+
|
|
211
|
+
| Prop | Type | Description | Since |
|
|
212
|
+
| ------------- | -------------------- | ---------------------------------------------------- | ----- |
|
|
213
|
+
| **`success`** | <code>boolean</code> | Whether the settings screen was successfully opened. | 8.2.0 |
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
#### IOSSettingsParams
|
|
217
|
+
|
|
218
|
+
Options for opening iOS settings.
|
|
219
|
+
|
|
220
|
+
| Prop | Type | Description | Since |
|
|
221
|
+
| ------------ | ------------------- | -------------------------------------------------------------------- | ----- |
|
|
222
|
+
| **`option`** | <code>string</code> | The iOS settings screen to open. Use values from `IOSSettings` enum. | 8.2.0 |
|
|
223
|
+
|
|
224
|
+
|
|
166
225
|
#### OpenApplicationOptions
|
|
167
226
|
|
|
168
227
|
Options for opening an application.
|
package/android/build.gradle
CHANGED
|
@@ -26,7 +26,7 @@ import org.json.JSONObject;
|
|
|
26
26
|
@CapacitorPlugin(name = "IntentLauncher")
|
|
27
27
|
public class IntentLauncherPlugin extends Plugin {
|
|
28
28
|
|
|
29
|
-
private final String pluginVersion = "8.
|
|
29
|
+
private final String pluginVersion = "8.3.0";
|
|
30
30
|
|
|
31
31
|
@PluginMethod
|
|
32
32
|
public void startActivityAsync(PluginCall call) {
|
package/dist/docs.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"api": {
|
|
3
3
|
"name": "IntentLauncherPlugin",
|
|
4
4
|
"slug": "intentlauncherplugin",
|
|
5
|
-
"docs": "Capacitor Intent Launcher Plugin for launching Android intents and opening system settings.",
|
|
5
|
+
"docs": "Capacitor Intent Launcher Plugin for launching Android intents and opening system settings on both Android and iOS.",
|
|
6
6
|
"tags": [
|
|
7
7
|
{
|
|
8
8
|
"text": "1.0.0",
|
|
@@ -54,6 +54,50 @@
|
|
|
54
54
|
],
|
|
55
55
|
"slug": "startactivityasync"
|
|
56
56
|
},
|
|
57
|
+
{
|
|
58
|
+
"name": "openIOSSettings",
|
|
59
|
+
"signature": "(options: IOSSettingsParams) => Promise<IOSSettingsResult>",
|
|
60
|
+
"parameters": [
|
|
61
|
+
{
|
|
62
|
+
"name": "options",
|
|
63
|
+
"docs": "- The iOS settings option to open",
|
|
64
|
+
"type": "IOSSettingsParams"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"returns": "Promise<IOSSettingsResult>",
|
|
68
|
+
"tags": [
|
|
69
|
+
{
|
|
70
|
+
"name": "param",
|
|
71
|
+
"text": "options - The iOS settings option to open"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "returns",
|
|
75
|
+
"text": "Promise that resolves with success status"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "throws",
|
|
79
|
+
"text": "Error if the settings screen cannot be opened"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "platform",
|
|
83
|
+
"text": "iOS"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "since",
|
|
87
|
+
"text": "8.2.0"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "example",
|
|
91
|
+
"text": "```typescript\n// Open app settings (recommended - officially supported by Apple)\nawait IntentLauncher.openIOSSettings({ option: IOSSettings.App });\n\n// Open WiFi settings (may not work in all iOS versions)\nawait IntentLauncher.openIOSSettings({ option: IOSSettings.WiFi });\n```"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"docs": "Opens iOS settings screen.\n\nNote: The only officially supported option by Apple is `App` which opens your app's settings page.\nOther options may work but are not guaranteed and could break in future iOS versions or cause App Store rejection.\n\nAlso note that the iOS Simulator will sometimes only open the Settings app,\ninstead of the specified option.",
|
|
95
|
+
"complexTypes": [
|
|
96
|
+
"IOSSettingsResult",
|
|
97
|
+
"IOSSettingsParams"
|
|
98
|
+
],
|
|
99
|
+
"slug": "openiossettings"
|
|
100
|
+
},
|
|
57
101
|
{
|
|
58
102
|
"name": "openApplication",
|
|
59
103
|
"signature": "(options: OpenApplicationOptions) => Promise<void>",
|
|
@@ -330,6 +374,58 @@
|
|
|
330
374
|
}
|
|
331
375
|
]
|
|
332
376
|
},
|
|
377
|
+
{
|
|
378
|
+
"name": "IOSSettingsResult",
|
|
379
|
+
"slug": "iossettingsresult",
|
|
380
|
+
"docs": "Result from opening iOS settings.",
|
|
381
|
+
"tags": [
|
|
382
|
+
{
|
|
383
|
+
"text": "8.2.0",
|
|
384
|
+
"name": "since"
|
|
385
|
+
}
|
|
386
|
+
],
|
|
387
|
+
"methods": [],
|
|
388
|
+
"properties": [
|
|
389
|
+
{
|
|
390
|
+
"name": "success",
|
|
391
|
+
"tags": [
|
|
392
|
+
{
|
|
393
|
+
"text": "8.2.0",
|
|
394
|
+
"name": "since"
|
|
395
|
+
}
|
|
396
|
+
],
|
|
397
|
+
"docs": "Whether the settings screen was successfully opened.",
|
|
398
|
+
"complexTypes": [],
|
|
399
|
+
"type": "boolean"
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"name": "IOSSettingsParams",
|
|
405
|
+
"slug": "iossettingsparams",
|
|
406
|
+
"docs": "Options for opening iOS settings.",
|
|
407
|
+
"tags": [
|
|
408
|
+
{
|
|
409
|
+
"text": "8.2.0",
|
|
410
|
+
"name": "since"
|
|
411
|
+
}
|
|
412
|
+
],
|
|
413
|
+
"methods": [],
|
|
414
|
+
"properties": [
|
|
415
|
+
{
|
|
416
|
+
"name": "option",
|
|
417
|
+
"tags": [
|
|
418
|
+
{
|
|
419
|
+
"text": "8.2.0",
|
|
420
|
+
"name": "since"
|
|
421
|
+
}
|
|
422
|
+
],
|
|
423
|
+
"docs": "The iOS settings screen to open. Use values from `IOSSettings` enum.",
|
|
424
|
+
"complexTypes": [],
|
|
425
|
+
"type": "string"
|
|
426
|
+
}
|
|
427
|
+
]
|
|
428
|
+
},
|
|
333
429
|
{
|
|
334
430
|
"name": "OpenApplicationOptions",
|
|
335
431
|
"slug": "openapplicationoptions",
|