cordova-jd-barcode-qrscanner 3.0.16

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.
Files changed (50) hide show
  1. package/.jshintrc +15 -0
  2. package/.prettierignore +1 -0
  3. package/CHANGELOG.md +233 -0
  4. package/LICENSE +21 -0
  5. package/gulpfile.js +46 -0
  6. package/hooks/windows/check-arch.js +52 -0
  7. package/package.json +92 -0
  8. package/plugin.xml +64 -0
  9. package/readme.md +30 -0
  10. package/readme_how_to_publish_to_npm.txt +9 -0
  11. package/src/android/QRScanner.java +808 -0
  12. package/src/android/qrscanner.gradle +12 -0
  13. package/src/browser/plugin.min.js +4242 -0
  14. package/src/browser/src/cordova-plugin.js +7 -0
  15. package/src/browser/src/createQRScannerInternal.js +573 -0
  16. package/src/browser/src/library.js +52 -0
  17. package/src/browser/src/worker.js +12 -0
  18. package/src/common/src/cordova-remap.js +9 -0
  19. package/src/common/src/cordova-www.js +8 -0
  20. package/src/common/src/createQRScannerAdapter.js +226 -0
  21. package/src/ios/QRScanner.swift +535 -0
  22. package/src/windows/QRReader/CameraRotationHelper.cs +263 -0
  23. package/src/windows/QRReader/Properties/AssemblyInfo.cs +29 -0
  24. package/src/windows/QRReader/QRReader.csproj +132 -0
  25. package/src/windows/QRReader/QRReader.csproj.user +6 -0
  26. package/src/windows/QRReader/Reader.cs +98 -0
  27. package/src/windows/QRReader/VideoCapture.cs +187 -0
  28. package/src/windows/QRReader/lib/ZXing.winmd +0 -0
  29. package/src/windows/QRReader/project.json +16 -0
  30. package/src/windows/QRReader/project.lock.json +15504 -0
  31. package/src/windows/QRScanner.sln +50 -0
  32. package/src/windows/lib/preview.css +89 -0
  33. package/src/windows/lib/preview.js +88 -0
  34. package/src/windows/lib/qrScanner.js +285 -0
  35. package/tests/.jshintrc +14 -0
  36. package/tests/library/index.html +121 -0
  37. package/tests/library/test.js +12 -0
  38. package/tests/plugin.xml +9 -0
  39. package/tests/project/config.xml +38 -0
  40. package/tests/project/package.json +18 -0
  41. package/tests/project/readme.md +37 -0
  42. package/tests/project/resources/Default@2x~universal~anyany.png +0 -0
  43. package/tests/project/resources/Default@3x~universal~anyany.png +0 -0
  44. package/tests/project/scripts/timestamp.js +11 -0
  45. package/tests/project/www/index.html +1 -0
  46. package/tests/tests.js +287 -0
  47. package/webpack.cordova.config.js +19 -0
  48. package/webpack.library.config.js +22 -0
  49. package/webpack.prepack.config.js +17 -0
  50. package/www/www.min.js +342 -0
