File tree Expand file tree Collapse file tree
DocumentScanner.xcodeproj Expand file tree Collapse file tree Original file line number Diff line number Diff line change 336336 DYLIB_COMPATIBILITY_VERSION = 1;
337337 DYLIB_CURRENT_VERSION = 1;
338338 DYLIB_INSTALL_NAME_BASE = "@rpath";
339+ EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = NO;
339340 INFOPLIST_FILE = DocumentScanner/Info.plist;
340341 INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
341342 IPHONEOS_DEPLOYMENT_TARGET = 10.0;
360361 DYLIB_COMPATIBILITY_VERSION = 1;
361362 DYLIB_CURRENT_VERSION = 1;
362363 DYLIB_INSTALL_NAME_BASE = "@rpath";
364+ EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = NO;
363365 INFOPLIST_FILE = DocumentScanner/Info.plist;
364366 INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
365367 IPHONEOS_DEPLOYMENT_TARGET = 10.0;
Original file line number Diff line number Diff line change @@ -48,24 +48,28 @@ class CroppView: UIView {
4848 }
4949
5050 private func setup( ) {
51- let podBundle = Bundle ( for : self . classForCoder )
51+ var bundle : Bundle ? = nil
5252
53- if let bundleURL = podBundle. url ( forResource: " DocumentScanner " , withExtension: " bundle " ) {
54- if let bundle = Bundle . init ( url: bundleURL) {
53+ let libBundle = Bundle ( for: self . classForCoder)
5554
56- let nib = UINib ( nibName: " CroppView " , bundle: bundle)
57- let view = nib. instantiate ( withOwner: self , options: nil ) . first as! UIView
58-
59- view. frame = bounds
60-
61- addSubview ( view)
55+ // Search resource in Pod resource bundle
56+ if let bundleURL = libBundle. url ( forResource: " DocumentScanner " , withExtension: " bundle " ) {
57+ if let resourceBundle = Bundle . init ( url: bundleURL) {
58+ bundle = resourceBundle
6259 } else {
63- assertionFailure ( " Could not load the bundle " )
60+ assertionFailure ( " Could not load the resource bundle " )
6461 }
6562 } else {
66- assertionFailure ( " Could not create a path to the bundle " )
63+ bundle = libBundle
6764 }
6865
66+ let nib = UINib ( nibName: " CroppView " , bundle: bundle)
67+ let view = nib. instantiate ( withOwner: self , options: nil ) . first as! UIView
68+
69+ view. frame = bounds
70+
71+ addSubview ( view)
72+
6973 retakeButton. title = NSLocalizedString ( " Retake " , comment: " Retake " )
7074 keepButton. title = NSLocalizedString ( " Crop " , comment: " Crop " )
7175
Original file line number Diff line number Diff line change @@ -38,24 +38,28 @@ final class ScannerView: UIView {
3838 }
3939
4040 private func setup( ) {
41- let podBundle = Bundle ( for : self . classForCoder )
41+ var bundle : Bundle ? = nil
4242
43- if let bundleURL = podBundle. url ( forResource: " DocumentScanner " , withExtension: " bundle " ) {
44- if let bundle = Bundle . init ( url: bundleURL) {
43+ let libBundle = Bundle ( for: self . classForCoder)
4544
46- let nib = UINib ( nibName: " ScannerView " , bundle: bundle)
47- let view = nib. instantiate ( withOwner: self , options: nil ) . first as! UIView
48-
49- view. frame = bounds
50-
51- addSubview ( view)
45+ // Search resource in Pod resource bundle
46+ if let bundleURL = libBundle. url ( forResource: " DocumentScanner " , withExtension: " bundle " ) {
47+ if let resourceBundle = Bundle . init ( url: bundleURL) {
48+ bundle = resourceBundle
5249 } else {
53- assertionFailure ( " Could not load the bundle " )
50+ assertionFailure ( " Could not load the resource bundle " )
5451 }
5552 } else {
56- assertionFailure ( " Could not create a path to the bundle " )
53+ bundle = libBundle
5754 }
5855
56+ let nib = UINib ( nibName: " ScannerView " , bundle: bundle)
57+ let view = nib. instantiate ( withOwner: self , options: nil ) . first as! UIView
58+
59+ view. frame = bounds
60+
61+ addSubview ( view)
62+
5963 cancelButton. setTitle ( NSLocalizedString ( " Cancel " , comment: " Cancel " ) , for: . normal)
6064 }
6165
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ class ScannerViewController: UIViewController {
3535 self . dismiss ( animated: true , completion: nil )
3636 }
3737
38-
3938 self . previewView. onRescan = {
4039 // continue session on current scanner instance
4140 scanner. continueSession ( )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
99 :path: "../"
1010
1111SPEC CHECKSUMS:
12- DocumentScanner: e4e3badd9fe51a275698df7d2ab365ddfdcfd2ce
12+ DocumentScanner: be8800dc5974b6eff1900a07be51e470e25e0ca6
1313
1414PODFILE CHECKSUM: 17bd2e0c29a1621d1827cccff1cb72b77f989be3
1515
You can’t perform that action at this time.
0 commit comments