├── QRScanner
├── QRScanner
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ ├── ItunesArtwork@2x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ │ └── iTunesArtwork.imageset
│ │ │ ├── iTunesArtwork@3x.png
│ │ │ └── Contents.json
│ ├── Model
│ │ └── QRData.swift
│ ├── Controller
│ │ ├── DetailViewController.swift
│ │ └── QRScannerViewController.swift
│ ├── Extensions
│ │ └── UIViewController+Alert.swift
│ ├── View
│ │ ├── CopyLabel.swift
│ │ ├── QRScannerView.swift
│ │ └── StoryBoards
│ │ │ └── Main.storyboard
│ ├── Info.plist
│ ├── AppDelegate.swift
│ └── Base.lproj
│ │ └── LaunchScreen.storyboard
└── QRScanner.xcodeproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── abhilash.a.km.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ ├── xcuserdata
│ └── abhilash.a.km.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
│ └── project.pbxproj
└── README.md
/QRScanner/QRScanner/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # QRScanner
2 |
3 | QRScanner is a base level QR Code scanning application. It uses **AVFoundation** for scanning the code. Feel free to download and customize.
4 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/iTunesArtwork.imageset/iTunesArtwork@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner/Assets.xcassets/iTunesArtwork.imageset/iTunesArtwork@3x.png
--------------------------------------------------------------------------------
/QRScanner/QRScanner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner.xcodeproj/project.xcworkspace/xcuserdata/abhilash.a.km.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/abhimuralidharan/QRScanner/HEAD/QRScanner/QRScanner.xcodeproj/project.xcworkspace/xcuserdata/abhilash.a.km.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Model/QRData.swift:
--------------------------------------------------------------------------------
1 | //
2 | // QRData.swift
3 | // QRScanner
4 | //
5 | // Created by KM, Abhilash a on 11/03/19.
6 | // Copyright © 2019 KM, Abhilash. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | struct QRData {
12 | var codeString: String?
13 | }
14 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/iTunesArtwork.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "iTunesArtwork@3x.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/QRScanner/QRScanner.xcodeproj/xcuserdata/abhilash.a.km.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | QRScanner.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Controller/DetailViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DetailViewController.swift
3 | // QRScanner
4 | //
5 | // Created by KM, Abhilash a on 11/03/19.
6 | // Copyright © 2019 KM, Abhilash. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class DetailViewController: UIViewController {
12 |
13 | @IBOutlet weak var detailLabel: CopyLabel!
14 |
15 | var qrData: QRData?
16 |
17 | override func viewDidLoad() {
18 | super.viewDidLoad()
19 | detailLabel.text = qrData?.codeString
20 | UIPasteboard.general.string = detailLabel.text
21 | showToast(message : "Text copied to clipboard")
22 |
23 | }
24 |
25 | @IBAction func openInWebAction(_ sender: Any) {
26 | if let url = URL(string: qrData?.codeString ?? ""), UIApplication.shared.canOpenURL(url) {
27 | UIApplication.shared.open(url, options: [:])
28 | } else {
29 | showToast(message : "Not a valid URL")
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Extensions/UIViewController+Alert.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+Alert.swift
3 | // QRScanner
4 | //
5 | // Created by KM, Abhilash a on 11/03/19.
6 | // Copyright © 2019 KM, Abhilash. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 |
12 | extension UIViewController {
13 |
14 | func presentAlert(withTitle title: String, message : String) {
15 | let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
16 | let OKAction = UIAlertAction(title: "OK", style: .default) { action in
17 | print("You've pressed OK Button")
18 | }
19 | alertController.addAction(OKAction)
20 | self.present(alertController, animated: true, completion: nil)
21 | }
22 | func showToast(message : String, seconds: Double = 2.0) {
23 | let alert = UIAlertController(title: nil, message: message, preferredStyle: .alert)
24 | alert.view.backgroundColor = UIColor.black
25 | alert.view.alpha = 0.6
26 | alert.view.layer.cornerRadius = 15
27 |
28 | self.present(alert, animated: true)
29 |
30 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + seconds) {
31 | alert.dismiss(animated: true)
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner/View/CopyLabel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CopyLabel.swift
3 | // QRScanner
4 | //
5 | // Created by KM, Abhilash a on 15/03/19.
6 | // Copyright © 2019 KM, Abhilash. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CopyLabel: UILabel {
12 |
13 | override public var canBecomeFirstResponder: Bool {
14 | return true
15 | }
16 |
17 | required init?(coder aDecoder: NSCoder) {
18 | super.init(coder: aDecoder)
19 | setupLabel()
20 | }
21 | override init(frame: CGRect) {
22 | super.init(frame: frame)
23 | setupLabel()
24 | }
25 |
26 | func setupLabel() {
27 | isUserInteractionEnabled = true
28 | addGestureRecognizer(UILongPressGestureRecognizer(
29 | target: self,
30 | action: #selector(showMenu(sender:))
31 | ))
32 | }
33 |
34 | override func copy(_ sender: Any?) {
35 | UIPasteboard.general.string = text
36 | UIMenuController.shared.setMenuVisible(false, animated: true)
37 | }
38 |
39 | @objc func showMenu(sender: Any?) {
40 | becomeFirstResponder()
41 | let menu = UIMenuController.shared
42 | if !menu.isMenuVisible {
43 | menu.setTargetRect(bounds, in: self)
44 | menu.setMenuVisible(true, animated: true)
45 | }
46 | }
47 |
48 | override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool {
49 | return action == #selector(copy(_:))
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | NSCameraUsageDescription
24 | To scan QR code
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // QRScanner
4 | //
5 | // Created by KM, Abhilash a on 11/03/19.
6 | // Copyright © 2019 KM, Abhilash. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Controller/QRScannerViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // QRScannerViewController.swift
3 | // QRCodeReader
4 | //
5 | // Created by KM, Abhilash a on 08/03/19.
6 | // Copyright © 2019 KM, Abhilash. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class QRScannerViewController: UIViewController {
12 |
13 | @IBOutlet weak var scannerView: QRScannerView! {
14 | didSet {
15 | scannerView.delegate = self
16 | }
17 | }
18 | @IBOutlet weak var scanButton: UIButton! {
19 | didSet {
20 | scanButton.setTitle("STOP", for: .normal)
21 | }
22 | }
23 |
24 | var qrData: QRData? = nil {
25 | didSet {
26 | if qrData != nil {
27 | self.performSegue(withIdentifier: "detailSeuge", sender: self)
28 | }
29 | }
30 | }
31 |
32 | override func viewDidLoad() {
33 | super.viewDidLoad()
34 | }
35 |
36 |
37 | override func viewWillAppear(_ animated: Bool) {
38 | super.viewWillAppear(animated)
39 |
40 | if !scannerView.isRunning {
41 | scannerView.startScanning()
42 | }
43 | }
44 |
45 | override func viewWillDisappear(_ animated: Bool) {
46 | super.viewWillDisappear(animated)
47 | if !scannerView.isRunning {
48 | scannerView.stopScanning()
49 | }
50 | }
51 |
52 | @IBAction func scanButtonAction(_ sender: UIButton) {
53 | scannerView.isRunning ? scannerView.stopScanning() : scannerView.startScanning()
54 | let buttonTitle = scannerView.isRunning ? "STOP" : "SCAN"
55 | sender.setTitle(buttonTitle, for: .normal)
56 | }
57 | }
58 |
59 |
60 | extension QRScannerViewController: QRScannerViewDelegate {
61 | func qrScanningDidStop() {
62 | let buttonTitle = scannerView.isRunning ? "STOP" : "SCAN"
63 | scanButton.setTitle(buttonTitle, for: .normal)
64 | }
65 |
66 | func qrScanningDidFail() {
67 | presentAlert(withTitle: "Error", message: "Scanning Failed. Please try again")
68 | }
69 |
70 | func qrScanningSucceededWithCode(_ str: String?) {
71 | self.qrData = QRData(codeString: str)
72 | }
73 |
74 |
75 |
76 | }
77 |
78 |
79 | extension QRScannerViewController {
80 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
81 | if segue.identifier == "detailSeuge", let viewController = segue.destination as? DetailViewController {
82 | viewController.qrData = self.qrData
83 | }
84 | }
85 | }
86 |
87 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "ItunesArtwork@2x.png",
115 | "scale" : "1x"
116 | },
117 | {
118 | "size" : "76x76",
119 | "idiom" : "iphone",
120 | "filename" : "Icon-App-76x76@2x.png",
121 | "scale" : "2x"
122 | }
123 | ],
124 | "info" : {
125 | "version" : 1,
126 | "author" : "xcode"
127 | }
128 | }
--------------------------------------------------------------------------------
/QRScanner/QRScanner/View/QRScannerView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // QRScannerView.swift
3 | // QRCodeReader
4 | //
5 | // Created by KM, Abhilash a on 08/03/19.
6 | // Copyright © 2019 KM, Abhilash. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 | import AVFoundation
12 |
13 | /// Delegate callback for the QRScannerView.
14 | protocol QRScannerViewDelegate: class {
15 | func qrScanningDidFail()
16 | func qrScanningSucceededWithCode(_ str: String?)
17 | func qrScanningDidStop()
18 | }
19 |
20 | class QRScannerView: UIView {
21 |
22 | weak var delegate: QRScannerViewDelegate?
23 |
24 | /// capture settion which allows us to start and stop scanning.
25 | var captureSession: AVCaptureSession?
26 |
27 | // Init methods..
28 | required init?(coder aDecoder: NSCoder) {
29 | super.init(coder: aDecoder)
30 | doInitialSetup()
31 | }
32 | override init(frame: CGRect) {
33 | super.init(frame: frame)
34 | doInitialSetup()
35 | }
36 |
37 | //MARK: overriding the layerClass to return `AVCaptureVideoPreviewLayer`.
38 | override class var layerClass: AnyClass {
39 | return AVCaptureVideoPreviewLayer.self
40 | }
41 | override var layer: AVCaptureVideoPreviewLayer {
42 | return super.layer as! AVCaptureVideoPreviewLayer
43 | }
44 | }
45 | extension QRScannerView {
46 |
47 | var isRunning: Bool {
48 | return captureSession?.isRunning ?? false
49 | }
50 |
51 | func startScanning() {
52 | captureSession?.startRunning()
53 | }
54 |
55 | func stopScanning() {
56 | captureSession?.stopRunning()
57 | delegate?.qrScanningDidStop()
58 | }
59 |
60 | /// Does the initial setup for captureSession
61 | private func doInitialSetup() {
62 | clipsToBounds = true
63 | captureSession = AVCaptureSession()
64 |
65 | guard let videoCaptureDevice = AVCaptureDevice.default(for: .video) else { return }
66 | let videoInput: AVCaptureDeviceInput
67 | do {
68 | videoInput = try AVCaptureDeviceInput(device: videoCaptureDevice)
69 | } catch let error {
70 | print(error)
71 | return
72 | }
73 |
74 | if (captureSession?.canAddInput(videoInput) ?? false) {
75 | captureSession?.addInput(videoInput)
76 | } else {
77 | scanningDidFail()
78 | return
79 | }
80 |
81 | let metadataOutput = AVCaptureMetadataOutput()
82 |
83 | if (captureSession?.canAddOutput(metadataOutput) ?? false) {
84 | captureSession?.addOutput(metadataOutput)
85 |
86 | metadataOutput.setMetadataObjectsDelegate(self, queue: DispatchQueue.main)
87 | metadataOutput.metadataObjectTypes = [.qr, .ean8, .ean13, .pdf417]
88 | } else {
89 | scanningDidFail()
90 | return
91 | }
92 |
93 | self.layer.session = captureSession
94 | self.layer.videoGravity = .resizeAspectFill
95 |
96 | captureSession?.startRunning()
97 | }
98 | func scanningDidFail() {
99 | delegate?.qrScanningDidFail()
100 | captureSession = nil
101 | }
102 |
103 | func found(code: String) {
104 | delegate?.qrScanningSucceededWithCode(code)
105 | }
106 |
107 | }
108 |
109 | extension QRScannerView: AVCaptureMetadataOutputObjectsDelegate {
110 | func metadataOutput(_ output: AVCaptureMetadataOutput,
111 | didOutput metadataObjects: [AVMetadataObject],
112 | from connection: AVCaptureConnection) {
113 | stopScanning()
114 |
115 | if let metadataObject = metadataObjects.first {
116 | guard let readableObject = metadataObject as? AVMetadataMachineReadableCodeObject else { return }
117 | guard let stringValue = readableObject.stringValue else { return }
118 | AudioServicesPlaySystemSound(SystemSoundID(kSystemSoundID_Vibrate))
119 | found(code: stringValue)
120 | }
121 | }
122 |
123 | }
124 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner/View/StoryBoards/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
85 |
91 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/QRScanner/QRScanner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 921807A5223B6DA200F36C40 /* CopyLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 921807A4223B6DA200F36C40 /* CopyLabel.swift */; };
11 | 92368507223624F7005C1AD7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92368506223624F7005C1AD7 /* AppDelegate.swift */; };
12 | 9236850E223624F8005C1AD7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9236850D223624F8005C1AD7 /* Assets.xcassets */; };
13 | 92368511223624F8005C1AD7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9236850F223624F8005C1AD7 /* LaunchScreen.storyboard */; };
14 | 9236851B22362675005C1AD7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9236851822362675005C1AD7 /* Main.storyboard */; };
15 | 9236851C22362675005C1AD7 /* QRScannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9236851922362675005C1AD7 /* QRScannerViewController.swift */; };
16 | 9236851D22362675005C1AD7 /* QRScannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9236851A22362675005C1AD7 /* QRScannerView.swift */; };
17 | 9236852022362AAA005C1AD7 /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9236851F22362AAA005C1AD7 /* DetailViewController.swift */; };
18 | 9236852322362B1C005C1AD7 /* QRData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9236852222362B1C005C1AD7 /* QRData.swift */; };
19 | 92368528223635AB005C1AD7 /* UIViewController+Alert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92368527223635AB005C1AD7 /* UIViewController+Alert.swift */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXFileReference section */
23 | 921807A4223B6DA200F36C40 /* CopyLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopyLabel.swift; sourceTree = ""; };
24 | 92368503223624F7005C1AD7 /* QRScanner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = QRScanner.app; sourceTree = BUILT_PRODUCTS_DIR; };
25 | 92368506223624F7005C1AD7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
26 | 9236850D223624F8005C1AD7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
27 | 92368510223624F8005C1AD7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
28 | 92368512223624F8005C1AD7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
29 | 9236851822362675005C1AD7 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; };
30 | 9236851922362675005C1AD7 /* QRScannerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRScannerViewController.swift; sourceTree = ""; };
31 | 9236851A22362675005C1AD7 /* QRScannerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRScannerView.swift; sourceTree = ""; };
32 | 9236851F22362AAA005C1AD7 /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = ""; };
33 | 9236852222362B1C005C1AD7 /* QRData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRData.swift; sourceTree = ""; };
34 | 92368527223635AB005C1AD7 /* UIViewController+Alert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Alert.swift"; sourceTree = ""; };
35 | /* End PBXFileReference section */
36 |
37 | /* Begin PBXFrameworksBuildPhase section */
38 | 92368500223624F7005C1AD7 /* Frameworks */ = {
39 | isa = PBXFrameworksBuildPhase;
40 | buildActionMask = 2147483647;
41 | files = (
42 | );
43 | runOnlyForDeploymentPostprocessing = 0;
44 | };
45 | /* End PBXFrameworksBuildPhase section */
46 |
47 | /* Begin PBXGroup section */
48 | 923684FA223624F7005C1AD7 = {
49 | isa = PBXGroup;
50 | children = (
51 | 92368505223624F7005C1AD7 /* QRScanner */,
52 | 92368504223624F7005C1AD7 /* Products */,
53 | );
54 | sourceTree = "";
55 | };
56 | 92368504223624F7005C1AD7 /* Products */ = {
57 | isa = PBXGroup;
58 | children = (
59 | 92368503223624F7005C1AD7 /* QRScanner.app */,
60 | );
61 | name = Products;
62 | sourceTree = "";
63 | };
64 | 92368505223624F7005C1AD7 /* QRScanner */ = {
65 | isa = PBXGroup;
66 | children = (
67 | 92368506223624F7005C1AD7 /* AppDelegate.swift */,
68 | 9236852422362B20005C1AD7 /* Model */,
69 | 9236851E22362681005C1AD7 /* View */,
70 | 9236852122362B04005C1AD7 /* Controller */,
71 | 9236852622363587005C1AD7 /* Extensions */,
72 | 9236850D223624F8005C1AD7 /* Assets.xcassets */,
73 | 9236850F223624F8005C1AD7 /* LaunchScreen.storyboard */,
74 | 92368512223624F8005C1AD7 /* Info.plist */,
75 | );
76 | path = QRScanner;
77 | sourceTree = "";
78 | };
79 | 9236851E22362681005C1AD7 /* View */ = {
80 | isa = PBXGroup;
81 | children = (
82 | 9236852522362CC5005C1AD7 /* StoryBoards */,
83 | 9236851A22362675005C1AD7 /* QRScannerView.swift */,
84 | 921807A4223B6DA200F36C40 /* CopyLabel.swift */,
85 | );
86 | path = View;
87 | sourceTree = "";
88 | };
89 | 9236852122362B04005C1AD7 /* Controller */ = {
90 | isa = PBXGroup;
91 | children = (
92 | 9236851922362675005C1AD7 /* QRScannerViewController.swift */,
93 | 9236851F22362AAA005C1AD7 /* DetailViewController.swift */,
94 | );
95 | path = Controller;
96 | sourceTree = "";
97 | };
98 | 9236852422362B20005C1AD7 /* Model */ = {
99 | isa = PBXGroup;
100 | children = (
101 | 9236852222362B1C005C1AD7 /* QRData.swift */,
102 | );
103 | path = Model;
104 | sourceTree = "";
105 | };
106 | 9236852522362CC5005C1AD7 /* StoryBoards */ = {
107 | isa = PBXGroup;
108 | children = (
109 | 9236851822362675005C1AD7 /* Main.storyboard */,
110 | );
111 | path = StoryBoards;
112 | sourceTree = "";
113 | };
114 | 9236852622363587005C1AD7 /* Extensions */ = {
115 | isa = PBXGroup;
116 | children = (
117 | 92368527223635AB005C1AD7 /* UIViewController+Alert.swift */,
118 | );
119 | path = Extensions;
120 | sourceTree = "";
121 | };
122 | /* End PBXGroup section */
123 |
124 | /* Begin PBXNativeTarget section */
125 | 92368502223624F7005C1AD7 /* QRScanner */ = {
126 | isa = PBXNativeTarget;
127 | buildConfigurationList = 92368515223624F8005C1AD7 /* Build configuration list for PBXNativeTarget "QRScanner" */;
128 | buildPhases = (
129 | 923684FF223624F7005C1AD7 /* Sources */,
130 | 92368500223624F7005C1AD7 /* Frameworks */,
131 | 92368501223624F7005C1AD7 /* Resources */,
132 | );
133 | buildRules = (
134 | );
135 | dependencies = (
136 | );
137 | name = QRScanner;
138 | productName = QRScanner;
139 | productReference = 92368503223624F7005C1AD7 /* QRScanner.app */;
140 | productType = "com.apple.product-type.application";
141 | };
142 | /* End PBXNativeTarget section */
143 |
144 | /* Begin PBXProject section */
145 | 923684FB223624F7005C1AD7 /* Project object */ = {
146 | isa = PBXProject;
147 | attributes = {
148 | LastSwiftUpdateCheck = 1010;
149 | LastUpgradeCheck = 1010;
150 | ORGANIZATIONNAME = "KM, Abhilash";
151 | TargetAttributes = {
152 | 92368502223624F7005C1AD7 = {
153 | CreatedOnToolsVersion = 10.1;
154 | };
155 | };
156 | };
157 | buildConfigurationList = 923684FE223624F7005C1AD7 /* Build configuration list for PBXProject "QRScanner" */;
158 | compatibilityVersion = "Xcode 9.3";
159 | developmentRegion = en;
160 | hasScannedForEncodings = 0;
161 | knownRegions = (
162 | en,
163 | Base,
164 | );
165 | mainGroup = 923684FA223624F7005C1AD7;
166 | productRefGroup = 92368504223624F7005C1AD7 /* Products */;
167 | projectDirPath = "";
168 | projectRoot = "";
169 | targets = (
170 | 92368502223624F7005C1AD7 /* QRScanner */,
171 | );
172 | };
173 | /* End PBXProject section */
174 |
175 | /* Begin PBXResourcesBuildPhase section */
176 | 92368501223624F7005C1AD7 /* Resources */ = {
177 | isa = PBXResourcesBuildPhase;
178 | buildActionMask = 2147483647;
179 | files = (
180 | 9236851B22362675005C1AD7 /* Main.storyboard in Resources */,
181 | 92368511223624F8005C1AD7 /* LaunchScreen.storyboard in Resources */,
182 | 9236850E223624F8005C1AD7 /* Assets.xcassets in Resources */,
183 | );
184 | runOnlyForDeploymentPostprocessing = 0;
185 | };
186 | /* End PBXResourcesBuildPhase section */
187 |
188 | /* Begin PBXSourcesBuildPhase section */
189 | 923684FF223624F7005C1AD7 /* Sources */ = {
190 | isa = PBXSourcesBuildPhase;
191 | buildActionMask = 2147483647;
192 | files = (
193 | 9236851C22362675005C1AD7 /* QRScannerViewController.swift in Sources */,
194 | 9236851D22362675005C1AD7 /* QRScannerView.swift in Sources */,
195 | 92368507223624F7005C1AD7 /* AppDelegate.swift in Sources */,
196 | 92368528223635AB005C1AD7 /* UIViewController+Alert.swift in Sources */,
197 | 9236852022362AAA005C1AD7 /* DetailViewController.swift in Sources */,
198 | 9236852322362B1C005C1AD7 /* QRData.swift in Sources */,
199 | 921807A5223B6DA200F36C40 /* CopyLabel.swift in Sources */,
200 | );
201 | runOnlyForDeploymentPostprocessing = 0;
202 | };
203 | /* End PBXSourcesBuildPhase section */
204 |
205 | /* Begin PBXVariantGroup section */
206 | 9236850F223624F8005C1AD7 /* LaunchScreen.storyboard */ = {
207 | isa = PBXVariantGroup;
208 | children = (
209 | 92368510223624F8005C1AD7 /* Base */,
210 | );
211 | name = LaunchScreen.storyboard;
212 | sourceTree = "";
213 | };
214 | /* End PBXVariantGroup section */
215 |
216 | /* Begin XCBuildConfiguration section */
217 | 92368513223624F8005C1AD7 /* Debug */ = {
218 | isa = XCBuildConfiguration;
219 | buildSettings = {
220 | ALWAYS_SEARCH_USER_PATHS = NO;
221 | CLANG_ANALYZER_NONNULL = YES;
222 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
223 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
224 | CLANG_CXX_LIBRARY = "libc++";
225 | CLANG_ENABLE_MODULES = YES;
226 | CLANG_ENABLE_OBJC_ARC = YES;
227 | CLANG_ENABLE_OBJC_WEAK = YES;
228 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
229 | CLANG_WARN_BOOL_CONVERSION = YES;
230 | CLANG_WARN_COMMA = YES;
231 | CLANG_WARN_CONSTANT_CONVERSION = YES;
232 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
233 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
234 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
235 | CLANG_WARN_EMPTY_BODY = YES;
236 | CLANG_WARN_ENUM_CONVERSION = YES;
237 | CLANG_WARN_INFINITE_RECURSION = YES;
238 | CLANG_WARN_INT_CONVERSION = YES;
239 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
240 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
241 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
242 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
243 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
244 | CLANG_WARN_STRICT_PROTOTYPES = YES;
245 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
246 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
247 | CLANG_WARN_UNREACHABLE_CODE = YES;
248 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
249 | CODE_SIGN_IDENTITY = "iPhone Developer";
250 | COPY_PHASE_STRIP = NO;
251 | DEBUG_INFORMATION_FORMAT = dwarf;
252 | ENABLE_STRICT_OBJC_MSGSEND = YES;
253 | ENABLE_TESTABILITY = YES;
254 | GCC_C_LANGUAGE_STANDARD = gnu11;
255 | GCC_DYNAMIC_NO_PIC = NO;
256 | GCC_NO_COMMON_BLOCKS = YES;
257 | GCC_OPTIMIZATION_LEVEL = 0;
258 | GCC_PREPROCESSOR_DEFINITIONS = (
259 | "DEBUG=1",
260 | "$(inherited)",
261 | );
262 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
263 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
264 | GCC_WARN_UNDECLARED_SELECTOR = YES;
265 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
266 | GCC_WARN_UNUSED_FUNCTION = YES;
267 | GCC_WARN_UNUSED_VARIABLE = YES;
268 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
269 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
270 | MTL_FAST_MATH = YES;
271 | ONLY_ACTIVE_ARCH = YES;
272 | SDKROOT = iphoneos;
273 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
274 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
275 | };
276 | name = Debug;
277 | };
278 | 92368514223624F8005C1AD7 /* Release */ = {
279 | isa = XCBuildConfiguration;
280 | buildSettings = {
281 | ALWAYS_SEARCH_USER_PATHS = NO;
282 | CLANG_ANALYZER_NONNULL = YES;
283 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
284 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
285 | CLANG_CXX_LIBRARY = "libc++";
286 | CLANG_ENABLE_MODULES = YES;
287 | CLANG_ENABLE_OBJC_ARC = YES;
288 | CLANG_ENABLE_OBJC_WEAK = YES;
289 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
290 | CLANG_WARN_BOOL_CONVERSION = YES;
291 | CLANG_WARN_COMMA = YES;
292 | CLANG_WARN_CONSTANT_CONVERSION = YES;
293 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
294 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
295 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
296 | CLANG_WARN_EMPTY_BODY = YES;
297 | CLANG_WARN_ENUM_CONVERSION = YES;
298 | CLANG_WARN_INFINITE_RECURSION = YES;
299 | CLANG_WARN_INT_CONVERSION = YES;
300 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
301 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
302 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
303 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
304 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
305 | CLANG_WARN_STRICT_PROTOTYPES = YES;
306 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
307 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
308 | CLANG_WARN_UNREACHABLE_CODE = YES;
309 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
310 | CODE_SIGN_IDENTITY = "iPhone Developer";
311 | COPY_PHASE_STRIP = NO;
312 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
313 | ENABLE_NS_ASSERTIONS = NO;
314 | ENABLE_STRICT_OBJC_MSGSEND = YES;
315 | GCC_C_LANGUAGE_STANDARD = gnu11;
316 | GCC_NO_COMMON_BLOCKS = YES;
317 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
318 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
319 | GCC_WARN_UNDECLARED_SELECTOR = YES;
320 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
321 | GCC_WARN_UNUSED_FUNCTION = YES;
322 | GCC_WARN_UNUSED_VARIABLE = YES;
323 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
324 | MTL_ENABLE_DEBUG_INFO = NO;
325 | MTL_FAST_MATH = YES;
326 | SDKROOT = iphoneos;
327 | SWIFT_COMPILATION_MODE = wholemodule;
328 | SWIFT_OPTIMIZATION_LEVEL = "-O";
329 | VALIDATE_PRODUCT = YES;
330 | };
331 | name = Release;
332 | };
333 | 92368516223624F8005C1AD7 /* Debug */ = {
334 | isa = XCBuildConfiguration;
335 | buildSettings = {
336 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
337 | CODE_SIGN_STYLE = Automatic;
338 | DEVELOPMENT_TEAM = 4Z9R274Z8Z;
339 | INFOPLIST_FILE = QRScanner/Info.plist;
340 | LD_RUNPATH_SEARCH_PATHS = (
341 | "$(inherited)",
342 | "@executable_path/Frameworks",
343 | );
344 | PRODUCT_BUNDLE_IDENTIFIER = com.abhilash.QRScanner.QRScanner;
345 | PRODUCT_NAME = "$(TARGET_NAME)";
346 | SWIFT_VERSION = 4.2;
347 | TARGETED_DEVICE_FAMILY = "1,2";
348 | };
349 | name = Debug;
350 | };
351 | 92368517223624F8005C1AD7 /* Release */ = {
352 | isa = XCBuildConfiguration;
353 | buildSettings = {
354 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
355 | CODE_SIGN_STYLE = Automatic;
356 | DEVELOPMENT_TEAM = 4Z9R274Z8Z;
357 | INFOPLIST_FILE = QRScanner/Info.plist;
358 | LD_RUNPATH_SEARCH_PATHS = (
359 | "$(inherited)",
360 | "@executable_path/Frameworks",
361 | );
362 | PRODUCT_BUNDLE_IDENTIFIER = com.abhilash.QRScanner.QRScanner;
363 | PRODUCT_NAME = "$(TARGET_NAME)";
364 | SWIFT_VERSION = 4.2;
365 | TARGETED_DEVICE_FAMILY = "1,2";
366 | };
367 | name = Release;
368 | };
369 | /* End XCBuildConfiguration section */
370 |
371 | /* Begin XCConfigurationList section */
372 | 923684FE223624F7005C1AD7 /* Build configuration list for PBXProject "QRScanner" */ = {
373 | isa = XCConfigurationList;
374 | buildConfigurations = (
375 | 92368513223624F8005C1AD7 /* Debug */,
376 | 92368514223624F8005C1AD7 /* Release */,
377 | );
378 | defaultConfigurationIsVisible = 0;
379 | defaultConfigurationName = Release;
380 | };
381 | 92368515223624F8005C1AD7 /* Build configuration list for PBXNativeTarget "QRScanner" */ = {
382 | isa = XCConfigurationList;
383 | buildConfigurations = (
384 | 92368516223624F8005C1AD7 /* Debug */,
385 | 92368517223624F8005C1AD7 /* Release */,
386 | );
387 | defaultConfigurationIsVisible = 0;
388 | defaultConfigurationName = Release;
389 | };
390 | /* End XCConfigurationList section */
391 | };
392 | rootObject = 923684FB223624F7005C1AD7 /* Project object */;
393 | }
394 |
--------------------------------------------------------------------------------