diff --git a/Barcode Demo/Mobile Barcode Demo.xcodeproj/project.pbxproj b/Barcode Demo/Mobile Barcode Demo.xcodeproj/project.pbxproj new file mode 100644 index 0000000..55e018c --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo.xcodeproj/project.pbxproj @@ -0,0 +1,549 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + B208E2641CEF3BEB0053F137 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B208E2631CEF3BEB0053F137 /* AppDelegate.swift */; }; + B208E2691CEF3BEB0053F137 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B208E2671CEF3BEB0053F137 /* Main.storyboard */; }; + B208E26B1CEF3BEB0053F137 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B208E26A1CEF3BEB0053F137 /* Assets.xcassets */; }; + B208E26E1CEF3BEB0053F137 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B208E26C1CEF3BEB0053F137 /* LaunchScreen.storyboard */; }; + B2092DB51D24F13200479F14 /* LicenseAgreementCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2092DB31D24F13200479F14 /* LicenseAgreementCell.swift */; }; + B2092DB61D24F13200479F14 /* LicenseAgreementViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2092DB41D24F13200479F14 /* LicenseAgreementViewController.swift */; }; + B20B9DE61CF71062003E12AD /* BaseSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20B9DE01CF71062003E12AD /* BaseSettingsViewController.swift */; }; + B20B9DE81CF71062003E12AD /* BarcodeCaptureViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20B9DE21CF71062003E12AD /* BarcodeCaptureViewController.swift */; }; + B20B9DE91CF71062003E12AD /* CommonViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20B9DE31CF71062003E12AD /* CommonViewController.swift */; }; + B20B9DEA1CF71062003E12AD /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20B9DE41CF71062003E12AD /* HomeViewController.swift */; }; + B20B9DED1CF7107D003E12AD /* Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20B9DEC1CF7107D003E12AD /* Settings.swift */; }; + B20B9DEF1CF71102003E12AD /* SettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20B9DEE1CF71102003E12AD /* SettingsTableViewController.swift */; }; + B20B9DF11CF83DED003E12AD /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20B9DF01CF83DED003E12AD /* AboutViewController.swift */; }; + B20B9DF71CF870A3003E12AD /* BarcodeTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20B9DF61CF870A3003E12AD /* BarcodeTypes.swift */; }; + B20B9DFB1CF87275003E12AD /* BarcodesSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20B9DFA1CF87275003E12AD /* BarcodesSettingsViewController.swift */; }; + B27BD43F1D38B35C00943531 /* eula.rtf in Resources */ = {isa = PBXBuildFile; fileRef = B27BD43E1D38B35C00943531 /* eula.rtf */; }; + B280628F1D20FBE5009DD03D /* MobileSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B280628C1D20FBE5009DD03D /* MobileSDK.framework */; }; + B29531941D2A817100429143 /* BarcodeInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B29531931D2A817100429143 /* BarcodeInfoCell.swift */; }; + B2CCCE391CFC286C00C1DB59 /* bluecircle.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE2C1CFC286C00C1DB59 /* bluecircle.png */; }; + B2CCCE3A1CFC286C00C1DB59 /* bluecircle@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE2D1CFC286C00C1DB59 /* bluecircle@2x.png */; }; + B2CCCE3B1CFC286C00C1DB59 /* camera_button_normal.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE2E1CFC286C00C1DB59 /* camera_button_normal.png */; }; + B2CCCE3C1CFC286C00C1DB59 /* camera@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE2F1CFC286C00C1DB59 /* camera@2x.png */; }; + B2CCCE3D1CFC286C00C1DB59 /* close@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE301CFC286C00C1DB59 /* close@2x.png */; }; + B2CCCE3E1CFC286C00C1DB59 /* email.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE311CFC286C00C1DB59 /* email.png */; }; + B2CCCE3F1CFC286C00C1DB59 /* email@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE321CFC286C00C1DB59 /* email@2x.png */; }; + B2CCCE401CFC286C00C1DB59 /* gallery@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE331CFC286C00C1DB59 /* gallery@2x.png */; }; + B2CCCE411CFC286C00C1DB59 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE341CFC286C00C1DB59 /* logo.png */; }; + B2CCCE421CFC286C00C1DB59 /* settings_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE351CFC286C00C1DB59 /* settings_icon.png */; }; + B2CCCE431CFC286C00C1DB59 /* settings_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE361CFC286C00C1DB59 /* settings_icon@2x.png */; }; + B2CCCE441CFC286C00C1DB59 /* torch_off@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE371CFC286C00C1DB59 /* torch_off@2x.png */; }; + B2CCCE451CFC286C00C1DB59 /* torchon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE381CFC286C00C1DB59 /* torchon@2x.png */; }; + B2CCCE491CFC4CD900C1DB59 /* beep-29.wav in Resources */ = {isa = PBXBuildFile; fileRef = B2CCCE481CFC4CD900C1DB59 /* beep-29.wav */; }; + B2D3BECC1CEF3E4F00C439C6 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEB71CEF3E4F00C439C6 /* AssetsLibrary.framework */; }; + B2D3BECD1CEF3E4F00C439C6 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEB81CEF3E4F00C439C6 /* AudioToolbox.framework */; }; + B2D3BECE1CEF3E4F00C439C6 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEB91CEF3E4F00C439C6 /* MobileCoreServices.framework */; }; + B2D3BECF1CEF3E4F00C439C6 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEBA1CEF3E4F00C439C6 /* OpenGLES.framework */; }; + B2D3BED01CEF3E4F00C439C6 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEBB1CEF3E4F00C439C6 /* Security.framework */; }; + B2D3BED11CEF3E4F00C439C6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEBC1CEF3E4F00C439C6 /* UIKit.framework */; }; + B2D3BED21CEF3E4F00C439C6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEBD1CEF3E4F00C439C6 /* CoreGraphics.framework */; }; + B2D3BED31CEF3E4F00C439C6 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEBE1CEF3E4F00C439C6 /* CoreLocation.framework */; }; + B2D3BED41CEF3E4F00C439C6 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEBF1CEF3E4F00C439C6 /* CoreMedia.framework */; }; + B2D3BED51CEF3E4F00C439C6 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEC01CEF3E4F00C439C6 /* CoreMotion.framework */; }; + B2D3BED61CEF3E4F00C439C6 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEC11CEF3E4F00C439C6 /* CoreVideo.framework */; }; + B2D3BED71CEF3E4F00C439C6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEC21CEF3E4F00C439C6 /* Foundation.framework */; }; + B2D3BED81CEF3E4F00C439C6 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEC31CEF3E4F00C439C6 /* libc++.tbd */; }; + B2D3BED91CEF3E4F00C439C6 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEC41CEF3E4F00C439C6 /* libxml2.tbd */; }; + B2D3BEDA1CEF3E4F00C439C6 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEC51CEF3E4F00C439C6 /* libz.tbd */; }; + B2D3BEDB1CEF3E4F00C439C6 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEC61CEF3E4F00C439C6 /* SystemConfiguration.framework */; }; + B2D3BEDC1CEF3E4F00C439C6 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEC71CEF3E4F00C439C6 /* AVFoundation.framework */; }; + B2D3BEDD1CEF3E4F00C439C6 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D3BEC81CEF3E4F00C439C6 /* QuartzCore.framework */; }; + B2D3BEED1CEF495D00C439C6 /* PreviewBarcodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2D3BEEC1CEF495D00C439C6 /* PreviewBarcodeViewController.swift */; }; + B2E5144B1D2148E800D17BAE /* AboutCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2E5144A1D2148E800D17BAE /* AboutCell.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + B208E2601CEF3BEB0053F137 /* Mobile Barcode Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mobile Barcode Demo.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + B208E2631CEF3BEB0053F137 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + B208E2681CEF3BEB0053F137 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + B208E26A1CEF3BEB0053F137 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + B208E26D1CEF3BEB0053F137 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + B208E26F1CEF3BEB0053F137 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B2092DB31D24F13200479F14 /* LicenseAgreementCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LicenseAgreementCell.swift; sourceTree = ""; }; + B2092DB41D24F13200479F14 /* LicenseAgreementViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LicenseAgreementViewController.swift; sourceTree = ""; }; + B20B9DE01CF71062003E12AD /* BaseSettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseSettingsViewController.swift; sourceTree = ""; }; + B20B9DE21CF71062003E12AD /* BarcodeCaptureViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BarcodeCaptureViewController.swift; sourceTree = ""; }; + B20B9DE31CF71062003E12AD /* CommonViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommonViewController.swift; sourceTree = ""; }; + B20B9DE41CF71062003E12AD /* HomeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; + B20B9DEC1CF7107D003E12AD /* Settings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Settings.swift; sourceTree = ""; }; + B20B9DEE1CF71102003E12AD /* SettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewController.swift; sourceTree = ""; }; + B20B9DF01CF83DED003E12AD /* AboutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = ""; }; + B20B9DF61CF870A3003E12AD /* BarcodeTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BarcodeTypes.swift; sourceTree = ""; }; + B20B9DFA1CF87275003E12AD /* BarcodesSettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BarcodesSettingsViewController.swift; sourceTree = ""; }; + B27BD43E1D38B35C00943531 /* eula.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; path = eula.rtf; sourceTree = ""; }; + B280628C1D20FBE5009DD03D /* MobileSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileSDK.framework; path = ../../MobileSDK/MobileSDK.framework; sourceTree = ""; }; + B280628D1D20FBE5009DD03D /* SDKStrings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = SDKStrings.bundle; path = ../../MobileSDK/SDKStrings.bundle; sourceTree = ""; }; + B280628E1D20FBE5009DD03D /* uiimages.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = uiimages.bundle; path = ../../MobileSDK/uiimages.bundle; sourceTree = ""; }; + B29531931D2A817100429143 /* BarcodeInfoCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BarcodeInfoCell.swift; sourceTree = ""; }; + B2CCCE2C1CFC286C00C1DB59 /* bluecircle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bluecircle.png; path = Resources/Images/bluecircle.png; sourceTree = ""; }; + B2CCCE2D1CFC286C00C1DB59 /* bluecircle@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bluecircle@2x.png"; path = "Resources/Images/bluecircle@2x.png"; sourceTree = ""; }; + B2CCCE2E1CFC286C00C1DB59 /* camera_button_normal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = camera_button_normal.png; path = Resources/Images/camera_button_normal.png; sourceTree = ""; }; + B2CCCE2F1CFC286C00C1DB59 /* camera@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "camera@2x.png"; path = "Resources/Images/camera@2x.png"; sourceTree = ""; }; + B2CCCE301CFC286C00C1DB59 /* close@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "close@2x.png"; path = "Resources/Images/close@2x.png"; sourceTree = ""; }; + B2CCCE311CFC286C00C1DB59 /* email.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = email.png; path = Resources/Images/email.png; sourceTree = ""; }; + B2CCCE321CFC286C00C1DB59 /* email@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "email@2x.png"; path = "Resources/Images/email@2x.png"; sourceTree = ""; }; + B2CCCE331CFC286C00C1DB59 /* gallery@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "gallery@2x.png"; path = "Resources/Images/gallery@2x.png"; sourceTree = ""; }; + B2CCCE341CFC286C00C1DB59 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = logo.png; path = Resources/Images/logo.png; sourceTree = ""; }; + B2CCCE351CFC286C00C1DB59 /* settings_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = settings_icon.png; path = Resources/Images/settings_icon.png; sourceTree = ""; }; + B2CCCE361CFC286C00C1DB59 /* settings_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "settings_icon@2x.png"; path = "Resources/Images/settings_icon@2x.png"; sourceTree = ""; }; + B2CCCE371CFC286C00C1DB59 /* torch_off@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "torch_off@2x.png"; path = "Resources/Images/torch_off@2x.png"; sourceTree = ""; }; + B2CCCE381CFC286C00C1DB59 /* torchon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "torchon@2x.png"; path = "Resources/Images/torchon@2x.png"; sourceTree = ""; }; + B2CCCE481CFC4CD900C1DB59 /* beep-29.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = "beep-29.wav"; sourceTree = ""; }; + B2D3BEB71CEF3E4F00C439C6 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; + B2D3BEB81CEF3E4F00C439C6 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + B2D3BEB91CEF3E4F00C439C6 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; + B2D3BEBA1CEF3E4F00C439C6 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + B2D3BEBB1CEF3E4F00C439C6 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; + B2D3BEBC1CEF3E4F00C439C6 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + B2D3BEBD1CEF3E4F00C439C6 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + B2D3BEBE1CEF3E4F00C439C6 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + B2D3BEBF1CEF3E4F00C439C6 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + B2D3BEC01CEF3E4F00C439C6 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; + B2D3BEC11CEF3E4F00C439C6 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; + B2D3BEC21CEF3E4F00C439C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + B2D3BEC31CEF3E4F00C439C6 /* libc++.tbd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; + B2D3BEC41CEF3E4F00C439C6 /* libxml2.tbd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; }; + B2D3BEC51CEF3E4F00C439C6 /* libz.tbd */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + B2D3BEC61CEF3E4F00C439C6 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + B2D3BEC71CEF3E4F00C439C6 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + B2D3BEC81CEF3E4F00C439C6 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + B2D3BEE71CEF43DB00C439C6 /* Mobile-Barcode-Demo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Mobile-Barcode-Demo-Bridging-Header.h"; sourceTree = SOURCE_ROOT; }; + B2D3BEEC1CEF495D00C439C6 /* PreviewBarcodeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreviewBarcodeViewController.swift; sourceTree = ""; }; + B2E5144A1D2148E800D17BAE /* AboutCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AboutCell.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B208E25D1CEF3BEB0053F137 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B280628F1D20FBE5009DD03D /* MobileSDK.framework in Frameworks */, + B2D3BECE1CEF3E4F00C439C6 /* MobileCoreServices.framework in Frameworks */, + B2D3BED11CEF3E4F00C439C6 /* UIKit.framework in Frameworks */, + B2D3BED01CEF3E4F00C439C6 /* Security.framework in Frameworks */, + B2D3BED91CEF3E4F00C439C6 /* libxml2.tbd in Frameworks */, + B2D3BEDA1CEF3E4F00C439C6 /* libz.tbd in Frameworks */, + B2D3BED81CEF3E4F00C439C6 /* libc++.tbd in Frameworks */, + B2D3BEDB1CEF3E4F00C439C6 /* SystemConfiguration.framework in Frameworks */, + B2D3BED51CEF3E4F00C439C6 /* CoreMotion.framework in Frameworks */, + B2D3BEDD1CEF3E4F00C439C6 /* QuartzCore.framework in Frameworks */, + B2D3BED41CEF3E4F00C439C6 /* CoreMedia.framework in Frameworks */, + B2D3BED21CEF3E4F00C439C6 /* CoreGraphics.framework in Frameworks */, + B2D3BED31CEF3E4F00C439C6 /* CoreLocation.framework in Frameworks */, + B2D3BEDC1CEF3E4F00C439C6 /* AVFoundation.framework in Frameworks */, + B2D3BED71CEF3E4F00C439C6 /* Foundation.framework in Frameworks */, + B2D3BECC1CEF3E4F00C439C6 /* AssetsLibrary.framework in Frameworks */, + B2D3BECD1CEF3E4F00C439C6 /* AudioToolbox.framework in Frameworks */, + B2D3BED61CEF3E4F00C439C6 /* CoreVideo.framework in Frameworks */, + B2D3BECF1CEF3E4F00C439C6 /* OpenGLES.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B208E2571CEF3BEB0053F137 = { + isa = PBXGroup; + children = ( + B208E2621CEF3BEB0053F137 /* Mobile Barcode Demo */, + B208E2611CEF3BEB0053F137 /* Products */, + B2D3BEB61CEF3E4200C439C6 /* Frameworks */, + B2D3BE9A1CEF3DFA00C439C6 /* Resources */, + ); + sourceTree = ""; + }; + B208E2611CEF3BEB0053F137 /* Products */ = { + isa = PBXGroup; + children = ( + B208E2601CEF3BEB0053F137 /* Mobile Barcode Demo.app */, + ); + name = Products; + sourceTree = ""; + }; + B208E2621CEF3BEB0053F137 /* Mobile Barcode Demo */ = { + isa = PBXGroup; + children = ( + B2D3BE861CEF3CF000C439C6 /* Controllers */, + B208E2631CEF3BEB0053F137 /* AppDelegate.swift */, + B20B9DF61CF870A3003E12AD /* BarcodeTypes.swift */, + B20B9DEC1CF7107D003E12AD /* Settings.swift */, + B2D3BEE71CEF43DB00C439C6 /* Mobile-Barcode-Demo-Bridging-Header.h */, + B208E2671CEF3BEB0053F137 /* Main.storyboard */, + B208E26A1CEF3BEB0053F137 /* Assets.xcassets */, + B208E26C1CEF3BEB0053F137 /* LaunchScreen.storyboard */, + B27BD43E1D38B35C00943531 /* eula.rtf */, + B208E26F1CEF3BEB0053F137 /* Info.plist */, + ); + path = "Mobile Barcode Demo"; + sourceTree = ""; + }; + B2D3BE861CEF3CF000C439C6 /* Controllers */ = { + isa = PBXGroup; + children = ( + B20B9DE01CF71062003E12AD /* BaseSettingsViewController.swift */, + B20B9DEE1CF71102003E12AD /* SettingsTableViewController.swift */, + B20B9DE21CF71062003E12AD /* BarcodeCaptureViewController.swift */, + B20B9DE31CF71062003E12AD /* CommonViewController.swift */, + B20B9DE41CF71062003E12AD /* HomeViewController.swift */, + B2D3BEEC1CEF495D00C439C6 /* PreviewBarcodeViewController.swift */, + B29531931D2A817100429143 /* BarcodeInfoCell.swift */, + B20B9DF01CF83DED003E12AD /* AboutViewController.swift */, + B2E5144A1D2148E800D17BAE /* AboutCell.swift */, + B20B9DFA1CF87275003E12AD /* BarcodesSettingsViewController.swift */, + B2092DB31D24F13200479F14 /* LicenseAgreementCell.swift */, + B2092DB41D24F13200479F14 /* LicenseAgreementViewController.swift */, + ); + name = Controllers; + sourceTree = ""; + }; + B2D3BE9A1CEF3DFA00C439C6 /* Resources */ = { + isa = PBXGroup; + children = ( + B2CCCE481CFC4CD900C1DB59 /* beep-29.wav */, + B2D3BE9B1CEF3E0300C439C6 /* Images */, + ); + name = Resources; + path = "Mobile Barcode Demo"; + sourceTree = ""; + }; + B2D3BE9B1CEF3E0300C439C6 /* Images */ = { + isa = PBXGroup; + children = ( + B2CCCE2C1CFC286C00C1DB59 /* bluecircle.png */, + B2CCCE2D1CFC286C00C1DB59 /* bluecircle@2x.png */, + B2CCCE2E1CFC286C00C1DB59 /* camera_button_normal.png */, + B2CCCE2F1CFC286C00C1DB59 /* camera@2x.png */, + B2CCCE301CFC286C00C1DB59 /* close@2x.png */, + B2CCCE311CFC286C00C1DB59 /* email.png */, + B2CCCE321CFC286C00C1DB59 /* email@2x.png */, + B2CCCE331CFC286C00C1DB59 /* gallery@2x.png */, + B2CCCE341CFC286C00C1DB59 /* logo.png */, + B2CCCE351CFC286C00C1DB59 /* settings_icon.png */, + B2CCCE361CFC286C00C1DB59 /* settings_icon@2x.png */, + B2CCCE371CFC286C00C1DB59 /* torch_off@2x.png */, + B2CCCE381CFC286C00C1DB59 /* torchon@2x.png */, + ); + name = Images; + sourceTree = ""; + }; + B2D3BEB61CEF3E4200C439C6 /* Frameworks */ = { + isa = PBXGroup; + children = ( + B280628C1D20FBE5009DD03D /* MobileSDK.framework */, + B280628D1D20FBE5009DD03D /* SDKStrings.bundle */, + B280628E1D20FBE5009DD03D /* uiimages.bundle */, + B2D3BEB71CEF3E4F00C439C6 /* AssetsLibrary.framework */, + B2D3BEB81CEF3E4F00C439C6 /* AudioToolbox.framework */, + B2D3BEB91CEF3E4F00C439C6 /* MobileCoreServices.framework */, + B2D3BEBA1CEF3E4F00C439C6 /* OpenGLES.framework */, + B2D3BEBB1CEF3E4F00C439C6 /* Security.framework */, + B2D3BEBC1CEF3E4F00C439C6 /* UIKit.framework */, + B2D3BEBD1CEF3E4F00C439C6 /* CoreGraphics.framework */, + B2D3BEBE1CEF3E4F00C439C6 /* CoreLocation.framework */, + B2D3BEBF1CEF3E4F00C439C6 /* CoreMedia.framework */, + B2D3BEC01CEF3E4F00C439C6 /* CoreMotion.framework */, + B2D3BEC11CEF3E4F00C439C6 /* CoreVideo.framework */, + B2D3BEC21CEF3E4F00C439C6 /* Foundation.framework */, + B2D3BEC31CEF3E4F00C439C6 /* libc++.tbd */, + B2D3BEC41CEF3E4F00C439C6 /* libxml2.tbd */, + B2D3BEC51CEF3E4F00C439C6 /* libz.tbd */, + B2D3BEC61CEF3E4F00C439C6 /* SystemConfiguration.framework */, + B2D3BEC71CEF3E4F00C439C6 /* AVFoundation.framework */, + B2D3BEC81CEF3E4F00C439C6 /* QuartzCore.framework */, + ); + name = Frameworks; + path = "Mobile Barcode Demo"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + B208E25F1CEF3BEB0053F137 /* Mobile Barcode Demo */ = { + isa = PBXNativeTarget; + buildConfigurationList = B208E2881CEF3BEB0053F137 /* Build configuration list for PBXNativeTarget "Mobile Barcode Demo" */; + buildPhases = ( + B208E25C1CEF3BEB0053F137 /* Sources */, + B208E25D1CEF3BEB0053F137 /* Frameworks */, + B208E25E1CEF3BEB0053F137 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Mobile Barcode Demo"; + productName = "Mobile Barcode Demo"; + productReference = B208E2601CEF3BEB0053F137 /* Mobile Barcode Demo.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B208E2581CEF3BEB0053F137 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = Atalasoft; + TargetAttributes = { + B208E25F1CEF3BEB0053F137 = { + CreatedOnToolsVersion = 7.3.1; + DevelopmentTeam = B9C7GRQCYQ; + }; + }; + }; + buildConfigurationList = B208E25B1CEF3BEB0053F137 /* Build configuration list for PBXProject "Mobile Barcode Demo" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B208E2571CEF3BEB0053F137; + productRefGroup = B208E2611CEF3BEB0053F137 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B208E25F1CEF3BEB0053F137 /* Mobile Barcode Demo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B208E25E1CEF3BEB0053F137 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B2CCCE431CFC286C00C1DB59 /* settings_icon@2x.png in Resources */, + B27BD43F1D38B35C00943531 /* eula.rtf in Resources */, + B2CCCE491CFC4CD900C1DB59 /* beep-29.wav in Resources */, + B2CCCE411CFC286C00C1DB59 /* logo.png in Resources */, + B2CCCE3D1CFC286C00C1DB59 /* close@2x.png in Resources */, + B2CCCE451CFC286C00C1DB59 /* torchon@2x.png in Resources */, + B208E26E1CEF3BEB0053F137 /* LaunchScreen.storyboard in Resources */, + B2CCCE3B1CFC286C00C1DB59 /* camera_button_normal.png in Resources */, + B2CCCE3F1CFC286C00C1DB59 /* email@2x.png in Resources */, + B2CCCE391CFC286C00C1DB59 /* bluecircle.png in Resources */, + B2CCCE441CFC286C00C1DB59 /* torch_off@2x.png in Resources */, + B2CCCE3C1CFC286C00C1DB59 /* camera@2x.png in Resources */, + B2CCCE3A1CFC286C00C1DB59 /* bluecircle@2x.png in Resources */, + B2CCCE401CFC286C00C1DB59 /* gallery@2x.png in Resources */, + B208E26B1CEF3BEB0053F137 /* Assets.xcassets in Resources */, + B2CCCE421CFC286C00C1DB59 /* settings_icon.png in Resources */, + B2CCCE3E1CFC286C00C1DB59 /* email.png in Resources */, + B208E2691CEF3BEB0053F137 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B208E25C1CEF3BEB0053F137 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B2092DB51D24F13200479F14 /* LicenseAgreementCell.swift in Sources */, + B20B9DE61CF71062003E12AD /* BaseSettingsViewController.swift in Sources */, + B20B9DE81CF71062003E12AD /* BarcodeCaptureViewController.swift in Sources */, + B2092DB61D24F13200479F14 /* LicenseAgreementViewController.swift in Sources */, + B20B9DF11CF83DED003E12AD /* AboutViewController.swift in Sources */, + B20B9DFB1CF87275003E12AD /* BarcodesSettingsViewController.swift in Sources */, + B2D3BEED1CEF495D00C439C6 /* PreviewBarcodeViewController.swift in Sources */, + B20B9DEA1CF71062003E12AD /* HomeViewController.swift in Sources */, + B20B9DF71CF870A3003E12AD /* BarcodeTypes.swift in Sources */, + B20B9DEF1CF71102003E12AD /* SettingsTableViewController.swift in Sources */, + B20B9DED1CF7107D003E12AD /* Settings.swift in Sources */, + B29531941D2A817100429143 /* BarcodeInfoCell.swift in Sources */, + B20B9DE91CF71062003E12AD /* CommonViewController.swift in Sources */, + B208E2641CEF3BEB0053F137 /* AppDelegate.swift in Sources */, + B2E5144B1D2148E800D17BAE /* AboutCell.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + B208E2671CEF3BEB0053F137 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B208E2681CEF3BEB0053F137 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + B208E26C1CEF3BEB0053F137 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B208E26D1CEF3BEB0053F137 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + B208E2861CEF3BEB0053F137 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE = "5b8c5cfc-5eb4-46af-9919-a160838d9512"; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + B208E2871CEF3BEB0053F137 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + PROVISIONING_PROFILE = "5b8c5cfc-5eb4-46af-9919-a160838d9512"; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + B208E2891CEF3BEB0053F137 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/../MobileSDK", + "$(PROJECT_DIR)/../MobileSDK/uiimages.bundle", + ); + HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../MobileSDK/MobileSDK.framework/Headers"; + INFOPLIST_FILE = "Mobile Barcode Demo/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.kofax.Mobile-Barcode-Demo"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/Mobile-Barcode-Demo-Bridging-Header.h"; + }; + name = Debug; + }; + B208E28A1CEF3BEB0053F137 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/../MobileSDK", + "$(PROJECT_DIR)/../MobileSDK/uiimages.bundle", + ); + HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../MobileSDK/MobileSDK.framework/Headers"; + INFOPLIST_FILE = "Mobile Barcode Demo/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.kofax.Mobile-Barcode-Demo"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/Mobile-Barcode-Demo-Bridging-Header.h"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B208E25B1CEF3BEB0053F137 /* Build configuration list for PBXProject "Mobile Barcode Demo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B208E2861CEF3BEB0053F137 /* Debug */, + B208E2871CEF3BEB0053F137 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B208E2881CEF3BEB0053F137 /* Build configuration list for PBXNativeTarget "Mobile Barcode Demo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B208E2891CEF3BEB0053F137 /* Debug */, + B208E28A1CEF3BEB0053F137 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B208E2581CEF3BEB0053F137 /* Project object */; +} diff --git a/Barcode Demo/Mobile Barcode Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Barcode Demo/Mobile Barcode Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..518aab2 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Barcode Demo/Mobile Barcode Demo.xcodeproj/xcshareddata/xcschemes/Mobile Barcode Demo.xcscheme b/Barcode Demo/Mobile Barcode Demo.xcodeproj/xcshareddata/xcschemes/Mobile Barcode Demo.xcscheme new file mode 100644 index 0000000..3af9255 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo.xcodeproj/xcshareddata/xcschemes/Mobile Barcode Demo.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Barcode Demo/Mobile Barcode Demo/AboutCell.swift b/Barcode Demo/Mobile Barcode Demo/AboutCell.swift new file mode 100644 index 0000000..7422d91 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/AboutCell.swift @@ -0,0 +1,123 @@ +// +// AboutCell.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 23/06/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class AboutCell: UITableViewCell { + + @IBOutlet var versionLabel: UILabel! + @IBOutlet var appNameLabel: UILabel! + @IBOutlet var text1Label: UITextView! + @IBOutlet var text2Label: UITextView! + @IBOutlet var emailLabel: UITextView! + + var linkTapGestureRecognizer: UITapGestureRecognizer! + + func makeLink(text: NSMutableAttributedString, linkText: String, linkUrl: String) { + + let linkRange = (text.string as NSString).rangeOfString(linkText) + text.addAttribute(NSLinkAttributeName, value: linkUrl, range: linkRange) + } + + func setupAboutData() { + + if linkTapGestureRecognizer == nil { + linkTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleLinkTapGestureRecognizer)) + linkTapGestureRecognizer.cancelsTouchesInView = false + linkTapGestureRecognizer.delaysTouchesBegan = false + linkTapGestureRecognizer.delaysTouchesEnded = false + addGestureRecognizer(linkTapGestureRecognizer) + } + + let appVersion = NSBundle.mainBundle().infoDictionary!["CFBundleShortVersionString"]; + if let ver = appVersion { + versionLabel.text = "Version \(ver)" + } + + appNameLabel.text = "Atalasoft MobileImage Barcode SDK app" + + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.alignment = NSTextAlignment.Justified + + let text1 = NSMutableAttributedString(string: "This app is for app developers to see what they can build with the Atalasoft MobileImage barcode SDK for iOS/Xcode. The technology can recognize one or many barcodes on the screen. This app is not for consumers looking to check store prices.", attributes: [ + NSParagraphStyleAttributeName: paragraphStyle, + NSBaselineOffsetAttributeName: NSNumber(float: 0) + ]) + text1Label.attributedText = text1; + + let text2 = NSMutableAttributedString(string: "To build your own document capture, processing, or viewing app - visit Atalasoft and grab a 30-day evaluation copy for yourself. We'll provide the tools and the support you need to get started!", attributes: [ + NSParagraphStyleAttributeName: paragraphStyle, + NSBaselineOffsetAttributeName: NSNumber(float: 0) + ]) + + makeLink(text2, linkText: "Atalasoft", linkUrl: "http://hubs.ly/H03pzS80") + text2Label.attributedText = text2 + + + let email = NSMutableAttributedString(string: "sales@atalasoft.com") + let emailUrl = "sales@atalasoft.com" + + makeLink(email, linkText: emailUrl, linkUrl: "mailto:sales@atalasoft.com") + emailLabel.attributedText = email + } + + func handleLinkTapGestureRecognizer(tapRecognizer: UITapGestureRecognizer) { + + let view = tapRecognizer.view + let location = tapRecognizer.locationInView(view) + + var linkStr = "" + + if CGRectContainsPoint(text2Label.frame, location) { + linkStr = getLinkOnText(tapRecognizer.locationInView(text2Label), textView: text2Label) + } else if CGRectContainsPoint(emailLabel.frame, location) { + linkStr = getLinkOnText(tapRecognizer.locationInView(emailLabel), textView: emailLabel) + } + + if !linkStr.isEmpty { + let url: NSURL! = NSURL(string: linkStr) + UIApplication.sharedApplication().openURL(url) + } + } + + func getLinkOnText(location: CGPoint, textView: UITextView) -> String { + + var textPosition1 = textView.closestPositionToPoint(location) + var textPosition2:UITextPosition? + if let _ = textPosition1 { + textPosition2 = textView.positionFromPosition(textPosition1!, offset: 1) + if let _ = textPosition2 { + textPosition1 = textView.positionFromPosition(textPosition1!, offset: -1) + textPosition2 = textView.positionFromPosition(textPosition1!, offset: 1) + } else { + return "" + } + } + + let range = textView.textRangeFromPosition(textPosition1!, toPosition: textPosition2!) + let startOffset = textView.offsetFromPosition(textView.beginningOfDocument, toPosition: range!.start) + let endOffset = textView.offsetFromPosition(textView.beginningOfDocument, toPosition: range!.end) + let offsetRange = NSMakeRange(startOffset, endOffset - startOffset) + if offsetRange.location == NSNotFound || offsetRange.length == 0 { + return "" + } + + if NSMaxRange(offsetRange) > textView.attributedText.length { + return "" + } + + let attributedSubstring = textView.attributedText .attributedSubstringFromRange(offsetRange) + let link = attributedSubstring.attribute(NSLinkAttributeName, atIndex: 0, effectiveRange: nil) + + if let linkStr = link { + return linkStr as! String + } + + return "" + } +} diff --git a/Barcode Demo/Mobile Barcode Demo/AboutViewController.swift b/Barcode Demo/Mobile Barcode Demo/AboutViewController.swift new file mode 100644 index 0000000..a436f16 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/AboutViewController.swift @@ -0,0 +1,43 @@ +// +// AboutViewController.swift +// Mobile Barcode Demo +// +// Created by Michael Chernikov on 27/05/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class AboutViewController: UITableViewController { + + static let cellIdentifier = "AboutCell" + + override func viewDidLoad() { + super.viewDidLoad() + + tableView.estimatedRowHeight = 100.0; + tableView.rowHeight = UITableViewAutomaticDimension; + + tableView.setNeedsLayout() + tableView.layoutIfNeeded() + } + + override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + return 1 + } + + override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 1 + } + + override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + let cell: AboutCell! = tableView.dequeueReusableCellWithIdentifier(AboutViewController.cellIdentifier) as! AboutCell! + + cell.setupAboutData() + + cell.selectionStyle = .None + + return cell + } + +} diff --git a/Barcode Demo/Mobile Barcode Demo/AppDelegate.swift b/Barcode Demo/Mobile Barcode Demo/AppDelegate.swift new file mode 100644 index 0000000..b8e4e38 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/AppDelegate.swift @@ -0,0 +1,47 @@ +// +// AppDelegate.swift +// Mobile Barcode Demo +// +// Created by Michael Chernikov on 20/05/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + return true + } + + func applicationWillResignActive(application: UIApplication) { + } + + func applicationDidEnterBackground(application: UIApplication) { + } + + func applicationWillEnterForeground(application: UIApplication) { + } + + func applicationDidBecomeActive(application: UIApplication) { + Settings.validateLimitation() + if Settings.ExceedLimitation { + let alert = UIAlertController(title: "Error", message: "You have reached your monthly usage limit.", preferredStyle: .Alert) + alert.addAction(UIAlertAction(title: "OK", style: .Default) { action -> Void in }) + + if let wnd = window { + wnd.rootViewController?.presentViewController(alert, animated: true, completion: nil) + } + } + } + + func applicationWillTerminate(application: UIApplication) { + } + + +} + diff --git a/Barcode Demo/Mobile Barcode Demo/Assets.xcassets/AppIcon.appiconset/Contents.json b/Barcode Demo/Mobile Barcode Demo/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..af8a99e --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,40 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "barcodeAppIcon-120.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "barcodeAppIcon-180.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Barcode Demo/Mobile Barcode Demo/Assets.xcassets/AppIcon.appiconset/barcodeAppIcon-120.png b/Barcode Demo/Mobile Barcode Demo/Assets.xcassets/AppIcon.appiconset/barcodeAppIcon-120.png new file mode 100644 index 0000000..052a623 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Assets.xcassets/AppIcon.appiconset/barcodeAppIcon-120.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Assets.xcassets/AppIcon.appiconset/barcodeAppIcon-180.png b/Barcode Demo/Mobile Barcode Demo/Assets.xcassets/AppIcon.appiconset/barcodeAppIcon-180.png new file mode 100644 index 0000000..b23827d Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Assets.xcassets/AppIcon.appiconset/barcodeAppIcon-180.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/BarcodeCaptureViewController.swift b/Barcode Demo/Mobile Barcode Demo/BarcodeCaptureViewController.swift new file mode 100644 index 0000000..c5279e0 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/BarcodeCaptureViewController.swift @@ -0,0 +1,161 @@ +// +// CaptureViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 15/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit +import Foundation + +class BarcodeInfo : AnyObject +{ + var barcode: kfxKEDBarcodeResult! + var image: kfxKEDImage! +} + +class BarcodeCaptureViewController: UIViewController, kfxKUIBarCodeCaptureControlDelegate { + + @IBOutlet weak var captureControlView: kfxKUIBarCodeCaptureControl! + @IBOutlet var cancelButton: UIButton! + @IBOutlet var torchButton: UIButton! + + let captureDevice = AVCaptureDevice.defaultDeviceWithMediaType(AVMediaTypeVideo) + + var barcodeControlInitialized = false + let settings : Settings = Settings() + + var barcodeDetectedPlayer: AVAudioPlayer? + + static let SeguePreviewImageViewController = "PreviewBarcodeViewController" + + static let DefaultStabilityDelay: Int32 = 95 + + let torchOnImage = UIImage(named: "torchon.png") + let torchOffImage = UIImage(named: "torch_off.png") + + override func viewDidLoad() { + super.viewDidLoad() + + self.setNeedsStatusBarAppearanceUpdate() + + torchButton.setImage(torchOffImage, forState: .Normal) + torchButton.hidden = !(captureDevice.hasFlash && captureDevice.hasTorch) + + let alertSound = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("beep-29", ofType: "wav")!) + + do { + try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback) + try AVAudioSession.sharedInstance().setActive(true) + try barcodeDetectedPlayer = AVAudioPlayer(contentsOfURL: alertSound) + barcodeDetectedPlayer?.prepareToPlay() + + } catch { + print("Failed to initialize audio") + barcodeDetectedPlayer = nil + } + + } + + override func viewWillAppear(animated: Bool) { + super.viewWillAppear(animated) + + settings.load() + + navigationController?.setNavigationBarHidden(true, animated: true) + + self.performSelector(#selector(initializeCaptureControl), withObject:nil, afterDelay: 0.25) + } + + override func viewDidDisappear(animated: Bool) { + super.viewDidDisappear(animated) + + navigationController?.setNavigationBarHidden(false, animated:false) + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + } + + override func prefersStatusBarHidden() -> Bool { + return true; + } + + func initializeCaptureControl() { + + if barcodeControlInitialized == false { + + captureControlView.delegate = self; + captureControlView.guidingLine = kfxKUIGuidingLineLandscape + } + + var symbologies = [Int]() + for (index,value) in settings.barcodes.enumerate() { + if value { + symbologies.append(index); + } + } + + captureControlView.symbologies = symbologies as [AnyObject] + + captureControlView.readBarcode() + } + + @IBAction func OnCancelButtonPressed() { + self.navigationController?.popViewControllerAnimated(true) + } + + func barcodeCaptureControl(barcodeCaptureControl: kfxKUIBarCodeCaptureControl!, + barcodeFound result : kfxKEDBarcodeResult, image:kfxKEDImage) + { + let barcodeInfo = BarcodeInfo() + barcodeInfo.barcode = result + barcodeInfo.image = image + + if let player = barcodeDetectedPlayer { + let volume = AVAudioSession.sharedInstance().outputVolume + player.volume = volume + do { + try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryAmbient) + } catch {} + player.play() + } + + dispatch_async(dispatch_get_main_queue(), { + + Settings.updateLimitationCounter() + + self.performSegueWithIdentifier(BarcodeCaptureViewController.SeguePreviewImageViewController, sender: barcodeInfo) + }) + } + + @IBAction func OnTorchButtonPressed() { + if captureDevice.hasFlash && captureDevice.hasTorch { + do { + try captureDevice.lockForConfiguration() + captureDevice.torchMode = captureDevice.torchMode == .Off ? .On : .Off + captureDevice.unlockForConfiguration() + } catch { + print("Unable to turn on the torch") + } + + torchButton.setImage(captureDevice.torchMode == .On ? torchOnImage : torchOffImage, forState: .Normal) + } + } + + override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { + if (segue.identifier == BarcodeCaptureViewController.SeguePreviewImageViewController) + { + let previewViewController: PreviewBarcodeViewController = segue.destinationViewController as! PreviewBarcodeViewController + let barcodeInfo = sender as! BarcodeInfo + + previewViewController.barcodeInfo = barcodeInfo + } + } + + func imageCaptureControl(imageCaptureControl: kfxKUIImageCaptureControl!, pageDetected previewImage: UIImage!, pageCoordinates bound: kfxKEDBoundingTetragon!) { + OnCancelButtonPressed() + } + +} diff --git a/Barcode Demo/Mobile Barcode Demo/BarcodeInfoCell.swift b/Barcode Demo/Mobile Barcode Demo/BarcodeInfoCell.swift new file mode 100644 index 0000000..09467b1 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/BarcodeInfoCell.swift @@ -0,0 +1,26 @@ +// +// BarcodeInfoCell.swift +// Mobile Barcode Demo +// +// Created by Michael Chernikov on 04/07/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class BarcodeInfoCell: UITableViewCell { + @IBOutlet var barcodeInfoLabel : UILabel! + @IBOutlet var barcodeValue : UITextView! + + func setupBarcodeInfoCell(bcInfo: BarcodeInfo) { + barcodeInfoLabel.text = BarcodeTypes.BarcodeTypeToString(bcInfo.barcode.type) + + var value = bcInfo.barcode.value + if bcInfo.barcode.dataFormat == KEDBarcodeDataFormats.init(2) { + let data = NSData(base64EncodedString: bcInfo.barcode.value, options: NSDataBase64DecodingOptions(rawValue: 0)) + value = String(data: data!, encoding: NSUTF8StringEncoding)! + } + + barcodeValue.text = value + } +} diff --git a/Barcode Demo/Mobile Barcode Demo/BarcodeTypes.swift b/Barcode Demo/Mobile Barcode Demo/BarcodeTypes.swift new file mode 100644 index 0000000..65b03f6 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/BarcodeTypes.swift @@ -0,0 +1,91 @@ +// +// BarcodeTypes.swift +// Mobile Barcode Demo +// +// Created by Michael Chernikov on 27/05/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import Foundation + +class BarcodeTypes { + + static let SymbologiesCount = 11 + + static let SymbologyCode39 = "Code39" + static let SymbologyPdf417 = "PDF417" + static let SymbologyQRCode = "QR Code" + static let SymbologyDataMatrix = "DataMatrix" + static let SymbologyCode128 = "Code128" + static let SymbologyCode25 = "Code25" + static let SymbologyEAN = "EAN" + static let SymbologyUPC = "UPC" + static let SymbologyCodabar = "Codabar" + static let SymbologyAztec = "Aztec" + static let SymbologyCode93 = "Code93" + static let SymbologyPostNet = "PostNet" + + static let SymbologyUnknown = "Unknown" + + static func BarcodeTypeToString(barcodeType : KEDBarcodeTypes) -> String { + var barcodeTypeStr = BarcodeTypes.SymbologyUnknown + + if barcodeType == BARCODE_QR { + barcodeTypeStr = BarcodeTypes.SymbologyQRCode + } else if barcodeType == BARCODE_EAN { + barcodeTypeStr = BarcodeTypes.SymbologyEAN + } else if barcodeType == BARCODE_PDF417 { + barcodeTypeStr = BarcodeTypes.SymbologyPdf417 + } else if barcodeType == BARCODE_CODE39 { + barcodeTypeStr = BarcodeTypes.SymbologyCode39 + } else if barcodeType == BARCODE_DATAMATRIX { + barcodeTypeStr = BarcodeTypes.SymbologyDataMatrix + } else if barcodeType == BARCODE_CODE128 { + barcodeTypeStr = BarcodeTypes.SymbologyCode128 + } else if barcodeType == BARCODE_CODE25 { + barcodeTypeStr = BarcodeTypes.SymbologyCode25 + } else if barcodeType == BARCODE_UPC { + barcodeTypeStr = BarcodeTypes.SymbologyUPC + } else if barcodeType == BARCODE_CODABAR { + barcodeTypeStr = BarcodeTypes.SymbologyCodabar + } else if barcodeType == BARCODE_AZTEC { + barcodeTypeStr = BarcodeTypes.SymbologyAztec + } else if barcodeType == BARCODE_CODE93 { + barcodeTypeStr = BarcodeTypes.SymbologyCode93 + } else if barcodeType == BARCODE_POSTNET { + barcodeTypeStr = BarcodeTypes.SymbologyPostNet + } + + return barcodeTypeStr + } + + static func BarcodeSymbologyToString(symbology: kfxKUISymbology) -> String { + var symbologyStr = BarcodeTypes.SymbologyUnknown + + if symbology == kfxKUISymbologyCode39 { + symbologyStr = BarcodeTypes.SymbologyCode39 + } else if symbology == kfxKUISymbologyPdf417 { + symbologyStr = BarcodeTypes.SymbologyPdf417 + } else if symbology == kfxKUISymbologyQR { + symbologyStr = BarcodeTypes.SymbologyQRCode + } else if symbology == kfxKUISymbologyDataMatrix { + symbologyStr = BarcodeTypes.SymbologyDataMatrix + } else if symbology == kfxKUISymbologyCode128 { + symbologyStr = BarcodeTypes.SymbologyCode128 + } else if symbology == kfxKUISymbologyCode25 { + symbologyStr = BarcodeTypes.SymbologyCode25 + } else if symbology == kfxKUISymbologyEAN { + symbologyStr = BarcodeTypes.SymbologyEAN + } else if symbology == kfxKUISymbologyUPC { + symbologyStr = BarcodeTypes.SymbologyUPC + } else if symbology == kfxKUISymbologyCodabar { + symbologyStr = BarcodeTypes.SymbologyCodabar + } else if symbology == kfxKUISymbologyAztec { + symbologyStr = BarcodeTypes.SymbologyAztec + } else if symbology == kfxKUISymbologyCode93{ + symbologyStr = BarcodeTypes.SymbologyCode93 + } + + return symbologyStr + } +} \ No newline at end of file diff --git a/Barcode Demo/Mobile Barcode Demo/BarcodesSettingsViewController.swift b/Barcode Demo/Mobile Barcode Demo/BarcodesSettingsViewController.swift new file mode 100644 index 0000000..76d85ba --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/BarcodesSettingsViewController.swift @@ -0,0 +1,63 @@ +// +// BarcodesSettingsViewController.swift +// Mobile Barcode Demo +// +// Created by Michael Chernikov on 27/05/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class BarcodesSettingsViewController: BaseSettingsViewController { + + var switches : [UISwitch?]! + + override func viewDidLoad() { + super.viewDidLoad() + + switches = [UISwitch?](count: BarcodeTypes.SymbologiesCount, repeatedValue: nil) + } + + override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + return 1; + } + + override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return BarcodeTypes.SymbologiesCount + } + + override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + var cell: UITableViewCell! = tableView.dequeueReusableCellWithIdentifier(SettingsTableViewController.cellIdentifier) + + if cell == nil { + cell = UITableViewCell(style: .Default, reuseIdentifier: SettingsTableViewController.cellIdentifier) + } + + assert(indexPath.section == 0) + + cell.textLabel?.font = UIFont(name:CellsFontName, size:15) + + var switchControl = switches?[indexPath.row] + if switchControl == nil { + switchControl = createSwitchWithTag(indexPath.row, value: BarcodeTypes.BarcodeSymbologyToString(kfxKUISymbology(UInt32(indexPath.row)))) + cell.accessoryView = switchControl + switchControl?.addTarget(self, action: #selector(switchValueChanged), forControlEvents: .ValueChanged) + cell.textLabel?.text = BarcodeTypes.BarcodeSymbologyToString(kfxKUISymbology(UInt32(indexPath.row))) + + switches?[indexPath.row] = switchControl + } + + cell.accessoryView = switchControl + switchControl?.on = settings.barcodes[indexPath.row] + + cell.selectionStyle = .None + + return cell + } + + @IBAction func switchValueChanged(sender: UISwitch) { + + let index = sender.tag + settings.barcodes[index] = !settings.barcodes[index] + } +} diff --git a/Barcode Demo/Mobile Barcode Demo/Base.lproj/LaunchScreen.storyboard b/Barcode Demo/Mobile Barcode Demo/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..0cfee76 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Barcode Demo/Mobile Barcode Demo/Base.lproj/Main.storyboard b/Barcode Demo/Mobile Barcode Demo/Base.lproj/Main.storyboard new file mode 100644 index 0000000..1ad36c6 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/Base.lproj/Main.storyboard @@ -0,0 +1,403 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Barcode Demo/Mobile Barcode Demo/BaseSettingsViewController.swift b/Barcode Demo/Mobile Barcode Demo/BaseSettingsViewController.swift new file mode 100644 index 0000000..461c141 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/BaseSettingsViewController.swift @@ -0,0 +1,62 @@ +// +// BaseSettingsViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 19/05/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class BaseSettingsViewController: UITableViewController { + + var settings : Settings = Settings() + + let CellsFontName = "HelveticaNeue" + let CellsFontSize : CGFloat = 13 + + override func viewWillAppear(animated: Bool) { + settings.load() + + super.viewWillAppear(animated) + } + + override func viewWillDisappear(animated: Bool) { + settings.save() + + super.viewWillDisappear(animated) + } + + + func createSwitchWithTag(tag: Int, value: AnyObject) -> UISwitch{ + let newSwitch = UISwitch() + newSwitch.on = value.boolValue + newSwitch.tag = tag + return newSwitch + } + + func createTextFieldWithTag(tag: Int, frame: CGRect, placeholder: String, text:String) -> UITextField { + let textField = UITextField() + textField.tag = tag + textField.font = UIFont(name: CellsFontName, size: CellsFontSize) + textField.borderStyle = .None + textField.autocorrectionType = .No + textField.returnKeyType = .Done + textField.placeholder = placeholder + textField.textAlignment = .Right + textField.clearButtonMode = .WhileEditing + textField.text = text + textField.frame = frame + return textField + } + + func createSegmentedControlWithTag(tag: Int, items: NSArray, selectedSegment: NSInteger) -> UISegmentedControl{ + let segmentControl = UISegmentedControl(items: items as [AnyObject]) + let dict : Dictionary = [NSFontAttributeName : UIFont(name: CellsFontName, size:15.0)!] + segmentControl.setTitleTextAttributes(dict, forState: .Normal) + segmentControl.selectedSegmentIndex = selectedSegment; + segmentControl.tag = tag; + return segmentControl; + } + +} diff --git a/Barcode Demo/Mobile Barcode Demo/CommonViewController.swift b/Barcode Demo/Mobile Barcode Demo/CommonViewController.swift new file mode 100644 index 0000000..45cd55d --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/CommonViewController.swift @@ -0,0 +1,26 @@ +// +// CommonViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 14/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import Foundation +import UIKit + +extension UIButton { + func ConfigureButton(image imageName: String) { + self.setImage(UIImage(named: imageName), forState: .Normal) + self.setBackgroundImage(UIImage(named: "bluecircle.png"), forState: .Normal) + self.layer.cornerRadius = 30; + self.backgroundColor = UIColor(red: 0, green: 0x79/255, blue: 0xc2/255, alpha: 1.0) //"#0079C2" + } +} + +class CommonViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + } +} \ No newline at end of file diff --git a/Barcode Demo/Mobile Barcode Demo/HomeViewController.swift b/Barcode Demo/Mobile Barcode Demo/HomeViewController.swift new file mode 100644 index 0000000..c7b634c --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/HomeViewController.swift @@ -0,0 +1,102 @@ +// +// HomeViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 15/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class HomeViewController: UIViewController { + + var mobileSdkInitialized: Bool = false + + @IBOutlet var cameraButton : UIButton! + + static let evrsLIcense = PROCESS_PAGE_SDK_LICENSE + + override func viewDidLoad() { + super.viewDidLoad() + + if !mobileSdkInitialized + { + mobileSdkInitialized = true + + let license = kfxKUTLicensing() + let lic = KFX_ERROR_IMAGE_PROCESSOR(rawValue: UInt32(license.setMobileSDKLicense(HomeViewController.evrsLIcense))) + + if lic == KMC_IP_LICENSE_EXPIRED || lic == KMC_IP_LICENSE_INVALID + { + showErrorMessage(lic) + } + } + + NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(applicationIsActive), name: UIApplicationDidBecomeActiveNotification, object: nil) + + cameraButton.ConfigureButton(image: "camera_button_normal.png") + + navigationItem.title = "MobileImage BarCode" + } + + override func viewWillAppear(animated: Bool) { + super.viewWillAppear(animated) + + cameraButton.userInteractionEnabled = !Settings.ExceedLimitation + navigationController?.setNavigationBarHidden(false, animated: true) + } + + func applicationIsActive(notification: NSNotification) { + cameraButton.userInteractionEnabled = !Settings.ExceedLimitation + } + + func showErrorMessage(licenseErrorCode: KFX_ERROR_IMAGE_PROCESSOR) { + let errorCode = Int32(licenseErrorCode.rawValue) + let message = kfxError.findErrMsg(errorCode) + let description = kfxError.findErrDesc(errorCode) + + var alertTitle: String + var alertDescription: String + + let split = message.characters.split {$0 == ":"}.map(String.init) + + if split.count == 2 + { + alertTitle = split[0] + alertDescription = String(format: "%@\n\n%@", split[1], description) + + } + else if split.count > 2 + { + var info = ""; + + for item in split { + info = info.stringByAppendingFormat("%@", item) + } + + alertTitle = split[0] + alertDescription = String(format: "%@\n\n%@", info, description) + } + else + { + alertTitle = "License Error!!!" + alertDescription = String(format: "%@\n\n%@", message, description) + + } + + let alert = UIAlertController(title: alertTitle, message: alertDescription, preferredStyle: .Alert) + alert.addAction(UIAlertAction(title: "OK", style: .Default) { action -> Void in }) + self.presentViewController(alert, animated: true, completion: nil) + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + } + + override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { + let backItem = UIBarButtonItem() + backItem.title = "Back" + navigationItem.backBarButtonItem = backItem + } + +} diff --git a/Barcode Demo/Mobile Barcode Demo/Info.plist b/Barcode Demo/Mobile Barcode Demo/Info.plist new file mode 100644 index 0000000..d86b65d --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + MobileImage + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + + diff --git a/Barcode Demo/Mobile Barcode Demo/LicenseAgreementCell.swift b/Barcode Demo/Mobile Barcode Demo/LicenseAgreementCell.swift new file mode 100644 index 0000000..34b3d70 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/LicenseAgreementCell.swift @@ -0,0 +1,103 @@ +// +// LicenseAgreementCell.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 30/06/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class LicenseAgreementCell: UITableViewCell { + + @IBOutlet var license: UITextView! + + var linkTapGestureRecognizer: UITapGestureRecognizer! + + func makeLink(text: NSMutableAttributedString, linkText: String, linkUrl: String) { + + let linkRange = (text.string as NSString).rangeOfString(linkText) + text.addAttribute(NSLinkAttributeName, value: linkUrl, range: linkRange) + } + + func setupLicenseData() { + + if linkTapGestureRecognizer == nil { + linkTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleLinkTapGestureRecognizer)) + linkTapGestureRecognizer.cancelsTouchesInView = false + linkTapGestureRecognizer.delaysTouchesBegan = false + linkTapGestureRecognizer.delaysTouchesEnded = false + addGestureRecognizer(linkTapGestureRecognizer) + } + + let path = NSBundle.mainBundle().pathForResource("eula", ofType: "rtf") + do { + let text = try String(contentsOfFile: path!, encoding: NSUTF8StringEncoding) + + let eula = try NSMutableAttributedString(data: text.dataUsingEncoding(NSUTF8StringEncoding)!, options: [NSDocumentTypeDocumentAttribute:NSRTFTextDocumentType], documentAttributes: nil) + + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.alignment = NSTextAlignment.Justified + paragraphStyle.hyphenationFactor = 1 + + eula.addAttribute(NSParagraphStyleAttributeName, value: paragraphStyle, range: NSMakeRange(0, eula.length)) + makeLink(eula, linkText: "www.kofax.com", linkUrl: "http://www.kofax.com") + + license.attributedText = eula + } catch { + } + } + + func handleLinkTapGestureRecognizer(tapRecognizer: UITapGestureRecognizer) { + + let view = tapRecognizer.view + let location = tapRecognizer.locationInView(view) + + var linkStr = "" + + if CGRectContainsPoint(license.frame, location) { + linkStr = getLinkOnText(tapRecognizer.locationInView(license), textView: license) + } + + if !linkStr.isEmpty { + let url: NSURL! = NSURL(string: linkStr) + UIApplication.sharedApplication().openURL(url) + } + } + + func getLinkOnText(location: CGPoint, textView: UITextView) -> String { + + var textPosition1 = textView.closestPositionToPoint(location) + var textPosition2:UITextPosition? + if let _ = textPosition1 { + textPosition2 = textView.positionFromPosition(textPosition1!, offset: 1) + if let _ = textPosition2 { + textPosition1 = textView.positionFromPosition(textPosition1!, offset: -1) + textPosition2 = textView.positionFromPosition(textPosition1!, offset: 1) + } else { + return "" + } + } + + let range = textView.textRangeFromPosition(textPosition1!, toPosition: textPosition2!) + let startOffset = textView.offsetFromPosition(textView.beginningOfDocument, toPosition: range!.start) + let endOffset = textView.offsetFromPosition(textView.beginningOfDocument, toPosition: range!.end) + let offsetRange = NSMakeRange(startOffset, endOffset - startOffset) + if offsetRange.location == NSNotFound || offsetRange.length == 0 { + return "" + } + + if NSMaxRange(offsetRange) > textView.attributedText.length { + return "" + } + + let attributedSubstring = textView.attributedText .attributedSubstringFromRange(offsetRange) + let link = attributedSubstring.attribute(NSLinkAttributeName, atIndex: 0, effectiveRange: nil) + + if let linkStr = link { + return linkStr.absoluteString + } + + return "" + } +} diff --git a/Barcode Demo/Mobile Barcode Demo/LicenseAgreementViewController.swift b/Barcode Demo/Mobile Barcode Demo/LicenseAgreementViewController.swift new file mode 100644 index 0000000..2a691a2 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/LicenseAgreementViewController.swift @@ -0,0 +1,43 @@ +// +// LicenseAgreementViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 30/06/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class LicenseAgreementViewController: UITableViewController { + + static let cellIdentifier = "LicenseCell" + + override func viewDidLoad() { + super.viewDidLoad() + + tableView.estimatedRowHeight = 100.0; + tableView.rowHeight = UITableViewAutomaticDimension; + + tableView.setNeedsLayout() + tableView.layoutIfNeeded() + } + + override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + return 1 + } + + override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 1 + } + + override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + let cell: LicenseAgreementCell! = tableView.dequeueReusableCellWithIdentifier(LicenseAgreementViewController.cellIdentifier) as! LicenseAgreementCell! + + cell.setupLicenseData() + + cell.selectionStyle = .None + + return cell + } + +} diff --git a/Barcode Demo/Mobile Barcode Demo/PreviewBarcodeViewController.swift b/Barcode Demo/Mobile Barcode Demo/PreviewBarcodeViewController.swift new file mode 100644 index 0000000..f4d71f2 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/PreviewBarcodeViewController.swift @@ -0,0 +1,218 @@ +// +// PreviewImageViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 10/05/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit +import MessageUI + +class PreviewBarcodeViewController: UITableViewController, MFMailComposeViewControllerDelegate { + + static let barcodeImageCellIdentifier = "BarcodeImageCellIdentifier" + static let barcodeInfoCellIdentifier = "BarcodeInfoCell" + + var buttonsView : UIView! + @IBOutlet var retakeButton : UIButton! + @IBOutlet var sendMailButton : UIButton! + + var barcodeInfo : BarcodeInfo? + + override func viewDidLoad() { + super.viewDidLoad() + + retakeButton = UIButton(frame: CGRectMake(0, 5, 60, 60)) + sendMailButton = UIButton(frame: CGRectMake(0, 5, 60, 60)) + + retakeButton.ConfigureButton(image: "camera_button_normal.png") + retakeButton.addTarget(self, action: #selector(onRetakePicture), forControlEvents: .TouchUpInside) + sendMailButton.ConfigureButton(image: "email.png") + sendMailButton.addTarget(self, action: #selector(onSendImageByMail), forControlEvents: .TouchUpInside) + + let closeButton = UIBarButtonItem(title: "Close", style: .Done, target: self, action: #selector(onClosePreview)) + navigationItem.rightBarButtonItem = closeButton + + sendMailButton.enabled = MFMailComposeViewController.canSendMail() + + navigationItem.setHidesBackButton(true, animated: true); + + tableView.rowHeight = UITableViewAutomaticDimension + + tableView.separatorStyle = .None + + tableView.estimatedRowHeight = 70.0; + tableView.rowHeight = UITableViewAutomaticDimension; + + tableView.setNeedsLayout() + tableView.layoutIfNeeded() + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + } + + @IBAction func onSendImageByMail() { + + if !MFMailComposeViewController.canSendMail() { + return + } + + let mailComposeVC = MFMailComposeViewController() + mailComposeVC.mailComposeDelegate = self + + mailComposeVC.setSubject("Email Subject") + + var mailBody: String = "" + + if let bcInfo = barcodeInfo { + var barcodeValue = bcInfo.barcode.value + if bcInfo.barcode.dataFormat == KEDBarcodeDataFormats.init(2) { + let data = NSData(base64EncodedString: bcInfo.barcode.value, options: NSDataBase64DecodingOptions(rawValue: 0)) + barcodeValue = String(data: data!, encoding: NSUTF8StringEncoding)! + } + + mailBody = "" + + "" + + "

