@capgo/capacitor-intent-launcher 0.0.1 → 8.1.1
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.
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'CapgoIntentLauncher'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.license = package['license']
|
|
10
|
+
s.homepage = package['repository']['url']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
+
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
+
s.ios.deployment_target = '15.0'
|
|
15
|
+
s.dependency 'Capacitor'
|
|
16
|
+
s.swift_version = '5.1'
|
|
17
|
+
end
|
package/README.md
CHANGED
|
@@ -212,3 +212,7 @@ Construct a type with a set of properties K of type T
|
|
|
212
212
|
| **`FirstUser`** | <code>1</code> | First custom user-defined result code. |
|
|
213
213
|
|
|
214
214
|
</docgen-api>
|
|
215
|
+
|
|
216
|
+
# Credit
|
|
217
|
+
|
|
218
|
+
Based on the (Expo plugin)[https://docs.expo.dev/versions/latest/sdk/intent-launcher/]
|
|
@@ -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 = "
|
|
29
|
+
private final String pluginVersion = "8.1.1";
|
|
30
30
|
|
|
31
31
|
@PluginMethod
|
|
32
32
|
public void startActivityAsync(PluginCall call) {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc(IntentLauncherPlugin)
|
|
5
|
+
public class IntentLauncherPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
6
|
+
public let identifier = "IntentLauncherPlugin"
|
|
7
|
+
public let jsName = "IntentLauncher"
|
|
8
|
+
public let pluginMethods: [CAPPluginMethod] = [
|
|
9
|
+
CAPPluginMethod(name: "startActivityAsync", returnType: CAPPluginReturnPromise),
|
|
10
|
+
CAPPluginMethod(name: "openApplication", returnType: CAPPluginReturnPromise),
|
|
11
|
+
CAPPluginMethod(name: "getApplicationIconAsync", returnType: CAPPluginReturnPromise),
|
|
12
|
+
CAPPluginMethod(name: "getPluginVersion", returnType: CAPPluginReturnPromise)
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
private let pluginVersion = "8.0.0"
|
|
16
|
+
|
|
17
|
+
@objc func startActivityAsync(_ call: CAPPluginCall) {
|
|
18
|
+
call.reject("Intent Launcher is not available on iOS. This plugin only works on Android.")
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@objc func openApplication(_ call: CAPPluginCall) {
|
|
22
|
+
call.reject("Opening applications by package name is not available on iOS. This plugin only works on Android.")
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@objc func getApplicationIconAsync(_ call: CAPPluginCall) {
|
|
26
|
+
call.reject("Getting application icons is not available on iOS. This plugin only works on Android.")
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@objc func getPluginVersion(_ call: CAPPluginCall) {
|
|
30
|
+
call.resolve(["version": pluginVersion])
|
|
31
|
+
}
|
|
32
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-intent-launcher",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.1.1",
|
|
4
4
|
"description": "Launch Android intents and open system settings screens from your Capacitor app.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"android/src/main/",
|
|
11
11
|
"android/build.gradle",
|
|
12
|
-
"
|
|
12
|
+
"ios/Sources/",
|
|
13
|
+
"dist/",
|
|
14
|
+
"CapgoIntentLauncher.podspec"
|
|
13
15
|
],
|
|
14
16
|
"author": "Martin Donadieu <martin@capgo.app>",
|
|
15
17
|
"license": "MPL-2.0",
|
|
@@ -31,7 +33,8 @@
|
|
|
31
33
|
"native"
|
|
32
34
|
],
|
|
33
35
|
"scripts": {
|
|
34
|
-
"verify": "npm run verify:android && npm run verify:web",
|
|
36
|
+
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
37
|
+
"verify:ios": "cd ios && pod lib lint --allow-warnings ../../CapgoIntentLauncher.podspec || true && cd ..",
|
|
35
38
|
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
36
39
|
"verify:web": "npm run build",
|
|
37
40
|
"lint": "npm run eslint && npm run prettier -- --check",
|
|
@@ -70,6 +73,9 @@
|
|
|
70
73
|
},
|
|
71
74
|
"prettier": "@ionic/prettier-config",
|
|
72
75
|
"capacitor": {
|
|
76
|
+
"ios": {
|
|
77
|
+
"src": "ios"
|
|
78
|
+
},
|
|
73
79
|
"android": {
|
|
74
80
|
"src": "android"
|
|
75
81
|
}
|