Skip to content

Commit 5b85aa3

Browse files
committed
Update project
1 parent d8b3986 commit 5b85aa3

File tree

8 files changed

+56
-56
lines changed

8 files changed

+56
-56
lines changed

BarcodeScanner.xcodeproj/project.pbxproj

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@
169169
D5B2E89B1C3A780C00C0327D /* Frameworks */,
170170
D5B2E89C1C3A780C00C0327D /* Headers */,
171171
D5B2E89D1C3A780C00C0327D /* Resources */,
172-
D5C113C9201A981500D46C9C /* SwiftLint */,
173172
);
174173
buildRules = (
175174
);
@@ -187,20 +186,22 @@
187186
isa = PBXProject;
188187
attributes = {
189188
LastSwiftUpdateCheck = 0720;
190-
LastUpgradeCheck = 0900;
189+
LastUpgradeCheck = 1200;
191190
ORGANIZATIONNAME = "Hyper Interaktiv AS";
192191
TargetAttributes = {
193192
D5B2E89E1C3A780C00C0327D = {
194193
CreatedOnToolsVersion = 7.2;
194+
LastSwiftMigration = 1200;
195195
};
196196
};
197197
};
198198
buildConfigurationList = D5B2E8991C3A780C00C0327D /* Build configuration list for PBXProject "BarcodeScanner" */;
199199
compatibilityVersion = "Xcode 8.0";
200-
developmentRegion = English;
200+
developmentRegion = en;
201201
hasScannedForEncodings = 0;
202202
knownRegions = (
203203
en,
204+
Base,
204205
);
205206
mainGroup = D5B2E8951C3A780C00C0327D;
206207
productRefGroup = D5B2E8A01C3A780C00C0327D /* Products */;
@@ -226,23 +227,6 @@
226227
};
227228
/* End PBXResourcesBuildPhase section */
228229

