diff --git a/FaceCertificatePinning/FaceCertificatePinning.xcodeproj/project.pbxproj b/FaceCertificatePinning/FaceCertificatePinning.xcodeproj/project.pbxproj new file mode 100644 index 0000000..533169c --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning.xcodeproj/project.pbxproj @@ -0,0 +1,441 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + 3782CB90AA6FDBC20350BCF6 /* Pods_FaceCertificatePinning.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F0758A1A93024D9C7CA01A6E /* Pods_FaceCertificatePinning.framework */; }; + 5D8824D42AD9786D00872CCE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D8824D32AD9786D00872CCE /* AppDelegate.swift */; }; + 5D8824D62AD9786D00872CCE /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D8824D52AD9786D00872CCE /* SceneDelegate.swift */; }; + 5D8824D82AD9786D00872CCE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D8824D72AD9786D00872CCE /* ViewController.swift */; }; + 5D8824DB2AD9786D00872CCE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5D8824D92AD9786D00872CCE /* Main.storyboard */; }; + 5D8824DD2AD9786F00872CCE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5D8824DC2AD9786F00872CCE /* Assets.xcassets */; }; + 5D8824E02AD9786F00872CCE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5D8824DE2AD9786F00872CCE /* LaunchScreen.storyboard */; }; + 5D8824E82AD9825E00872CCE /* sample1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 5D8824E72AD9825E00872CCE /* sample1.jpg */; }; + 5D8824EA2AD985F400872CCE /* DetectionCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D8824E92AD985F400872CCE /* DetectionCollectionViewCell.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 37EE2DBFDF6778574FAE7939 /* Pods-FaceCertificatePinning.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FaceCertificatePinning.debug.xcconfig"; path = "Target Support Files/Pods-FaceCertificatePinning/Pods-FaceCertificatePinning.debug.xcconfig"; sourceTree = ""; }; + 5D8824D02AD9786D00872CCE /* FaceCertificatePinning.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FaceCertificatePinning.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 5D8824D32AD9786D00872CCE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 5D8824D52AD9786D00872CCE /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 5D8824D72AD9786D00872CCE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 5D8824DA2AD9786D00872CCE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 5D8824DC2AD9786F00872CCE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 5D8824DF2AD9786F00872CCE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 5D8824E12AD9786F00872CCE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5D8824E72AD9825E00872CCE /* sample1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = sample1.jpg; sourceTree = ""; }; + 5D8824E92AD985F400872CCE /* DetectionCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetectionCollectionViewCell.swift; sourceTree = ""; }; + E18772D994B423C0DA66A9DF /* Pods-FaceCertificatePinning.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FaceCertificatePinning.release.xcconfig"; path = "Target Support Files/Pods-FaceCertificatePinning/Pods-FaceCertificatePinning.release.xcconfig"; sourceTree = ""; }; + F0758A1A93024D9C7CA01A6E /* Pods_FaceCertificatePinning.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FaceCertificatePinning.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 5D8824CD2AD9786D00872CCE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3782CB90AA6FDBC20350BCF6 /* Pods_FaceCertificatePinning.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 5D8824C72AD9786D00872CCE = { + isa = PBXGroup; + children = ( + 5D8824D22AD9786D00872CCE /* FaceCertificatePinning */, + 5D8824D12AD9786D00872CCE /* Products */, + F14DAB05B6D75D5474D8EBCB /* Pods */, + 912B3661A063ECDAFB6E3B73 /* Frameworks */, + ); + sourceTree = ""; + }; + 5D8824D12AD9786D00872CCE /* Products */ = { + isa = PBXGroup; + children = ( + 5D8824D02AD9786D00872CCE /* FaceCertificatePinning.app */, + ); + name = Products; + sourceTree = ""; + }; + 5D8824D22AD9786D00872CCE /* FaceCertificatePinning */ = { + isa = PBXGroup; + children = ( + 5D8824D32AD9786D00872CCE /* AppDelegate.swift */, + 5D8824D52AD9786D00872CCE /* SceneDelegate.swift */, + 5D8824D72AD9786D00872CCE /* ViewController.swift */, + 5D8824E92AD985F400872CCE /* DetectionCollectionViewCell.swift */, + 5D8824D92AD9786D00872CCE /* Main.storyboard */, + 5D8824E72AD9825E00872CCE /* sample1.jpg */, + 5D8824DC2AD9786F00872CCE /* Assets.xcassets */, + 5D8824DE2AD9786F00872CCE /* LaunchScreen.storyboard */, + 5D8824E12AD9786F00872CCE /* Info.plist */, + ); + path = FaceCertificatePinning; + sourceTree = ""; + }; + 912B3661A063ECDAFB6E3B73 /* Frameworks */ = { + isa = PBXGroup; + children = ( + F0758A1A93024D9C7CA01A6E /* Pods_FaceCertificatePinning.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + F14DAB05B6D75D5474D8EBCB /* Pods */ = { + isa = PBXGroup; + children = ( + 37EE2DBFDF6778574FAE7939 /* Pods-FaceCertificatePinning.debug.xcconfig */, + E18772D994B423C0DA66A9DF /* Pods-FaceCertificatePinning.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 5D8824CF2AD9786D00872CCE /* FaceCertificatePinning */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5D8824E42AD9786F00872CCE /* Build configuration list for PBXNativeTarget "FaceCertificatePinning" */; + buildPhases = ( + 58D67383B5F413613E2E1974 /* [CP] Check Pods Manifest.lock */, + 5D8824CC2AD9786D00872CCE /* Sources */, + 5D8824CD2AD9786D00872CCE /* Frameworks */, + 5D8824CE2AD9786D00872CCE /* Resources */, + CD066AEA129FE22A29D1A958 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = FaceCertificatePinning; + productName = FaceSDKCertificatePinning; + productReference = 5D8824D02AD9786D00872CCE /* FaceCertificatePinning.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 5D8824C82AD9786D00872CCE /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1410; + LastUpgradeCheck = 1410; + TargetAttributes = { + 5D8824CF2AD9786D00872CCE = { + CreatedOnToolsVersion = 14.1; + }; + }; + }; + buildConfigurationList = 5D8824CB2AD9786D00872CCE /* Build configuration list for PBXProject "FaceCertificatePinning" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 5D8824C72AD9786D00872CCE; + productRefGroup = 5D8824D12AD9786D00872CCE /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 5D8824CF2AD9786D00872CCE /* FaceCertificatePinning */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 5D8824CE2AD9786D00872CCE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5D8824E82AD9825E00872CCE /* sample1.jpg in Resources */, + 5D8824E02AD9786F00872CCE /* LaunchScreen.storyboard in Resources */, + 5D8824DD2AD9786F00872CCE /* Assets.xcassets in Resources */, + 5D8824DB2AD9786D00872CCE /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 58D67383B5F413613E2E1974 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-FaceCertificatePinning-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; + }; + CD066AEA129FE22A29D1A958 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-FaceCertificatePinning/Pods-FaceCertificatePinning-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-FaceCertificatePinning/Pods-FaceCertificatePinning-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FaceCertificatePinning/Pods-FaceCertificatePinning-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 5D8824CC2AD9786D00872CCE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5D8824D82AD9786D00872CCE /* ViewController.swift in Sources */, + 5D8824D42AD9786D00872CCE /* AppDelegate.swift in Sources */, + 5D8824EA2AD985F400872CCE /* DetectionCollectionViewCell.swift in Sources */, + 5D8824D62AD9786D00872CCE /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 5D8824D92AD9786D00872CCE /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 5D8824DA2AD9786D00872CCE /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 5D8824DE2AD9786F00872CCE /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 5D8824DF2AD9786F00872CCE /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 5D8824E22AD9786F00872CCE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = 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_DOCUMENTATION_COMMENTS = YES; + 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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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 = 16.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 5D8824E32AD9786F00872CCE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = 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_DOCUMENTATION_COMMENTS = YES; + 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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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 = 16.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 5D8824E52AD9786F00872CCE /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 37EE2DBFDF6778574FAE7939 /* Pods-FaceCertificatePinning.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = H6WR54S268; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = FaceCertificatePinning/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.regula.facesdk.certificatepinning; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 5D8824E62AD9786F00872CCE /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E18772D994B423C0DA66A9DF /* Pods-FaceCertificatePinning.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = H6WR54S268; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = FaceCertificatePinning/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.regula.facesdk.certificatepinning; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 5D8824CB2AD9786D00872CCE /* Build configuration list for PBXProject "FaceCertificatePinning" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5D8824E22AD9786F00872CCE /* Debug */, + 5D8824E32AD9786F00872CCE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5D8824E42AD9786F00872CCE /* Build configuration list for PBXNativeTarget "FaceCertificatePinning" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5D8824E52AD9786F00872CCE /* Debug */, + 5D8824E62AD9786F00872CCE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 5D8824C82AD9786D00872CCE /* Project object */; +} diff --git a/FaceCertificatePinning/FaceCertificatePinning.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/FaceCertificatePinning/FaceCertificatePinning.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..d150dda --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/FaceCertificatePinning/FaceCertificatePinning.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/FaceCertificatePinning/FaceCertificatePinning.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/FaceCertificatePinning/FaceCertificatePinning.xcworkspace/contents.xcworkspacedata b/FaceCertificatePinning/FaceCertificatePinning.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..77d409a --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/FaceCertificatePinning/FaceCertificatePinning.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/FaceCertificatePinning/FaceCertificatePinning.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/FaceCertificatePinning/FaceCertificatePinning/AppDelegate.swift b/FaceCertificatePinning/FaceCertificatePinning/AppDelegate.swift new file mode 100644 index 0000000..1334cb1 --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning/AppDelegate.swift @@ -0,0 +1,36 @@ +// +// AppDelegate.swift +// FaceCertificatePinning +// +// Created by Serge Rylko on 13.10.23. +// + +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/FaceCertificatePinning/FaceCertificatePinning/Assets.xcassets/AccentColor.colorset/Contents.json b/FaceCertificatePinning/FaceCertificatePinning/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceCertificatePinning/FaceCertificatePinning/Assets.xcassets/AppIcon.appiconset/Contents.json b/FaceCertificatePinning/FaceCertificatePinning/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceCertificatePinning/FaceCertificatePinning/Assets.xcassets/Contents.json b/FaceCertificatePinning/FaceCertificatePinning/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FaceCertificatePinning/FaceCertificatePinning/Base.lproj/LaunchScreen.storyboard b/FaceCertificatePinning/FaceCertificatePinning/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FaceCertificatePinning/FaceCertificatePinning/Base.lproj/Main.storyboard b/FaceCertificatePinning/FaceCertificatePinning/Base.lproj/Main.storyboard new file mode 100644 index 0000000..5a77d69 --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning/Base.lproj/Main.storyboard @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FaceCertificatePinning/FaceCertificatePinning/DetectionCollectionViewCell.swift b/FaceCertificatePinning/FaceCertificatePinning/DetectionCollectionViewCell.swift new file mode 100644 index 0000000..63b976b --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning/DetectionCollectionViewCell.swift @@ -0,0 +1,12 @@ +// +// DetectionCollectionViewCell.swift +// FaceCertificatePinning +// +// Created by Serge Rylko on 13.10.23. +// + +import UIKit + +class DetectionCollectionViewCell: UICollectionViewCell { + @IBOutlet weak var imageView: UIImageView! +} diff --git a/FaceCertificatePinning/FaceCertificatePinning/Info.plist b/FaceCertificatePinning/FaceCertificatePinning/Info.plist new file mode 100644 index 0000000..d03d45b --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning/Info.plist @@ -0,0 +1,43 @@ + + + + + NSAppTransportSecurity + + NSPinnedDomains + + regulaforensics.com + + NSIncludesSubdomains + + NSPinnedLeafIdentities + + + SPKI-SHA256-BASE64 + /5RKFaPkCjAzvsEZHOlYqncYADaLIG5VfTmhsBbkaBk= + + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/FaceCertificatePinning/FaceCertificatePinning/SceneDelegate.swift b/FaceCertificatePinning/FaceCertificatePinning/SceneDelegate.swift new file mode 100644 index 0000000..354fd90 --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning/SceneDelegate.swift @@ -0,0 +1,52 @@ +// +// SceneDelegate.swift +// FaceCertificatePinning +// +// Created by Serge Rylko on 13.10.23. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/FaceCertificatePinning/FaceCertificatePinning/ViewController.swift b/FaceCertificatePinning/FaceCertificatePinning/ViewController.swift new file mode 100644 index 0000000..05f57ff --- /dev/null +++ b/FaceCertificatePinning/FaceCertificatePinning/ViewController.swift @@ -0,0 +1,96 @@ +// +// ViewController.swift +// FaceCertificatePinning +// +// Created by Serge Rylko on 13.10.23. +// + +import UIKit +import FaceSDK + +enum Section { + case main +} + +typealias ResultsDataSource = UICollectionViewDiffableDataSource + +class ViewController: UIViewController { + + @IBOutlet private weak var imageView: UIImageView! + @IBOutlet private weak var detectButton: UIButton! + @IBOutlet private weak var collectionView: UICollectionView! + @IBOutlet private weak var activityIndicator: UIActivityIndicatorView! + private let image = UIImage(named: "sample1.jpg") + private lazy var dataSource = makeDataSource() + + override func viewDidLoad() { + super.viewDidLoad() + imageView.image = image + prepareFaceSDK() + } + + private func prepareFaceSDK() { + showLoading(loading: true) + FaceSDK.service.initialize { success, error in + self.showLoading(loading: false) + if success { + print("FaceSDK initialized") + } else if let error = error { + print(error.localizedDescription) + } + } + } + + @IBAction func didPressDetectFacesButton(_ sender: Any) { + guard let image = image else { return } + let config = DetectFacesConfiguration() + let outpupImageParams = OutputImageParams() + outpupImageParams.crop = OutputImageCrop(type: .ratio4x5) + config.outputImageParams = outpupImageParams + config.onlyCentralFace = false + let request = DetectFacesRequest(image: image, configuration: config) + + showLoading(loading: true) + + FaceSDK.service.detectFaces(by: request) { [weak self] response in + guard let self = self else { return } + self.showLoading(loading: false) + if let detections = response.allDetections { + var snapshot = NSDiffableDataSourceSnapshot() + snapshot.appendSections([.main]) + snapshot.appendItems(detections) + self.dataSource.apply(snapshot) + } else if let error = response.error { + print(error.localizedDescription) + } + } + } + + private func makeDataSource() -> ResultsDataSource { + let dataSource = ResultsDataSource(collectionView: collectionView, cellProvider: { collectionView, indexPath, result in + guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "DetectionCollectionViewCell", for: indexPath) as? DetectionCollectionViewCell else { fatalError() } + cell.imageView.image = result.crop + return cell + }) + + return dataSource + } + + private func showLoading(loading: Bool) { + if loading { + activityIndicator.startAnimating() + } else { + activityIndicator.stopAnimating() + } + detectButton.isEnabled = !loading + } +} + +extension ViewController: UICollectionViewDelegateFlowLayout { + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + let width = collectionView.bounds.width / 3 + let height = width * 5 / 4 + return .init(width: width, height: height) + } +} diff --git a/FaceCertificatePinning/FaceCertificatePinning/sample1.jpg b/FaceCertificatePinning/FaceCertificatePinning/sample1.jpg new file mode 100644 index 0000000..5e4e954 Binary files /dev/null and b/FaceCertificatePinning/FaceCertificatePinning/sample1.jpg differ diff --git a/FaceCertificatePinning/Podfile b/FaceCertificatePinning/Podfile new file mode 100644 index 0000000..467b2a5 --- /dev/null +++ b/FaceCertificatePinning/Podfile @@ -0,0 +1,10 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '14.0' + +target 'FaceCertificatePinning' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + pod 'FaceCoreSDK', '~> 5.2' + pod 'FaceSDK', '~> 5.2' + +end diff --git a/FaceCertificatePinning/README.md b/FaceCertificatePinning/README.md new file mode 100644 index 0000000..bd9d6b9 --- /dev/null +++ b/FaceCertificatePinning/README.md @@ -0,0 +1,30 @@ +# Regula Document Reader (iOS version) +The sample project for working with the +[Mobile document authenticator Regula 1120](https://regulaforensics.com/en/products/machine_verification/1120/). + +# Content +* [How to build the demo application](#how-to-build-the-demo-application) +* [Documentation](#documentation) +* [Additional information](#additional-information) + +## How to build the demo application +1. Download or clone the current repository using the command `git clone https://github.com/regulaforensics/FaceSDK-iOS.git`. +2. Open the `FaceCertificatePinning` project in an IDE. +3. Run pods `pod install` + +## How to configure Certificate Pinning +* Requires iOS 14.0 minimum deployment target + +Here is an [official documentation for Identity Pinning](https://developer.apple.com/news/?id=g9ejcf8y) for iOS devices. + +Here you can find [how to generate key for the app](https://nikunj-joshi.medium.com/ssl-pinning-increase-server-identity-trust-656a2fc7e22b). + +1. In the Info.plist file add `NSPinnedDomains` section in the `NSAppTransportSecurity` section. +2. Add your domain. Set YES for`NSIncludesSubdomains` to spread pinning over all subdomains. +3. In the domain NSPinnedLeafIdentities array use your generated 'SHA-256' hash key. + +## Documentation +The documentation on the SDK can be found [here](https://docs.regulaforensics.com/develop/face-sdk//mobile?utm_source=github). + +## Additional information +If you have any technical questions or suggestions, feel free to [contact](mailto:ios.support@regulaforensics.com) us or create an issue [here](https://github.com/regulaforensics/FaceSDK-iOS/issues).