@capacitor-community/camera-preview 5.0.0 → 6.0.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/CapacitorCommunityCameraPreview.podspec +16 -13
- package/README.md +4 -2
- package/android/build.gradle +3 -3
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +2 -1
- package/android/gradlew +8 -4
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraPreview.java +0 -9
- package/ios/PluginTests/PluginTests.swift +0 -19
- package/package.json +6 -8
- package/android/.gradle/8.0.2/checksums/checksums.lock +0 -0
- package/android/.gradle/8.0.2/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.0.2/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.0.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/8.0.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.0.2/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/8.0.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.0.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.0.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/8.0.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.0.2/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/8.0.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/file-system.probe +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/ios/Pods/CapacitorCordova/LICENSE +0 -23
- package/ios/Pods/CapacitorCordova/README.md +0 -39
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/CapacitorCordova.h +0 -21
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/AppDelegate.h +0 -8
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/AppDelegate.m +0 -5
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDV.h +0 -28
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVAvailability.h +0 -109
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVCommandDelegate.h +0 -51
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVCommandDelegateImpl.h +0 -39
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVCommandDelegateImpl.m +0 -154
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVConfigParser.h +0 -31
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVConfigParser.m +0 -81
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVInvokedUrlCommand.h +0 -52
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVInvokedUrlCommand.m +0 -116
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVPlugin.h +0 -81
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVPlugin.m +0 -154
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVPluginManager.h +0 -25
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVPluginManager.m +0 -77
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVPluginResult.h +0 -82
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVPluginResult.m +0 -216
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVScreenOrientationDelegate.h +0 -33
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVUIWebViewDelegate.h +0 -41
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVUIWebViewDelegate.m +0 -399
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVURLProtocol.h +0 -27
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVURLProtocol.m +0 -74
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVUserAgentUtil.h +0 -27
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVUserAgentUtil.m +0 -156
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVViewController.h +0 -30
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVViewController.m +0 -34
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/NSDictionary+CordovaPreferences.h +0 -35
- package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/NSDictionary+CordovaPreferences.m +0 -63
- package/ios/Pods/Local Podspecs/Capacitor.podspec.json +0 -34
- package/ios/Pods/Local Podspecs/CapacitorCordova.podspec.json +0 -26
- package/ios/Pods/Manifest.lock +0 -22
- package/ios/Pods/Pods.xcodeproj/project.pbxproj +0 -1374
- package/ios/Pods/Pods.xcodeproj/xcuserdata/julionic.xcuserdatad/xcschemes/Capacitor.xcscheme +0 -58
- package/ios/Pods/Pods.xcodeproj/xcuserdata/julionic.xcuserdatad/xcschemes/CapacitorCordova.xcscheme +0 -58
- package/ios/Pods/Pods.xcodeproj/xcuserdata/julionic.xcuserdatad/xcschemes/Pods-Plugin.xcscheme +0 -58
- package/ios/Pods/Pods.xcodeproj/xcuserdata/julionic.xcuserdatad/xcschemes/Pods-PluginTests.xcscheme +0 -58
- package/ios/Pods/Pods.xcodeproj/xcuserdata/julionic.xcuserdatad/xcschemes/xcschememanagement.plist +0 -31
- package/ios/Pods/Target Support Files/Capacitor/Capacitor-Info.plist +0 -26
- package/ios/Pods/Target Support Files/Capacitor/Capacitor-dummy.m +0 -5
- package/ios/Pods/Target Support Files/Capacitor/Capacitor-prefix.pch +0 -12
- package/ios/Pods/Target Support Files/Capacitor/Capacitor.debug.xcconfig +0 -15
- package/ios/Pods/Target Support Files/Capacitor/Capacitor.modulemap +0 -8
- package/ios/Pods/Target Support Files/Capacitor/Capacitor.release.xcconfig +0 -15
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova-Info.plist +0 -26
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova-dummy.m +0 -5
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova-prefix.pch +0 -12
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova-umbrella.h +0 -32
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova.debug.xcconfig +0 -12
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova.modulemap +0 -6
- package/ios/Pods/Target Support Files/CapacitorCordova/CapacitorCordova.release.xcconfig +0 -12
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin-Info.plist +0 -26
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin-acknowledgements.markdown +0 -53
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin-acknowledgements.plist +0 -91
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin-dummy.m +0 -5
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin-umbrella.h +0 -16
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin.debug.xcconfig +0 -14
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin.modulemap +0 -6
- package/ios/Pods/Target Support Files/Pods-Plugin/Pods-Plugin.release.xcconfig +0 -14
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-Info.plist +0 -26
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-acknowledgements.markdown +0 -53
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-acknowledgements.plist +0 -91
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-dummy.m +0 -5
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-frameworks.sh +0 -188
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests-umbrella.h +0 -16
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.debug.xcconfig +0 -15
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.modulemap +0 -6
- package/ios/Pods/Target Support Files/Pods-PluginTests/Pods-PluginTests.release.xcconfig +0 -15
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
require 'json'
|
|
1
2
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'CapacitorCommunityCameraPreview'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.license = package['license']
|
|
10
|
+
s.homepage = 'https://github.com/capacitor-community/camera-preview.git'
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.source = { :git => 'https://github.com/capacitor-community/camera-preview.git', :tag => s.version.to_s }
|
|
13
|
+
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
+
s.ios.deployment_target = '13.0'
|
|
15
|
+
s.dependency 'Capacitor'
|
|
16
|
+
s.swift_version = '5.1'
|
|
17
|
+
end
|
package/README.md
CHANGED
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
Capacitor plugin that allows camera interaction from Javascript and HTML<br>(based on cordova-plugin-camera-preview).
|
|
9
9
|
</p>
|
|
10
10
|
<br>
|
|
11
|
-
Version
|
|
11
|
+
Version 6 of this plugin requires Capacitor 6.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
If you are using Capacitor 5, use [version 5](https://github.com/capacitor-community/camera-preview/releases/tag/v5.0.0)
|
|
14
|
+
|
|
15
|
+
If you are using Capacitor 4, use [version 4](https://github.com/capacitor-community/camera-preview/releases/tag/v4.0.0)
|
|
14
16
|
|
|
15
17
|
If you are using Capacitor 3, use [version 3](https://github.com/capacitor-community/camera-preview/releases/tag/v3.1.2)
|
|
16
18
|
|
package/android/build.gradle
CHANGED
|
@@ -12,7 +12,7 @@ buildscript {
|
|
|
12
12
|
google()
|
|
13
13
|
}
|
|
14
14
|
dependencies {
|
|
15
|
-
classpath 'com.android.tools.build:gradle:8.
|
|
15
|
+
classpath 'com.android.tools.build:gradle:8.2.1'
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -20,10 +20,10 @@ apply plugin: 'com.android.library'
|
|
|
20
20
|
|
|
21
21
|
android {
|
|
22
22
|
namespace "com.ahm.capacitor.camera.preview.capacitorcamerapreview"
|
|
23
|
-
|
|
23
|
+
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
|
|
24
24
|
defaultConfig {
|
|
25
25
|
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
|
|
26
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
26
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
|
|
27
27
|
versionCode 1
|
|
28
28
|
versionName "1.0"
|
|
29
29
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
Binary file
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
|
+
validateDistributionUrl=true
|
|
5
6
|
zipStoreBase=GRADLE_USER_HOME
|
|
6
7
|
zipStorePath=wrapper/dists
|
package/android/gradlew
CHANGED
|
@@ -85,9 +85,6 @@ done
|
|
|
85
85
|
APP_BASE_NAME=${0##*/}
|
|
86
86
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
|
87
87
|
|
|
88
|
-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
89
|
-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
90
|
-
|
|
91
88
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
92
89
|
MAX_FD=maximum
|
|
93
90
|
|
|
@@ -133,10 +130,13 @@ location of your Java installation."
|
|
|
133
130
|
fi
|
|
134
131
|
else
|
|
135
132
|
JAVACMD=java
|
|
136
|
-
|
|
133
|
+
if ! command -v java >/dev/null 2>&1
|
|
134
|
+
then
|
|
135
|
+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
137
136
|
|
|
138
137
|
Please set the JAVA_HOME variable in your environment to match the
|
|
139
138
|
location of your Java installation."
|
|
139
|
+
fi
|
|
140
140
|
fi
|
|
141
141
|
|
|
142
142
|
# Increase the maximum file descriptors if we can.
|
|
@@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
|
|
|
197
197
|
done
|
|
198
198
|
fi
|
|
199
199
|
|
|
200
|
+
|
|
201
|
+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
202
|
+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
203
|
+
|
|
200
204
|
# Collect all arguments for the java command;
|
|
201
205
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
|
202
206
|
# shell script including quotes and variable substitutions, so put them in
|
|
@@ -47,15 +47,6 @@ public class CameraPreview extends Plugin implements CameraActivity.CameraPrevie
|
|
|
47
47
|
private CameraActivity fragment;
|
|
48
48
|
private int containerViewId = 20;
|
|
49
49
|
|
|
50
|
-
@PluginMethod
|
|
51
|
-
public void echo(PluginCall call) {
|
|
52
|
-
String value = call.getString("value");
|
|
53
|
-
|
|
54
|
-
JSObject ret = new JSObject();
|
|
55
|
-
ret.put("value", value);
|
|
56
|
-
call.resolve(ret);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
50
|
@PluginMethod
|
|
60
51
|
public void start(PluginCall call) {
|
|
61
52
|
if (PermissionState.GRANTED.equals(getPermissionState(CAMERA_PERMISSION_ALIAS))) {
|
|
@@ -13,23 +13,4 @@ class PluginTests: XCTestCase {
|
|
|
13
13
|
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
|
14
14
|
super.tearDown()
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
func testEcho() {
|
|
18
|
-
// This is an example of a functional test case for a plugin.
|
|
19
|
-
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
|
20
|
-
|
|
21
|
-
let value = "Hello, World!"
|
|
22
|
-
let plugin = MyPlugin()
|
|
23
|
-
|
|
24
|
-
let call = CAPPluginCall(callbackId: "test", options: [
|
|
25
|
-
"value": value
|
|
26
|
-
], success: { (result, _) in
|
|
27
|
-
let resultValue = result!.data["value"] as? String
|
|
28
|
-
XCTAssertEqual(value, resultValue)
|
|
29
|
-
}, error: { (_) in
|
|
30
|
-
XCTFail("Error shouldn't have been called")
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
plugin.echo(call!)
|
|
34
|
-
}
|
|
35
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor-community/camera-preview",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Camera preview",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -20,22 +20,20 @@
|
|
|
20
20
|
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
21
21
|
"swiftlint": "node-swiftlint",
|
|
22
22
|
"prepublishOnly": "npm run build",
|
|
23
|
-
"prepare": "husky install && npm run build"
|
|
24
|
-
"release": "np --any-branch --yolo"
|
|
23
|
+
"prepare": "husky install && npm run build"
|
|
25
24
|
},
|
|
26
25
|
"author": "Ariel Hernandez Musa",
|
|
27
26
|
"license": "MIT",
|
|
28
27
|
"devDependencies": {
|
|
29
|
-
"@capacitor/android": "^
|
|
30
|
-
"@capacitor/core": "^
|
|
31
|
-
"@capacitor/ios": "^
|
|
28
|
+
"@capacitor/android": "^6.0.0",
|
|
29
|
+
"@capacitor/core": "^6.0.0",
|
|
30
|
+
"@capacitor/ios": "^6.0.0",
|
|
32
31
|
"@ionic/eslint-config": "^0.3.0",
|
|
33
32
|
"@ionic/prettier-config": "^2.0.0",
|
|
34
33
|
"@ionic/swiftlint-config": "^1.1.2",
|
|
35
34
|
"concurrently": "^7.0.0",
|
|
36
35
|
"eslint": "^7.32.0",
|
|
37
36
|
"husky": "^7.0.4",
|
|
38
|
-
"np": "^7.7.0",
|
|
39
37
|
"prettier": "^2.5.1",
|
|
40
38
|
"prettier-plugin-java": "^1.6.1",
|
|
41
39
|
"pretty-quick": "^3.1.3",
|
|
@@ -45,7 +43,7 @@
|
|
|
45
43
|
"typescript": "^4.3.2"
|
|
46
44
|
},
|
|
47
45
|
"peerDependencies": {
|
|
48
|
-
"@capacitor/core": "^
|
|
46
|
+
"@capacitor/core": "^6.0.0"
|
|
49
47
|
},
|
|
50
48
|
"husky": {
|
|
51
49
|
"hooks": {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Copyright 2015-present Drifty Co.
|
|
2
|
-
http://drifty.com/
|
|
3
|
-
|
|
4
|
-
MIT License
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
7
|
-
a copy of this software and associated documentation files (the
|
|
8
|
-
"Software"), to deal in the Software without restriction, including
|
|
9
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
10
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
11
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
12
|
-
the following conditions:
|
|
13
|
-
|
|
14
|
-
The above copyright notice and this permission notice shall be
|
|
15
|
-
included in all copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
18
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
19
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
20
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
21
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
22
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
23
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
[![Build Status][circle-badge]][circle-badge-url]
|
|
2
|
-
|
|
3
|
-
# ⚡️ Cross-platform apps with JavaScript and the Web ⚡️
|
|
4
|
-
|
|
5
|
-
Capacitor is a cross-platform API and code execution layer that makes it easy to call Native SDKs from web code and to write custom Native plugins that your app might need. Additionally, Capacitor provides first-class Progressive Web App support so you can write one app and deploy it to the app stores, _and_ the mobile web.
|
|
6
|
-
|
|
7
|
-
Capacitor was created by the Ionic Framework team as a spiritual successor to Cordova, though it does have backward compatibility with the majority of Cordova plugins. Capacitor can be used without [Ionic Framework](https://ionicframework.com/docs/components), but since it's a core part of the Ionic Platform, it's recommended for the best app development experience.
|
|
8
|
-
|
|
9
|
-
Capacitor also comes with a Plugin API for building native plugins. On iOS, first-class Swift support is available, and much of the iOS Capacitor runtime is written in Swift. Plugins may also be written in Objective-C. On Android, writing plugins in Java and Kotlin is supported.
|
|
10
|
-
|
|
11
|
-
## Roadmap
|
|
12
|
-
|
|
13
|
-
_Disclaimer: Our roadmap is subject to change at any time and has no specific date guarantees_
|
|
14
|
-
|
|
15
|
-
2020 and beyond: The core Capacitor project is now stable. Maintenance is ongoing (including support for new mobile operating system versions, bugs, etc.). Going forward, most new functionality will be implemented as plugins. For the latest updates, track new releases [here](https://github.com/ionic-team/capacitor/releases) or milestones [here](https://github.com/ionic-team/capacitor/milestones).
|
|
16
|
-
|
|
17
|
-
[2019](https://blog.ionicframework.com/capacitor-in-2019-native-progressive-web-apps-for-all/)
|
|
18
|
-
|
|
19
|
-
2018
|
|
20
|
-
|
|
21
|
-
- __Cordova Plugin Integration__
|
|
22
|
-
- Preliminary support for using plugins from the existing Cordova community
|
|
23
|
-
- __Electron support__
|
|
24
|
-
- Support for building Electron apps and interacting with Node.js libraries
|
|
25
|
-
- __Enterprise Premium Plugins__
|
|
26
|
-
- Paid add-on plugins with support for common Enterprise use cases, such as storage, authentication, security, and more
|
|
27
|
-
- Developer Support options with SLAs and priority patches
|
|
28
|
-
- We are working with a few large teams/businesses as early development partners. Interested? Email [max@ionicframework.com](mailto:max@ionicframework.com)
|
|
29
|
-
|
|
30
|
-
## Contributing
|
|
31
|
-
|
|
32
|
-
Contributing to Capacitor may involve writing TypeScript, Swift/Objective-C, Java, or Markdown depending on the component you are working on. We are looking for help in any of these areas!
|
|
33
|
-
|
|
34
|
-
Please read the [Contributing](.github/CONTRIBUTING.md) guide for more information.
|
|
35
|
-
|
|
36
|
-
For details on updating the Capacitor website or documentation, [see here](site/CONTRIBUTING.md).
|
|
37
|
-
|
|
38
|
-
[circle-badge]: https://circleci.com/gh/ionic-team/capacitor.svg?style=shield
|
|
39
|
-
[circle-badge-url]: https://circleci.com/gh/ionic-team/capacitor
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#import <UIKit/UIKit.h>
|
|
2
|
-
|
|
3
|
-
//! Project version number for CapacitorCordova.
|
|
4
|
-
FOUNDATION_EXPORT double CapacitorCordovaVersionNumber;
|
|
5
|
-
|
|
6
|
-
//! Project version string for CapacitorCordova.
|
|
7
|
-
FOUNDATION_EXPORT const unsigned char CapacitorCordovaVersionString[];
|
|
8
|
-
|
|
9
|
-
// In this header, you should import all the public headers of your framework using statements like #import <CapacitorCordova/PublicHeader.h>
|
|
10
|
-
|
|
11
|
-
#import <Cordova/CDV.h>
|
|
12
|
-
#import <Cordova/CDVCommandDelegateImpl.h>
|
|
13
|
-
#import <Cordova/CDVAvailability.h>
|
|
14
|
-
#import <Cordova/CDVPlugin.h>
|
|
15
|
-
#import <Cordova/CDVPluginResult.h>
|
|
16
|
-
#import <Cordova/CDVCommandDelegate.h>
|
|
17
|
-
#import <Cordova/CDVInvokedUrlCommand.h>
|
|
18
|
-
#import <Cordova/CDVConfigParser.h>
|
|
19
|
-
#import <Cordova/CDVViewController.h>
|
|
20
|
-
#import <Cordova/NSDictionary+CordovaPreferences.h>
|
|
21
|
-
#import <Cordova/CDVURLProtocol.h>
|
package/ios/Pods/CapacitorCordova/ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDV.h
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
-
or more contributor license agreements. See the NOTICE file
|
|
4
|
-
distributed with this work for additional information
|
|
5
|
-
regarding copyright ownership. The ASF licenses this file
|
|
6
|
-
to you under the Apache License, Version 2.0 (the
|
|
7
|
-
"License"); you may not use this file except in compliance
|
|
8
|
-
with the License. You may obtain a copy of the License at
|
|
9
|
-
|
|
10
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
|
|
12
|
-
Unless required by applicable law or agreed to in writing,
|
|
13
|
-
software distributed under the License is distributed on an
|
|
14
|
-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
KIND, either express or implied. See the License for the
|
|
16
|
-
specific language governing permissions and limitations
|
|
17
|
-
under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
#import "CDVAvailability.h"
|
|
21
|
-
#import "CDVPlugin.h"
|
|
22
|
-
#import "CDVPluginResult.h"
|
|
23
|
-
#import "CDVCommandDelegate.h"
|
|
24
|
-
#import "CDVInvokedUrlCommand.h"
|
|
25
|
-
#import "CDVViewController.h"
|
|
26
|
-
#import "CDVURLProtocol.h"
|
|
27
|
-
#import "CDVScreenOrientationDelegate.h"
|
|
28
|
-
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
-
or more contributor license agreements. See the NOTICE file
|
|
4
|
-
distributed with this work for additional information
|
|
5
|
-
regarding copyright ownership. The ASF licenses this file
|
|
6
|
-
to you under the Apache License, Version 2.0 (the
|
|
7
|
-
"License"); you may not use this file except in compliance
|
|
8
|
-
with the License. You may obtain a copy of the License at
|
|
9
|
-
|
|
10
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
|
|
12
|
-
Unless required by applicable law or agreed to in writing,
|
|
13
|
-
software distributed under the License is distributed on an
|
|
14
|
-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
KIND, either express or implied. See the License for the
|
|
16
|
-
specific language governing permissions and limitations
|
|
17
|
-
under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
#define __CORDOVA_IOS__
|
|
21
|
-
|
|
22
|
-
#define __CORDOVA_0_9_6 906
|
|
23
|
-
#define __CORDOVA_1_0_0 10000
|
|
24
|
-
#define __CORDOVA_1_1_0 10100
|
|
25
|
-
#define __CORDOVA_1_2_0 10200
|
|
26
|
-
#define __CORDOVA_1_3_0 10300
|
|
27
|
-
#define __CORDOVA_1_4_0 10400
|
|
28
|
-
#define __CORDOVA_1_4_1 10401
|
|
29
|
-
#define __CORDOVA_1_5_0 10500
|
|
30
|
-
#define __CORDOVA_1_6_0 10600
|
|
31
|
-
#define __CORDOVA_1_6_1 10601
|
|
32
|
-
#define __CORDOVA_1_7_0 10700
|
|
33
|
-
#define __CORDOVA_1_8_0 10800
|
|
34
|
-
#define __CORDOVA_1_8_1 10801
|
|
35
|
-
#define __CORDOVA_1_9_0 10900
|
|
36
|
-
#define __CORDOVA_2_0_0 20000
|
|
37
|
-
#define __CORDOVA_2_1_0 20100
|
|
38
|
-
#define __CORDOVA_2_2_0 20200
|
|
39
|
-
#define __CORDOVA_2_3_0 20300
|
|
40
|
-
#define __CORDOVA_2_4_0 20400
|
|
41
|
-
#define __CORDOVA_2_5_0 20500
|
|
42
|
-
#define __CORDOVA_2_6_0 20600
|
|
43
|
-
#define __CORDOVA_2_7_0 20700
|
|
44
|
-
#define __CORDOVA_2_8_0 20800
|
|
45
|
-
#define __CORDOVA_2_9_0 20900
|
|
46
|
-
#define __CORDOVA_3_0_0 30000
|
|
47
|
-
#define __CORDOVA_3_1_0 30100
|
|
48
|
-
#define __CORDOVA_3_2_0 30200
|
|
49
|
-
#define __CORDOVA_3_3_0 30300
|
|
50
|
-
#define __CORDOVA_3_4_0 30400
|
|
51
|
-
#define __CORDOVA_3_4_1 30401
|
|
52
|
-
#define __CORDOVA_3_5_0 30500
|
|
53
|
-
#define __CORDOVA_3_6_0 30600
|
|
54
|
-
#define __CORDOVA_3_7_0 30700
|
|
55
|
-
#define __CORDOVA_3_8_0 30800
|
|
56
|
-
#define __CORDOVA_3_9_0 30900
|
|
57
|
-
#define __CORDOVA_3_9_1 30901
|
|
58
|
-
#define __CORDOVA_3_9_2 30902
|
|
59
|
-
#define __CORDOVA_4_0_0 40000
|
|
60
|
-
#define __CORDOVA_4_0_1 40001
|
|
61
|
-
#define __CORDOVA_4_1_0 40100
|
|
62
|
-
#define __CORDOVA_4_1_1 40101
|
|
63
|
-
#define __CORDOVA_4_2_0 40200
|
|
64
|
-
#define __CORDOVA_4_2_1 40201
|
|
65
|
-
#define __CORDOVA_4_3_0 40300
|
|
66
|
-
#define __CORDOVA_4_3_1 40301
|
|
67
|
-
#define __CORDOVA_4_4_0 40400
|
|
68
|
-
#define __CORDOVA_4_5_0 40500
|
|
69
|
-
#define __CORDOVA_4_5_1 40501
|
|
70
|
-
#define __CORDOVA_4_5_2 40502
|
|
71
|
-
#define __CORDOVA_4_5_4 40504
|
|
72
|
-
/* coho:next-version,insert-before */
|
|
73
|
-
#define __CORDOVA_NA 99999 /* not available */
|
|
74
|
-
|
|
75
|
-
/*
|
|
76
|
-
#if CORDOVA_VERSION_MIN_REQUIRED >= __CORDOVA_4_0_0
|
|
77
|
-
// do something when its at least 4.0.0
|
|
78
|
-
#else
|
|
79
|
-
// do something else (non 4.0.0)
|
|
80
|
-
#endif
|
|
81
|
-
*/
|
|
82
|
-
#ifndef CORDOVA_VERSION_MIN_REQUIRED
|
|
83
|
-
/* coho:next-version-min-required,replace-after */
|
|
84
|
-
#define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_4_5_4
|
|
85
|
-
#endif
|
|
86
|
-
|
|
87
|
-
/*
|
|
88
|
-
Returns YES if it is at least version specified as NSString(X)
|
|
89
|
-
Usage:
|
|
90
|
-
if (IsAtLeastiOSVersion(@"5.1")) {
|
|
91
|
-
// do something for iOS 5.1 or greater
|
|
92
|
-
}
|
|
93
|
-
*/
|
|
94
|
-
#define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending)
|
|
95
|
-
|
|
96
|
-
/* Return the string version of the decimal version */
|
|
97
|
-
#define CDV_VERSION [NSString stringWithFormat:@"%d.%d.%d", \
|
|
98
|
-
(CORDOVA_VERSION_MIN_REQUIRED / 10000), \
|
|
99
|
-
(CORDOVA_VERSION_MIN_REQUIRED % 10000) / 100, \
|
|
100
|
-
(CORDOVA_VERSION_MIN_REQUIRED % 10000) % 100]
|
|
101
|
-
|
|
102
|
-
// Enable this to log all exec() calls.
|
|
103
|
-
#define CDV_ENABLE_EXEC_LOGGING 0
|
|
104
|
-
#if CDV_ENABLE_EXEC_LOGGING
|
|
105
|
-
#define CDV_EXEC_LOG NSLog
|
|
106
|
-
#else
|
|
107
|
-
#define CDV_EXEC_LOG(...) do { \
|
|
108
|
-
} while (NO)
|
|
109
|
-
#endif
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
-
or more contributor license agreements. See the NOTICE file
|
|
4
|
-
distributed with this work for additional information
|
|
5
|
-
regarding copyright ownership. The ASF licenses this file
|
|
6
|
-
to you under the Apache License, Version 2.0 (the
|
|
7
|
-
"License"); you may not use this file except in compliance
|
|
8
|
-
with the License. You may obtain a copy of the License at
|
|
9
|
-
|
|
10
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
|
|
12
|
-
Unless required by applicable law or agreed to in writing,
|
|
13
|
-
software distributed under the License is distributed on an
|
|
14
|
-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
KIND, either express or implied. See the License for the
|
|
16
|
-
specific language governing permissions and limitations
|
|
17
|
-
under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
#import "CDVInvokedUrlCommand.h"
|
|
21
|
-
|
|
22
|
-
@class CDVPlugin;
|
|
23
|
-
@class CDVPluginResult;
|
|
24
|
-
|
|
25
|
-
typedef NSURL* (^ UrlTransformerBlock)(NSURL*);
|
|
26
|
-
|
|
27
|
-
@protocol CDVCommandDelegate <NSObject>
|
|
28
|
-
|
|
29
|
-
@property (nonatomic, readonly) NSDictionary* settings;
|
|
30
|
-
@property (nonatomic, copy) UrlTransformerBlock urlTransformer;
|
|
31
|
-
|
|
32
|
-
- (NSString*)pathForResource:(NSString*)resourcepath;
|
|
33
|
-
- (id)getCommandInstance:(NSString*)pluginName;
|
|
34
|
-
|
|
35
|
-
// Sends a plugin result to the JS. This is thread-safe.
|
|
36
|
-
- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId;
|
|
37
|
-
// Evaluates the given JS. This is thread-safe.
|
|
38
|
-
- (void)evalJs:(NSString*)js;
|
|
39
|
-
// Can be used to evaluate JS right away instead of scheduling it on the run-loop.
|
|
40
|
-
// This is required for dispatch resign and pause events, but should not be used
|
|
41
|
-
// without reason. Without the run-loop delay, alerts used in JS callbacks may result
|
|
42
|
-
// in dead-lock. This method must be called from the UI thread.
|
|
43
|
-
- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop;
|
|
44
|
-
// Run the javascript
|
|
45
|
-
- (void)evalJsHelper2:(NSString*)js;
|
|
46
|
-
// Runs the given block on a background thread using a shared thread-pool.
|
|
47
|
-
- (void)runInBackground:(void (^)())block;
|
|
48
|
-
// Returns the User-Agent of the associated UIWebView.
|
|
49
|
-
- (NSString*)userAgent;
|
|
50
|
-
|
|
51
|
-
@end
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
-
or more contributor license agreements. See the NOTICE file
|
|
4
|
-
distributed with this work for additional information
|
|
5
|
-
regarding copyright ownership. The ASF licenses this file
|
|
6
|
-
to you under the Apache License, Version 2.0 (the
|
|
7
|
-
"License"); you may not use this file except in compliance
|
|
8
|
-
with the License. You may obtain a copy of the License at
|
|
9
|
-
|
|
10
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
|
|
12
|
-
Unless required by applicable law or agreed to in writing,
|
|
13
|
-
software distributed under the License is distributed on an
|
|
14
|
-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
KIND, either express or implied. See the License for the
|
|
16
|
-
specific language governing permissions and limitations
|
|
17
|
-
under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
#import <UIKit/UIKit.h>
|
|
21
|
-
#import "CDVCommandDelegate.h"
|
|
22
|
-
#import <WebKit/WebKit.h>
|
|
23
|
-
#import "CDVPluginManager.h"
|
|
24
|
-
|
|
25
|
-
@class CDVViewController;
|
|
26
|
-
@class CDVCommandQueue;
|
|
27
|
-
|
|
28
|
-
@interface CDVCommandDelegateImpl : NSObject <CDVCommandDelegate>{
|
|
29
|
-
@private
|
|
30
|
-
__weak WKWebView* _webView;
|
|
31
|
-
__weak CDVPluginManager* _manager;
|
|
32
|
-
NSRegularExpression* _callbackIdPattern;
|
|
33
|
-
@protected
|
|
34
|
-
__weak CDVCommandQueue* _commandQueue;
|
|
35
|
-
BOOL _delayResponses;
|
|
36
|
-
}
|
|
37
|
-
- (id)initWithWebView:(WKWebView*)webView pluginManager:(CDVPluginManager *)manager;
|
|
38
|
-
- (void)flushCommandQueueWithDelayedJs;
|
|
39
|
-
@end
|