diff --git a/Art/BarcodeScannerIcon.png b/Art/BarcodeScannerIcon.png deleted file mode 100644 index 2aaa2e8..0000000 Binary files a/Art/BarcodeScannerIcon.png and /dev/null differ diff --git a/Art/BarcodeScannerPresentation.png b/Art/BarcodeScannerPresentation.png deleted file mode 100644 index a7a5656..0000000 Binary files a/Art/BarcodeScannerPresentation.png and /dev/null differ diff --git a/Art/ExampleError.png b/Art/ExampleError.png deleted file mode 100644 index c6d2ef1..0000000 Binary files a/Art/ExampleError.png and /dev/null differ diff --git a/Art/ExampleLoading.png b/Art/ExampleLoading.png deleted file mode 100644 index 9e5cef4..0000000 Binary files a/Art/ExampleLoading.png and /dev/null differ diff --git a/Art/ExampleScanning.png b/Art/ExampleScanning.png deleted file mode 100644 index 652fe1f..0000000 Binary files a/Art/ExampleScanning.png and /dev/null differ diff --git a/BarcodeScanner.podspec b/BarcodeScanner.podspec index 5acd641..f84e366 100644 --- a/BarcodeScanner.podspec +++ b/BarcodeScanner.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "BarcodeScanner" s.summary = "Simple and beautiful barcode scanner." - s.version = "5.0.1" + s.version = "5.0.0" s.homepage = "https://github.com/hyperoslo/BarcodeScanner" s.license = 'MIT' s.author = { "Hyper Interaktiv AS" => "ios@hyper.no" } diff --git a/BarcodeScanner.xcodeproj/project.pbxproj b/BarcodeScanner.xcodeproj/project.pbxproj index 5b02f64..4b26f59 100644 --- a/BarcodeScanner.xcodeproj/project.pbxproj +++ b/BarcodeScanner.xcodeproj/project.pbxproj @@ -8,8 +8,11 @@ /* Begin PBXBuildFile section */ 2DBF9E0E1F169DEF006B5AA8 /* FocusViewType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DBF9E0D1F169DEF006B5AA8 /* FocusViewType.swift */; }; - CE8C0771252FBBAF007FF4A4 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE8C0770252FBBAF007FF4A4 /* Images.xcassets */; }; D504555F1FD8714700E46826 /* UIView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D504555E1FD8714700E46826 /* UIView+Extensions.swift */; }; + D50BE3E91C9FE7A80000A34C /* flashOff@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D50BE3E51C9FE7A80000A34C /* flashOff@3x.png */; }; + D50BE3EA1C9FE7A80000A34C /* flashOn@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D50BE3E61C9FE7A80000A34C /* flashOn@3x.png */; }; + D50BE3EB1C9FE7A80000A34C /* info@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D50BE3E71C9FE7A80000A34C /* info@3x.png */; }; + D5349DF8201E42D900CD53EA /* cameraRotate@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D5349DF7201E42D900CD53EA /* cameraRotate@3x.png */; }; D55281B62016758F00FF3CDD /* HeaderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55281B52016758F00FF3CDD /* HeaderViewController.swift */; }; D55281B8201675D500FF3CDD /* MessageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55281B7201675D500FF3CDD /* MessageViewController.swift */; }; D55281BA2016770800FF3CDD /* CameraViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D55281B92016770800FF3CDD /* CameraViewController.swift */; }; @@ -25,8 +28,11 @@ /* Begin PBXFileReference section */ 2DBF9E0D1F169DEF006B5AA8 /* FocusViewType.swift */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = FocusViewType.swift; sourceTree = ""; tabWidth = 2; }; - CE8C0770252FBBAF007FF4A4 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; D504555E1FD8714700E46826 /* UIView+Extensions.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = "UIView+Extensions.swift"; sourceTree = ""; tabWidth = 2; }; + D50BE3E51C9FE7A80000A34C /* flashOff@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "flashOff@3x.png"; sourceTree = ""; }; + D50BE3E61C9FE7A80000A34C /* flashOn@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "flashOn@3x.png"; sourceTree = ""; }; + D50BE3E71C9FE7A80000A34C /* info@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "info@3x.png"; sourceTree = ""; }; + D5349DF7201E42D900CD53EA /* cameraRotate@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "cameraRotate@3x.png"; sourceTree = ""; }; D55281B52016758F00FF3CDD /* HeaderViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderViewController.swift; sourceTree = ""; }; D55281B7201675D500FF3CDD /* MessageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageViewController.swift; sourceTree = ""; }; D55281B92016770800FF3CDD /* CameraViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CameraViewController.swift; sourceTree = ""; }; @@ -56,7 +62,10 @@ D50BE3E31C9FE7A80000A34C /* Images */ = { isa = PBXGroup; children = ( - CE8C0770252FBBAF007FF4A4 /* Images.xcassets */, + D5349DF7201E42D900CD53EA /* cameraRotate@3x.png */, + D50BE3E51C9FE7A80000A34C /* flashOff@3x.png */, + D50BE3E61C9FE7A80000A34C /* flashOn@3x.png */, + D50BE3E71C9FE7A80000A34C /* info@3x.png */, ); path = Images; sourceTree = ""; @@ -86,6 +95,7 @@ D5B2E8951C3A780C00C0327D = { isa = PBXGroup; children = ( + D50BE3E31C9FE7A80000A34C /* Images */, D5C629691C3A809D007F7B7C /* Sources */, D5C6295C1C3A800E007F7B7C /* BarcodeScanner */, D5B2E8A01C3A780C00C0327D /* Products */, @@ -111,7 +121,6 @@ D5C629691C3A809D007F7B7C /* Sources */ = { isa = PBXGroup; children = ( - D50BE3E31C9FE7A80000A34C /* Images */, D5CB3785201947D000B9319D /* Helpers */, D5CB37842019477900B9319D /* DataStructures */, D55281BD20167D9F00FF3CDD /* Extensions */, @@ -209,7 +218,10 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - CE8C0771252FBBAF007FF4A4 /* Images.xcassets in Resources */, + D50BE3E91C9FE7A80000A34C /* flashOff@3x.png in Resources */, + D5349DF8201E42D900CD53EA /* cameraRotate@3x.png in Resources */, + D50BE3EB1C9FE7A80000A34C /* info@3x.png in Resources */, + D50BE3EA1C9FE7A80000A34C /* flashOn@3x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample.xcodeproj/project.pbxproj b/Example/BarcodeScannerExample/BarcodeScannerExample.xcodeproj/project.pbxproj deleted file mode 100644 index 997ff15..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,460 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 63C957FE1F74872600BAD365 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 63C957FC1F74872600BAD365 /* Main.storyboard */; }; - 7D6D7D252B4099761F98D03B /* Pods_BarcodeScannerExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F2F8EDB06143E719746E253D /* Pods_BarcodeScannerExample.framework */; }; - D50BE3F91C9FE8870000A34C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D50BE3F81C9FE8870000A34C /* AppDelegate.swift */; }; - D50BE3FB1C9FE8870000A34C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D50BE3FA1C9FE8870000A34C /* ViewController.swift */; }; - D50BE4001C9FE8870000A34C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D50BE3FF1C9FE8870000A34C /* Assets.xcassets */; }; - D50BE4031C9FE8870000A34C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D50BE4011C9FE8870000A34C /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 560D7A8F00215E8F16A67009 /* Pods-BarcodeScannerExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BarcodeScannerExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BarcodeScannerExample/Pods-BarcodeScannerExample.debug.xcconfig"; sourceTree = ""; }; - 63C957FD1F74872600BAD365 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - B2BB8B30EF0245DC64F4025A /* Pods-BarcodeScannerExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BarcodeScannerExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-BarcodeScannerExample/Pods-BarcodeScannerExample.release.xcconfig"; sourceTree = ""; }; - D50BE3F51C9FE8870000A34C /* BarcodeScannerExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BarcodeScannerExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - D50BE3F81C9FE8870000A34C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - D50BE3FA1C9FE8870000A34C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - D50BE3FF1C9FE8870000A34C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - D50BE4021C9FE8870000A34C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - D50BE4041C9FE8870000A34C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - F2F8EDB06143E719746E253D /* Pods_BarcodeScannerExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BarcodeScannerExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D50BE3F21C9FE8870000A34C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7D6D7D252B4099761F98D03B /* Pods_BarcodeScannerExample.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 04F2F1ECAB8C0457F6FF4BBC /* Pods */ = { - isa = PBXGroup; - children = ( - 560D7A8F00215E8F16A67009 /* Pods-BarcodeScannerExample.debug.xcconfig */, - B2BB8B30EF0245DC64F4025A /* Pods-BarcodeScannerExample.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 220E47204A0A0DD7D8A4D4D8 /* Frameworks */ = { - isa = PBXGroup; - children = ( - F2F8EDB06143E719746E253D /* Pods_BarcodeScannerExample.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - D50BE3EC1C9FE8870000A34C = { - isa = PBXGroup; - children = ( - D50BE3F71C9FE8870000A34C /* BarcodeScannerExample */, - D50BE3F61C9FE8870000A34C /* Products */, - 04F2F1ECAB8C0457F6FF4BBC /* Pods */, - 220E47204A0A0DD7D8A4D4D8 /* Frameworks */, - ); - sourceTree = ""; - }; - D50BE3F61C9FE8870000A34C /* Products */ = { - isa = PBXGroup; - children = ( - D50BE3F51C9FE8870000A34C /* BarcodeScannerExample.app */, - ); - name = Products; - sourceTree = ""; - }; - D50BE3F71C9FE8870000A34C /* BarcodeScannerExample */ = { - isa = PBXGroup; - children = ( - 63C957FC1F74872600BAD365 /* Main.storyboard */, - D50BE3F81C9FE8870000A34C /* AppDelegate.swift */, - D50BE3FA1C9FE8870000A34C /* ViewController.swift */, - D50BE3FF1C9FE8870000A34C /* Assets.xcassets */, - D50BE4011C9FE8870000A34C /* LaunchScreen.storyboard */, - D50BE4041C9FE8870000A34C /* Info.plist */, - ); - path = BarcodeScannerExample; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - D50BE3F41C9FE8870000A34C /* BarcodeScannerExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = D50BE4071C9FE8870000A34C /* Build configuration list for PBXNativeTarget "BarcodeScannerExample" */; - buildPhases = ( - BDF82C3FF3E7C5A57E2534BE /* [CP] Check Pods Manifest.lock */, - 36F8214472FD1CA639982CE8 /* [CP] Check Pods Manifest.lock */, - D50BE3F11C9FE8870000A34C /* Sources */, - D50BE3F21C9FE8870000A34C /* Frameworks */, - D50BE3F31C9FE8870000A34C /* Resources */, - E090C912AA824DD28A310598 /* [CP] Embed Pods Frameworks */, - C6637BE832A43C8F49FCF84D /* 📦 Embed Pods Frameworks */, - A8D9BF9C6304351F12DE8E23 /* 📦 Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = BarcodeScannerExample; - productName = BarcodeScannerExample; - productReference = D50BE3F51C9FE8870000A34C /* BarcodeScannerExample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D50BE3ED1C9FE8870000A34C /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 1200; - ORGANIZATIONNAME = "Hyper Interaktiv AS"; - TargetAttributes = { - D50BE3F41C9FE8870000A34C = { - CreatedOnToolsVersion = 7.2.1; - DevelopmentTeam = XVAH95CHDC; - LastSwiftMigration = 0800; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = D50BE3F01C9FE8870000A34C /* Build configuration list for PBXProject "BarcodeScannerExample" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - English, - en, - Base, - ); - mainGroup = D50BE3EC1C9FE8870000A34C; - productRefGroup = D50BE3F61C9FE8870000A34C /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D50BE3F41C9FE8870000A34C /* BarcodeScannerExample */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - D50BE3F31C9FE8870000A34C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63C957FE1F74872600BAD365 /* Main.storyboard in Resources */, - D50BE4031C9FE8870000A34C /* LaunchScreen.storyboard in Resources */, - D50BE4001C9FE8870000A34C /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 36F8214472FD1CA639982CE8 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - A8D9BF9C6304351F12DE8E23 /* 📦 Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BarcodeScannerExample/Pods-BarcodeScannerExample-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - BDF82C3FF3E7C5A57E2534BE /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-BarcodeScannerExample-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C6637BE832A43C8F49FCF84D /* 📦 Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "📦 Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BarcodeScannerExample/Pods-BarcodeScannerExample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - E090C912AA824DD28A310598 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-BarcodeScannerExample/Pods-BarcodeScannerExample-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/BarcodeScanner/BarcodeScanner.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BarcodeScanner.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BarcodeScannerExample/Pods-BarcodeScannerExample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - D50BE3F11C9FE8870000A34C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D50BE3FB1C9FE8870000A34C /* ViewController.swift in Sources */, - D50BE3F91C9FE8870000A34C /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 63C957FC1F74872600BAD365 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 63C957FD1F74872600BAD365 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - D50BE4011C9FE8870000A34C /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - D50BE4021C9FE8870000A34C /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - D50BE4051C9FE8870000A34C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "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 = 12.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - D50BE4061C9FE8870000A34C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "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 = 12.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - D50BE4081C9FE8870000A34C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 560D7A8F00215E8F16A67009 /* Pods-BarcodeScannerExample.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = XVAH95CHDC; - INFOPLIST_FILE = BarcodeScannerExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = no.hyper.BarcodeScannerExample2; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = "5429b4c3-def8-4c81-a541-9333e6f69af9"; - PROVISIONING_PROFILE_SPECIFIER = "Wildcard Development"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - D50BE4091C9FE8870000A34C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B2BB8B30EF0245DC64F4025A /* Pods-BarcodeScannerExample.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = BarcodeScannerExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = no.hyper.BarcodeScannerExample2; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE = ""; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - D50BE3F01C9FE8870000A34C /* Build configuration list for PBXProject "BarcodeScannerExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D50BE4051C9FE8870000A34C /* Debug */, - D50BE4061C9FE8870000A34C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D50BE4071C9FE8870000A34C /* Build configuration list for PBXNativeTarget "BarcodeScannerExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D50BE4081C9FE8870000A34C /* Debug */, - D50BE4091C9FE8870000A34C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = D50BE3ED1C9FE8870000A34C /* Project object */; -} diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/BarcodeScannerExample/BarcodeScannerExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index a87b0fd..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/BarcodeScannerExample/BarcodeScannerExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample.xcworkspace/contents.xcworkspacedata b/Example/BarcodeScannerExample/BarcodeScannerExample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 2f49253..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/BarcodeScannerExample/BarcodeScannerExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample/AppDelegate.swift b/Example/BarcodeScannerExample/BarcodeScannerExample/AppDelegate.swift deleted file mode 100644 index 9614d91..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample/AppDelegate.swift +++ /dev/null @@ -1,11 +0,0 @@ -import UIKit -import BarcodeScanner - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - var window: UIWindow? - func application(_ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - return true - } -} diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 19882d5..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - }, - { - "idiom" : "ios-marketing", - "size" : "1024x1024", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/BarcodeScannerPresentation.imageset/BarcodeScannerPresentation-1.png b/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/BarcodeScannerPresentation.imageset/BarcodeScannerPresentation-1.png deleted file mode 100644 index a7a5656..0000000 Binary files a/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/BarcodeScannerPresentation.imageset/BarcodeScannerPresentation-1.png and /dev/null differ diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/BarcodeScannerPresentation.imageset/BarcodeScannerPresentation-2.png b/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/BarcodeScannerPresentation.imageset/BarcodeScannerPresentation-2.png deleted file mode 100644 index a7a5656..0000000 Binary files a/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/BarcodeScannerPresentation.imageset/BarcodeScannerPresentation-2.png and /dev/null differ diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/BarcodeScannerPresentation.imageset/BarcodeScannerPresentation.png b/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/BarcodeScannerPresentation.imageset/BarcodeScannerPresentation.png deleted file mode 100644 index a7a5656..0000000 Binary files a/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/BarcodeScannerPresentation.imageset/BarcodeScannerPresentation.png and /dev/null differ diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/BarcodeScannerPresentation.imageset/Contents.json b/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/BarcodeScannerPresentation.imageset/Contents.json deleted file mode 100644 index 231b002..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/BarcodeScannerPresentation.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "BarcodeScannerPresentation.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "BarcodeScannerPresentation-1.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "BarcodeScannerPresentation-2.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/Contents.json b/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample/Base.lproj/LaunchScreen.storyboard b/Example/BarcodeScannerExample/BarcodeScannerExample/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 615bfff..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample/Base.lproj/Main.storyboard b/Example/BarcodeScannerExample/BarcodeScannerExample/Base.lproj/Main.storyboard deleted file mode 100644 index 09979b0..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample/Base.lproj/Main.storyboard +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample/Info.plist b/Example/BarcodeScannerExample/BarcodeScannerExample/Info.plist deleted file mode 100644 index ecf6b84..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample/Info.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSCameraUsageDescription - This app uses the camera for testing purposes - NSPhotoLibraryUsageDescription - This app uses the library for testing purposes - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UIRequiresFullScreen - - UIStatusBarHidden - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Example/BarcodeScannerExample/BarcodeScannerExample/ViewController.swift b/Example/BarcodeScannerExample/BarcodeScannerExample/ViewController.swift deleted file mode 100644 index 0fcb12f..0000000 --- a/Example/BarcodeScannerExample/BarcodeScannerExample/ViewController.swift +++ /dev/null @@ -1,56 +0,0 @@ -import UIKit -import BarcodeScanner - -final class ViewController: UIViewController { - @IBOutlet var presentScannerButton: UIButton! - @IBOutlet var pushScannerButton: UIButton! - - @IBAction func handleScannerPresent(_ sender: Any, forEvent event: UIEvent) { - let viewController = makeBarcodeScannerViewController() - viewController.title = "Barcode Scanner" - present(viewController, animated: true, completion: nil) - } - - @IBAction func handleScannerPush(_ sender: Any, forEvent event: UIEvent) { - let viewController = makeBarcodeScannerViewController() - viewController.title = "Barcode Scanner" - navigationController?.pushViewController(viewController, animated: true) - } - - private func makeBarcodeScannerViewController() -> BarcodeScannerViewController { - let viewController = BarcodeScannerViewController() - viewController.codeDelegate = self - viewController.errorDelegate = self - viewController.dismissalDelegate = self - return viewController - } -} - -// MARK: - BarcodeScannerCodeDelegate - -extension ViewController: BarcodeScannerCodeDelegate { - func scanner(_ controller: BarcodeScannerViewController, didCaptureCode code: String, type: String) { - print("Barcode Data: \(code)") - print("Symbology Type: \(type)") - - DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) { - controller.resetWithError() - } - } -} - -// MARK: - BarcodeScannerErrorDelegate - -extension ViewController: BarcodeScannerErrorDelegate { - func scanner(_ controller: BarcodeScannerViewController, didReceiveError error: Error) { - print(error) - } -} - -// MARK: - BarcodeScannerDismissalDelegate - -extension ViewController: BarcodeScannerDismissalDelegate { - func scannerDidDismiss(_ controller: BarcodeScannerViewController) { - controller.dismiss(animated: true, completion: nil) - } -} diff --git a/Example/BarcodeScannerExample/Podfile b/Example/BarcodeScannerExample/Podfile deleted file mode 100644 index c5bcab2..0000000 --- a/Example/BarcodeScannerExample/Podfile +++ /dev/null @@ -1,4 +0,0 @@ -use_frameworks! -platform :ios, '11.0' -pod 'BarcodeScanner', path: '../../' -target 'BarcodeScannerExample' diff --git a/Example/BarcodeScannerExample/Podfile.lock b/Example/BarcodeScannerExample/Podfile.lock deleted file mode 100644 index 45e77ed..0000000 --- a/Example/BarcodeScannerExample/Podfile.lock +++ /dev/null @@ -1,16 +0,0 @@ -PODS: - - BarcodeScanner (4.1.3) - -DEPENDENCIES: - - BarcodeScanner (from `../../`) - -EXTERNAL SOURCES: - BarcodeScanner: - :path: "../../" - -SPEC CHECKSUMS: - BarcodeScanner: fce1ad2b3f28286b1ab5091fe0979789618bee27 - -PODFILE CHECKSUM: c4b1962694020ee138563c7191c4ccdffcfa6c4f - -COCOAPODS: 1.9.3 diff --git a/Sources/Images/Images.xcassets/cameraRotate.imageset/cameraRotate@3x.png b/Images/cameraRotate@3x.png similarity index 100% rename from Sources/Images/Images.xcassets/cameraRotate.imageset/cameraRotate@3x.png rename to Images/cameraRotate@3x.png diff --git a/Sources/Images/Images.xcassets/flashOff.imageset/flashOff@3x.png b/Images/flashOff@3x.png similarity index 100% rename from Sources/Images/Images.xcassets/flashOff.imageset/flashOff@3x.png rename to Images/flashOff@3x.png diff --git a/Sources/Images/Images.xcassets/flashOn.imageset/flashOn@3x.png b/Images/flashOn@3x.png similarity index 100% rename from Sources/Images/Images.xcassets/flashOn.imageset/flashOn@3x.png rename to Images/flashOn@3x.png diff --git a/Sources/Images/Images.xcassets/info.imageset/info@3x.png b/Images/info@3x.png similarity index 100% rename from Sources/Images/Images.xcassets/info.imageset/info@3x.png rename to Images/info@3x.png diff --git a/Sources/Localization/de.lproj/Localizable.strings b/Localization/de.lproj/Localizable.strings similarity index 100% rename from Sources/Localization/de.lproj/Localizable.strings rename to Localization/de.lproj/Localizable.strings diff --git a/Sources/Localization/en.lproj/Localizable.strings b/Localization/en.lproj/Localizable.strings similarity index 100% rename from Sources/Localization/en.lproj/Localizable.strings rename to Localization/en.lproj/Localizable.strings diff --git a/Sources/Localization/fr.lproj/Localizable.strings b/Localization/fr.lproj/Localizable.strings similarity index 100% rename from Sources/Localization/fr.lproj/Localizable.strings rename to Localization/fr.lproj/Localizable.strings diff --git a/Sources/Localization/ja.lproj/Localizable.strings b/Localization/ja.lproj/Localizable.strings similarity index 100% rename from Sources/Localization/ja.lproj/Localizable.strings rename to Localization/ja.lproj/Localizable.strings diff --git a/Sources/Localization/pl-PL.lproj/Localizable.strings b/Localization/pl-PL.lproj/Localizable.strings similarity index 100% rename from Sources/Localization/pl-PL.lproj/Localizable.strings rename to Localization/pl-PL.lproj/Localizable.strings diff --git a/Sources/Localization/tr.lproj/Localizable.strings b/Localization/tr.lproj/Localizable.strings similarity index 100% rename from Sources/Localization/tr.lproj/Localizable.strings rename to Localization/tr.lproj/Localizable.strings diff --git a/Package.swift b/Package.swift deleted file mode 100644 index 637b8ab..0000000 --- a/Package.swift +++ /dev/null @@ -1,28 +0,0 @@ -// swift-tools-version:5.3 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "BarcodeScanner", - defaultLocalization: "en", - platforms: [.iOS(.v14)], - products: [ - // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "BarcodeScanner", - targets: ["BarcodeScanner"]), - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - // .package(url: /* package url */, from: "1.0.0"), - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages which this package depends on. - .target( - name: "BarcodeScanner", - path: "Sources" - ), - ] -) diff --git a/README.md b/README.md index 4bba949..48d3c8f 100644 --- a/README.md +++ b/README.md @@ -185,8 +185,6 @@ let viewController = BarcodeScannerViewController() viewController.cameraViewController.barCodeFocusViewType = .animated // Show camera position button viewController.cameraViewController.showsCameraButton = true -// Set the initial camera position -viewController.cameraViewController.initialCameraPosition = .front // Default is .back // Set settings button text let title = NSAttributedString( string: "Settings", diff --git a/Sources/Controllers/BarcodeScannerViewController.swift b/Sources/Controllers/BarcodeScannerViewController.swift index c32c76f..2a93993 100644 --- a/Sources/Controllers/BarcodeScannerViewController.swift +++ b/Sources/Controllers/BarcodeScannerViewController.swift @@ -2,6 +2,7 @@ import UIKit import AVFoundation // MARK: - Delegates +@objc public protocol BarcodeScannerViewControllerDelegate:BarcodeScannerCodeDelegate,BarcodeScannerErrorDelegate,BarcodeScannerDismissalDelegate{} /// Delegate to handle the captured code. @objc public protocol BarcodeScannerCodeDelegate: AnyObject { @@ -37,12 +38,9 @@ open class BarcodeScannerViewController: UIViewController { // MARK: - Public properties - /// Delegate to handle the captured code. - @objc public weak var codeDelegate: BarcodeScannerCodeDelegate? - /// Delegate to report errors. - @objc public weak var errorDelegate: BarcodeScannerErrorDelegate? - /// Delegate to dismiss barcode scanner when the close button has been pressed. - @objc public weak var dismissalDelegate: BarcodeScannerDismissalDelegate? + // MARK: - Public properties + @objc public weak var delegate:BarcodeScannerViewControllerDelegate? + /// When the flag is set to `true` controller returns a captured code /// and waits for the next reset action. @@ -70,8 +68,10 @@ open class BarcodeScannerViewController: UIViewController { // MARK: - UI + public private(set) var navigationBar: UINavigationBar? + // Title label and close button. - public private(set) lazy var headerViewController: HeaderViewController = .init() + public private(set) lazy var headerViewController: HeaderViewController = .init(navigationBar:navigationBar) /// Information view with description label. public private(set) lazy var messageViewController: MessageViewController = .init() /// Camera view with custom buttons. @@ -95,6 +95,17 @@ open class BarcodeScannerViewController: UIViewController { // MARK: - View lifecycle + + public init(navigationBar:UINavigationBar?=nil){ + self.navigationBar = navigationBar + super.init(nibName: nil, bundle: nil) + } + + required public init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + open override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = UIColor.black @@ -158,13 +169,13 @@ open class BarcodeScannerViewController: UIViewController { resetState() } - if newValue.state != .processing { - expandedConstraints.deactivate() - collapsedConstraints.activate() - } else { - collapsedConstraints.deactivate() - expandedConstraints.activate() - } +// if newValue.state != .processing { +// expandedConstraints.deactivate() +// collapsedConstraints.activate() +// } else { +// collapsedConstraints.deactivate() +// expandedConstraints.activate() +// } messageViewController.status = newValue @@ -178,10 +189,10 @@ open class BarcodeScannerViewController: UIViewController { self?.resetState() } - self?.messageView.layer.removeAllAnimations() - if self?.status.state == .processing { - self?.messageViewController.animateLoading() - } +// self?.messageView.layer.removeAllAnimations() +// if self?.status.state == .processing { +// self?.messageViewController.animateLoading() +// } })) } @@ -294,7 +305,7 @@ private extension BarcodeScannerViewController { extension BarcodeScannerViewController: HeaderViewControllerDelegate { func headerViewControllerDidTapCloseButton(_ controller: HeaderViewController) { - dismissalDelegate?.scannerDidDismiss(self) + delegate?.scannerDidDismiss(self) } } @@ -310,7 +321,7 @@ extension BarcodeScannerViewController: CameraViewControllerDelegate { } func cameraViewController(_ controller: CameraViewController, didReceiveError error: Error) { - errorDelegate?.scanner(self, didReceiveError: error) + delegate?.scanner(self, didReceiveError: error) } func cameraViewControllerDidTapSettingsButton(_ controller: CameraViewController) { @@ -345,7 +356,9 @@ extension BarcodeScannerViewController: CameraViewControllerDelegate { rawType = AVMetadataObject.ObjectType.upca.rawValue } - codeDelegate?.scanner(self, didCaptureCode: code, type: rawType) + delegate?.scanner(self, didCaptureCode: code, type: rawType) animateFlash(whenProcessing: isOneTimeSearch) } + + } diff --git a/Sources/Controllers/CameraViewController.swift b/Sources/Controllers/CameraViewController.swift index f5a722d..9fbdede 100644 --- a/Sources/Controllers/CameraViewController.swift +++ b/Sources/Controllers/CameraViewController.swift @@ -301,6 +301,9 @@ public final class CameraViewController: UIViewController { completion: nil ) } + public override var preferredStatusBarStyle: UIStatusBarStyle { + return .lightContent + } } // MARK: - Layout diff --git a/Sources/Controllers/HeaderViewController.swift b/Sources/Controllers/HeaderViewController.swift index 8eb1c9e..25c8c2c 100644 --- a/Sources/Controllers/HeaderViewController.swift +++ b/Sources/Controllers/HeaderViewController.swift @@ -13,14 +13,28 @@ public final class HeaderViewController: UIViewController { // MARK: - UI properties /// Header view with title label and close button. - public private(set) lazy var navigationBar: UINavigationBar = self.makeNavigationBar() + public private(set) var navigationBar: UINavigationBar! /// Title view of the navigation bar. public private(set) lazy var titleLabel: UILabel = self.makeTitleLabel() /// Left bar button item of the navigation bar. public private(set) lazy var closeButton: UIButton = self.makeCloseButton() // MARK: - View lifecycle - + + + init(navigationBar:UINavigationBar?=nil){ + super.init(nibName: nil, bundle: nil) + navigationBar?.items = [makeNavigationItem()] + self.setNeedsStatusBarAppearanceUpdate() + self.navigationBar = navigationBar ?? makeNavigationBar() + self.setNeedsStatusBarAppearanceUpdate() + } + + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + public override func viewDidLoad() { super.viewDidLoad() @@ -30,6 +44,10 @@ public final class HeaderViewController: UIViewController { view.addSubview(navigationBar) setupConstraints() } + + public override var preferredStatusBarStyle: UIStatusBarStyle { + return .lightContent + } // MARK: - Actions diff --git a/Sources/Controllers/MessageViewController.swift b/Sources/Controllers/MessageViewController.swift index 3fab7ab..c4be729 100644 --- a/Sources/Controllers/MessageViewController.swift +++ b/Sources/Controllers/MessageViewController.swift @@ -32,7 +32,10 @@ public final class MessageViewController: UIViewController { } // MARK: - View lifecycle - + public override var preferredStatusBarStyle: UIStatusBarStyle { + return .lightContent + } + public override func viewDidLoad() { super.viewDidLoad() view.addSubview(blurView) diff --git a/Sources/Helpers/Functions.swift b/Sources/Helpers/Functions.swift index af97fde..f959382 100644 --- a/Sources/Helpers/Functions.swift +++ b/Sources/Helpers/Functions.swift @@ -7,9 +7,15 @@ import AVFoundation - Returns: An image. */ func imageNamed(_ name: String) -> UIImage { + let cls = BarcodeScannerViewController.self + var bundle = Bundle(for: cls) let traitCollection = UITraitCollection(displayScale: 3) - guard let image = UIImage(named: name, in: Bundle.module, compatibleWith: traitCollection) else { + if let resourceBundle = bundle.resourcePath.flatMap({ Bundle(path: $0 + "/BarcodeScanner.bundle") }) { + bundle = resourceBundle + } + + guard let image = UIImage(named: name, in: bundle, compatibleWith: traitCollection) else { return UIImage() } @@ -22,7 +28,11 @@ func imageNamed(_ name: String) -> UIImage { - Returns: An image. */ func localizedString(_ key: String) -> String { - NSLocalizedString(key, bundle: Bundle.module, comment: key) + if let path = Bundle(for: BarcodeScannerViewController.self).resourcePath, + let resourceBundle = Bundle(path: path + "/Localization.bundle") { + return resourceBundle.localizedString(forKey: key, value: nil, table: "Localizable") + } + return key } /// Checks if the app is running in Simulator. diff --git a/Sources/Images/Images.xcassets/Contents.json b/Sources/Images/Images.xcassets/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/Sources/Images/Images.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Sources/Images/Images.xcassets/cameraRotate.imageset/Contents.json b/Sources/Images/Images.xcassets/cameraRotate.imageset/Contents.json deleted file mode 100644 index dcae763..0000000 --- a/Sources/Images/Images.xcassets/cameraRotate.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "cameraRotate@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Sources/Images/Images.xcassets/flashOff.imageset/Contents.json b/Sources/Images/Images.xcassets/flashOff.imageset/Contents.json deleted file mode 100644 index d663350..0000000 --- a/Sources/Images/Images.xcassets/flashOff.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "flashOff@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Sources/Images/Images.xcassets/flashOn.imageset/Contents.json b/Sources/Images/Images.xcassets/flashOn.imageset/Contents.json deleted file mode 100644 index 3c72d8a..0000000 --- a/Sources/Images/Images.xcassets/flashOn.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "flashOn@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Sources/Images/Images.xcassets/info.imageset/Contents.json b/Sources/Images/Images.xcassets/info.imageset/Contents.json deleted file mode 100644 index 675e54e..0000000 --- a/Sources/Images/Images.xcassets/info.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "info@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Sources/Localization/nl.lproj/Localizable.strings b/Sources/Localization/nl.lproj/Localizable.strings deleted file mode 100644 index 42bb178..0000000 --- a/Sources/Localization/nl.lproj/Localizable.strings +++ /dev/null @@ -1,7 +0,0 @@ -"SCAN_BARCODE_TITLE" = "Scan barcode"; -"BUTTON_CLOSE" = "Sluit"; -"BUTTON_SETTINGS" = "Instellingen"; -"INFO_DESCRIPTION_TEXT" = "Plaats de barcode in het venster om te scannen. Zoeken start automatisch."; -"INFO_LOADING_TITLE" = "Product aan het zoeken..."; -"NO_PRODUCT_ERROR_TITLE" = "Geen product gevonden."; -"ASK_FOR_PERMISSION_TEXT" = "Om een barcode te kunnen scannen hebben we toegang nodig tot de camera."; diff --git a/Sources/Localization/pt-BR.lproj/Localizable.strings b/Sources/Localization/pt-BR.lproj/Localizable.strings deleted file mode 100644 index d8f93be..0000000 --- a/Sources/Localization/pt-BR.lproj/Localizable.strings +++ /dev/null @@ -1,7 +0,0 @@ -"SCAN_BARCODE_TITLE" = "Escaneie o código de barras"; -"BUTTON_CLOSE" = "Fechar"; -"BUTTON_SETTINGS" = "Configurações"; -"INFO_DESCRIPTION_TEXT" = "Posicione o código de barras dentro da janela. A busca iniciará automaticamente."; -"INFO_LOADING_TITLE" = "Procurando pelo seu produto..."; -"NO_PRODUCT_ERROR_TITLE" = "Nenhum produto encontrado."; -"ASK_FOR_PERMISSION_TEXT" = "Para escanear os códigos de barras você deve permitir acesso a câmera nas configurações."; \ No newline at end of file diff --git a/Sources/Localization/ru.lproj/Localizable.strings b/Sources/Localization/ru.lproj/Localizable.strings deleted file mode 100644 index b212050..0000000 --- a/Sources/Localization/ru.lproj/Localizable.strings +++ /dev/null @@ -1,7 +0,0 @@ -"SCAN_BARCODE_TITLE" = "Сканер штрих-кода"; -"BUTTON_CLOSE" = "Закрыть"; -"BUTTON_SETTINGS" = "Настройки"; -"INFO_DESCRIPTION_TEXT" = "Расположите штрих-код в окне для сканирования. Поиск начнется автоматически."; -"INFO_LOADING_TITLE" = "Ищем продукт..."; -"NO_PRODUCT_ERROR_TITLE" = "Продукт не найден"; -"ASK_FOR_PERMISSION_TEXT" = "Чтобы воспользоваться сканером, необходимо разрешить доступ к камере в настройках телефона";