229-
/* Begin PBXShellScriptBuildPhase section */
230-
D5C113C9201A981500D46C9C /* SwiftLint */ = {
231-
isa = PBXShellScriptBuildPhase;
232-
buildActionMask = 2147483647;
233-
files = (
234-
);
235-
inputPaths = (
236-
);
237-
name = SwiftLint;
238-
outputPaths = (
239-
);
240-
runOnlyForDeploymentPostprocessing = 0;
241-
shellPath = /bin/sh;
242-
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
243-
};
244-
/* End PBXShellScriptBuildPhase section */
245-
246230
/* Begin PBXSourcesBuildPhase section */
247231
D5B2E89A1C3A780C00C0327D /* Sources */ = {
248232
isa = PBXSourcesBuildPhase;
@@ -271,6 +255,7 @@
271255
isa = XCBuildConfiguration;
272256
buildSettings = {
273257
ALWAYS_SEARCH_USER_PATHS = NO;
258+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
274259
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
275260
CLANG_CXX_LIBRARY = "libc++";
276261
CLANG_ENABLE_MODULES = YES;
@@ -279,14 +264,17 @@
279264
CLANG_WARN_BOOL_CONVERSION = YES;
280265
CLANG_WARN_COMMA = YES;
281266
CLANG_WARN_CONSTANT_CONVERSION = YES;
267+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
282268
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
283269
CLANG_WARN_EMPTY_BODY = YES;
284270
CLANG_WARN_ENUM_CONVERSION = YES;
285271
CLANG_WARN_INFINITE_RECURSION = YES;
286272
CLANG_WARN_INT_CONVERSION = YES;
287273
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
274+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
288275
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
289276
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
277+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
290278
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
291279
CLANG_WARN_STRICT_PROTOTYPES = YES;
292280
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -312,11 +300,12 @@
312300
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
313301
GCC_WARN_UNUSED_FUNCTION = YES;
314302
GCC_WARN_UNUSED_VARIABLE = YES;
315-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
303+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
316304
MTL_ENABLE_DEBUG_INFO = YES;
317305
ONLY_ACTIVE_ARCH = YES;
318306
SDKROOT = iphoneos;
319307
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
308+
SWIFT_VERSION = 5.0;
320309
TARGETED_DEVICE_FAMILY = "1,2";
321310
VERSIONING_SYSTEM = "apple-generic";
322311
VERSION_INFO_PREFIX = "";
@@ -327,6 +316,7 @@
327316
isa = XCBuildConfiguration;
328317
buildSettings = {
329318
ALWAYS_SEARCH_USER_PATHS = NO;
319+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
330320
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
331321
CLANG_CXX_LIBRARY = "libc++";
332322
CLANG_ENABLE_MODULES = YES;
@@ -335,14 +325,17 @@
335325
CLANG_WARN_BOOL_CONVERSION = YES;
336326
CLANG_WARN_COMMA = YES;
337327
CLANG_WARN_CONSTANT_CONVERSION = YES;
328+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
338329
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
339330
CLANG_WARN_EMPTY_BODY = YES;
340331
CLANG_WARN_ENUM_CONVERSION = YES;
341332
CLANG_WARN_INFINITE_RECURSION = YES;
342333
CLANG_WARN_INT_CONVERSION = YES;
343334
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
335+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
344336
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
345337
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
338+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
346339
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
347340
CLANG_WARN_STRICT_PROTOTYPES = YES;
348341
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -362,10 +355,11 @@
362355
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
363356
GCC_WARN_UNUSED_FUNCTION = YES;
364357
GCC_WARN_UNUSED_VARIABLE = YES;
365-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
358+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
366359
MTL_ENABLE_DEBUG_INFO = NO;
367360
SDKROOT = iphoneos;
368361
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
362+
SWIFT_VERSION = 5.0;
369363
TARGETED_DEVICE_FAMILY = "1,2";
370364
VALIDATE_PRODUCT = YES;
371365
VERSIONING_SYSTEM = "apple-generic";
@@ -384,13 +378,15 @@
384378
DYLIB_INSTALL_NAME_BASE = "@rpath";
385379
INFOPLIST_FILE = "$(SRCROOT)/BarcodeScanner/Info-iOS.plist";
386380
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
387-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
381+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
388382
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
389383
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.BarcodeScanner-iOS";
390384
PRODUCT_NAME = BarcodeScanner;
391385
SKIP_INSTALL = YES;
386+
SUPPORTS_MACCATALYST = NO;
392387
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
393-
SWIFT_VERSION = 4.0;
388+
SWIFT_VERSION = 5.0;
389+
TARGETED_DEVICE_FAMILY = "1,2";
394390
};
395391
name = Debug;
396392
};
@@ -405,12 +401,14 @@
405401
DYLIB_INSTALL_NAME_BASE = "@rpath";
406402
INFOPLIST_FILE = "$(SRCROOT)/BarcodeScanner/Info-iOS.plist";
407403
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
408-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
404+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
409405
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
410406
PRODUCT_BUNDLE_IDENTIFIER = "no.hyper.BarcodeScanner-iOS";
411407
PRODUCT_NAME = BarcodeScanner;
412408
SKIP_INSTALL = YES;
413-
SWIFT_VERSION = 4.0;
409+
SUPPORTS_MACCATALYST = NO;
410+
SWIFT_VERSION = 5.0;
411+
TARGETED_DEVICE_FAMILY = "1,2";
414412
};
415413
name = Release;
416414
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

BarcodeScanner.xcodeproj/xcshareddata/xcschemes/BarcodeScanner-iOS.xcscheme

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1200"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,8 +26,16 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "D5B2E89E1C3A780C00C0327D"
34+
BuildableName = "BarcodeScanner.framework"
35+
BlueprintName = "BarcodeScanner-iOS"
36+
ReferencedContainer = "container:BarcodeScanner.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3139
<Testables>
3240
<TestableReference
3341
skipped = "NO">
@@ -40,23 +48,11 @@
4048
</BuildableReference>
4149
</TestableReference>
4250
</Testables>
43-
<MacroExpansion>
44-
<BuildableReference
45-
BuildableIdentifier = "primary"
46-
BlueprintIdentifier = "D5B2E89E1C3A780C00C0327D"
47-
BuildableName = "BarcodeScanner.framework"
48-
BlueprintName = "BarcodeScanner-iOS"
49-
ReferencedContainer = "container:BarcodeScanner.xcodeproj">
50-
</BuildableReference>
51-
</MacroExpansion>
52-
<AdditionalOptions>
53-
</AdditionalOptions>
5451
</TestAction>
5552
<LaunchAction
5653
buildConfiguration = "Debug"
5754
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5855
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59-
language = ""
6056
launchStyle = "0"
6157
useCustomWorkingDirectory = "NO"
6258
ignoresPersistentStateOnLaunch = "NO"
@@ -72,8 +68,6 @@
7268
ReferencedContainer = "container:BarcodeScanner.xcodeproj">
7369
</BuildableReference>
7470
</MacroExpansion>
75-
<AdditionalOptions>
76-
</AdditionalOptions>
7771
</LaunchAction>
7872
<ProfileAction
7973
buildConfiguration = "Release"

