diff --git a/Example/EGFormValidatorExample.xcodeproj/project.pbxproj b/Example/EGFormValidatorExample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c6f9317 --- /dev/null +++ b/Example/EGFormValidatorExample.xcodeproj/project.pbxproj @@ -0,0 +1,605 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 57DE77CA1E16B48A00D5EE81 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57DE77C91E16B48A00D5EE81 /* AppDelegate.swift */; }; + 57DE77CC1E16B48A00D5EE81 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57DE77CB1E16B48A00D5EE81 /* ViewController.swift */; }; + 57DE77CF1E16B48A00D5EE81 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 57DE77CD1E16B48A00D5EE81 /* Main.storyboard */; }; + 57DE77D11E16B48A00D5EE81 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 57DE77D01E16B48A00D5EE81 /* Assets.xcassets */; }; + 57DE77D41E16B48A00D5EE81 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 57DE77D21E16B48A00D5EE81 /* LaunchScreen.storyboard */; }; + 57DE77DF1E16B48A00D5EE81 /* EGFormValidatorExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57DE77DE1E16B48A00D5EE81 /* EGFormValidatorExampleTests.swift */; }; + 57DE77EA1E16B48A00D5EE81 /* EGFormValidatorExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57DE77E91E16B48A00D5EE81 /* EGFormValidatorExampleUITests.swift */; }; + E6290F04C0A15F5C4D0B1B1E /* Pods_EGFormValidatorExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 410C2981A7C0CE6CB89B388E /* Pods_EGFormValidatorExample.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 57DE77DB1E16B48A00D5EE81 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 57DE77BE1E16B48A00D5EE81 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 57DE77C51E16B48A00D5EE81; + remoteInfo = EGFormValidatorExample; + }; + 57DE77E61E16B48A00D5EE81 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 57DE77BE1E16B48A00D5EE81 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 57DE77C51E16B48A00D5EE81; + remoteInfo = EGFormValidatorExample; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1BB3CA5908240F640DB4FEF5 /* Pods-EGFormValidatorExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EGFormValidatorExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-EGFormValidatorExample/Pods-EGFormValidatorExample.release.xcconfig"; sourceTree = ""; }; + 410C2981A7C0CE6CB89B388E /* Pods_EGFormValidatorExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_EGFormValidatorExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4FFD284656AE4BC0BEA2563E /* Pods-EGFormValidatorExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EGFormValidatorExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-EGFormValidatorExample/Pods-EGFormValidatorExample.debug.xcconfig"; sourceTree = ""; }; + 57DE77C61E16B48A00D5EE81 /* EGFormValidatorExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EGFormValidatorExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 57DE77C91E16B48A00D5EE81 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 57DE77CB1E16B48A00D5EE81 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 57DE77CE1E16B48A00D5EE81 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 57DE77D01E16B48A00D5EE81 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 57DE77D31E16B48A00D5EE81 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 57DE77D51E16B48A00D5EE81 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 57DE77DA1E16B48A00D5EE81 /* EGFormValidatorExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EGFormValidatorExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 57DE77DE1E16B48A00D5EE81 /* EGFormValidatorExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EGFormValidatorExampleTests.swift; sourceTree = ""; }; + 57DE77E01E16B48A00D5EE81 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 57DE77E51E16B48A00D5EE81 /* EGFormValidatorExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EGFormValidatorExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 57DE77E91E16B48A00D5EE81 /* EGFormValidatorExampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EGFormValidatorExampleUITests.swift; sourceTree = ""; }; + 57DE77EB1E16B48A00D5EE81 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 57DE77C31E16B48A00D5EE81 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E6290F04C0A15F5C4D0B1B1E /* Pods_EGFormValidatorExample.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 57DE77D71E16B48A00D5EE81 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 57DE77E21E16B48A00D5EE81 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 57DE77BD1E16B48A00D5EE81 = { + isa = PBXGroup; + children = ( + 57DE77C81E16B48A00D5EE81 /* EGFormValidatorExample */, + 57DE77DD1E16B48A00D5EE81 /* EGFormValidatorExampleTests */, + 57DE77E81E16B48A00D5EE81 /* EGFormValidatorExampleUITests */, + 57DE77C71E16B48A00D5EE81 /* Products */, + 91F05136B057F4E1A2AADB13 /* Pods */, + F13C71AF62B7BC1AED4A42D5 /* Frameworks */, + ); + sourceTree = ""; + }; + 57DE77C71E16B48A00D5EE81 /* Products */ = { + isa = PBXGroup; + children = ( + 57DE77C61E16B48A00D5EE81 /* EGFormValidatorExample.app */, + 57DE77DA1E16B48A00D5EE81 /* EGFormValidatorExampleTests.xctest */, + 57DE77E51E16B48A00D5EE81 /* EGFormValidatorExampleUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 57DE77C81E16B48A00D5EE81 /* EGFormValidatorExample */ = { + isa = PBXGroup; + children = ( + 57DE77C91E16B48A00D5EE81 /* AppDelegate.swift */, + 57DE77CB1E16B48A00D5EE81 /* ViewController.swift */, + 57DE77CD1E16B48A00D5EE81 /* Main.storyboard */, + 57DE77D01E16B48A00D5EE81 /* Assets.xcassets */, + 57DE77D21E16B48A00D5EE81 /* LaunchScreen.storyboard */, + 57DE77D51E16B48A00D5EE81 /* Info.plist */, + ); + path = EGFormValidatorExample; + sourceTree = ""; + }; + 57DE77DD1E16B48A00D5EE81 /* EGFormValidatorExampleTests */ = { + isa = PBXGroup; + children = ( + 57DE77DE1E16B48A00D5EE81 /* EGFormValidatorExampleTests.swift */, + 57DE77E01E16B48A00D5EE81 /* Info.plist */, + ); + path = EGFormValidatorExampleTests; + sourceTree = ""; + }; + 57DE77E81E16B48A00D5EE81 /* EGFormValidatorExampleUITests */ = { + isa = PBXGroup; + children = ( + 57DE77E91E16B48A00D5EE81 /* EGFormValidatorExampleUITests.swift */, + 57DE77EB1E16B48A00D5EE81 /* Info.plist */, + ); + path = EGFormValidatorExampleUITests; + sourceTree = ""; + }; + 91F05136B057F4E1A2AADB13 /* Pods */ = { + isa = PBXGroup; + children = ( + 4FFD284656AE4BC0BEA2563E /* Pods-EGFormValidatorExample.debug.xcconfig */, + 1BB3CA5908240F640DB4FEF5 /* Pods-EGFormValidatorExample.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + F13C71AF62B7BC1AED4A42D5 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 410C2981A7C0CE6CB89B388E /* Pods_EGFormValidatorExample.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 57DE77C51E16B48A00D5EE81 /* EGFormValidatorExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 57DE77EE1E16B48A00D5EE81 /* Build configuration list for PBXNativeTarget "EGFormValidatorExample" */; + buildPhases = ( + A36D44F7DEB6F1232676056E /* [CP] Check Pods Manifest.lock */, + 57DE77C21E16B48A00D5EE81 /* Sources */, + 57DE77C31E16B48A00D5EE81 /* Frameworks */, + 57DE77C41E16B48A00D5EE81 /* Resources */, + 821195BF756D4CC0F8D9D973 /* [CP] Embed Pods Frameworks */, + 4D4F12CAD036333666E704C0 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = EGFormValidatorExample; + productName = EGFormValidatorExample; + productReference = 57DE77C61E16B48A00D5EE81 /* EGFormValidatorExample.app */; + productType = "com.apple.product-type.application"; + }; + 57DE77D91E16B48A00D5EE81 /* EGFormValidatorExampleTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 57DE77F11E16B48A00D5EE81 /* Build configuration list for PBXNativeTarget "EGFormValidatorExampleTests" */; + buildPhases = ( + 57DE77D61E16B48A00D5EE81 /* Sources */, + 57DE77D71E16B48A00D5EE81 /* Frameworks */, + 57DE77D81E16B48A00D5EE81 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 57DE77DC1E16B48A00D5EE81 /* PBXTargetDependency */, + ); + name = EGFormValidatorExampleTests; + productName = EGFormValidatorExampleTests; + productReference = 57DE77DA1E16B48A00D5EE81 /* EGFormValidatorExampleTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 57DE77E41E16B48A00D5EE81 /* EGFormValidatorExampleUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 57DE77F41E16B48A00D5EE81 /* Build configuration list for PBXNativeTarget "EGFormValidatorExampleUITests" */; + buildPhases = ( + 57DE77E11E16B48A00D5EE81 /* Sources */, + 57DE77E21E16B48A00D5EE81 /* Frameworks */, + 57DE77E31E16B48A00D5EE81 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 57DE77E71E16B48A00D5EE81 /* PBXTargetDependency */, + ); + name = EGFormValidatorExampleUITests; + productName = EGFormValidatorExampleUITests; + productReference = 57DE77E51E16B48A00D5EE81 /* EGFormValidatorExampleUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 57DE77BE1E16B48A00D5EE81 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0820; + LastUpgradeCheck = 0820; + ORGANIZATIONNAME = "Evgeny Gushchin"; + TargetAttributes = { + 57DE77C51E16B48A00D5EE81 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + }; + 57DE77D91E16B48A00D5EE81 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + TestTargetID = 57DE77C51E16B48A00D5EE81; + }; + 57DE77E41E16B48A00D5EE81 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + TestTargetID = 57DE77C51E16B48A00D5EE81; + }; + }; + }; + buildConfigurationList = 57DE77C11E16B48A00D5EE81 /* Build configuration list for PBXProject "EGFormValidatorExample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 57DE77BD1E16B48A00D5EE81; + productRefGroup = 57DE77C71E16B48A00D5EE81 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 57DE77C51E16B48A00D5EE81 /* EGFormValidatorExample */, + 57DE77D91E16B48A00D5EE81 /* EGFormValidatorExampleTests */, + 57DE77E41E16B48A00D5EE81 /* EGFormValidatorExampleUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 57DE77C41E16B48A00D5EE81 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 57DE77D41E16B48A00D5EE81 /* LaunchScreen.storyboard in Resources */, + 57DE77D11E16B48A00D5EE81 /* Assets.xcassets in Resources */, + 57DE77CF1E16B48A00D5EE81 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 57DE77D81E16B48A00D5EE81 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 57DE77E31E16B48A00D5EE81 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 4D4F12CAD036333666E704C0 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-EGFormValidatorExample/Pods-EGFormValidatorExample-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 821195BF756D4CC0F8D9D973 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-EGFormValidatorExample/Pods-EGFormValidatorExample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + A36D44F7DEB6F1232676056E /* [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 # 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"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 57DE77C21E16B48A00D5EE81 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 57DE77CC1E16B48A00D5EE81 /* ViewController.swift in Sources */, + 57DE77CA1E16B48A00D5EE81 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 57DE77D61E16B48A00D5EE81 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 57DE77DF1E16B48A00D5EE81 /* EGFormValidatorExampleTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 57DE77E11E16B48A00D5EE81 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 57DE77EA1E16B48A00D5EE81 /* EGFormValidatorExampleUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 57DE77DC1E16B48A00D5EE81 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 57DE77C51E16B48A00D5EE81 /* EGFormValidatorExample */; + targetProxy = 57DE77DB1E16B48A00D5EE81 /* PBXContainerItemProxy */; + }; + 57DE77E71E16B48A00D5EE81 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 57DE77C51E16B48A00D5EE81 /* EGFormValidatorExample */; + targetProxy = 57DE77E61E16B48A00D5EE81 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 57DE77CD1E16B48A00D5EE81 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 57DE77CE1E16B48A00D5EE81 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 57DE77D21E16B48A00D5EE81 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 57DE77D31E16B48A00D5EE81 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 57DE77EC1E16B48A00D5EE81 /* 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_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_OBJC_ROOT_CLASS = YES_ERROR; + 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 = 10.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 57DE77ED1E16B48A00D5EE81 /* 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_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_OBJC_ROOT_CLASS = YES_ERROR; + 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 = 10.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 57DE77EF1E16B48A00D5EE81 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4FFD284656AE4BC0BEA2563E /* Pods-EGFormValidatorExample.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = EGFormValidatorExample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = ru.appner.EGFormValidatorExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + 57DE77F01E16B48A00D5EE81 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1BB3CA5908240F640DB4FEF5 /* Pods-EGFormValidatorExample.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = EGFormValidatorExample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = ru.appner.EGFormValidatorExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; + 57DE77F21E16B48A00D5EE81 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = EGFormValidatorExampleTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = ru.appner.EGFormValidatorExampleTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EGFormValidatorExample.app/EGFormValidatorExample"; + }; + name = Debug; + }; + 57DE77F31E16B48A00D5EE81 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = EGFormValidatorExampleTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = ru.appner.EGFormValidatorExampleTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EGFormValidatorExample.app/EGFormValidatorExample"; + }; + name = Release; + }; + 57DE77F51E16B48A00D5EE81 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + INFOPLIST_FILE = EGFormValidatorExampleUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = ru.appner.EGFormValidatorExampleUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_TARGET_NAME = EGFormValidatorExample; + }; + name = Debug; + }; + 57DE77F61E16B48A00D5EE81 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + INFOPLIST_FILE = EGFormValidatorExampleUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = ru.appner.EGFormValidatorExampleUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_TARGET_NAME = EGFormValidatorExample; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 57DE77C11E16B48A00D5EE81 /* Build configuration list for PBXProject "EGFormValidatorExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 57DE77EC1E16B48A00D5EE81 /* Debug */, + 57DE77ED1E16B48A00D5EE81 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 57DE77EE1E16B48A00D5EE81 /* Build configuration list for PBXNativeTarget "EGFormValidatorExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 57DE77EF1E16B48A00D5EE81 /* Debug */, + 57DE77F01E16B48A00D5EE81 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 57DE77F11E16B48A00D5EE81 /* Build configuration list for PBXNativeTarget "EGFormValidatorExampleTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 57DE77F21E16B48A00D5EE81 /* Debug */, + 57DE77F31E16B48A00D5EE81 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 57DE77F41E16B48A00D5EE81 /* Build configuration list for PBXNativeTarget "EGFormValidatorExampleUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 57DE77F51E16B48A00D5EE81 /* Debug */, + 57DE77F61E16B48A00D5EE81 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 57DE77BE1E16B48A00D5EE81 /* Project object */; +} diff --git a/Example/EGFormValidatorExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/EGFormValidatorExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..7e66505 --- /dev/null +++ b/Example/EGFormValidatorExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/EGFormValidatorExample.xcworkspace/contents.xcworkspacedata b/Example/EGFormValidatorExample.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..5608296 --- /dev/null +++ b/Example/EGFormValidatorExample.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Example/EGFormValidatorExample/AppDelegate.swift b/Example/EGFormValidatorExample/AppDelegate.swift new file mode 100644 index 0000000..72450c2 --- /dev/null +++ b/Example/EGFormValidatorExample/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// EGFormValidatorExample +// +// Created by Evgeny Gushchin on 30/12/16. +// Copyright © 2016 Evgeny Gushchin. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/Example/EGFormValidatorExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/EGFormValidatorExample/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..1d060ed --- /dev/null +++ b/Example/EGFormValidatorExample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "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" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Example/EGFormValidatorExample/Base.lproj/LaunchScreen.storyboard b/Example/EGFormValidatorExample/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..fdf3f97 --- /dev/null +++ b/Example/EGFormValidatorExample/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/EGFormValidatorExample/Base.lproj/Main.storyboard b/Example/EGFormValidatorExample/Base.lproj/Main.storyboard new file mode 100644 index 0000000..4d08f3f --- /dev/null +++ b/Example/EGFormValidatorExample/Base.lproj/Main.storyboard @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/EGFormValidatorExample/Info.plist b/Example/EGFormValidatorExample/Info.plist new file mode 100644 index 0000000..d052473 --- /dev/null +++ b/Example/EGFormValidatorExample/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Example/EGFormValidatorExample/ViewController.swift b/Example/EGFormValidatorExample/ViewController.swift new file mode 100644 index 0000000..24ba1e7 --- /dev/null +++ b/Example/EGFormValidatorExample/ViewController.swift @@ -0,0 +1,86 @@ +// +// ViewController.swift +// EGFormValidatorExample +// +// Created by Evgeny Gushchin on 30/12/16. +// Copyright © 2016 Evgeny Gushchin. All rights reserved. +// + +import UIKit +import EGFormValidator + +class ViewController: ValidatorViewController { + // Scrollview outlet + @IBOutlet weak var scrollView: UIScrollView? + + + // Inputs + @IBOutlet weak var mandatoryTextField: UITextField! + @IBOutlet weak var minLengthTextField: UITextField! + @IBOutlet weak var emailTextField: UITextField! + @IBOutlet weak var digitsOnlyTextField: UITextField! + @IBOutlet weak var equaltyTextField_1: UITextField! + @IBOutlet weak var equaltyTextField_2: UITextField! + + // Error labels + @IBOutlet weak var mandatoryErrorLabel: UILabel! + @IBOutlet weak var minLengthErrorLabel: UILabel! + @IBOutlet weak var emailErrorLabel: UILabel! + @IBOutlet weak var digitsOnlyErrorLabel: UILabel! + @IBOutlet weak var equaltyErrorLabel: UILabel! + + + + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + + // Empty error labels (they have some text in the storyboard) + self.mandatoryErrorLabel.text = "" + self.minLengthErrorLabel.text = "" + self.emailErrorLabel.text = "" + self.digitsOnlyErrorLabel.text = "" + self.equaltyErrorLabel.text = "" + + + // add validators + addValidators() + } + + + + + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + + + + + + // + // Add validators + func addValidators() { + self.addMandatoryValidation(control: self.mandatoryTextField, errorPlaceholder: self.mandatoryErrorLabel, errorMessage: "This field is required!") + } + + + + + + // + // Perform validation + @IBAction func validateButtonTapped(_ sender: Any) { + if self.validate() { + + } else { + // scroll to the first invalid input field + self.scrollView?.scrollRectToVisible(self.firstFailedControl!.frame, animated: true) + } + } +} + diff --git a/Example/EGFormValidatorExampleTests/EGFormValidatorExampleTests.swift b/Example/EGFormValidatorExampleTests/EGFormValidatorExampleTests.swift new file mode 100644 index 0000000..db16dbe --- /dev/null +++ b/Example/EGFormValidatorExampleTests/EGFormValidatorExampleTests.swift @@ -0,0 +1,36 @@ +// +// EGFormValidatorExampleTests.swift +// EGFormValidatorExampleTests +// +// Created by Evgeny Gushchin on 30/12/16. +// Copyright © 2016 Evgeny Gushchin. All rights reserved. +// + +import XCTest +@testable import EGFormValidatorExample + +class EGFormValidatorExampleTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/Example/EGFormValidatorExampleTests/Info.plist b/Example/EGFormValidatorExampleTests/Info.plist new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ b/Example/EGFormValidatorExampleTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Example/EGFormValidatorExampleUITests/EGFormValidatorExampleUITests.swift b/Example/EGFormValidatorExampleUITests/EGFormValidatorExampleUITests.swift new file mode 100644 index 0000000..bad8e7c --- /dev/null +++ b/Example/EGFormValidatorExampleUITests/EGFormValidatorExampleUITests.swift @@ -0,0 +1,36 @@ +// +// EGFormValidatorExampleUITests.swift +// EGFormValidatorExampleUITests +// +// Created by Evgeny Gushchin on 30/12/16. +// Copyright © 2016 Evgeny Gushchin. All rights reserved. +// + +import XCTest + +class EGFormValidatorExampleUITests: XCTestCase { + + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} diff --git a/Example/EGFormValidatorExampleUITests/Info.plist b/Example/EGFormValidatorExampleUITests/Info.plist new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ b/Example/EGFormValidatorExampleUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Example/Podfile b/Example/Podfile new file mode 100644 index 0000000..1c6e32e --- /dev/null +++ b/Example/Podfile @@ -0,0 +1,7 @@ +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '8.0' +use_frameworks! + +target 'EGFormValidatorExample' do + pod 'EGFormValidator' +end