package/.jshintrc ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "browser": true,
3
+ "curly": true,
4
+ "eqeqeq": true,
5
+ "latedef": true,
6
+ "noarg": true,
7
+ "unused": true,
8
+ "undef": true,
9
+ "globals": {
10
+ "cordova": false,
11
+ "module": false,
12
+ "require": false,
13
+ "Promise": false
14
+ }
15
+ }
@@ -0,0 +1 @@
1
+ package.json
package/CHANGELOG.md ADDED
@@ -0,0 +1,233 @@
1
+ <a name="3.0.1"></a>
2
+ ## [3.0.1](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.6.0...3.0.1) (2019-03-29)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * **iOS:** remove tag UseSwiftLanguageVersion
8
+
9
+
10
+
11
+ <a name="3.0.0"></a>
12
+ # [3.0.0](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.6.0...3.0.0) (2019-03-28)
13
+
14
+
15
+ ### BREAKING CHANGES
16
+
17
+ * **iOS:** only supported by XCode 10.2 or higher
18
+
19
+
20
+
21
+ <a name="2.6.1"></a>
22
+ # [2.6.1](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.6.0...2.6.1) (2019-03-27)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **ios:** adds support to Swift 4+ (required by XCode 10.2)
28
+
29
+ <a name="2.6.0"></a>
30
+ # [2.6.0](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.5.0...2.6.0) (2018-05-17)
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * **android:** Remove cordova-plugin-compat android dependency ([85e2396](https://github.com/bitpay/cordova-plugin-qrscanner/commit/85e2396))
36
+ * **ios:** prevents iOS plugin from crashing when destroy is called without a callback ([610a004](https://github.com/bitpay/cordova-plugin-qrscanner/commit/610a004)), closes [#142](https://github.com/bitpay/cordova-plugin-qrscanner/issues/142)
37
+ * **ios,android:** set background to transparent rather than white ([c9531b8](https://github.com/bitpay/cordova-plugin-qrscanner/commit/c9531b8)), closes [#135](https://github.com/bitpay/cordova-plugin-qrscanner/issues/135)
38
+ * **package:** add `main` property to package ([955e375](https://github.com/bitpay/cordova-plugin-qrscanner/commit/955e375)), closes [#83](https://github.com/bitpay/cordova-plugin-qrscanner/issues/83)
39
+ * **package:** Use upstream swift support plugin ([211597c](https://github.com/bitpay/cordova-plugin-qrscanner/commit/211597c))
40
+ * **windows:** prevent memory leaks when destroying, add rd file ([1a4843a](https://github.com/bitpay/cordova-plugin-qrscanner/commit/1a4843a))
41
+
42
+
43
+ ### Features
44
+
45
+ * **browser:** upgrade qrcode-reader to ^1.0.4 ([08cf523](https://github.com/bitpay/cordova-plugin-qrscanner/commit/08cf523)), closes [#92](https://github.com/bitpay/cordova-plugin-qrscanner/issues/92)
46
+ * **ios:** Upgrade, convert syntax to Swift 3.1 ([27fdd92](https://github.com/bitpay/cordova-plugin-qrscanner/commit/27fdd92))
47
+ * **windows:** target windows 10 universal ([691cdda](https://github.com/bitpay/cordova-plugin-qrscanner/commit/691cdda))
48
+
49
+
50
+
51
+ <a name="2.5.0"></a>
52
+ # [2.5.0](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.4.1...v2.5.0) (2017-02-15)
53
+
54
+
55
+ ### Features
56
+
57
+ * **windows:** add support for windows phone 8.1 ([3efa2df](https://github.com/bitpay/cordova-plugin-qrscanner/commit/3efa2df))
58
+
59
+
60
+
61
+ <a name="2.4.1"></a>
62
+ ## [2.4.1](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.4.0...v2.4.1) (2017-02-14)
63
+
64
+
65
+ ### Bug Fixes
66
+
67
+ * **ios:** correct video preview orientation handling on iOS ([141edbb](https://github.com/bitpay/cordova-plugin-qrscanner/commit/141edbb)), closes [#7](https://github.com/bitpay/cordova-plugin-qrscanner/issues/7)
68
+ * **ios:** fix openSettings on iOS 10.0 ([#43](https://github.com/bitpay/cordova-plugin-qrscanner/issues/43)) ([aaa098c](https://github.com/bitpay/cordova-plugin-qrscanner/commit/aaa098c))
69
+
70
+
71
+
72
+ <a name="2.4.0"></a>
73
+ # [2.4.0](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.3.4...2.4.0) (2016-10-06)
74
+
75
+ ## How to Upgrade
76
+
77
+ If you installed a previous version of this plugin and manually added a block like the following to your `config.xml`:
78
+
79
+ ```xml
80
+ <platform name="ios">
81
+ <hook type="before_build" src="plugins/cordova-plugin-qrscanner/scripts/swift-support.js" />
82
+ <config-file target="*-Info.plist" parent="NSCameraUsageDescription">
83
+ <string>The camera is used to scan QR codes.</string>
84
+ </config-file>
85
+ </platform>
86
+ ```
87
+
88
+ you can simply delete the whole thing, it is no longer necessary. The iOS platform now installs itself completely, and no additional configuration is needed.
89
+
90
+ ### Features
91
+
92
+ * **ios:** remove need for the swift-support hook, remove script ([dca1f7e](https://github.com/bitpay/cordova-plugin-qrscanner/commit/dca1f7e))
93
+
94
+
95
+
96
+ <a name="2.3.4"></a>
97
+ ## [2.3.4](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.3.3...2.3.4) (2016-10-01)
98
+
99
+
100
+ ### Bug Fixes
101
+
102
+ * **ios:** Make NSCameraUsageDescription string non-empty, which is now rejected by Apple ([514a2d2](https://github.com/bitpay/cordova-plugin-qrscanner/commit/514a2d2))
103
+ * **ios:** pause scanning with pausePreview method on iOS ([c0722c7](https://github.com/bitpay/cordova-plugin-qrscanner/commit/c0722c7)), closes [#12](https://github.com/bitpay/cordova-plugin-qrscanner/issues/12)
104
+
105
+
106
+
107
+ <a name="2.3.3"></a>
108
+ ## [2.3.3](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.3.2...2.3.3) (2016-09-29)
109
+
110
+
111
+ ### Bug Fixes
112
+
113
+ * **browser:** make cancelScan call the current scan's callback with error code 6 ([d5ca673](https://github.com/bitpay/cordova-plugin-qrscanner/commit/d5ca673))
114
+ * **library:** fixes an issue with optional callbacks being required ([99dc348](https://github.com/bitpay/cordova-plugin-qrscanner/commit/99dc348))
115
+
116
+
117
+
118
+ <a name="2.3.2"></a>
119
+ ## [2.3.2](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.3.1...2.3.2) (2016-09-28)
120
+
121
+
122
+ ### Bug Fixes
123
+
124
+ * **library:** rename UMD library file in dist ([a4b385f](https://github.com/bitpay/cordova-plugin-qrscanner/commit/a4b385f))
125
+
126
+
127
+
128
+ <a name="2.3.1"></a>
129
+ ## [2.3.1](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.3.0...2.3.1) (2016-09-28)
130
+
131
+
132
+ ### Bug Fixes
133
+
134
+ * **package:** remove install script ([b769bec](https://github.com/bitpay/cordova-plugin-qrscanner/commit/b769bec))
135
+
136
+
137
+
138
+ <a name="2.3.0"></a>
139
+ # [2.3.0](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.2.0...2.3.0) (2016-09-28)
140
+
141
+
142
+ ### Features
143
+
144
+ * **all:** Add build process, release browser platform as a UMD library ([052b8d3](https://github.com/bitpay/cordova-plugin-qrscanner/commit/052b8d3)), closes [#30](https://github.com/bitpay/cordova-plugin-qrscanner/issues/30)
145
+
146
+
147
+
148
+ <a name="2.2.0"></a>
149
+ ## [2.1.2](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.1.1...2.1.2) (2016-08-15)
150
+
151
+
152
+ ### Features
153
+
154
+ * **ios:** Support iOS 10 beta ([fa7ef5b](https://github.com/bitpay/cordova-plugin-qrscanner/commit/fa7ef5b))
155
+
156
+
157
+
158
+ <a name="2.1.1"></a>
159
+ ## [2.1.1](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.1.0...2.1.1) (2016-08-12)
160
+
161
+
162
+ ### Bug Fixes
163
+
164
+ * **android:** fixes the enableLight and disableLight methods ([21add2f](https://github.com/bitpay/cordova-plugin-qrscanner/commit/21add2f))
165
+
166
+
167
+
168
+ <a name="2.1.0"></a>
169
+ # [2.1.0](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.0.1...2.1.0) (2016-08-05)
170
+
171
+
172
+ ### Bug Fixes
173
+
174
+ * **all:** added required parameters to certain cordova.exec functions ([69fe4e6](https://github.com/bitpay/cordova-plugin-qrscanner/commit/69fe4e6))
175
+
176
+
177
+ ### Features
178
+
179
+ * **android:** add QRScanner class and majority of its methods ([7e589ef](https://github.com/bitpay/cordova-plugin-qrscanner/commit/7e589ef))
180
+ * **android:** android platform release preparation ([2d60614](https://github.com/bitpay/cordova-plugin-qrscanner/commit/2d60614))
181
+ * **android:** complete initial android release ([4afa02e](https://github.com/bitpay/cordova-plugin-qrscanner/commit/4afa02e))
182
+
183
+
184
+
185
+ <a name="2.0.1"></a>
186
+ ## [2.0.1](https://github.com/bitpay/cordova-plugin-qrscanner/compare/2.0.0...2.0.1) (2016-08-03)
187
+
188
+
189
+ ### Bug Fixes
190
+
191
+ * **js:** added requred args param to cordova.exec calls ([99050d6](https://github.com/bitpay/cordova-plugin-qrscanner/commit/99050d6))
192
+
193
+
194
+
195
+ <a name="2.0.0"></a>
196
+ # [2.0.0](https://github.com/bitpay/cordova-plugin-qrscanner/compare/v1.1.0...2.0.0) (2016-06-29)
197
+
198
+ ### Bug Fixes
199
+
200
+ * **jshint:** make jshint pass ([2d95c10](https://github.com/bitpay/cordova-plugin-qrscanner/commit/2d95c10))
201
+
202
+ ### Features
203
+
204
+ * **browser:** add browser to plugin.xml ([ac91b82](https://github.com/bitpay/cordova-plugin-qrscanner/commit/ac91b82))
205
+ * **browser:** initial release of browser platform ([2288539](https://github.com/bitpay/cordova-plugin-qrscanner/commit/2288539))
206
+ * **ios:** support older iPods (without a back camera) ([f211f90](https://github.com/bitpay/cordova-plugin-qrscanner/commit/f211f90))
207
+
208
+ ### Breaking Changes:
209
+
210
+ * `status.webviewBackgroundIsTransparent` has been renamed to `status.showing`
211
+
212
+
213
+
214
+ <a name="1.1.0"></a>
215
+ # [1.1.0](https://github.com/bitpay/cordova-plugin-qrscanner/compare/v1.0.1...v1.1.0) (2016-04-05)
216
+
217
+ ### Features
218
+
219
+ * **ios**: add support for WKWebView ([953c971](https://github.com/bitpay/cordova-plugin-qrscanner/commit/953c971))
220
+
221
+
222
+
223
+ <a name="1.0.1"></a>
224
+ ## [1.0.1](https://github.com/bitpay/cordova-plugin-qrscanner/compare/v1.0.0...v1.0.1) (2016-02-23)
225
+
226
+ Improves installation documentation
227
+
228
+
229
+
230
+ <a name="1.0.0"></a>
231
+ # [1.0.0](https://github.com/bitpay/cordova-plugin-qrscanner/compare/0.1.0...v1.0.0) (2016-01-25)
232
+
233
+ Initial release
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Rhino Software Pty Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/gulpfile.js ADDED
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+
3
+ const gulp = require('gulp');
4
+ const insert = require('gulp-insert');
5
+ const fs= require('fs');
6
+
7
+ const remap = fs.readFileSync('src/common/src/cordova-remap.js', 'utf-8');
8
+
9
+ function webpack(config, callback){
10
+ const exec = require('child_process').exec;
11
+ exec(__dirname + '/node_modules/.bin/webpack --config ' + config, (error, stdout, stderr) => {
12
+ console.log(stdout);
13
+ console.log(stderr);
14
+ callback(error);
15
+ });
16
+ }
17
+
18
+ gulp.task('prepack', function(cb){
19
+ webpack('webpack.prepack.config.js', cb);
20
+ });
21
+
22
+ gulp.task('webpack-cordova', gulp.series(['prepack'], function(cb){
23
+ webpack('webpack.cordova.config.js', cb);
24
+ }));
25
+
26
+ gulp.task('dist', gulp.series(['prepack'], function(cb){
27
+ webpack('webpack.library.config.js', cb);
28
+ }));
29
+
30
+ gulp.task('remap', gulp.series(['webpack-cordova'], function () {
31
+ return gulp.src(['dist/plugin.min.js', 'dist/www.min.js'])
32
+ .pipe(insert.prepend(remap))
33
+ .pipe(gulp.dest('dist'));
34
+ }));
35
+
36
+ gulp.task('plugin', gulp.series(['remap'], function () {
37
+ return gulp.src(['dist/plugin.min.js'])
38
+ .pipe(gulp.dest('src/browser'));
39
+ }));
40
+
41
+ gulp.task('www', gulp.series(['remap'], function () {
42
+ return gulp.src(['dist/www.min.js'])
43
+ .pipe(gulp.dest('www'));
44
+ }));
45
+
46
+ gulp.task('default', gulp.series(['dist', 'plugin', 'www']));
@@ -0,0 +1,52 @@
1
+ module.exports = function(ctx) {
2
+ if (ctx.opts && ctx.opts.platforms && ctx.opts.platforms.indexOf('windows') > -1
3
+ && ctx.opts.options) {
4
+ var path = require('path');
5
+ var shell = ctx.requireCordovaModule('shelljs');
6
+ var nopt = ctx.requireCordovaModule('nopt');
7
+
8
+ // parse and validate args
9
+ var args = nopt({
10
+ 'archs': [String],
11
+ 'appx': String,
12
+ 'phone': Boolean,
13
+ 'win': Boolean,
14
+ 'bundle': Boolean,
15
+ 'packageCertificateKeyFile': String,
16
+ 'packageThumbprint': String,
17
+ 'publisherId': String,
18
+ 'buildConfig': String
19
+ }, {}, ctx.opts.options.argv, 0);
20
+
21
+ // Check if --appx flag is passed so that we have a project build version override:
22
+ var isWin10 = args.appx && args.appx.toLowerCase() === 'uap';
23
+
24
+ // Else check "windows-target-version" preference:
25
+ if (!isWin10) {
26
+ var configXml = shell.ls(path.join(ctx.opts.projectRoot, 'config.xml'))[0];
27
+
28
+ var reTargetVersion = /<preference\s+name="windows-target-version"\s+value="(.+)"\s*\/>/i;
29
+ var targetVersion = shell.grep(reTargetVersion, configXml);
30
+
31
+ var result = reTargetVersion.exec(targetVersion);
32
+ if (result !== null) {
33
+ var match = result[1];
34
+ isWin10 = parseInt(match.split('.'), 10) > 8;
35
+ }
36
+ }
37
+
38
+ // Non-AnyCPU arch is required for Windows 10 (UWP) projects only:
39
+ if (isWin10) {
40
+ var rawArchs = ctx.opts.options.archs || args.archs;
41
+ var archs = rawArchs ? rawArchs.split(' ') : [];
42
+
43
+ // Avoid "anycpu" arch:
44
+ if (archs.length === 0 || archs.some(function (item) {
45
+ return item.toLowerCase() === 'anycpu';
46
+ })) {
47
+ throw new Error('You must specify an architecture to include the proper ZXing library version.'
48
+ + '\nUse \'cordova run windows -- --arch="x64"\' or \'cordova run windows -- --arch="arm" --phone --device\' for example.');
49
+ }
50
+ }
51
+ }
52
+ }
package/package.json ADDED
@@ -0,0 +1,92 @@
1
+ {
2
+ "name": "cordova-jd-barcode-qrscanner",
3
+ "version": "3.0.16",
4
+ "description": "Fast, energy-efficient, highly-configurable barcode and QR code scanner.",
5
+ "cordova": {
6
+ "id": "cordova-jd-barcode-qrscanner",
7
+ "platforms": [
8
+ "ios"
9
+ ]
10
+ },
11
+ "scripts": {
12
+ "build": "gulp && npm run clean-build",
13
+ "clean-build": "trash dist/plugin.min.js && trash dist/www.min.js && trash src/browser/worker.min.js",
14
+ "test": "npm run jshint",
15
+ "jshint": "jshint src/browser/src && jshint src/common/src && jshint tests",
16
+ "gen-tests": "npm run build && npm run clean-platform-tests && npm run mkdirp-platform-tests && npm run copy-platform-tests && npm run install-platform-tests",
17
+ "clean-platform-tests": "trash ../cordova-plugin-test-projects/cordova-plugin-qrscanner-tests",
18
+ "mkdirp-platform-tests": "mkdirp ../cordova-plugin-test-projects/cordova-plugin-qrscanner-tests",
19
+ "copy-platform-tests": "ncp tests/project ../cordova-plugin-test-projects/cordova-plugin-qrscanner-tests",
20
+ "install-platform-tests": "cd ../cordova-plugin-test-projects/cordova-plugin-qrscanner-tests && npm install",
21
+ "test:ios": "cd ../cordova-plugin-test-projects/cordova-plugin-qrscanner-tests && npm run test:ios",
22
+ "test:android": "cd ../cordova-plugin-test-projects/cordova-plugin-qrscanner-tests && npm run test:android",
23
+ "test:browser": "cd ../cordova-plugin-test-projects/cordova-plugin-qrscanner-tests && npm run test:browser",
24
+ "test:windows": "cd ../cordova-plugin-test-projects/cordova-plugin-qrscanner-tests && npm run test:windows",
25
+ "test:library": "npm run build && node tests/library/test.js",
26
+ "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
27
+ "commitmsg": "validate-commit-msg",
28
+ "prep-release": "git clean -dfx && npm install && npm run build && npm run changelog"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/jalixdesign/cordova-plugin-barcode-qrscanner.git"
33
+ },
34
+ "keywords": [
35
+ "cordova",
36
+ "barcode",
37
+ "CODE_39",
38
+ "CODE_93",
39
+ "CODE_128",
40
+ "EAN_8",
41
+ "EAN_13",
42
+ "GS1DataBar",
43
+ "ITF",
44
+ "UPC",
45
+ "qr",
46
+ "qr code",
47
+ "scanner",
48
+ "reader",
49
+ "ecosystem:cordova",
50
+ "cordova-ios",
51
+ "cordova-android",
52
+ "cordova-browser",
53
+ "UMD",
54
+ "library",
55
+ "electron",
56
+ "NW.js"
57
+ ],
58
+ "author": "Lance Conry",
59
+ "license": "MIT",
60
+ "bugs": {
61
+ "url": "https://github.com/jalixdesign/cordova-plugin-barcode-qrscanner"
62
+ },
63
+ "homepage": "https://github.com/jalixdesign/cordova-plugin-barcode-qrscanner",
64
+ "main": "dist/cordova-plugin-qrscanner-lib.min.js",
65
+ "dependencies": {
66
+ "qrcode-reader": "^1.0.4",
67
+ "webrtc-adapter": "^3.1.4"
68
+ },
69
+ "devDependencies": {
70
+ "conventional-changelog-cli": "^1.2.0",
71
+ "cz-conventional-changelog": "^2.0.0",
72
+ "express": "^4.14.0",
73
+ "gulp": "^4.0.2",
74
+ "gulp-insert": "^0.5.0",
75
+ "husky": "^0.13.1",
76
+ "jshint": "^2.9.2",
77
+ "mkdirp": "^0.5.1",
78
+ "ncp": "^2.0.0",
79
+ "raw-loader": "^0.5.1",
80
+ "trash-cli": "^1.3.0",
81
+ "validate-commit-msg": "^2.6.1",
82
+ "webpack": "^2.7.0"
83
+ },
84
+ "config": {
85
+ "commitizen": {
86
+ "path": "./node_modules/cz-conventional-changelog"
87
+ }
88
+ },
89
+ "directories": {
90
+ "test": "tests"
91
+ }
92
+ }
package/plugin.xml ADDED
@@ -0,0 +1,64 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <plugin
3
+ xmlns="http://www.phonegap.com/ns/plugins/1.0" id="@rhinosw/cordova-plugin-barcode-qrscanner" version="3.0.16">
4
+ <name>QRScanner</name>
5
+ <engines>
6
+ <engine name="cordova" version=">=3.4.0"/>
7
+ </engines>
8
+ <js-module src="www/www.min.js" name="QRScanner">
9
+ <clobbers target="QRScanner" />
10
+ </js-module>
11
+ <platform name="android">
12
+ <config-file target="res/xml/config.xml" parent="/*">
13
+ <feature name="QRScanner">
14
+ <param name="android-package" value="com.rhinosw.cordova.qrscanner.QRScanner"/>
15
+ </feature>
16
+ </config-file>
17
+ <config-file target="AndroidManifest.xml" parent="/*">
18
+ <uses-permission android:name="android.permission.CAMERA" android:required="false" />
19
+ <uses-feature android:name="android.hardware.camera" android:required="false" />
20
+ <uses-feature android:name="android.hardware.camera.front" android:required="false" />
21
+ </config-file>
22
+ <source-file src="src/android/QRScanner.java" target-dir="src/com/rhinosw/cordova/qrscanner"/>
23
+ <framework src="src/android/qrscanner.gradle" custom="true" type="gradleReference"/>
24
+ </platform>
25
+ <platform name="ios">
26
+ <config-file target="config.xml" parent="/*">
27
+ <feature name="QRScanner">
28
+ <param name="ios-package" value="QRScanner"/>
29
+ </feature>
30
+ </config-file>
31
+
32
+ <source-file src="src/ios/QRScanner.swift"/>
33
+ </platform>
34
+ <platform name="browser">
35
+ <config-file target="config.xml" parent="/*">
36
+ <feature name="QRScanner">
37
+ <param name="browser-package" value="QRScanner" />
38
+ </feature>
39
+ </config-file>
40
+ <js-module src="src/browser/plugin.min.js" name="QRScannerProxy">
41
+ <runs />
42
+ </js-module>
43
+ </platform>
44
+ <platform name="windows">
45
+ <config-file target="config.xml" parent="/*">
46
+ <feature name="QRScanner">
47
+ <param name="windows-package" value="QRScanner" />
48
+ </feature>
49
+ </config-file>
50
+ <config-file target="package.appxmanifest" parent="/Package/Capabilities">
51
+ <DeviceCapability Name="webcam" />
52
+ </config-file>
53
+ <js-module src="src/windows/lib/qrScanner.js" name="qrScanner">
54
+ <runs/>
55
+ </js-module>
56
+ <js-module src="src/windows/lib/preview.js" name="preview">
57
+ <runs/>
58
+ </js-module>
59
+ <framework src="src/windows/QRReader/QRReader.csproj" custom="true" type="projectReference"/>
60
+ <asset src="src/windows/lib/preview.css" target="css/plugin-qrscanner-preview.css" />
61
+ <hook src="hooks/windows/check-arch.js" type="before_compile" />
62
+ <hook src="hooks/windows/check-arch.js" type="before_run" />
63
+ </platform>
64
+ </plugin>
package/readme.md ADDED
@@ -0,0 +1,30 @@
1
+ # cordova-plugin-barcode-qrscanner
2
+
3
+ > A fast, energy efficient, highly-configurable QR code + barcode scanner for Cordova / Ionic apps – available for the iOS, Android, Windows, and browser platforms.
4
+ ---
5
+
6
+ Works as of **January 2023**.
7
+
8
+ Original project & documentation: https://www.npmjs.com/package/cordova-plugin-qrscanner
9
+
10
+ ```
11
+ ionic@6
12
+ cordova@11
13
+ cordova-ios@6
14
+ cordova-android@11
15
+ angular@14
16
+ ```
17
+
18
+ Original plugin/repo is `https://github.com/bitpay/cordova-plugin-qrscanner`. It was not working with the latest Android/iOS version. _It failed during XCode build._
19
+
20
+ Other packages on npm with apparent solutions kept installing the original plugin. _So they fail during XCode build, too._
21
+
22
+ ---
23
+
24
+ **This is a fork of https://github.com/gianluigitrontini/cordova-plugin-qrscanner-nbs. That fork was forked from https://github.com/v1934/cordova-plugin-qrscanner-11, with a commit taken from https://github.com/NoahSun/cordova-plugin-qrscanner.**
25
+
26
+ **This plugin is working with the latest android and ios platform and contains fixes for compilation errors due to incompatibilities with Swift 5 and Android API level 32**
27
+
28
+ ---
29
+
30
+ If you're using Ionic, switch to Capacitor.
@@ -0,0 +1,9 @@
1
+ 1. login on npm (through cmd) with command "npm login"
2
+ 2. make some changes in plugin
3
+ 3. increase version of this plugin in package.json (this will be a new version in npm)
4
+ 4. build plugin with command "npm run build"
5
+ 5. publish plugin with command "npm publish --access public"
6
+ 6. push all changes into git repository
7
+
8
+ Tutorial:
9
+ https://uynguyen.github.io/2022/03/26/Fork-and-publish-your-custom-lib-to-npm/