Sources/Controllers/BarcodeScannerViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ open class BarcodeScannerViewController: UIViewController {
102102
cameraViewController.delegate = self
103103
add(childViewController: cameraViewController)
104104

105-
view.bringSubview(toFront: messageView)
105+
view.bringSubviewToFront(messageView)
106106
}
107107

108108
open override func viewWillAppear(_ animated: Bool) {
@@ -202,7 +202,7 @@ open class BarcodeScannerViewController: UIViewController {
202202
flashView.alpha = 1
203203

204204
view.addSubview(flashView)
205-
view.bringSubview(toFront: flashView)
205+
view.bringSubviewToFront(flashView)
206206

207207
UIView.animate(
208208
withDuration: 0.2,
@@ -303,8 +303,8 @@ extension BarcodeScannerViewController: CameraViewControllerDelegate {
303303

304304
func cameraViewControllerDidTapSettingsButton(_ controller: CameraViewController) {
305305
DispatchQueue.main.async {
306-
if let settingsURL = URL(string: UIApplicationOpenSettingsURLString) {
307-
UIApplication.shared.openURL(settingsURL)
306+
if let settingsURL = URL(string: UIApplication.openSettingsURLString) {
307+
UIApplication.shared.open(settingsURL, options: [:], completionHandler: nil)
308308
}
309309
}
310310
}

Sources/Controllers/CameraViewController.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ public final class CameraViewController: UIViewController {
6666
captureDevice.unlockForConfiguration()
6767
} catch {}
6868

69-
flashButton.setImage(torchMode.image, for: UIControlState())
69+
flashButton.setImage(torchMode.image, for: UIControl.State())
7070
}
7171
}
7272

7373
private var frontCameraDevice: AVCaptureDevice? {
74-
return AVCaptureDevice.devices(for: .video).first(where: { $0.position == .front })
74+
AVCaptureDevice.default(.builtInWideAngleCamera, for: AVMediaType.video, position: .front)
7575
}
7676

7777
private var backCameraDevice: AVCaptureDevice? {
@@ -173,7 +173,7 @@ public final class CameraViewController: UIViewController {
173173
NotificationCenter.default.addObserver(
174174
self,
175175
selector: #selector(appWillEnterForeground),
176-
name: NSNotification.Name.UIApplicationWillEnterForeground,
176+
name: UIApplication.willEnterForegroundNotification,
177177
object: nil
178178
)
179179
}
@@ -415,14 +415,14 @@ private extension CameraViewController {
415415
string: localizedString("BUTTON_SETTINGS"),
416416
attributes: [.font: UIFont.boldSystemFont(ofSize: 17), .foregroundColor: UIColor.white]
417417
)
418-
button.setAttributedTitle(title, for: UIControlState())
418+
button.setAttributedTitle(title, for: UIControl.State())
419419
button.sizeToFit()
420420
return button
421421
}
422422

423423
func makeCameraButton() -> UIButton {
424424
let button = UIButton(type: .custom)
425-
button.setImage(imageNamed("cameraRotate"), for: UIControlState())
425+
button.setImage(imageNamed("cameraRotate"), for: UIControl.State())
426426
button.isHidden = !showsCameraButton
427427
return button
428428
}

Sources/Controllers/HeaderViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private extension HeaderViewController {
8585

8686
func makeCloseButton() -> UIButton {
8787
let button = UIButton(type: .system)
88-
button.setTitle(localizedString("BUTTON_CLOSE"), for: UIControlState())
88+
button.setTitle(localizedString("BUTTON_CLOSE"), for: UIControl.State())
8989
button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 17)
9090
button.tintColor = .black
9191
return button

Sources/Controllers/MessageViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public final class MessageViewController: UIViewController {
5858

5959
- Parameter style: The current blur style.
6060
*/
61-
private func animate(blurStyle: UIBlurEffectStyle) {
61+
private func animate(blurStyle: UIBlurEffect.Style) {
6262
guard status.state == .processing else { return }
6363

6464
UIView.animate(

Sources/Extensions/UIViewController+Extensions.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import UIKit
33
extension UIViewController {
44
/// A helper function to add child view controller.
55
func add(childViewController: UIViewController) {
6-
childViewController.willMove(toParentViewController: self)
7-
addChildViewController(childViewController)
6+
childViewController.willMove(toParent: self)
7+
addChild(childViewController)
88
view.addSubview(childViewController.view)
9-
childViewController.didMove(toParentViewController: self)
9+
childViewController.didMove(toParent: self)
1010
}
1111
}

0 commit comments

Comments
 (0)