Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
♻️ refactor xcode project to prevent warnings (#52)
Browse files Browse the repository at this point in the history
* Update Plugin.swift

* Update xcode project to prevent warnings
  • Loading branch information
tafelnl authored Jun 30, 2021
1 parent fc9ce35 commit b7a72ad
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 6 deletions.
9 changes: 8 additions & 1 deletion ios/Plugin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 1250;
ORGANIZATIONNAME = "Max Lynch";
TargetAttributes = {
50ADFF87201F53D600D50D53 = {
Expand All @@ -206,6 +206,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 50ADFF7E201F53D600D50D53;
productRefGroup = 50ADFF89201F53D600D50D53 /* Products */;
Expand Down Expand Up @@ -336,15 +337,18 @@
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;
CLANG_WARN_ENUM_CONVERSION = YES;
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;
Expand Down Expand Up @@ -396,15 +400,18 @@
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;
CLANG_WARN_ENUM_CONVERSION = YES;
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;
Expand Down
10 changes: 10 additions & 0 deletions ios/Plugin.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
10 changes: 5 additions & 5 deletions ios/Plugin/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand All @@ -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) {
Expand Down
22 changes: 22 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b7a72ad

Please sign in to comment.