Skip to content

Commit

Permalink
Improve camera session in sample wallet (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
llbartekll committed May 26, 2022
1 parent cf4c81b commit 35978d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Example/ExampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@
CODE_SIGN_ENTITLEMENTS = Wallet.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 12;
CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_TEAM = W5R8AG9K22;
INFOPLIST_FILE = ExampleApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand All @@ -766,7 +766,7 @@
CODE_SIGN_ENTITLEMENTS = Wallet.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 12;
CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_TEAM = W5R8AG9K22;
INFOPLIST_FILE = ExampleApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
Expand All @@ -791,7 +791,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_TEAM = W5R8AG9K22;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = DApp/Info.plist;
Expand Down Expand Up @@ -825,7 +825,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_TEAM = W5R8AG9K22;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = DApp/Info.plist;
Expand Down
8 changes: 5 additions & 3 deletions Example/ExampleApp/Wallet/ScannerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ extension ScannerViewController: AVCaptureMetadataOutputObjectsDelegate {
_ output: AVCaptureMetadataOutput,
didOutput metadataObjects: [AVMetadataObject],
from connection: AVCaptureConnection) {

if let metadata = metadataObjects.first as? AVMetadataMachineReadableCodeObject,
metadata.type == .qr,
let qrCode = metadata.stringValue {
delegate?.didScan(qrCode)
dismiss(animated: true)
captureSession.stopRunning()
dismiss(animated: true) { [weak self] in
self?.delegate?.didScan(qrCode)
}
}
}
}

0 comments on commit 35978d0

Please sign in to comment.