From b7a72ad99cb6409eaef918a74ad58b7db96753d6 Mon Sep 17 00:00:00 2001
From: Tafel <35837839+tafelnl@users.noreply.github.com>
Date: Wed, 30 Jun 2021 10:51:21 +0200
Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor=20xcode=20project?=
=?UTF-8?q?=20to=20prevent=20warnings=20(#52)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Update Plugin.swift
* Update xcode project to prevent warnings
---
ios/Plugin.xcodeproj/project.pbxproj | 9 +++++++-
.../contents.xcworkspacedata | 10 +++++++++
.../xcshareddata/IDEWorkspaceChecks.plist | 8 +++++++
ios/Plugin/Plugin.swift | 10 ++++-----
ios/Podfile.lock | 22 +++++++++++++++++++
5 files changed, 53 insertions(+), 6 deletions(-)
create mode 100644 ios/Plugin.xcworkspace/contents.xcworkspacedata
create mode 100644 ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
create mode 100644 ios/Podfile.lock
diff --git a/ios/Plugin.xcodeproj/project.pbxproj b/ios/Plugin.xcodeproj/project.pbxproj
index 5c6b970..ae71ef3 100644
--- a/ios/Plugin.xcodeproj/project.pbxproj
+++ b/ios/Plugin.xcodeproj/project.pbxproj
@@ -185,7 +185,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
- LastUpgradeCheck = 0920;
+ LastUpgradeCheck = 1250;
ORGANIZATIONNAME = "Max Lynch";
TargetAttributes = {
50ADFF87201F53D600D50D53 = {
@@ -206,6 +206,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
+ Base,
);
mainGroup = 50ADFF7E201F53D600D50D53;
productRefGroup = 50ADFF89201F53D600D50D53 /* Products */;
@@ -336,6 +337,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@@ -343,8 +345,10 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -396,6 +400,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@@ -403,8 +408,10 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
diff --git a/ios/Plugin.xcworkspace/contents.xcworkspacedata b/ios/Plugin.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..afad624
--- /dev/null
+++ b/ios/Plugin.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Plugin/Plugin.swift b/ios/Plugin/Plugin.swift
index 8cfaefd..33b3d6e 100644
--- a/ios/Plugin/Plugin.swift
+++ b/ios/Plugin/Plugin.swift
@@ -334,7 +334,7 @@ public class BarcodeScanner: CAPPlugin, AVCaptureMetadataOutputObjectsDelegate {
let found = metadataObjects[0] as! AVMetadataMachineReadableCodeObject
if (targetedFormats.contains(found.type)) {
- var jsObject = PluginResultData()
+ var jsObject = PluginCallResultData()
if (found.stringValue != nil) {
jsObject["hasContent"] = true
@@ -373,11 +373,11 @@ public class BarcodeScanner: CAPPlugin, AVCaptureMetadataOutputObjectsDelegate {
}
@objc func stopScan(_ call: CAPPluginCall) {
- if (call.hasOption("resolveScan") && call.getBool("resolveScan") && self.savedCall != nil) {
- var jsObject = PluginResultData()
+ if ((call.getBool("resolveScan") ?? false) && self.savedCall != nil) {
+ var jsObject = PluginCallResultData()
jsObject["hasContent"] = false
- savedCall.resolve(jsObject)
+ savedCall?.resolve(jsObject)
savedCall = nil
}
@@ -388,7 +388,7 @@ public class BarcodeScanner: CAPPlugin, AVCaptureMetadataOutputObjectsDelegate {
@objc func checkPermission(_ call: CAPPluginCall) {
let force = call.getBool("force") ?? false
- var savedReturnObject = PluginResultData()
+ var savedReturnObject = PluginCallResultData()
DispatchQueue.main.async {
switch AVCaptureDevice.authorizationStatus(for: .video) {
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
new file mode 100644
index 0000000..dd22f49
--- /dev/null
+++ b/ios/Podfile.lock
@@ -0,0 +1,22 @@
+PODS:
+ - Capacitor (3.0.0):
+ - CapacitorCordova
+ - CapacitorCordova (3.0.0)
+
+DEPENDENCIES:
+ - "Capacitor (from `../node_modules/@capacitor/ios`)"
+ - "CapacitorCordova (from `../node_modules/@capacitor/ios`)"
+
+EXTERNAL SOURCES:
+ Capacitor:
+ :path: "../node_modules/@capacitor/ios"
+ CapacitorCordova:
+ :path: "../node_modules/@capacitor/ios"
+
+SPEC CHECKSUMS:
+ Capacitor: 06cd8cd01340f5b162e9528bf5569d87a6f29009
+ CapacitorCordova: 183c8d1af3851da6d7a371f273462c8e64e15464
+
+PODFILE CHECKSUM: d908dea01cb4b1885654341d3f4274148fb6d382
+
+COCOAPODS: 1.10.0