Barcode information:

" + + "

type: \(BarcodeTypes.BarcodeTypeToString(bcInfo.barcode.type))

" + + "

value: \(barcodeValue)

" + + "" + + "" + } else { + mailBody = String(format: "

Barcode information is unavailable.

") + } + + mailComposeVC.setMessageBody(mailBody, isHTML: true) + + self.presentViewController(mailComposeVC, animated: true, completion: nil) + + } + + @IBAction func onRetakePicture() { + navigationController?.popViewControllerAnimated(false) + } + + @IBAction func onClosePreview() { + let confirmAlert = UIAlertController(title: "", message: "Are you sure to close?", preferredStyle: .Alert) + confirmAlert.addAction(UIAlertAction(title: "OK", style: .Default, handler: { (action) in + self.navigationController?.popToRootViewControllerAnimated(true) + })) + confirmAlert.addAction(UIAlertAction(title: "Cancel", style: .Default, handler: nil)) + + self.presentViewController(confirmAlert, animated: true, completion: nil) + } + + func mailComposeController(controller: MFMailComposeViewController, didFinishWithResult result: MFMailComposeResult, error: NSError?) { + switch (result) { + case MFMailComposeResultSent: + print("Email sent") + break + + default: + print("\(result)") + } + + self.dismissViewControllerAnimated(true, completion: nil) + } + + // MARK: - Table view data source + + override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + return 1 + } + + override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 2 + } + + func createPreviewCell(tableView: UITableView) -> UITableViewCell { + var cell: UITableViewCell! = tableView.dequeueReusableCellWithIdentifier(PreviewBarcodeViewController.barcodeImageCellIdentifier) + if cell == nil { + cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: PreviewBarcodeViewController.barcodeImageCellIdentifier) + } + + var image : UIImage? = nil + if let bcInfo = barcodeInfo where bcInfo.image != nil { + image = bcInfo.image?.getImageBitmap() + } + + let imageView = UIImageView(image: image) + + imageView.contentMode = .ScaleAspectFill + imageView.frame = CGRectMake(0,0,tableView.bounds.width, tableView.frame.height) + cell.addSubview(imageView) + var frame = cell.bounds + frame.size.height = tableView.frame.height + cell.bounds = frame + + return cell + } + + func createBarcodeInfoCell(tableView: UITableView) -> UITableViewCell { + let bcCell: BarcodeInfoCell! = tableView.dequeueReusableCellWithIdentifier(PreviewBarcodeViewController.barcodeInfoCellIdentifier) as! BarcodeInfoCell! + + if let bcInfo = barcodeInfo { + bcCell.setupBarcodeInfoCell(bcInfo) + } + + return bcCell + } + + override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + + var cell: UITableViewCell! + + if indexPath.row == 0 + { + cell = createBarcodeInfoCell(tableView) + } else { + cell = createPreviewCell(tableView) + } + + cell.accessoryType = .None + cell.selectionStyle = .None + + return cell + } + + override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { + if (indexPath.row == 0) { + return -1 + } + + return tableView.frame.height + } + + override func tableView(tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { + if section == 0 { + return 70 + } + + return 0 + } + + override func tableView(tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { + if section == 0 { + if buttonsView == nil { + buttonsView = UIView(frame: CGRectMake(0, 0, tableView.frame.width, 70)) + + var retakeButtonFrame = retakeButton.frame + retakeButtonFrame.origin.x = buttonsView.frame.width / 4 - retakeButtonFrame.width / 2 + retakeButton.frame = retakeButtonFrame + + var sendMailButtonFrame = sendMailButton.frame + sendMailButtonFrame.origin.x = buttonsView.frame.width / 4 * 3 - sendMailButtonFrame.width / 2 + sendMailButton.frame = sendMailButtonFrame + + buttonsView.addSubview(retakeButton) + buttonsView.addSubview(sendMailButton) + } + + return buttonsView + } + + return nil + } +} diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/bluecircle.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/bluecircle.png new file mode 100755 index 0000000..162a96a Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/bluecircle.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/bluecircle@2x.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/bluecircle@2x.png new file mode 100755 index 0000000..f6361f4 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/bluecircle@2x.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/camera@2x.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/camera@2x.png new file mode 100755 index 0000000..5fc5e2a Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/camera@2x.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/camera_button_normal.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/camera_button_normal.png new file mode 100755 index 0000000..892d2e3 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/camera_button_normal.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/close@2x.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/close@2x.png new file mode 100755 index 0000000..fdd3938 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/close@2x.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/email.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/email.png new file mode 100755 index 0000000..502c7fb Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/email.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/email@2x.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/email@2x.png new file mode 100755 index 0000000..c115b2b Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/email@2x.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/gallery@2x.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/gallery@2x.png new file mode 100755 index 0000000..ae0effd Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/gallery@2x.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/logo.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/logo.png new file mode 100644 index 0000000..75be9d5 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/logo.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/settings_icon.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/settings_icon.png new file mode 100755 index 0000000..a3b3340 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/settings_icon.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/settings_icon@2x.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/settings_icon@2x.png new file mode 100755 index 0000000..a3b3340 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/settings_icon@2x.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/torch_off@2x.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/torch_off@2x.png new file mode 100755 index 0000000..b79d622 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/torch_off@2x.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/Resources/Images/torchon@2x.png b/Barcode Demo/Mobile Barcode Demo/Resources/Images/torchon@2x.png new file mode 100755 index 0000000..99ba911 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/Resources/Images/torchon@2x.png differ diff --git a/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/Info.plist b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/Info.plist new file mode 100644 index 0000000..2bb341c Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/Info.plist differ diff --git a/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/de.lproj/SDKStrings.strings b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/de.lproj/SDKStrings.strings new file mode 100644 index 0000000..8b2aec5 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/de.lproj/SDKStrings.strings differ diff --git a/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/en.lproj/SDKStrings.strings b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/en.lproj/SDKStrings.strings new file mode 100644 index 0000000..26947fe Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/en.lproj/SDKStrings.strings differ diff --git a/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/es.lproj/SDKStrings.strings b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/es.lproj/SDKStrings.strings new file mode 100644 index 0000000..19ce56d Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/es.lproj/SDKStrings.strings differ diff --git a/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/fr.lproj/SDKStrings.strings b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/fr.lproj/SDKStrings.strings new file mode 100644 index 0000000..b277c86 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/fr.lproj/SDKStrings.strings differ diff --git a/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/it.lproj/SDKStrings.strings b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/it.lproj/SDKStrings.strings new file mode 100644 index 0000000..a0d80de Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/it.lproj/SDKStrings.strings differ diff --git a/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/pt.lproj/SDKStrings.strings b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/pt.lproj/SDKStrings.strings new file mode 100644 index 0000000..e952983 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/SDKStrings.bundle/pt.lproj/SDKStrings.strings differ diff --git a/Barcode Demo/Mobile Barcode Demo/Settings.swift b/Barcode Demo/Mobile Barcode Demo/Settings.swift new file mode 100644 index 0000000..efb252c --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/Settings.swift @@ -0,0 +1,107 @@ +// +// Settings.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 01/05/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import Foundation + +class Settings { + + static let MaxUsagesPerMonth = 100 // set to -1 to disable usage limitation + + static var ExceedLimitation = false + + // Barcode settings + var barcodes : [Bool] = [Bool](count: 11, repeatedValue: true) + + static let BarcodeSettingsKey = "Barcodes" + + static let ShotsCounterKey = "UsageCounter" + static let UsageUpdateDateKey = "UsageUpdateDate" + + func load() { + + let userDefaults = NSUserDefaults.standardUserDefaults() + + let bc = userDefaults.arrayForKey(Settings.BarcodeSettingsKey) + if let configuredBarcodes = bc { + for (index,value) in configuredBarcodes.enumerate() { + if let enabled = value.boolValue { + barcodes[index] = enabled + } + } + } + } + + func save() { + + let userDefaults = NSUserDefaults.standardUserDefaults() + + userDefaults.setObject(barcodes, forKey: Settings.BarcodeSettingsKey) + + userDefaults.synchronize() + } + + static func MonthOfDate(date: NSDate) -> Int { + + let calendar = NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian) + let dateComponents = calendar?.components(NSCalendarUnit.Month, fromDate: date) + if let components = dateComponents { + return components.month + } + return -1 + } + + static func validateLimitation() { + if Settings.MaxUsagesPerMonth == -1 { + return + } + + let userDefaults = NSUserDefaults.standardUserDefaults() + let keys = userDefaults.dictionaryRepresentation().keys + + var exceeded = false + if keys.contains(Settings.ShotsCounterKey) && keys.contains(Settings.UsageUpdateDateKey) { + let lastDateInterval : Int = userDefaults.integerForKey(Settings.UsageUpdateDateKey) + + let lastDateMonth = MonthOfDate(NSDate(timeIntervalSince1970: NSTimeInterval(lastDateInterval))) + let todaysMonth = MonthOfDate(NSDate()) + + if lastDateMonth == todaysMonth { + let shotsCounter = userDefaults.integerForKey(Settings.ShotsCounterKey) + exceeded = shotsCounter >= Settings.MaxUsagesPerMonth + } + } + + ExceedLimitation = exceeded + } + + static func updateLimitationCounter() { + if Settings.MaxUsagesPerMonth == -1 { + return + } + + let userDefaults = NSUserDefaults.standardUserDefaults() + let keys = userDefaults.dictionaryRepresentation().keys + var shotsCounter = 0 + + if keys.contains(Settings.ShotsCounterKey) && keys.contains(Settings.UsageUpdateDateKey) { + let lastDateInterval : Int = userDefaults.integerForKey(Settings.UsageUpdateDateKey) + + let lastDateMonth = MonthOfDate(NSDate(timeIntervalSince1970: NSTimeInterval(lastDateInterval))) + let todaysMonth = MonthOfDate(NSDate()) + + if lastDateMonth == todaysMonth { + shotsCounter = userDefaults.integerForKey(Settings.ShotsCounterKey) + } + } + + shotsCounter += 1 + + userDefaults.setInteger(shotsCounter, forKey: Settings.ShotsCounterKey) + userDefaults.setInteger(Int(NSDate().timeIntervalSince1970), forKey: Settings.UsageUpdateDateKey) + } +} diff --git a/Barcode Demo/Mobile Barcode Demo/SettingsTableViewController.swift b/Barcode Demo/Mobile Barcode Demo/SettingsTableViewController.swift new file mode 100644 index 0000000..556fc86 --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/SettingsTableViewController.swift @@ -0,0 +1,81 @@ +// +// SettingsTableViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 15/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class SettingsTableViewController: UITableViewController { + + static let cellIdentifier = "SettingsCellIdentifier" + static let SegueBarcodesSettingsViewController = "BarcodesSettingsViewController" + static let SegueAboutViewController = "AboutViewController" + static let SegueLicenseAgreementViewController = "LicenseAgreementViewController" + + override func viewDidLoad() { + super.viewDidLoad() + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + } + + // MARK: - Table view data source + + override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + return 1 + } + + override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 3 + } + + override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + var cell: UITableViewCell! = tableView.dequeueReusableCellWithIdentifier(SettingsTableViewController.cellIdentifier) + if cell == nil { + cell = UITableViewCell(style: .Default, reuseIdentifier: SettingsTableViewController.cellIdentifier) + } + + if indexPath.row == 0 + { + cell.textLabel?.text = "Symbologies" + } else if indexPath.row == 1 + { + cell.textLabel?.text = "About" + } else if indexPath.row == 2 { + cell.textLabel?.text = "License Agreement" + } + + cell.accessoryType = .DisclosureIndicator + + return cell!; + } + + override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { + + var segueName : String = "" + switch indexPath.row + { + case 0: + segueName = SettingsTableViewController.SegueBarcodesSettingsViewController + break + + case 1: + segueName = SettingsTableViewController.SegueAboutViewController + break + + case 2: + segueName = SettingsTableViewController.SegueLicenseAgreementViewController + break + + default: + assert(false) + } + + performSegueWithIdentifier(segueName, sender: self) + tableView.deselectRowAtIndexPath(indexPath, animated: true) + } +} diff --git a/Barcode Demo/Mobile Barcode Demo/beep-29.wav b/Barcode Demo/Mobile Barcode Demo/beep-29.wav new file mode 100644 index 0000000..4daff85 Binary files /dev/null and b/Barcode Demo/Mobile Barcode Demo/beep-29.wav differ diff --git a/Barcode Demo/Mobile Barcode Demo/eula.rtf b/Barcode Demo/Mobile Barcode Demo/eula.rtf new file mode 100644 index 0000000..c8b7fdf --- /dev/null +++ b/Barcode Demo/Mobile Barcode Demo/eula.rtf @@ -0,0 +1,26 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 ArialMT;} +{\colortbl;\red255\green255\blue255;\red0\green0\blue255;} +{\info +{\author Peter Lawrence} +{\*\company Kofax, Inc.}}\margl720\margr720\margb720\margt720\viewkind1 +\deftab720 +\pard\pardeftab720\ri0\sb100\sa100\partightenfactor0 + +\f0\fs20 \cf0 This End-User License Agreement (\'93Agreement\'94) governs your use of the Atalasoft Mobile Application software (\'93Software\'94) provided by Atalasoft, Inc and its affiliates (\'93Atalasoft\'94). Your use of the Software constitutes your acceptance of the terms of this Agreement. Your use of the Software is also subject to the signed agreement between Atalasoft and your employer or in the absence of a signed agreement, Atalasoft\'92s standard license terms as made available at {\field{\*\fldinst{HYPERLINK "http://www.Kofax.com"}}{\fldrslt \cf2 \ul \ulc2 www.Kofax.com}}.\ +\pard\pardeftab720\ri0\sb100\sa100\partightenfactor0 + +\b \cf0 1. License. +\b0 Atalasoft grants to you a nontransferable, nonexclusive, license to install and use one copy of the Software, in object code form only, solely on your mobile device. You agree to the following license restrictions: (a) to not duplicate, copy or redistribute the Software except as necessary for use on your mobile device; and (b) to not modify, translate, make derivative works of, disassemble, reverse engineer or otherwise use the Software in order to build competitive technologies or for competitive benchmark purposes.\ + +\b 2. Generally. +\b0 You agree that Atalasoft shall not have any liability to you for your use of the Software, including not limited to your access or creation of content using the Software. By using the Software, you acknowledge and agree that Atalasoft is not responsible for examining or evaluating the content, accuracy, completeness, timeliness, validity, copyright compliance, legality, decency, quality or any other aspect of the content accessed or created by You You further agree not to use the Software to infringe or violate the rights of any other party, and that Atalasoft is not in any way responsible for any such use by you. \ +Atalasoft reserves the right to change, terminate, or disable access to the Software as is reasonably necessary to ensure compliance with this Agreement. In no event will Atalasoft be liable for the change, removal of, termination, or disabling of access to the Software. \ + +\b 3. Limitation Of Liability. +\b0 To the extent not prohibited by law, in no event shall Atalasoft be liable for personal injury, or any incidental, special, indirect or consequential damages, including, without limitation, damages for loss of profits, loss of data, business interruption or any other commercial damages or losses, arising out of or related to your use or inability to use the Software or Services, however caused, regardless of the theory of liability (contract, tort or otherwise) and even if Atalasoft has been advised of the possibility of such damages. In no event shall Atalasoft\'92s total liability to you for all damages (other than as may be required by applicable law in cases involving personal injury) exceed the amount price paid for the Software, if any. The foregoing limitations will apply even if the above stated remedy fails of its essential purpose.\ +Some jurisdictions do not allow the limitation of liability for personal injury, or of incidental or consequential damages, so this limitation may not apply to you.\ + +\b 4. Indemnification By You. +\b0 You agree to indemnify and hold Atalasoft, its subsidiaries, and affiliates, and their respective officers, agents, partners and employees, harmless from any loss, liability, claim or demand, including reasonable attorney\'92s fees, made by any third party due to or arising out of your use of the Software in violation of this Agreement, and in the event that any content accessed or created by you causes Atalasoft to be liable to another.\ +} \ No newline at end of file diff --git a/Barcode Demo/Mobile-Barcode-Demo-Bridging-Header.h b/Barcode Demo/Mobile-Barcode-Demo-Bridging-Header.h new file mode 100755 index 0000000..c230063 --- /dev/null +++ b/Barcode Demo/Mobile-Barcode-Demo-Bridging-Header.h @@ -0,0 +1,20 @@ +// +// Mobile-Capture-Demo-Bridging-Header.h +// Mobile Capture Demo +// +// Created by Michael Chernikov on 15/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +#ifndef Mobile_Barcode_Demo_Bridging_Header_h +#define Mobile_Barcode_Demo_Bridging_Header_h + +#import "../kfxEVRS_License.h" +#import "MobileSDK.h" +#import "kfxLibEngines/kfxEngines.h" +#import "kfxLibEngines/kfxKUTErrorInfo.h" +#import "kfxLibEngines/kfxKEDBarcodeResult.h" +#import "kfxLibUIControls/kfxUIControls.h" +#import "kfxLibUtilities/kfxUtilities.h" + +#endif /* Mobile_Barcode_Demo_Bridging_Header_h */ diff --git a/Barcode Demo/MobileBarcode.plist b/Barcode Demo/MobileBarcode.plist new file mode 100644 index 0000000..f862a9d --- /dev/null +++ b/Barcode Demo/MobileBarcode.plist @@ -0,0 +1,12 @@ + + + + + method + app-store + teamID + B9C7GRQCYQ + uploadSymbols + + + \ No newline at end of file diff --git a/Capture Demo/Mobile Capture Demo.xcodeproj/project.pbxproj b/Capture Demo/Mobile Capture Demo.xcodeproj/project.pbxproj new file mode 100644 index 0000000..f5befde --- /dev/null +++ b/Capture Demo/Mobile Capture Demo.xcodeproj/project.pbxproj @@ -0,0 +1,560 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + B208E2541CEDBF6C0053F137 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = B208E2531CEDBF6C0053F137 /* logo.png */; }; + B208E2561CEDD6E60053F137 /* BaseSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B208E2551CEDD6E60053F137 /* BaseSettingsViewController.swift */; }; + B2092DB01D24EC0D00479F14 /* LicenseAgreementViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2092DAF1D24EC0D00479F14 /* LicenseAgreementViewController.swift */; }; + B2092DB21D24EC7D00479F14 /* LicenseAgreementCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2092DB11D24EC7D00479F14 /* LicenseAgreementCell.swift */; }; + B2493A901CD6241C000D6F2E /* Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2493A8F1CD6241C000D6F2E /* Settings.swift */; }; + B268FA6A1D0A844700937D29 /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B268FA691D0A844700937D29 /* AboutViewController.swift */; }; + B278169C1CE9DB2F00F90AAA /* bluecircle.png in Resources */ = {isa = PBXBuildFile; fileRef = B278169A1CE9DB2F00F90AAA /* bluecircle.png */; }; + B278169D1CE9DB2F00F90AAA /* bluecircle@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B278169B1CE9DB2F00F90AAA /* bluecircle@2x.png */; }; + B278169F1CE9E20400F90AAA /* camera_button_normal.png in Resources */ = {isa = PBXBuildFile; fileRef = B278169E1CE9E20400F90AAA /* camera_button_normal.png */; }; + B27816A11CEB281400F90AAA /* PhotoAlbum.swift in Sources */ = {isa = PBXBuildFile; fileRef = B27816A01CEB281400F90AAA /* PhotoAlbum.swift */; }; + B27BD4411D38B8FD00943531 /* eula.rtf in Resources */ = {isa = PBXBuildFile; fileRef = B27BD4401D38B8FD00943531 /* eula.rtf */; }; + B280628B1D1BDE79009DD03D /* AboutCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B280628A1D1BDE79009DD03D /* AboutCell.swift */; }; + B28062951D20FE0A009DD03D /* MobileSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B28062921D20FE0A009DD03D /* MobileSDK.framework */; }; + B28062961D20FE0A009DD03D /* SDKStrings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = B28062931D20FE0A009DD03D /* SDKStrings.bundle */; }; + B28062971D20FE0A009DD03D /* uiimages.bundle in Resources */ = {isa = PBXBuildFile; fileRef = B28062941D20FE0A009DD03D /* uiimages.bundle */; }; + B29A30E01CC0AC5B007BA18C /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B29A30DF1CC0AC5B007BA18C /* HomeViewController.swift */; }; + B29A30E51CC0B6B2007BA18C /* settings_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = B29A30E31CC0B6B2007BA18C /* settings_icon.png */; }; + B29A30E61CC0B6B2007BA18C /* settings_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B29A30E41CC0B6B2007BA18C /* settings_icon@2x.png */; }; + B29A30E81CC0B7E5007BA18C /* SettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B29A30E71CC0B7E5007BA18C /* SettingsTableViewController.swift */; }; + B29A30EA1CC0BB5C007BA18C /* CaptureViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B29A30E91CC0BB5C007BA18C /* CaptureViewController.swift */; }; + B29A31061CC0C709007BA18C /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A31051CC0C709007BA18C /* QuartzCore.framework */; }; + B29A31081CC0C74B007BA18C /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A31071CC0C74B007BA18C /* AVFoundation.framework */; }; + B29A31131CC0C7BD007BA18C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A31091CC0C7BD007BA18C /* CoreGraphics.framework */; }; + B29A31141CC0C7BD007BA18C /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A310A1CC0C7BD007BA18C /* CoreLocation.framework */; }; + B29A31151CC0C7BD007BA18C /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A310B1CC0C7BD007BA18C /* CoreMedia.framework */; }; + B29A31161CC0C7BD007BA18C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A310C1CC0C7BD007BA18C /* CoreMotion.framework */; }; + B29A31171CC0C7BD007BA18C /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A310D1CC0C7BD007BA18C /* CoreVideo.framework */; }; + B29A31181CC0C7BD007BA18C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A310E1CC0C7BD007BA18C /* Foundation.framework */; }; + B29A31191CC0C7BD007BA18C /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A310F1CC0C7BD007BA18C /* libc++.tbd */; }; + B29A311A1CC0C7BD007BA18C /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A31101CC0C7BD007BA18C /* libxml2.tbd */; }; + B29A311B1CC0C7BD007BA18C /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A31111CC0C7BD007BA18C /* libz.tbd */; }; + B29A311C1CC0C7BD007BA18C /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A31121CC0C7BD007BA18C /* SystemConfiguration.framework */; }; + B29A31231CC0C7E6007BA18C /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A311D1CC0C7E6007BA18C /* AssetsLibrary.framework */; }; + B29A31241CC0C7E6007BA18C /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A311E1CC0C7E6007BA18C /* AudioToolbox.framework */; }; + B29A31251CC0C7E6007BA18C /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A311F1CC0C7E6007BA18C /* MobileCoreServices.framework */; }; + B29A31261CC0C7E6007BA18C /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A31201CC0C7E6007BA18C /* OpenGLES.framework */; }; + B29A31271CC0C7E6007BA18C /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A31211CC0C7E6007BA18C /* Security.framework */; }; + B29A31281CC0C7E6007BA18C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B29A31221CC0C7E6007BA18C /* UIKit.framework */; }; + B29A312D1CC0D990007BA18C /* close@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B29A312C1CC0D990007BA18C /* close@2x.png */; }; + B29A312F1CC0E06F007BA18C /* camera@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B29A312E1CC0E06F007BA18C /* camera@2x.png */; }; + B29A31311CC1408B007BA18C /* CameraSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B29A31301CC1408B007BA18C /* CameraSettingsViewController.swift */; }; + B29A31331CC143EA007BA18C /* ImageProcessorSettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B29A31321CC143EA007BA18C /* ImageProcessorSettingsTableViewController.swift */; }; + B2B4461E1D06B22C002C79E5 /* useImage@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2B4461D1D06B22C002C79E5 /* useImage@2x.png */; }; + B2B446221D06CEA6002C79E5 /* WaitingIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2B446211D06CEA6002C79E5 /* WaitingIndicator.swift */; }; + B2C6AF9B1CBFB8EE00D19076 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C6AF9A1CBFB8EE00D19076 /* AppDelegate.swift */; }; + B2C6AFA01CBFB8EE00D19076 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2C6AF9E1CBFB8EE00D19076 /* Main.storyboard */; }; + B2C6AFA21CBFB8EE00D19076 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2C6AFA11CBFB8EE00D19076 /* Assets.xcassets */; }; + B2C6AFA51CBFB8EE00D19076 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B2C6AFA31CBFB8EE00D19076 /* LaunchScreen.storyboard */; }; + B2C6AFC91CBFBB7000D19076 /* CommonViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C6AFC81CBFBB7000D19076 /* CommonViewController.swift */; }; + B2CBE9CF1CDB9FCF0075BEE8 /* torch_off@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CBE9CD1CDB9FCF0075BEE8 /* torch_off@2x.png */; }; + B2CBE9D01CDB9FCF0075BEE8 /* torchon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CBE9CE1CDB9FCF0075BEE8 /* torchon@2x.png */; }; + B2CBE9D21CE194CE0075BEE8 /* PreviewImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2CBE9D11CE194CE0075BEE8 /* PreviewImageViewController.swift */; }; + B2CBE9D51CE199880075BEE8 /* email.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CBE9D31CE199880075BEE8 /* email.png */; }; + B2CBE9D61CE199880075BEE8 /* email@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CBE9D41CE199880075BEE8 /* email@2x.png */; }; + B2CBE9D81CE1999C0075BEE8 /* gallery@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B2CBE9D71CE1999C0075BEE8 /* gallery@2x.png */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + B208E2531CEDBF6C0053F137 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = ""; }; + B208E2551CEDD6E60053F137 /* BaseSettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseSettingsViewController.swift; sourceTree = ""; }; + B2092DAF1D24EC0D00479F14 /* LicenseAgreementViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LicenseAgreementViewController.swift; sourceTree = ""; }; + B2092DB11D24EC7D00479F14 /* LicenseAgreementCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LicenseAgreementCell.swift; sourceTree = ""; }; + B2493A8F1CD6241C000D6F2E /* Settings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Settings.swift; sourceTree = ""; }; + B268FA691D0A844700937D29 /* AboutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = ""; }; + B278169A1CE9DB2F00F90AAA /* bluecircle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bluecircle.png; sourceTree = ""; }; + B278169B1CE9DB2F00F90AAA /* bluecircle@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bluecircle@2x.png"; sourceTree = ""; }; + B278169E1CE9E20400F90AAA /* camera_button_normal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = camera_button_normal.png; sourceTree = ""; }; + B27816A01CEB281400F90AAA /* PhotoAlbum.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhotoAlbum.swift; sourceTree = ""; }; + B27BD4401D38B8FD00943531 /* eula.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; path = eula.rtf; sourceTree = ""; }; + B280628A1D1BDE79009DD03D /* AboutCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AboutCell.swift; sourceTree = ""; }; + B28062921D20FE0A009DD03D /* MobileSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileSDK.framework; path = ../MobileSDK/MobileSDK.framework; sourceTree = ""; }; + B28062931D20FE0A009DD03D /* SDKStrings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = SDKStrings.bundle; path = ../MobileSDK/SDKStrings.bundle; sourceTree = ""; }; + B28062941D20FE0A009DD03D /* uiimages.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = uiimages.bundle; path = ../MobileSDK/uiimages.bundle; sourceTree = ""; }; + B29A30DF1CC0AC5B007BA18C /* HomeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; + B29A30E31CC0B6B2007BA18C /* settings_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = settings_icon.png; sourceTree = ""; }; + B29A30E41CC0B6B2007BA18C /* settings_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "settings_icon@2x.png"; sourceTree = ""; }; + B29A30E71CC0B7E5007BA18C /* SettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewController.swift; sourceTree = ""; }; + B29A30E91CC0BB5C007BA18C /* CaptureViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CaptureViewController.swift; sourceTree = ""; }; + B29A31051CC0C709007BA18C /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + B29A31071CC0C74B007BA18C /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + B29A31091CC0C7BD007BA18C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + B29A310A1CC0C7BD007BA18C /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + B29A310B1CC0C7BD007BA18C /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + B29A310C1CC0C7BD007BA18C /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; + B29A310D1CC0C7BD007BA18C /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; + B29A310E1CC0C7BD007BA18C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + B29A310F1CC0C7BD007BA18C /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; + B29A31101CC0C7BD007BA18C /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; }; + B29A31111CC0C7BD007BA18C /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + B29A31121CC0C7BD007BA18C /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + B29A311D1CC0C7E6007BA18C /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; + B29A311E1CC0C7E6007BA18C /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + B29A311F1CC0C7E6007BA18C /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; + B29A31201CC0C7E6007BA18C /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + B29A31211CC0C7E6007BA18C /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; + B29A31221CC0C7E6007BA18C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + B29A31291CC0C8F4007BA18C /* Mobile-Capture-Demo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "Mobile-Capture-Demo-Bridging-Header.h"; path = "../Mobile-Capture-Demo-Bridging-Header.h"; sourceTree = ""; }; + B29A312C1CC0D990007BA18C /* close@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "close@2x.png"; sourceTree = ""; }; + B29A312E1CC0E06F007BA18C /* camera@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "camera@2x.png"; sourceTree = ""; }; + B29A31301CC1408B007BA18C /* CameraSettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CameraSettingsViewController.swift; sourceTree = ""; }; + B29A31321CC143EA007BA18C /* ImageProcessorSettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageProcessorSettingsTableViewController.swift; sourceTree = ""; }; + B2B4461D1D06B22C002C79E5 /* useImage@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "useImage@2x.png"; sourceTree = ""; }; + B2B446211D06CEA6002C79E5 /* WaitingIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WaitingIndicator.swift; sourceTree = ""; }; + B2C6AF971CBFB8EE00D19076 /* Mobile Capture Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mobile Capture Demo.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + B2C6AF9A1CBFB8EE00D19076 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + B2C6AF9F1CBFB8EE00D19076 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + B2C6AFA11CBFB8EE00D19076 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + B2C6AFA41CBFB8EE00D19076 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + B2C6AFA61CBFB8EE00D19076 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B2C6AFC81CBFBB7000D19076 /* CommonViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommonViewController.swift; sourceTree = ""; }; + B2CBE9CD1CDB9FCF0075BEE8 /* torch_off@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "torch_off@2x.png"; sourceTree = ""; }; + B2CBE9CE1CDB9FCF0075BEE8 /* torchon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "torchon@2x.png"; sourceTree = ""; }; + B2CBE9D11CE194CE0075BEE8 /* PreviewImageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreviewImageViewController.swift; sourceTree = ""; }; + B2CBE9D31CE199880075BEE8 /* email.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = email.png; sourceTree = ""; }; + B2CBE9D41CE199880075BEE8 /* email@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "email@2x.png"; sourceTree = ""; }; + B2CBE9D71CE1999C0075BEE8 /* gallery@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gallery@2x.png"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B2C6AF941CBFB8EE00D19076 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B29A31231CC0C7E6007BA18C /* AssetsLibrary.framework in Frameworks */, + B29A31241CC0C7E6007BA18C /* AudioToolbox.framework in Frameworks */, + B29A31251CC0C7E6007BA18C /* MobileCoreServices.framework in Frameworks */, + B29A31261CC0C7E6007BA18C /* OpenGLES.framework in Frameworks */, + B29A31271CC0C7E6007BA18C /* Security.framework in Frameworks */, + B29A31281CC0C7E6007BA18C /* UIKit.framework in Frameworks */, + B29A31131CC0C7BD007BA18C /* CoreGraphics.framework in Frameworks */, + B29A31141CC0C7BD007BA18C /* CoreLocation.framework in Frameworks */, + B29A31151CC0C7BD007BA18C /* CoreMedia.framework in Frameworks */, + B29A31161CC0C7BD007BA18C /* CoreMotion.framework in Frameworks */, + B29A31171CC0C7BD007BA18C /* CoreVideo.framework in Frameworks */, + B29A31181CC0C7BD007BA18C /* Foundation.framework in Frameworks */, + B29A31191CC0C7BD007BA18C /* libc++.tbd in Frameworks */, + B29A311A1CC0C7BD007BA18C /* libxml2.tbd in Frameworks */, + B29A311B1CC0C7BD007BA18C /* libz.tbd in Frameworks */, + B29A311C1CC0C7BD007BA18C /* SystemConfiguration.framework in Frameworks */, + B29A31081CC0C74B007BA18C /* AVFoundation.framework in Frameworks */, + B29A31061CC0C709007BA18C /* QuartzCore.framework in Frameworks */, + B28062951D20FE0A009DD03D /* MobileSDK.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B29A30E11CC0B6B2007BA18C /* Resources */ = { + isa = PBXGroup; + children = ( + B29A30E21CC0B6B2007BA18C /* Images */, + ); + name = Resources; + path = "Mobile Capture Demo/Resources"; + sourceTree = ""; + }; + B29A30E21CC0B6B2007BA18C /* Images */ = { + isa = PBXGroup; + children = ( + B2B4461D1D06B22C002C79E5 /* useImage@2x.png */, + B208E2531CEDBF6C0053F137 /* logo.png */, + B278169E1CE9E20400F90AAA /* camera_button_normal.png */, + B278169A1CE9DB2F00F90AAA /* bluecircle.png */, + B278169B1CE9DB2F00F90AAA /* bluecircle@2x.png */, + B2CBE9D71CE1999C0075BEE8 /* gallery@2x.png */, + B2CBE9D31CE199880075BEE8 /* email.png */, + B2CBE9D41CE199880075BEE8 /* email@2x.png */, + B2CBE9CD1CDB9FCF0075BEE8 /* torch_off@2x.png */, + B2CBE9CE1CDB9FCF0075BEE8 /* torchon@2x.png */, + B29A312E1CC0E06F007BA18C /* camera@2x.png */, + B29A312C1CC0D990007BA18C /* close@2x.png */, + B29A30E31CC0B6B2007BA18C /* settings_icon.png */, + B29A30E41CC0B6B2007BA18C /* settings_icon@2x.png */, + ); + path = Images; + sourceTree = ""; + }; + B29A312A1CC0CFD7007BA18C /* Frameworks */ = { + isa = PBXGroup; + children = ( + B28062921D20FE0A009DD03D /* MobileSDK.framework */, + B28062931D20FE0A009DD03D /* SDKStrings.bundle */, + B28062941D20FE0A009DD03D /* uiimages.bundle */, + B29A311D1CC0C7E6007BA18C /* AssetsLibrary.framework */, + B29A311E1CC0C7E6007BA18C /* AudioToolbox.framework */, + B29A311F1CC0C7E6007BA18C /* MobileCoreServices.framework */, + B29A31201CC0C7E6007BA18C /* OpenGLES.framework */, + B29A31211CC0C7E6007BA18C /* Security.framework */, + B29A31221CC0C7E6007BA18C /* UIKit.framework */, + B29A31091CC0C7BD007BA18C /* CoreGraphics.framework */, + B29A310A1CC0C7BD007BA18C /* CoreLocation.framework */, + B29A310B1CC0C7BD007BA18C /* CoreMedia.framework */, + B29A310C1CC0C7BD007BA18C /* CoreMotion.framework */, + B29A310D1CC0C7BD007BA18C /* CoreVideo.framework */, + B29A310E1CC0C7BD007BA18C /* Foundation.framework */, + B29A310F1CC0C7BD007BA18C /* libc++.tbd */, + B29A31101CC0C7BD007BA18C /* libxml2.tbd */, + B29A31111CC0C7BD007BA18C /* libz.tbd */, + B29A31121CC0C7BD007BA18C /* SystemConfiguration.framework */, + B29A31071CC0C74B007BA18C /* AVFoundation.framework */, + B29A31051CC0C709007BA18C /* QuartzCore.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + B29A312B1CC0D007007BA18C /* Controllers */ = { + isa = PBXGroup; + children = ( + B2C6AFC81CBFBB7000D19076 /* CommonViewController.swift */, + B29A30DF1CC0AC5B007BA18C /* HomeViewController.swift */, + B29A30E71CC0B7E5007BA18C /* SettingsTableViewController.swift */, + B29A30E91CC0BB5C007BA18C /* CaptureViewController.swift */, + B29A31301CC1408B007BA18C /* CameraSettingsViewController.swift */, + B29A31321CC143EA007BA18C /* ImageProcessorSettingsTableViewController.swift */, + B2CBE9D11CE194CE0075BEE8 /* PreviewImageViewController.swift */, + B208E2551CEDD6E60053F137 /* BaseSettingsViewController.swift */, + B268FA691D0A844700937D29 /* AboutViewController.swift */, + B280628A1D1BDE79009DD03D /* AboutCell.swift */, + B2092DAF1D24EC0D00479F14 /* LicenseAgreementViewController.swift */, + B2092DB11D24EC7D00479F14 /* LicenseAgreementCell.swift */, + ); + name = Controllers; + sourceTree = ""; + }; + B2C6AF8E1CBFB8EE00D19076 = { + isa = PBXGroup; + children = ( + B2C6AF991CBFB8EE00D19076 /* Mobile Capture Demo */, + B2C6AF981CBFB8EE00D19076 /* Products */, + B29A312A1CC0CFD7007BA18C /* Frameworks */, + B29A30E11CC0B6B2007BA18C /* Resources */, + ); + sourceTree = ""; + }; + B2C6AF981CBFB8EE00D19076 /* Products */ = { + isa = PBXGroup; + children = ( + B2C6AF971CBFB8EE00D19076 /* Mobile Capture Demo.app */, + ); + name = Products; + sourceTree = ""; + }; + B2C6AF991CBFB8EE00D19076 /* Mobile Capture Demo */ = { + isa = PBXGroup; + children = ( + B29A312B1CC0D007007BA18C /* Controllers */, + B29A31291CC0C8F4007BA18C /* Mobile-Capture-Demo-Bridging-Header.h */, + B2C6AF9A1CBFB8EE00D19076 /* AppDelegate.swift */, + B2C6AF9E1CBFB8EE00D19076 /* Main.storyboard */, + B2C6AFA11CBFB8EE00D19076 /* Assets.xcassets */, + B2C6AFA31CBFB8EE00D19076 /* LaunchScreen.storyboard */, + B27BD4401D38B8FD00943531 /* eula.rtf */, + B2C6AFA61CBFB8EE00D19076 /* Info.plist */, + B2493A8F1CD6241C000D6F2E /* Settings.swift */, + B27816A01CEB281400F90AAA /* PhotoAlbum.swift */, + B2B446211D06CEA6002C79E5 /* WaitingIndicator.swift */, + ); + path = "Mobile Capture Demo"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + B2C6AF961CBFB8EE00D19076 /* Mobile Capture Demo */ = { + isa = PBXNativeTarget; + buildConfigurationList = B2C6AFBF1CBFB8EF00D19076 /* Build configuration list for PBXNativeTarget "Mobile Capture Demo" */; + buildPhases = ( + B2C6AF931CBFB8EE00D19076 /* Sources */, + B2C6AF941CBFB8EE00D19076 /* Frameworks */, + B2C6AF951CBFB8EE00D19076 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Mobile Capture Demo"; + productName = "Mobile Capture Demo"; + productReference = B2C6AF971CBFB8EE00D19076 /* Mobile Capture Demo.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B2C6AF8F1CBFB8EE00D19076 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = Atalasoft; + TargetAttributes = { + B2C6AF961CBFB8EE00D19076 = { + CreatedOnToolsVersion = 7.3; + DevelopmentTeam = B9C7GRQCYQ; + }; + }; + }; + buildConfigurationList = B2C6AF921CBFB8EE00D19076 /* Build configuration list for PBXProject "Mobile Capture Demo" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B2C6AF8E1CBFB8EE00D19076; + productRefGroup = B2C6AF981CBFB8EE00D19076 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B2C6AF961CBFB8EE00D19076 /* Mobile Capture Demo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B2C6AF951CBFB8EE00D19076 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B2CBE9D01CDB9FCF0075BEE8 /* torchon@2x.png in Resources */, + B29A30E61CC0B6B2007BA18C /* settings_icon@2x.png in Resources */, + B208E2541CEDBF6C0053F137 /* logo.png in Resources */, + B2CBE9D81CE1999C0075BEE8 /* gallery@2x.png in Resources */, + B29A312F1CC0E06F007BA18C /* camera@2x.png in Resources */, + B278169C1CE9DB2F00F90AAA /* bluecircle.png in Resources */, + B2C6AFA51CBFB8EE00D19076 /* LaunchScreen.storyboard in Resources */, + B28062961D20FE0A009DD03D /* SDKStrings.bundle in Resources */, + B2B4461E1D06B22C002C79E5 /* useImage@2x.png in Resources */, + B27BD4411D38B8FD00943531 /* eula.rtf in Resources */, + B278169D1CE9DB2F00F90AAA /* bluecircle@2x.png in Resources */, + B2CBE9CF1CDB9FCF0075BEE8 /* torch_off@2x.png in Resources */, + B29A30E51CC0B6B2007BA18C /* settings_icon.png in Resources */, + B278169F1CE9E20400F90AAA /* camera_button_normal.png in Resources */, + B2CBE9D51CE199880075BEE8 /* email.png in Resources */, + B2C6AFA21CBFB8EE00D19076 /* Assets.xcassets in Resources */, + B2C6AFA01CBFB8EE00D19076 /* Main.storyboard in Resources */, + B28062971D20FE0A009DD03D /* uiimages.bundle in Resources */, + B29A312D1CC0D990007BA18C /* close@2x.png in Resources */, + B2CBE9D61CE199880075BEE8 /* email@2x.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B2C6AF931CBFB8EE00D19076 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B2092DB21D24EC7D00479F14 /* LicenseAgreementCell.swift in Sources */, + B29A30E81CC0B7E5007BA18C /* SettingsTableViewController.swift in Sources */, + B2B446221D06CEA6002C79E5 /* WaitingIndicator.swift in Sources */, + B29A31331CC143EA007BA18C /* ImageProcessorSettingsTableViewController.swift in Sources */, + B2493A901CD6241C000D6F2E /* Settings.swift in Sources */, + B2C6AFC91CBFBB7000D19076 /* CommonViewController.swift in Sources */, + B29A31311CC1408B007BA18C /* CameraSettingsViewController.swift in Sources */, + B208E2561CEDD6E60053F137 /* BaseSettingsViewController.swift in Sources */, + B2CBE9D21CE194CE0075BEE8 /* PreviewImageViewController.swift in Sources */, + B27816A11CEB281400F90AAA /* PhotoAlbum.swift in Sources */, + B2C6AF9B1CBFB8EE00D19076 /* AppDelegate.swift in Sources */, + B29A30E01CC0AC5B007BA18C /* HomeViewController.swift in Sources */, + B268FA6A1D0A844700937D29 /* AboutViewController.swift in Sources */, + B29A30EA1CC0BB5C007BA18C /* CaptureViewController.swift in Sources */, + B280628B1D1BDE79009DD03D /* AboutCell.swift in Sources */, + B2092DB01D24EC0D00479F14 /* LicenseAgreementViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + B2C6AF9E1CBFB8EE00D19076 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B2C6AF9F1CBFB8EE00D19076 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + B2C6AFA31CBFB8EE00D19076 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B2C6AFA41CBFB8EE00D19076 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + B2C6AFBD1CBFB8EF00D19076 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE = "87b5ad36-04ba-44f1-9dca-1f71ce1c3f5d"; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + B2C6AFBE1CBFB8EF00D19076 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + PROVISIONING_PROFILE = "87b5ad36-04ba-44f1-9dca-1f71ce1c3f5d"; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + B2C6AFC01CBFB8EF00D19076 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/../MobileSDK", + "$(PROJECT_DIR)/../MobileSDK/uiimages.bundle", + ); + HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../MobileSDK/MobileSDK.framework/Headers"; + INFOPLIST_FILE = "Mobile Capture Demo/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.kofax.Mobile-Capture-Demo"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/Mobile-Capture-Demo-Bridging-Header.h"; + }; + name = Debug; + }; + B2C6AFC11CBFB8EF00D19076 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/../MobileSDK", + "$(PROJECT_DIR)/../MobileSDK/uiimages.bundle", + ); + HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../MobileSDK/MobileSDK.framework/Headers"; + INFOPLIST_FILE = "Mobile Capture Demo/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.kofax.Mobile-Capture-Demo"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; + SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/Mobile-Capture-Demo-Bridging-Header.h"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B2C6AF921CBFB8EE00D19076 /* Build configuration list for PBXProject "Mobile Capture Demo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B2C6AFBD1CBFB8EF00D19076 /* Debug */, + B2C6AFBE1CBFB8EF00D19076 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B2C6AFBF1CBFB8EF00D19076 /* Build configuration list for PBXNativeTarget "Mobile Capture Demo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B2C6AFC01CBFB8EF00D19076 /* Debug */, + B2C6AFC11CBFB8EF00D19076 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B2C6AF8F1CBFB8EE00D19076 /* Project object */; +} diff --git a/Capture Demo/Mobile Capture Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Capture Demo/Mobile Capture Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..3b57669 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Capture Demo/Mobile Capture Demo.xcodeproj/xcshareddata/xcschemes/Mobile Capture Demo.xcscheme b/Capture Demo/Mobile Capture Demo.xcodeproj/xcshareddata/xcschemes/Mobile Capture Demo.xcscheme new file mode 100644 index 0000000..6b053d3 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo.xcodeproj/xcshareddata/xcschemes/Mobile Capture Demo.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Capture Demo/Mobile Capture Demo/AboutCell.swift b/Capture Demo/Mobile Capture Demo/AboutCell.swift new file mode 100644 index 0000000..5b12184 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/AboutCell.swift @@ -0,0 +1,124 @@ +// +// AboutCell.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 23/06/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class AboutCell: UITableViewCell { + + @IBOutlet var versionLabel: UILabel! + @IBOutlet var appNameLabel: UILabel! + @IBOutlet var text1Label: UITextView! + @IBOutlet var text2Label: UITextView! + @IBOutlet var emailLabel: UITextView! + + var linkTapGestureRecognizer: UITapGestureRecognizer! + + func makeLink(text: NSMutableAttributedString, linkText: String, linkUrl: String) { + + let linkRange = (text.string as NSString).rangeOfString(linkText) + text.addAttribute(NSLinkAttributeName, value: linkUrl, range: linkRange) + } + + func setupAboutData() { + + if linkTapGestureRecognizer == nil { + linkTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleLinkTapGestureRecognizer)) + linkTapGestureRecognizer.cancelsTouchesInView = false + linkTapGestureRecognizer.delaysTouchesBegan = false + linkTapGestureRecognizer.delaysTouchesEnded = false + addGestureRecognizer(linkTapGestureRecognizer) + } + + let appVersion = NSBundle.mainBundle().infoDictionary!["CFBundleShortVersionString"]; + if let ver = appVersion { + versionLabel.text = "Version \(ver)" + } + + appNameLabel.text = "Atalasoft MobileImage Capture sample app" + + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.alignment = NSTextAlignment.Justified + + let text1 = NSMutableAttributedString(string: "This app shows developers what they could build with the Atalasoft MobileImage Capture SDK. When the user opens the camera, the software can guide them to take the image at the right angle. Access to the camera torch is enabled. Finally, the image taken is processed and cleaned up with eVRS and ready for a backend server process like OCR or storage.", attributes: [ + NSParagraphStyleAttributeName: paragraphStyle, + NSBaselineOffsetAttributeName: NSNumber(float: 0) + ]) + + text1Label.attributedText = text1 + + let text2 = NSMutableAttributedString(string: "To build your own document capture, processing, or viewing app - visit Atalasoft and grab a 30-day evaluation copy for yourself. We'll provide the tools and the support you need to get started!", attributes: [ + NSParagraphStyleAttributeName: paragraphStyle, + NSBaselineOffsetAttributeName: NSNumber(float: 0) + ]) + + makeLink(text2, linkText: "Atalasoft", linkUrl: "http://hubs.ly/H03pzS80") + text2Label.attributedText = text2 + + + let email = NSMutableAttributedString(string: "sales@atalasoft.com") + let emailUrl = "sales@atalasoft.com" + + makeLink(email, linkText: emailUrl, linkUrl: "mailto:sales@atalasoft.com") + emailLabel.attributedText = email + } + + func handleLinkTapGestureRecognizer(tapRecognizer: UITapGestureRecognizer) { + + let view = tapRecognizer.view + let location = tapRecognizer.locationInView(view) + + var linkStr = "" + + if CGRectContainsPoint(text2Label.frame, location) { + linkStr = getLinkOnText(tapRecognizer.locationInView(text2Label), textView: text2Label) + } else if CGRectContainsPoint(emailLabel.frame, location) { + linkStr = getLinkOnText(tapRecognizer.locationInView(emailLabel), textView: emailLabel) + } + + if !linkStr.isEmpty { + let url: NSURL! = NSURL(string: linkStr) + UIApplication.sharedApplication().openURL(url) + } + } + + func getLinkOnText(location: CGPoint, textView: UITextView) -> String { + + var textPosition1 = textView.closestPositionToPoint(location) + var textPosition2:UITextPosition? + if let _ = textPosition1 { + textPosition2 = textView.positionFromPosition(textPosition1!, offset: 1) + if let _ = textPosition2 { + textPosition1 = textView.positionFromPosition(textPosition1!, offset: -1) + textPosition2 = textView.positionFromPosition(textPosition1!, offset: 1) + } else { + return "" + } + } + + let range = textView.textRangeFromPosition(textPosition1!, toPosition: textPosition2!) + let startOffset = textView.offsetFromPosition(textView.beginningOfDocument, toPosition: range!.start) + let endOffset = textView.offsetFromPosition(textView.beginningOfDocument, toPosition: range!.end) + let offsetRange = NSMakeRange(startOffset, endOffset - startOffset) + if offsetRange.location == NSNotFound || offsetRange.length == 0 { + return "" + } + + if NSMaxRange(offsetRange) > textView.attributedText.length { + return "" + } + + let attributedSubstring = textView.attributedText .attributedSubstringFromRange(offsetRange) + let link = attributedSubstring.attribute(NSLinkAttributeName, atIndex: 0, effectiveRange: nil) + + if let linkStr = link { + return linkStr as! String + } + + return "" + } +} diff --git a/Capture Demo/Mobile Capture Demo/AboutViewController.swift b/Capture Demo/Mobile Capture Demo/AboutViewController.swift new file mode 100644 index 0000000..f8ca093 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/AboutViewController.swift @@ -0,0 +1,43 @@ +// +// AboutViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 10/06/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class AboutViewController: UITableViewController { + + static let cellIdentifier = "AboutCell" + + override func viewDidLoad() { + super.viewDidLoad() + + tableView.estimatedRowHeight = 100.0; + tableView.rowHeight = UITableViewAutomaticDimension; + + tableView.setNeedsLayout() + tableView.layoutIfNeeded() + } + + override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + return 1 + } + + override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 1 + } + + override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + let cell: AboutCell! = tableView.dequeueReusableCellWithIdentifier(AboutViewController.cellIdentifier) as! AboutCell! + + cell.setupAboutData() + + cell.selectionStyle = .None + + return cell + } + +} diff --git a/Capture Demo/Mobile Capture Demo/AppDelegate.swift b/Capture Demo/Mobile Capture Demo/AppDelegate.swift new file mode 100644 index 0000000..72ee7e1 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 14/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + return true; + } + + func applicationWillResignActive(application: UIApplication) { + } + + func applicationDidEnterBackground(application: UIApplication) { + } + + func applicationWillEnterForeground(application: UIApplication) { + } + + func applicationDidBecomeActive(application: UIApplication) { + Settings.validateLimitation() + if Settings.ExceedLimitation { + let alert = UIAlertController(title: "Error", message: "You have reached your monthly usage limit.", preferredStyle: .Alert) + alert.addAction(UIAlertAction(title: "OK", style: .Default) { action -> Void in }) + + if let wnd = window { + wnd.rootViewController?.presentViewController(alert, animated: true, completion: nil) + } + } + } + + func applicationWillTerminate(application: UIApplication) { + } + + +} + diff --git a/Capture Demo/Mobile Capture Demo/Assets.xcassets/AppIcon.appiconset/Contents.json b/Capture Demo/Mobile Capture Demo/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..db9bbf3 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,40 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "captureAppIcon-120.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "captureAppIcon-180.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Capture Demo/Mobile Capture Demo/Assets.xcassets/AppIcon.appiconset/captureAppIcon-120.png b/Capture Demo/Mobile Capture Demo/Assets.xcassets/AppIcon.appiconset/captureAppIcon-120.png new file mode 100644 index 0000000..d255ec4 Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Assets.xcassets/AppIcon.appiconset/captureAppIcon-120.png differ diff --git a/Capture Demo/Mobile Capture Demo/Assets.xcassets/AppIcon.appiconset/captureAppIcon-180.png b/Capture Demo/Mobile Capture Demo/Assets.xcassets/AppIcon.appiconset/captureAppIcon-180.png new file mode 100644 index 0000000..438f738 Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Assets.xcassets/AppIcon.appiconset/captureAppIcon-180.png differ diff --git a/Capture Demo/Mobile Capture Demo/Base.lproj/LaunchScreen.storyboard b/Capture Demo/Mobile Capture Demo/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..b474a11 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Capture Demo/Mobile Capture Demo/Base.lproj/Main.storyboard b/Capture Demo/Mobile Capture Demo/Base.lproj/Main.storyboard new file mode 100644 index 0000000..304def4 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/Base.lproj/Main.storyboard @@ -0,0 +1,531 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Capture Demo/Mobile Capture Demo/BaseSettingsViewController.swift b/Capture Demo/Mobile Capture Demo/BaseSettingsViewController.swift new file mode 100644 index 0000000..461c141 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/BaseSettingsViewController.swift @@ -0,0 +1,62 @@ +// +// BaseSettingsViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 19/05/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class BaseSettingsViewController: UITableViewController { + + var settings : Settings = Settings() + + let CellsFontName = "HelveticaNeue" + let CellsFontSize : CGFloat = 13 + + override func viewWillAppear(animated: Bool) { + settings.load() + + super.viewWillAppear(animated) + } + + override func viewWillDisappear(animated: Bool) { + settings.save() + + super.viewWillDisappear(animated) + } + + + func createSwitchWithTag(tag: Int, value: AnyObject) -> UISwitch{ + let newSwitch = UISwitch() + newSwitch.on = value.boolValue + newSwitch.tag = tag + return newSwitch + } + + func createTextFieldWithTag(tag: Int, frame: CGRect, placeholder: String, text:String) -> UITextField { + let textField = UITextField() + textField.tag = tag + textField.font = UIFont(name: CellsFontName, size: CellsFontSize) + textField.borderStyle = .None + textField.autocorrectionType = .No + textField.returnKeyType = .Done + textField.placeholder = placeholder + textField.textAlignment = .Right + textField.clearButtonMode = .WhileEditing + textField.text = text + textField.frame = frame + return textField + } + + func createSegmentedControlWithTag(tag: Int, items: NSArray, selectedSegment: NSInteger) -> UISegmentedControl{ + let segmentControl = UISegmentedControl(items: items as [AnyObject]) + let dict : Dictionary = [NSFontAttributeName : UIFont(name: CellsFontName, size:15.0)!] + segmentControl.setTitleTextAttributes(dict, forState: .Normal) + segmentControl.selectedSegmentIndex = selectedSegment; + segmentControl.tag = tag; + return segmentControl; + } + +} diff --git a/Capture Demo/Mobile Capture Demo/CameraSettingsViewController.swift b/Capture Demo/Mobile Capture Demo/CameraSettingsViewController.swift new file mode 100644 index 0000000..b4d4d7f --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/CameraSettingsViewController.swift @@ -0,0 +1,187 @@ +// +// CameraSettingsViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 15/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class CameraSettingsViewController: BaseSettingsViewController, UITextFieldDelegate { + + var showGallerySwitch : UISwitch? + var stabilityDelayField : UITextField? + var pitchThresholdField : UITextField? + var rollThresholdField : UITextField? + var manualCaptureTimeField : UITextField? + var autoTorchSwitch : UISwitch? + + var selectedTextField : UITextField? + + let captureDevice = AVCaptureDevice.defaultDeviceWithMediaType(AVMediaTypeVideo) + + override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + + var cell: UITableViewCell! = tableView.dequeueReusableCellWithIdentifier(SettingsTableViewController.cellIdentifier) + + if cell == nil { + cell = UITableViewCell(style: .Default, reuseIdentifier: SettingsTableViewController.cellIdentifier) + } + + assert(indexPath.section == 0) + + cell.textLabel?.font = UIFont(name:CellsFontName, size:15) + + switch indexPath.row { + case 0: + showGallerySwitch = createSwitchWithTag(indexPath.row, value: settings.CameraShowGallery) + cell.accessoryView = showGallerySwitch + showGallerySwitch?.addTarget(self, action: #selector(switchValueChanged), forControlEvents: .ValueChanged) + cell.textLabel?.text = "Show Gallery:" + break + + case 1: + stabilityDelayField = createTextFieldWithTag(0, frame: CGRectMake(0, 0, 50, 25), placeholder: "", text: String.localizedStringWithFormat("%d", settings.StabilityDelay)) + stabilityDelayField?.keyboardType = .NumbersAndPunctuation + stabilityDelayField?.delegate = self + cell.accessoryView = stabilityDelayField + cell.textLabel?.text = "Stability Delay (0 - 100):" + break + + case 2: + pitchThresholdField = createTextFieldWithTag(0, frame: CGRectMake(0, 0, 50, 25), placeholder: "", text: String.localizedStringWithFormat("%d", settings.PitchThreshold)) + pitchThresholdField?.keyboardType = .NumbersAndPunctuation + pitchThresholdField?.delegate = self + cell.accessoryView = pitchThresholdField + cell.textLabel?.text = "Pitch Threshold (0 - 45):" + break + + case 3: + rollThresholdField = createTextFieldWithTag(0, frame: CGRectMake(0, 0, 50, 25), placeholder: "", text: String.localizedStringWithFormat("%d", settings.RollThreshold)) + rollThresholdField?.keyboardType = .NumbersAndPunctuation + rollThresholdField?.delegate = self + cell.accessoryView = rollThresholdField + cell.textLabel?.text = "Roll Threshold (0 - 45):" + break + + case 4: + manualCaptureTimeField = createTextFieldWithTag(0, frame: CGRectMake(0, 0, 50, 25), placeholder: "", text: String.localizedStringWithFormat("%d", settings.ManualCaptureTime)) + manualCaptureTimeField?.keyboardType = .NumbersAndPunctuation + manualCaptureTimeField?.delegate = self + cell.accessoryView = manualCaptureTimeField + cell.textLabel?.text = "Manual Capture Time:" + break + + case 5: + autoTorchSwitch = createSwitchWithTag(indexPath.row, value: settings.AutoTorch) + cell.accessoryView = autoTorchSwitch + autoTorchSwitch?.addTarget(self, action: #selector(switchValueChanged), forControlEvents: .ValueChanged) + cell.textLabel?.text = "Auto Torch:" + break + + default: + assert(indexPath.row < Settings.CameraSettingsCount) + } + + cell.selectionStyle = .None + + return cell + + } + + override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + return 1; + } + + override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + + return captureDevice.hasFlash && captureDevice.hasTorch ? Settings.CameraSettingsCount : Settings.CameraSettingsCount - 1 + } + + @IBAction func switchValueChanged(sender: UISwitch) { + + if sender == showGallerySwitch { + settings.CameraShowGallery = sender.on + } else if sender == autoTorchSwitch { + settings.AutoTorch = sender.on + } + } + + func textFieldShouldBeginEditing(textField: UITextField) -> Bool { + selectedTextField = textField + return true + } + + func textFieldDidBeginEditing(textField: UITextField) { + + var rect = CGRectZero + + if textField == stabilityDelayField { + rect = tableView.rectForRowAtIndexPath(NSIndexPath(forRow: 1, inSection: 0)) + } else if textField == pitchThresholdField { + rect = tableView.rectForRowAtIndexPath(NSIndexPath(forRow: 2, inSection: 0)) + } else if textField == rollThresholdField { + rect = tableView.rectForRowAtIndexPath(NSIndexPath(forRow: 3, inSection: 0)) + } else if textField == manualCaptureTimeField { + rect = tableView.rectForRowAtIndexPath(NSIndexPath(forRow: 4, inSection: 0)) + } + + tableView.setContentOffset(CGPointMake(0, rect.origin.y), animated: true) + } + + func processTextFieldData(textField: UITextField) { + let numbersOnly = NSCharacterSet.decimalDigitCharacterSet() + let characterSetFromTextField = NSCharacterSet(charactersInString: textField.text!) + if !numbersOnly.isSupersetOfSet(characterSetFromTextField) { + return + } + + if textField.isEqual(stabilityDelayField) + { + let intValue = Int(textField.text!) + if intValue < 0 || intValue > 100 + { + textField.text = String.localizedStringWithFormat("%d", 100) + } + + settings.StabilityDelay = Int32(textField.text!)! + + } else if textField.isEqual(pitchThresholdField) + { + let intValue = Int(textField.text!) + if intValue < 0 || intValue > 45 + { + textField.text = String.localizedStringWithFormat("%d", 45) + } + + settings.PitchThreshold = Int32(textField.text!)! + + } else if textField.isEqual(rollThresholdField) + { + let intValue = Int(textField.text!) + if intValue < 0 || intValue > 45 { + textField.text = String.localizedStringWithFormat("%d", 45) + } + settings.RollThreshold = Int32(textField.text!)! + + } else if textField.isEqual(manualCaptureTimeField) + { + settings.ManualCaptureTime = Int32(textField.text!)! + } + } + + func textFieldDidEndEditing(textField: UITextField) { + processTextFieldData(textField) + } + + func textFieldShouldReturn(textField: UITextField) -> Bool { + + textField.resignFirstResponder() + tableView.setContentOffset(CGPointMake(0, 0), animated:true) + + processTextFieldData(textField) + + return true + } +} diff --git a/Capture Demo/Mobile Capture Demo/CaptureViewController.swift b/Capture Demo/Mobile Capture Demo/CaptureViewController.swift new file mode 100644 index 0000000..f63e699 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/CaptureViewController.swift @@ -0,0 +1,260 @@ +// +// CaptureViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 15/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +extension UIImage { + static func fromColor(color: UIColor) -> UIImage { + let rect = CGRect(x: 0, y: 0, width: 1, height: 1) + UIGraphicsBeginImageContext(rect.size) + let context = UIGraphicsGetCurrentContext() + CGContextSetFillColorWithColor(context, color.CGColor) + CGContextFillRect(context, rect) + let img = UIGraphicsGetImageFromCurrentImageContext() + UIGraphicsEndImageContext() + + return img + } +} + +class CaptureViewController: UIViewController, kfxKUIImageCaptureControlDelegate , UIImagePickerControllerDelegate, UINavigationControllerDelegate { + + @IBOutlet var cancelButton: UIButton! + @IBOutlet var forceCaptureButton: UIButton! + @IBOutlet var galleryButton: UIButton! + @IBOutlet var torchButton: UIButton! + + @IBOutlet var retakeButton: UIButton! + @IBOutlet var processImageButton: UIButton! + + @IBOutlet weak var captureControl: kfxKUIImageCaptureControl! + @IBOutlet weak var reviewControl: kfxKUIImageReviewAndEdit! + + var waitingIndicator = WaitingIndicator() + + var flashState = kfxKUIFlashOff + var manualCapturing = false + + var captureExperience: kfxKUIDocumentCaptureExperience! + var captureCriteriaHolder = kfxKUIDocumentCaptureExperienceCriteriaHolder() + + let settings : Settings = Settings() + + var forceCaptureTimer: NSTimer? + + var torchEnabled : Bool = false + let torchOnIcon = UIImage(named: "torchon.png") + let torchOffIcon = UIImage(named: "torch_off.png") + + var capturedImage : kfxKEDImage? + let captureDevice = AVCaptureDevice.defaultDeviceWithMediaType(AVMediaTypeVideo) + + static let SeguePreviewImageViewController = "PreviewImageViewController" + + override func viewDidLoad() { + super.viewDidLoad() + + waitingIndicator.show("Initializing...", superview: view) + + kfxKUIImageCaptureControl.initializeControl() + kfxKUIImageReviewAndEdit.initializeControl() + + captureControl.delegate = self + captureExperience = kfxKUIDocumentCaptureExperience(captureControl: captureControl, criteria: captureCriteriaHolder) + + self.setNeedsStatusBarAppearanceUpdate() + + processImageButton.layer.cornerRadius = 30; + processImageButton.setBackgroundImage(UIImage.fromColor(UIColor.whiteColor()), forState: .Normal) + processImageButton.setBackgroundImage(UIImage.fromColor(UIColor.grayColor()), forState: UIControlState.Highlighted.union(.Selected)) + processImageButton.clipsToBounds = true + } + + override func viewDidAppear(animated: Bool) { + super.viewDidAppear(animated) + + if capturedImage == nil { + waitingIndicator.show("Initializing...", superview: view) + + self.performSelector(#selector(initializeCaptureControl), withObject:nil, afterDelay: 0.25) + } + } + + override func viewWillAppear(animated: Bool) { + super.viewWillAppear(animated) + + navigationController?.setNavigationBarHidden(true, animated: true) + + if capturedImage == nil { + settings.load() + + manualCapturing = false + + showCaptureControls(false) + showReviewControls(false) + } + } + + override func viewDidDisappear(animated: Bool) { + super.viewDidDisappear(animated) + + navigationController?.setNavigationBarHidden(false, animated:false) + + waitingIndicator.hide() + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + } + + override func prefersStatusBarHidden() -> Bool { + return true; + } + + func initializeCaptureControl() { + + captureControl.stabilityDelay = settings.StabilityDelay + captureControl.levelThresholdPitch = settings.PitchThreshold + captureControl.levelThresholdRoll = settings.RollThreshold + captureControl.flash = settings.AutoTorch ? kfxKUIFlashAuto : flashState + + captureControl.pageDetectMode = kfxKUIPageDetectAutomatic + forceCaptureButton.hidden = !manualCapturing + + showCaptureControls() + + waitingIndicator.hide() + + if !manualCapturing { + performSelector(#selector(runManualCapturing), withObject:nil, afterDelay: NSTimeInterval(settings.ManualCaptureTime)) + } + } + + func runManualCapturing() { + + manualCapturing = true + if capturedImage == nil { + forceCaptureButton.hidden = false + } + } + + func showCaptureControls(show: Bool) { + captureControl.hidden = !show + cancelButton.hidden = !show + forceCaptureButton.hidden = !(show && manualCapturing) + torchButton.hidden = !show || settings.AutoTorch || !(captureDevice.hasFlash && captureDevice.hasTorch) + galleryButton.hidden = !show || !settings.CameraShowGallery + + if show { + captureExperience.takePictureContinually() + } else { + captureExperience.stopCapture() + } + } + + func showReviewControls(show: Bool) { + reviewControl.hidden = !show + retakeButton.hidden = !show + processImageButton.hidden = !show + + flashState = captureControl.flash + captureControl.flash = kfxKUIFlashOff + } + + func showCaptureControls() { + showCaptureControls(true) + showReviewControls(false) + + captureControl.flash = flashState + } + + func showReviewControls() { + showCaptureControls(false) + showReviewControls(true) + } + + @IBAction func OnCancelButtonPressed() { + self.navigationController?.popViewControllerAnimated(true) + } + + @IBAction func OnCaptureButtonPressed() { + captureControl.forceTakePicture() + } + + @IBAction func OnTorchButtonPressed() { + + torchEnabled = !torchEnabled + + torchButton.setImage(torchEnabled ? torchOnIcon : torchOffIcon, forState: .Normal) + + captureControl?.flash = torchEnabled ? kfxKUITorch : kfxKUIFlashOff + } + + @IBAction func OnRetakeImagePressed() { + capturedImage = nil + initializeCaptureControl() + } + + @IBAction func OnProcessImagePressed() { + if let kfxImage = capturedImage { + Settings.updateLimitationCounter() + performSegueWithIdentifier(CaptureViewController.SeguePreviewImageViewController, sender: kfxImage) + } + } + + @IBAction func OnOpenGallery() { + + let imagePicker = UIImagePickerController() + imagePicker.delegate = self + imagePicker.sourceType = .PhotoLibrary + navigationController?.presentViewController(imagePicker, animated: true, completion: nil) + } + + override func viewDidLayoutSubviews() { + super.viewDidLayoutSubviews() + + if let captureView = captureControl { + captureView.frame = CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height - 70) + } + } + + func imageCaptureControl(imageCaptureControl: kfxKUIImageCaptureControl!, imageCaptured image: kfxKEDImage!) { + previewCapturedImage(image) + } + + func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) { + let image = info[UIImagePickerControllerOriginalImage] + + let kfxImage = kfxKEDImage(image: image as! UIImage) + + picker.dismissViewControllerAnimated(true, completion: nil) + previewCapturedImage(kfxImage) + } + + func imagePickerControllerDidCancel(picker: UIImagePickerController) { + picker.dismissViewControllerAnimated(true, completion: nil) + } + + override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { + if (segue.identifier == CaptureViewController.SeguePreviewImageViewController) + { + let previewViewController: PreviewImageViewController = segue.destinationViewController as! PreviewImageViewController + let image = sender as! kfxKEDImage + + previewViewController.image = image + } + } + + func previewCapturedImage(kfxImage: kfxKEDImage) { + + showReviewControls() + + capturedImage = kfxImage + reviewControl.setImage(kfxImage) + } +} diff --git a/Capture Demo/Mobile Capture Demo/CommonViewController.swift b/Capture Demo/Mobile Capture Demo/CommonViewController.swift new file mode 100644 index 0000000..c4879ca --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/CommonViewController.swift @@ -0,0 +1,27 @@ +// +// CommonViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 14/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import Foundation +import UIKit + +extension UIButton { + func ConfigureButton(image imageName: String) { + self.setImage(UIImage(named: imageName), forState: .Normal) + self.setBackgroundImage(UIImage(named: "bluecircle.png"), forState: .Normal) + self.layer.cornerRadius = 30; + self.backgroundColor = UIColor(red: 0, green: 0x79/255, blue: 0xc2/255, alpha: 1.0) //"#0079C2" + self.imageView?.contentMode = .ScaleAspectFit + } +} + +class CommonViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + } +} \ No newline at end of file diff --git a/Capture Demo/Mobile Capture Demo/HomeViewController.swift b/Capture Demo/Mobile Capture Demo/HomeViewController.swift new file mode 100644 index 0000000..a1f2979 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/HomeViewController.swift @@ -0,0 +1,94 @@ +// +// HomeViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 15/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class HomeViewController: UIViewController { + + var mobileSdkInitialized: Bool = false + + @IBOutlet var cameraButton : UIButton! + + static let evrsLIcense = PROCESS_PAGE_SDK_LICENSE + + override func viewDidLoad() { + super.viewDidLoad() + + if !mobileSdkInitialized + { + mobileSdkInitialized = true + + let license = kfxKUTLicensing() + let lic = KFX_ERROR_IMAGE_PROCESSOR(rawValue: UInt32(license.setMobileSDKLicense(HomeViewController.evrsLIcense))) + + if lic == KMC_IP_LICENSE_EXPIRED || lic == KMC_IP_LICENSE_INVALID { + showErrorMessage(lic) + } + } + + NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(applicationIsActive), name: UIApplicationDidBecomeActiveNotification, object: nil) + + cameraButton?.ConfigureButton(image: "camera_button_normal.png") + + navigationItem.title = "MobileImage Document Capture" + } + + override func viewWillAppear(animated: Bool) { + super.viewWillAppear(animated) + + cameraButton.userInteractionEnabled = !Settings.ExceedLimitation + navigationController?.setNavigationBarHidden(false, animated: true) + } + + func applicationIsActive(notification: NSNotification) { + cameraButton.userInteractionEnabled = !Settings.ExceedLimitation + } + + func showErrorMessage(licenseErrorCode: KFX_ERROR_IMAGE_PROCESSOR) { + let errorCode = Int32(licenseErrorCode.rawValue) + let message = kfxError.findErrMsg(errorCode) + let description = kfxError.findErrDesc(errorCode) + + var alertTitle: String + var alertDescription: String + + let split = message.characters.split {$0 == ":"}.map(String.init) + + if split.count == 2 + { + alertTitle = split[0] + alertDescription = String(format: "%@\n\n%@", split[1], description) + + } + else if split.count > 2 + { + var info = ""; + + for item in split { + info = info.stringByAppendingFormat("%@", item) + } + + alertTitle = split[0] + alertDescription = String(format: "%@\n\n%@", info, description) + } + else + { + alertTitle = "License Error!!!" + alertDescription = String(format: "%@\n\n%@", message, description) + + } + + let alert = UIAlertController(title: alertTitle, message: alertDescription, preferredStyle: .Alert) + alert.addAction(UIAlertAction(title: "OK", style: .Default) { action -> Void in }) + self.presentViewController(alert, animated: true, completion: nil) + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + } +} diff --git a/Capture Demo/Mobile Capture Demo/ImageProcessorSettingsTableViewController.swift b/Capture Demo/Mobile Capture Demo/ImageProcessorSettingsTableViewController.swift new file mode 100644 index 0000000..6fdb4a0 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/ImageProcessorSettingsTableViewController.swift @@ -0,0 +1,151 @@ +// +// ImageProcessorSettingsTableViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 15/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class ImageProcessorSettingsTableViewController: BaseSettingsViewController { + + var useDefaultSettingsSwitch : UISwitch? + + var modeSegment : UISegmentedControl? + var autoCropSwitch : UISwitch? + var autoRotateSwitch : UISwitch? + var deskewSwitch : UISwitch? + var scaleSegment : UISegmentedControl? + + var selectedTextField : UITextField? + + override func viewDidLoad() { + super.viewDidLoad() + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + } + + // MARK: - Table view data source + + override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + return 2 + } + + override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + if section == 0 { + return 1 + } else if section == 1 { + return 5 + } + + return 0 + } + + override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + + var cell: UITableViewCell! = tableView.dequeueReusableCellWithIdentifier(SettingsTableViewController.cellIdentifier) + + if cell == nil { + cell = UITableViewCell(style: .Default, reuseIdentifier: SettingsTableViewController.cellIdentifier) + } + + cell.textLabel?.font = UIFont(name:CellsFontName, size:15) + + if indexPath.section == 0 { + if indexPath.row == 0 { + useDefaultSettingsSwitch = createSwitchWithTag(indexPath.row, value: settings.UseDefaultSettings) + cell.accessoryView = useDefaultSettingsSwitch + useDefaultSettingsSwitch?.addTarget(self, action: #selector(switchValueChanged), forControlEvents: .ValueChanged) + cell.textLabel?.text = "Use Default Settings:" + } + } else if indexPath.section == 1 { + switch indexPath.row { + case 0: + modeSegment = createSegmentedControlWithTag(0, items: ["BW", "Gray", "Color"], selectedSegment: settings.Mode) + modeSegment?.addTarget(self, action:#selector(captureExperienceSwitchAction), forControlEvents:.ValueChanged) + cell.accessoryView = modeSegment; + cell.textLabel?.text = "Mode:" + + case 1: + autoCropSwitch = createSwitchWithTag(indexPath.row, value: settings.AutoCrop) + cell.accessoryView = autoCropSwitch + autoCropSwitch?.addTarget(self, action: #selector(switchValueChanged), forControlEvents: .ValueChanged) + cell.textLabel?.text = "Auto Crop:" + + case 2: + autoRotateSwitch = createSwitchWithTag(indexPath.row, value: settings.AutoRotate) + cell.accessoryView = autoRotateSwitch + autoRotateSwitch?.addTarget(self, action: #selector(switchValueChanged), forControlEvents: .ValueChanged) + cell.textLabel?.text = "Auto Rotate:" + + case 3: + deskewSwitch = createSwitchWithTag(indexPath.row, value: settings.Deskew) + cell.accessoryView = deskewSwitch + deskewSwitch?.addTarget(self, action: #selector(switchValueChanged), forControlEvents: .ValueChanged) + cell.textLabel?.text = "Deskew:" + + case 4: + scaleSegment = createSegmentedControlWithTag(0, items: ["No", "200", "300", "400"], selectedSegment: settings.Scale) + scaleSegment?.addTarget(self, action:#selector(captureExperienceSwitchAction), forControlEvents:.ValueChanged) + cell.accessoryView = scaleSegment; + cell.textLabel?.text = "Scale (dpi):" + + default: + assert(false) + } + } + + cell.selectionStyle = .None + + let enabledCell = !settings.UseDefaultSettings || (indexPath.section == 0 && indexPath.row == 0) + cell.userInteractionEnabled = enabledCell + cell.textLabel?.enabled = enabledCell + cell.accessoryView?.userInteractionEnabled = enabledCell + + return cell! + } + + override func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + if section == 0 { + return 0.5 + } + + return 25 + } + + + // MARK: - Handlers + + @IBAction func switchValueChanged(sender: UISwitch) { + + if sender == useDefaultSettingsSwitch { + settings.UseDefaultSettings = sender.on + tableView.reloadData() + } else if sender == autoCropSwitch { + settings.AutoCrop = sender.on + } else if sender == autoRotateSwitch { + settings.AutoRotate = sender.on + } else if sender == deskewSwitch { + settings.Deskew = sender.on + } + } + + @IBAction func captureExperienceSwitchAction(sender:UISegmentedControl) { + + if sender == modeSegment { + settings.Mode = sender.selectedSegmentIndex + } else if sender == scaleSegment { + settings.Scale = sender.selectedSegmentIndex + } + + tableView.reloadData() + } + + func textFieldShouldBeginEditing(textField: UITextField) -> Bool { + selectedTextField = textField + return true + } +} diff --git a/Capture Demo/Mobile Capture Demo/Info.plist b/Capture Demo/Mobile Capture Demo/Info.plist new file mode 100644 index 0000000..d86b65d --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + MobileImage + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + + diff --git a/Capture Demo/Mobile Capture Demo/LicenseAgreementCell.swift b/Capture Demo/Mobile Capture Demo/LicenseAgreementCell.swift new file mode 100644 index 0000000..8600fcc --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/LicenseAgreementCell.swift @@ -0,0 +1,103 @@ +// +// LicenseAgreementCell.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 30/06/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class LicenseAgreementCell: UITableViewCell { + + @IBOutlet var license: UITextView! + + var linkTapGestureRecognizer: UITapGestureRecognizer! + + func makeLink(text: NSMutableAttributedString, linkText: String, linkUrl: String) { + + let linkRange = (text.string as NSString).rangeOfString(linkText) + text.addAttribute(NSLinkAttributeName, value: linkUrl, range: linkRange) + } + + func setupLicenseData() { + + if linkTapGestureRecognizer == nil { + linkTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleLinkTapGestureRecognizer)) + linkTapGestureRecognizer.cancelsTouchesInView = false + linkTapGestureRecognizer.delaysTouchesBegan = false + linkTapGestureRecognizer.delaysTouchesEnded = false + addGestureRecognizer(linkTapGestureRecognizer) + } + + let path = NSBundle.mainBundle().pathForResource("eula", ofType: "rtf") + do { + let text = try String(contentsOfFile: path!, encoding: NSUTF8StringEncoding) + + let eula = try NSMutableAttributedString(data: text.dataUsingEncoding(NSUTF8StringEncoding)!, options: [NSDocumentTypeDocumentAttribute:NSRTFTextDocumentType], documentAttributes: nil) + + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.alignment = NSTextAlignment.Justified + paragraphStyle.hyphenationFactor = 1 + + eula.addAttribute(NSParagraphStyleAttributeName, value: paragraphStyle, range: NSMakeRange(0, eula.length)) + makeLink(eula, linkText: "www.kofax.com", linkUrl: "http://www.kofax.com") + + license.attributedText = eula + } catch { + } + } + + func handleLinkTapGestureRecognizer(tapRecognizer: UITapGestureRecognizer) { + + let view = tapRecognizer.view + let location = tapRecognizer.locationInView(view) + + var linkStr = "" + + if CGRectContainsPoint(license.frame, location) { + linkStr = getLinkOnText(tapRecognizer.locationInView(license), textView: license) + } + + if !linkStr.isEmpty { + let url: NSURL! = NSURL(string: linkStr) + UIApplication.sharedApplication().openURL(url) + } + } + + func getLinkOnText(location: CGPoint, textView: UITextView) -> String { + + var textPosition1 = textView.closestPositionToPoint(location) + var textPosition2:UITextPosition? + if let _ = textPosition1 { + textPosition2 = textView.positionFromPosition(textPosition1!, offset: 1) + if let _ = textPosition2 { + textPosition1 = textView.positionFromPosition(textPosition1!, offset: -1) + textPosition2 = textView.positionFromPosition(textPosition1!, offset: 1) + } else { + return "" + } + } + + let range = textView.textRangeFromPosition(textPosition1!, toPosition: textPosition2!) + let startOffset = textView.offsetFromPosition(textView.beginningOfDocument, toPosition: range!.start) + let endOffset = textView.offsetFromPosition(textView.beginningOfDocument, toPosition: range!.end) + let offsetRange = NSMakeRange(startOffset, endOffset - startOffset) + if offsetRange.location == NSNotFound || offsetRange.length == 0 { + return "" + } + + if NSMaxRange(offsetRange) > textView.attributedText.length { + return "" + } + + let attributedSubstring = textView.attributedText .attributedSubstringFromRange(offsetRange) + let link = attributedSubstring.attribute(NSLinkAttributeName, atIndex: 0, effectiveRange: nil) + + if let linkStr = link { + return linkStr.absoluteString + } + + return "" + } +} diff --git a/Capture Demo/Mobile Capture Demo/LicenseAgreementViewController.swift b/Capture Demo/Mobile Capture Demo/LicenseAgreementViewController.swift new file mode 100644 index 0000000..2a691a2 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/LicenseAgreementViewController.swift @@ -0,0 +1,43 @@ +// +// LicenseAgreementViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 30/06/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class LicenseAgreementViewController: UITableViewController { + + static let cellIdentifier = "LicenseCell" + + override func viewDidLoad() { + super.viewDidLoad() + + tableView.estimatedRowHeight = 100.0; + tableView.rowHeight = UITableViewAutomaticDimension; + + tableView.setNeedsLayout() + tableView.layoutIfNeeded() + } + + override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + return 1 + } + + override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 1 + } + + override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + let cell: LicenseAgreementCell! = tableView.dequeueReusableCellWithIdentifier(LicenseAgreementViewController.cellIdentifier) as! LicenseAgreementCell! + + cell.setupLicenseData() + + cell.selectionStyle = .None + + return cell + } + +} diff --git a/Capture Demo/Mobile Capture Demo/PhotoAlbum.swift b/Capture Demo/Mobile Capture Demo/PhotoAlbum.swift new file mode 100644 index 0000000..a9110a8 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/PhotoAlbum.swift @@ -0,0 +1,74 @@ +// +// PhotoAlbum.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 17/05/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import Photos + +class PhotoAlbum { + + static let albumName = "Mobile Image Album" + static let sharedInstance = PhotoAlbum() + + var assetCollection: PHAssetCollection! + + init() { + + func fetchAssetCollectionForAlbum() -> PHAssetCollection! { + + PHPhotoLibrary.requestAuthorization { status in + switch status { + case .Authorized: + break + case .Restricted: + return + case .Denied: + return + default: + // place for .NotDetermined - in this callback status is already determined so should never get here + break + } + } + let fetchOptions = PHFetchOptions() + fetchOptions.predicate = NSPredicate(format: "title = %@", PhotoAlbum.albumName) + let collection = PHAssetCollection.fetchAssetCollectionsWithType(.Album, subtype: .Any, options: fetchOptions) + + if let _: AnyObject = collection.firstObject { + return collection.firstObject as! PHAssetCollection + } + + return nil + } + + if let assetCollection = fetchAssetCollectionForAlbum() { + self.assetCollection = assetCollection + return + } + + PHPhotoLibrary.sharedPhotoLibrary().performChanges({ + PHAssetCollectionChangeRequest.creationRequestForAssetCollectionWithTitle(PhotoAlbum.albumName) + }) { success, _ in + if success { + self.assetCollection = fetchAssetCollectionForAlbum() + } + } + } + + func saveImage(image: UIImage, completionHandler: (result: Bool, error: NSError?) -> Void) { + + if assetCollection == nil { + return // If there was an error upstream, skip the save. + } + + PHPhotoLibrary.sharedPhotoLibrary().performChanges( + { + let assetChangeRequest = PHAssetChangeRequest.creationRequestForAssetFromImage(image) + let assetPlaceholder = assetChangeRequest.placeholderForCreatedAsset + let albumChangeRequest = PHAssetCollectionChangeRequest(forAssetCollection: self.assetCollection) + albumChangeRequest!.addAssets([assetPlaceholder!]) + }, completionHandler: completionHandler) + } +} \ No newline at end of file diff --git a/Capture Demo/Mobile Capture Demo/PreviewImageViewController.swift b/Capture Demo/Mobile Capture Demo/PreviewImageViewController.swift new file mode 100644 index 0000000..2ed046e --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/PreviewImageViewController.swift @@ -0,0 +1,194 @@ +// +// PreviewImageViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 10/05/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit +import MessageUI + +class PreviewImageViewController: UIViewController, kfxKIPDelegate, MFMailComposeViewControllerDelegate { + + @IBOutlet var saveGalleryButton : UIButton! + @IBOutlet var sendMailButton : UIButton! + + @IBOutlet var imageView : kfxKUIImageReviewAndEdit! + + var image : kfxKEDImage? + let processor = kfxKENImageProcessor.instance() + + var closeButton: UIBarButtonItem! + + let waitingIndicator = WaitingIndicator() + var openedEmail = false + + override func viewDidLoad() { + super.viewDidLoad() + + saveGalleryButton.ConfigureButton(image: "gallery.png") + sendMailButton.ConfigureButton(image: "email.png") + + imageView.layer.borderColor = UIColor(red: 1, green: 0, blue: 0, alpha: 1.0).CGColor + + sendMailButton.enabled = MFMailComposeViewController.canSendMail() + + navigationItem.setHidesBackButton(true, animated: true); + + closeButton = UIBarButtonItem(title: "Close", style: .Done, target: self, action: #selector(onClosePreview)) + navigationItem.rightBarButtonItem = closeButton + } + + func GetTopView() -> UIView { + + return (navigationController?.view)! + } + + override func viewDidAppear(animated: Bool) { + super.viewDidAppear(animated) + + if !openedEmail { + self.performSelector(#selector(processImage), withObject:nil, afterDelay: 0.25) + } + + openedEmail = false + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + } + + func processImage() { + + waitingIndicator.show("Processing image...", superview: GetTopView()) + + let ipSettings = Settings() + if !Settings.UseDefaultIPSettings() { + ipSettings.load() + } + + let basicSettings = kfxKEDBasicSettingsProfile() + + if ipSettings.Mode == 0 { + basicSettings.specifyOutputBitDepth(KED_BITDEPTH_BITONAL) + } else if ipSettings.Mode == 1 { + basicSettings.specifyOutputBitDepth(KED_BITDEPTH_GRAYSCALE) + } else { + basicSettings.specifyOutputBitDepth(KED_BITDEPTH_COLOR) + } + + basicSettings.doCrop = ipSettings.AutoCrop ? KED_CROP_AUTO : KED_CROP_NONE + basicSettings.doRotate = ipSettings.AutoRotate ? KED_AUTOMATIC : KED_ROTATE_NONE + basicSettings.doDeskew = ipSettings.Deskew + + if ipSettings.Scale == 1 { + basicSettings.outputDPI = 200 + } else if ipSettings.Scale == 2 { + basicSettings.outputDPI = 300 + } else if ipSettings.Mode == 3 { + basicSettings.outputDPI = 400 + } + + processor.delegate = self + processor.basicSettingsProfile = basicSettings + + let res = processor.processImage(image) + if res != KMC_SUCCESS { + print("Error \(res)") + waitingIndicator.hide() + + let alert = UIAlertController(title: "Error", message: "Failed to run image processing. Error: \(res)", preferredStyle: .Alert) + alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil)) + self.presentViewController(alert, animated: true, completion: nil) + } + } + + @IBAction func onClosePreview() { + let confirmAlert = UIAlertController(title: "", message: "Are you sure to close?", preferredStyle: .Alert) + confirmAlert.addAction(UIAlertAction(title: "OK", style: .Default, handler: { (action) in + self.navigationController?.popToRootViewControllerAnimated(true) + })) + confirmAlert.addAction(UIAlertAction(title: "Cancel", style: .Default, handler: nil)) + + self.presentViewController(confirmAlert, animated: true, completion: nil) + } + + @IBAction func onSaveImageToGallery() { + + if let kfxImage = image { + dispatch_async(dispatch_get_main_queue(), { + self.waitingIndicator.show("Saving image...", superview: self.GetTopView()) + }) + + PhotoAlbum.sharedInstance.saveImage(kfxImage.getImageBitmap(), completionHandler: {(result: Bool, error: NSError?) in + + var title = "" + var message = "" + + if result { + message = "Image saved successfully" + } else { + title = "Error" + message = "Failed to save image to gallery." + } + dispatch_async(dispatch_get_main_queue(), { + + self.waitingIndicator.hide() + + let confirmAlert = UIAlertController(title: title, message: message, preferredStyle: .Alert) + confirmAlert.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil)) + + self.presentViewController(confirmAlert, animated: true, completion: nil) + }) + }) + } + } + + @IBAction func onSendImageByMail() { + + if !MFMailComposeViewController.canSendMail() { + return + } + + openedEmail = true + + let mailComposeVC = MFMailComposeViewController() + mailComposeVC.mailComposeDelegate = self + + if let kfxImage = image { + mailComposeVC.addAttachmentData(UIImageJPEGRepresentation(kfxImage.getImageBitmap(), 1.0)!, mimeType: "image/png", fileName: "image.png") + } + + mailComposeVC.setSubject("Email Subject") + + self.presentViewController(mailComposeVC, animated: true, completion: nil) + + } + + func imageOut(status: Int32, withMsg errorMsg: String!, andOutputImage kfxImage: kfxKEDImage!) { + + dispatch_async(dispatch_get_main_queue(), { + self.image = kfxImage + self.imageView.setImage(self.image) + self.waitingIndicator.hide() + }) + } + + func processProgress(status: Int32, withMsg errorMsg: String!, imageID: String!, andProgress percent: Int32) { + dispatch_async(dispatch_get_main_queue(), { + self.waitingIndicator.updateMessage("Processing image... \(percent)%") + }) + } + + func analysisProgress(status: Int32, withMsg errorMsg: String!, imageID: String!, andProgress percent: Int32) { + } + + func analysisComplete(status: Int32, withMsg errorMsg: String!, andOutputImage kfxImage: kfxKEDImage!) { + } + + + func mailComposeController(controller: MFMailComposeViewController, didFinishWithResult result: MFMailComposeResult, error: NSError?) { + self.dismissViewControllerAnimated(true, completion: nil) + } +} diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/bluecircle.png b/Capture Demo/Mobile Capture Demo/Resources/Images/bluecircle.png new file mode 100755 index 0000000..162a96a Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/bluecircle.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/bluecircle@2x.png b/Capture Demo/Mobile Capture Demo/Resources/Images/bluecircle@2x.png new file mode 100755 index 0000000..f6361f4 Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/bluecircle@2x.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/camera@2x.png b/Capture Demo/Mobile Capture Demo/Resources/Images/camera@2x.png new file mode 100755 index 0000000..5fc5e2a Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/camera@2x.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/camera_button_normal.png b/Capture Demo/Mobile Capture Demo/Resources/Images/camera_button_normal.png new file mode 100755 index 0000000..892d2e3 Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/camera_button_normal.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/close@2x.png b/Capture Demo/Mobile Capture Demo/Resources/Images/close@2x.png new file mode 100755 index 0000000..fdd3938 Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/close@2x.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/email.png b/Capture Demo/Mobile Capture Demo/Resources/Images/email.png new file mode 100755 index 0000000..502c7fb Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/email.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/email@2x.png b/Capture Demo/Mobile Capture Demo/Resources/Images/email@2x.png new file mode 100755 index 0000000..c115b2b Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/email@2x.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/gallery@2x.png b/Capture Demo/Mobile Capture Demo/Resources/Images/gallery@2x.png new file mode 100755 index 0000000..ae0effd Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/gallery@2x.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/logo.png b/Capture Demo/Mobile Capture Demo/Resources/Images/logo.png new file mode 100644 index 0000000..75be9d5 Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/logo.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/settings_icon.png b/Capture Demo/Mobile Capture Demo/Resources/Images/settings_icon.png new file mode 100755 index 0000000..a3b3340 Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/settings_icon.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/settings_icon@2x.png b/Capture Demo/Mobile Capture Demo/Resources/Images/settings_icon@2x.png new file mode 100755 index 0000000..a3b3340 Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/settings_icon@2x.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/torch_off@2x.png b/Capture Demo/Mobile Capture Demo/Resources/Images/torch_off@2x.png new file mode 100755 index 0000000..b79d622 Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/torch_off@2x.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/torchon@2x.png b/Capture Demo/Mobile Capture Demo/Resources/Images/torchon@2x.png new file mode 100755 index 0000000..99ba911 Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/torchon@2x.png differ diff --git a/Capture Demo/Mobile Capture Demo/Resources/Images/useImage@2x.png b/Capture Demo/Mobile Capture Demo/Resources/Images/useImage@2x.png new file mode 100644 index 0000000..8363bc2 Binary files /dev/null and b/Capture Demo/Mobile Capture Demo/Resources/Images/useImage@2x.png differ diff --git a/Capture Demo/Mobile Capture Demo/Settings.swift b/Capture Demo/Mobile Capture Demo/Settings.swift new file mode 100644 index 0000000..0123d99 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/Settings.swift @@ -0,0 +1,197 @@ +// +// Settings.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 01/05/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import Foundation + +class Settings { + + static let CameraSettingsCount = 6 + static let MaxUsagesPerMonth = 100 // set to -1 to disable usage limitation + + static var ExceedLimitation = false + + // Camera settings + + var CameraShowGallery : Bool = true + var StabilityDelay : Int32 = 95 + var PitchThreshold : Int32 = 45 + var RollThreshold : Int32 = 45 + var ManualCaptureTime : Int32 = 15 + var AutoTorch : Bool = true + + // IP settings + var UseDefaultSettings : Bool = true + var Mode : Int = 0 + var AutoCrop : Bool = true + var AutoRotate : Bool = true + var Deskew : Bool = true + var Scale : Int = 1 + + // Camera settings keys + static let CameraShowGalleryKey = "CameraShowGallery" + static let StabilityDelayKey = "StabilityDelay" + static let PitchThresholdKey = "PitchThreshold" + static let RollThresholdKey = "RollThreshold" + static let ManualCaptureTimeKey = "ManualCaptureTime" + static let AutoTorchKey = "AutoTorch" + + static let UseDefaultSettingsKey = "UseDefaultSettings" + static let ModeKey = "Mode" + static let AutoCropKey = "AutoCrop" + static let AutoRotateKey = "AutoRotate" + static let DeskewKey = "Deskew" + static let ScaleKey = "Scale" + + static let ShotsCounterKey = "UsageCounter" + static let UsageUpdateDateKey = "UsageUpdateDate" + + func load() { + + let userDefaults = NSUserDefaults.standardUserDefaults() + + let keys = userDefaults.dictionaryRepresentation().keys + + // load camera settings + if keys.contains(Settings.CameraShowGalleryKey) { + CameraShowGallery = userDefaults.boolForKey(Settings.CameraShowGalleryKey) + } + if keys.contains(Settings.StabilityDelayKey) { + StabilityDelay = Int32(userDefaults.integerForKey(Settings.StabilityDelayKey)) + } + if keys.contains(Settings.PitchThresholdKey) { + PitchThreshold = Int32(userDefaults.integerForKey(Settings.PitchThresholdKey)) + } + if keys.contains(Settings.RollThresholdKey) { + RollThreshold = Int32(userDefaults.integerForKey(Settings.RollThresholdKey)) + } + if keys.contains(Settings.ManualCaptureTimeKey) { + ManualCaptureTime = Int32(userDefaults.integerForKey(Settings.ManualCaptureTimeKey)) + } + if keys.contains(Settings.AutoTorchKey) { + AutoTorch = userDefaults.boolForKey(Settings.AutoTorchKey) + } + + UseDefaultSettings = Settings.UseDefaultIPSettings() + if keys.contains(Settings.ModeKey) { + Mode = userDefaults.integerForKey(Settings.ModeKey) + } + if keys.contains(Settings.AutoCropKey) { + AutoCrop = userDefaults.boolForKey(Settings.AutoCropKey) + } + if keys.contains(Settings.AutoRotateKey) { + AutoRotate = userDefaults.boolForKey(Settings.AutoRotateKey) + } + if keys.contains(Settings.DeskewKey) { + Deskew = userDefaults.boolForKey(Settings.DeskewKey) + } + if keys.contains(Settings.ScaleKey) { + Scale = userDefaults.integerForKey(Settings.ScaleKey) + } + } + + func save() { + + let userDefaults = NSUserDefaults.standardUserDefaults() + + // save camera settings + userDefaults.setBool(CameraShowGallery, forKey: Settings.CameraShowGalleryKey) + userDefaults.setInteger(Int(StabilityDelay), forKey: Settings.StabilityDelayKey) + userDefaults.setInteger(Int(PitchThreshold), forKey: Settings.PitchThresholdKey) + userDefaults.setInteger(Int(RollThreshold), forKey: Settings.RollThresholdKey) + userDefaults.setInteger(Int(ManualCaptureTime), forKey: Settings.ManualCaptureTimeKey) + userDefaults.setBool(AutoTorch, forKey: Settings.AutoTorchKey) + + saveIPSettings() + + userDefaults.synchronize() + } + + static func UseDefaultIPSettings() -> Bool { + let userDefaults = NSUserDefaults.standardUserDefaults() + + if userDefaults.dictionaryRepresentation().keys.contains(Settings.UseDefaultSettingsKey) { + return userDefaults.boolForKey(Settings.UseDefaultSettingsKey) + } + + return true + } + + + func saveIPSettings() { + let userDefaults = NSUserDefaults.standardUserDefaults() + + userDefaults.setBool(UseDefaultSettings, forKey: Settings.UseDefaultSettingsKey) + userDefaults.setInteger(Mode, forKey: Settings.ModeKey) + userDefaults.setBool(AutoCrop, forKey: Settings.AutoCropKey) + userDefaults.setBool(AutoRotate, forKey: Settings.AutoRotateKey) + userDefaults.setBool(Deskew, forKey: Settings.DeskewKey) + userDefaults.setInteger(Scale, forKey: Settings.ScaleKey) + + userDefaults.synchronize() + } + + static func MonthOfDate(date: NSDate) -> Int { + + let calendar = NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian) + let dateComponents = calendar?.components(NSCalendarUnit.Month, fromDate: date) + if let components = dateComponents { + return components.month + } + return -1 + } + + static func validateLimitation() { + if Settings.MaxUsagesPerMonth == -1 { + return + } + + let userDefaults = NSUserDefaults.standardUserDefaults() + let keys = userDefaults.dictionaryRepresentation().keys + + var exceeded = false + if keys.contains(Settings.ShotsCounterKey) && keys.contains(Settings.UsageUpdateDateKey) { + let lastDateInterval : Int = userDefaults.integerForKey(Settings.UsageUpdateDateKey) + + let lastDateMonth = MonthOfDate(NSDate(timeIntervalSince1970: NSTimeInterval(lastDateInterval))) + let todaysMonth = MonthOfDate(NSDate()) + + if lastDateMonth == todaysMonth { + let shotsCounter = userDefaults.integerForKey(Settings.ShotsCounterKey) + exceeded = shotsCounter >= Settings.MaxUsagesPerMonth + } + } + + ExceedLimitation = exceeded + } + + static func updateLimitationCounter() { + if Settings.MaxUsagesPerMonth == -1 { + return + } + + let userDefaults = NSUserDefaults.standardUserDefaults() + let keys = userDefaults.dictionaryRepresentation().keys + var shotsCounter = 0 + + if keys.contains(Settings.ShotsCounterKey) && keys.contains(Settings.UsageUpdateDateKey) { + let lastDateInterval : Int = userDefaults.integerForKey(Settings.UsageUpdateDateKey) + + let lastDateMonth = MonthOfDate(NSDate(timeIntervalSince1970: NSTimeInterval(lastDateInterval))) + let todaysMonth = MonthOfDate(NSDate()) + + if lastDateMonth == todaysMonth { + shotsCounter = userDefaults.integerForKey(Settings.ShotsCounterKey) + } + } + + shotsCounter += 1 + + userDefaults.setInteger(shotsCounter, forKey: Settings.ShotsCounterKey) + userDefaults.setInteger(Int(NSDate().timeIntervalSince1970), forKey: Settings.UsageUpdateDateKey) + } +} diff --git a/Capture Demo/Mobile Capture Demo/SettingsTableViewController.swift b/Capture Demo/Mobile Capture Demo/SettingsTableViewController.swift new file mode 100644 index 0000000..0781900 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/SettingsTableViewController.swift @@ -0,0 +1,73 @@ +// +// SettingsTableViewController.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 15/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class SettingsTableViewController: UITableViewController { + + static let cellIdentifier = "SettingsCellIdentifier" + static let SegueCameraSettingsViewController = "CameraSettingsViewController" + static let SegueImageProcessorSettingsViewController = "ImageProcessorSettingsViewController" + static let SegueAboutViewController = "AboutViewController" + static let SegueLicenseAgreementViewController = "LicenseAgreementViewController" + + override func viewDidLoad() { + super.viewDidLoad() + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + } + + // MARK: - Table view data source + + override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + return 1 + } + + override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 4 + } + + override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + var cell: UITableViewCell! = tableView.dequeueReusableCellWithIdentifier(SettingsTableViewController.cellIdentifier) + if cell == nil { + cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: SettingsTableViewController.cellIdentifier) + } + + if indexPath.row == 0 { + cell.textLabel?.text = "Camera" + } else if indexPath.row == 1 { + cell.textLabel?.text = "Image Processor" + } else if indexPath.row == 2 { + cell.textLabel?.text = "About" + } else if indexPath.row == 3 { + cell.textLabel?.text = "License Agreement" + } + + cell.accessoryType = UITableViewCellAccessoryType.DisclosureIndicator + + return cell + } + + override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { + + var segueName = SettingsTableViewController.SegueCameraSettingsViewController + + if indexPath.row == 1 { + segueName = SettingsTableViewController.SegueImageProcessorSettingsViewController + } else if indexPath.row == 2 { + segueName = SettingsTableViewController.SegueAboutViewController + } else if indexPath.row == 3 { + segueName = SettingsTableViewController.SegueLicenseAgreementViewController + } + + performSegueWithIdentifier(segueName, sender: self) + tableView.deselectRowAtIndexPath(indexPath, animated: true) + } +} diff --git a/Capture Demo/Mobile Capture Demo/WaitingIndicator.swift b/Capture Demo/Mobile Capture Demo/WaitingIndicator.swift new file mode 100644 index 0000000..3688db0 --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/WaitingIndicator.swift @@ -0,0 +1,63 @@ +// +// WaitingIndicator.swift +// Mobile Capture Demo +// +// Created by Michael Chernikov on 07/06/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +import UIKit + +class WaitingIndicator: UIView { + + var message = UILabel() + var indicator = UIActivityIndicatorView(activityIndicatorStyle: UIActivityIndicatorViewStyle.WhiteLarge) + + let messageLabelHeight: CGFloat = 30 + + override func layoutSubviews() { + super.layoutSubviews() + + let screenRect = UIScreen.mainScreen().bounds + + frame = CGRectMake(0, 0, screenRect.width, screenRect.height) + + let labelFrame = CGRectMake(30, screenRect.midY - messageLabelHeight / 2, screenRect.width - 60, messageLabelHeight) + message.frame = labelFrame + + let indicatorSize = indicator.frame.size + let indicatorRect = CGRectMake(screenRect.midX - indicatorSize.width / 2 , labelFrame.minY - 20 - indicatorSize.height, indicatorSize.width, indicatorSize.height) + indicator.frame = indicatorRect + } + + func show(text: String, superview: UIView) { + message.text = text + indicator.startAnimating() + + message.textColor = UIColor.whiteColor() + message.textAlignment = .Center + message.font = message.font.fontWithSize(24) + message.adjustsFontSizeToFitWidth = true + + addSubview(message) + addSubview(indicator) + + backgroundColor = UIColor.grayColor() + alpha = 0.5 + + superview.addSubview(self) + superview.bringSubviewToFront(self) + } + + func hide() { + message.removeFromSuperview() + indicator.removeFromSuperview() + hidden = true + removeFromSuperview() + } + + func updateMessage(text: String) { + message.text = text + } +} + \ No newline at end of file diff --git a/Capture Demo/Mobile Capture Demo/eula.rtf b/Capture Demo/Mobile Capture Demo/eula.rtf new file mode 100644 index 0000000..c8b7fdf --- /dev/null +++ b/Capture Demo/Mobile Capture Demo/eula.rtf @@ -0,0 +1,26 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 ArialMT;} +{\colortbl;\red255\green255\blue255;\red0\green0\blue255;} +{\info +{\author Peter Lawrence} +{\*\company Kofax, Inc.}}\margl720\margr720\margb720\margt720\viewkind1 +\deftab720 +\pard\pardeftab720\ri0\sb100\sa100\partightenfactor0 + +\f0\fs20 \cf0 This End-User License Agreement (\'93Agreement\'94) governs your use of the Atalasoft Mobile Application software (\'93Software\'94) provided by Atalasoft, Inc and its affiliates (\'93Atalasoft\'94). Your use of the Software constitutes your acceptance of the terms of this Agreement. Your use of the Software is also subject to the signed agreement between Atalasoft and your employer or in the absence of a signed agreement, Atalasoft\'92s standard license terms as made available at {\field{\*\fldinst{HYPERLINK "http://www.Kofax.com"}}{\fldrslt \cf2 \ul \ulc2 www.Kofax.com}}.\ +\pard\pardeftab720\ri0\sb100\sa100\partightenfactor0 + +\b \cf0 1. License. +\b0 Atalasoft grants to you a nontransferable, nonexclusive, license to install and use one copy of the Software, in object code form only, solely on your mobile device. You agree to the following license restrictions: (a) to not duplicate, copy or redistribute the Software except as necessary for use on your mobile device; and (b) to not modify, translate, make derivative works of, disassemble, reverse engineer or otherwise use the Software in order to build competitive technologies or for competitive benchmark purposes.\ + +\b 2. Generally. +\b0 You agree that Atalasoft shall not have any liability to you for your use of the Software, including not limited to your access or creation of content using the Software. By using the Software, you acknowledge and agree that Atalasoft is not responsible for examining or evaluating the content, accuracy, completeness, timeliness, validity, copyright compliance, legality, decency, quality or any other aspect of the content accessed or created by You You further agree not to use the Software to infringe or violate the rights of any other party, and that Atalasoft is not in any way responsible for any such use by you. \ +Atalasoft reserves the right to change, terminate, or disable access to the Software as is reasonably necessary to ensure compliance with this Agreement. In no event will Atalasoft be liable for the change, removal of, termination, or disabling of access to the Software. \ + +\b 3. Limitation Of Liability. +\b0 To the extent not prohibited by law, in no event shall Atalasoft be liable for personal injury, or any incidental, special, indirect or consequential damages, including, without limitation, damages for loss of profits, loss of data, business interruption or any other commercial damages or losses, arising out of or related to your use or inability to use the Software or Services, however caused, regardless of the theory of liability (contract, tort or otherwise) and even if Atalasoft has been advised of the possibility of such damages. In no event shall Atalasoft\'92s total liability to you for all damages (other than as may be required by applicable law in cases involving personal injury) exceed the amount price paid for the Software, if any. The foregoing limitations will apply even if the above stated remedy fails of its essential purpose.\ +Some jurisdictions do not allow the limitation of liability for personal injury, or of incidental or consequential damages, so this limitation may not apply to you.\ + +\b 4. Indemnification By You. +\b0 You agree to indemnify and hold Atalasoft, its subsidiaries, and affiliates, and their respective officers, agents, partners and employees, harmless from any loss, liability, claim or demand, including reasonable attorney\'92s fees, made by any third party due to or arising out of your use of the Software in violation of this Agreement, and in the event that any content accessed or created by you causes Atalasoft to be liable to another.\ +} \ No newline at end of file diff --git a/Capture Demo/Mobile-Capture-Demo-Bridging-Header.h b/Capture Demo/Mobile-Capture-Demo-Bridging-Header.h new file mode 100644 index 0000000..2c0fe65 --- /dev/null +++ b/Capture Demo/Mobile-Capture-Demo-Bridging-Header.h @@ -0,0 +1,19 @@ +// +// Mobile-Capture-Demo-Bridging-Header.h +// Mobile Capture Demo +// +// Created by Michael Chernikov on 15/04/16. +// Copyright © 2016 Atalasoft, a Kofax Company. All rights reserved. +// + +#ifndef Mobile_Capture_Demo_Bridging_Header_h +#define Mobile_Capture_Demo_Bridging_Header_h + +#import "../kfxEVRS_License.h" +#import "MobileSDK.h" +#import "kfxLibEngines/kfxEngines.h" +#import "kfxLibEngines/kfxKUTErrorInfo.h" +#import "kfxLibUIControls/kfxUIControls.h" +#import "kfxLibUtilities/kfxUtilities.h" + +#endif /* Mobile_Capture_Demo_Bridging_Header_h */ diff --git a/Capture Demo/MobileCapture.plist b/Capture Demo/MobileCapture.plist new file mode 100644 index 0000000..f862a9d --- /dev/null +++ b/Capture Demo/MobileCapture.plist @@ -0,0 +1,12 @@ + + + + + method + app-store + teamID + B9C7GRQCYQ + uploadSymbols + + + \ No newline at end of file diff --git a/kfxEVRS_License.h b/kfxEVRS_License.h new file mode 100644 index 0000000..b3a586a --- /dev/null +++ b/kfxEVRS_License.h @@ -0,0 +1,16 @@ +//========================================================================= +// kfxEVRS_License.h +// +// Copyright (c) 2014 Kofax. All rights reserved. Kofax Confidential. +// Unauthorized use, duplication, distribution, or disclosure is strictly +// prohibited. +// +// Atalasoft Mobile SDK +//========================================================================= + +#ifndef kfxEVRS_License_h +#define kfxEVRS_License_h + +#define PROCESS_PAGE_SDK_LICENSE "Put your license here" + +#endif diff --git a/versioninfo.properties b/versioninfo.properties new file mode 100644 index 0000000..b7e585b --- /dev/null +++ b/versioninfo.properties @@ -0,0 +1,10 @@ +samples.company.name=Kofax, Inc. +samples.copyright=Copyright © Kofax 2016 +samples.copyright.year=2016 +samples.version.major=1 +samples.version.minor=0 +samples.version.service.pack=0 +samples.version.fix.pack=0 +samples.version.fix=0 +samples.version.build.number=0 +samples.version.revision=0