diff --git a/Pods/Pods.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/Pods-TymateSwiftExtensions.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/Pods-TymateSwiftExtensions.xcscheme index 89f1c7e..8b210a8 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/Pods-TymateSwiftExtensions.xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/Pods-TymateSwiftExtensions.xcscheme @@ -7,15 +7,15 @@ buildImplicitDependencies = "YES"> + buildForArchiving = "YES" + buildForAnalyzing = "YES"> @@ -23,14 +23,17 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> + + + + + + + debugDocumentVersioning = "YES"> diff --git a/Pods/Pods.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist b/Pods/Pods.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist index 92e04ca..5f32022 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Pods/Pods.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist @@ -8,11 +8,15 @@ isShown + orderHint + 0 Pods-TymateSwiftExtensions.xcscheme isShown + orderHint + 1 SuppressBuildableAutocreation diff --git a/TymateSwiftExtensions.xcodeproj/project.pbxproj b/TymateSwiftExtensions.xcodeproj/project.pbxproj index b5d6a00..f226037 100644 --- a/TymateSwiftExtensions.xcodeproj/project.pbxproj +++ b/TymateSwiftExtensions.xcodeproj/project.pbxproj @@ -9,6 +9,7 @@ /* Begin PBXBuildFile section */ 5B6AA39F467E0BF2D262468F /* Pods_TymateSwiftExtensions.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6685F60706721708C67C8CF6 /* Pods_TymateSwiftExtensions.framework */; }; F464DAE522D39F2C002413BD /* TymateSwiftExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = F464DAE322D39F2C002413BD /* TymateSwiftExtensions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F464DB1322D730A5002413BD /* StringExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F464DB1222D730A5002413BD /* StringExtensions.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -18,6 +19,7 @@ F464DAE022D39F2C002413BD /* TymateSwiftExtensions.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TymateSwiftExtensions.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F464DAE322D39F2C002413BD /* TymateSwiftExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TymateSwiftExtensions.h; sourceTree = ""; }; F464DAE422D39F2C002413BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F464DB1222D730A5002413BD /* StringExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringExtensions.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -38,7 +40,6 @@ 00955484756FD6B2C4E60979 /* Pods-TymateSwiftExtensions.debug.xcconfig */, 78A9AA7B809D409F49089628 /* Pods-TymateSwiftExtensions.release.xcconfig */, ); - name = Pods; path = Pods; sourceTree = ""; }; @@ -73,6 +74,7 @@ children = ( F464DAE322D39F2C002413BD /* TymateSwiftExtensions.h */, F464DAE422D39F2C002413BD /* Info.plist */, + F464DB1222D730A5002413BD /* StringExtensions.swift */, ); path = TymateSwiftExtensions; sourceTree = ""; @@ -121,6 +123,7 @@ TargetAttributes = { F464DADF22D39F2C002413BD = { CreatedOnToolsVersion = 10.2; + LastSwiftMigration = 1020; }; }; }; @@ -181,6 +184,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + F464DB1322D730A5002413BD /* StringExtensions.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -313,6 +317,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 00955484756FD6B2C4E60979 /* Pods-TymateSwiftExtensions.debug.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; DEFINES_MODULE = YES; @@ -329,6 +334,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.tymate.TymateSwiftExtensions; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -338,6 +344,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 78A9AA7B809D409F49089628 /* Pods-TymateSwiftExtensions.release.xcconfig */; buildSettings = { + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; DEFINES_MODULE = YES; diff --git a/TymateSwiftExtensions.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist b/TymateSwiftExtensions.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist index 06653f2..3be4640 100644 --- a/TymateSwiftExtensions.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/TymateSwiftExtensions.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,7 @@ TymateSwiftExtensions.xcscheme_^#shared#^_ orderHint - 0 + 2 diff --git a/TymateSwiftExtensions.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/TymateSwiftExtensions.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/TymateSwiftExtensions.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/TymateSwiftExtensions.xcworkspace/xcuserdata/simon.xcuserdatad/UserInterfaceState.xcuserstate b/TymateSwiftExtensions.xcworkspace/xcuserdata/simon.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..fa31261 Binary files /dev/null and b/TymateSwiftExtensions.xcworkspace/xcuserdata/simon.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/TymateSwiftExtensions/StringExtensions.swift b/TymateSwiftExtensions/StringExtensions.swift new file mode 100644 index 0000000..497cc83 --- /dev/null +++ b/TymateSwiftExtensions/StringExtensions.swift @@ -0,0 +1,19 @@ +// +// StringExtensions.swift +// TymateSwiftExtensions +// +// Created by Simon on 11/07/2019. +// Copyright © 2019 Tymate. All rights reserved. +// + +import Foundation + +public extension String { + func isValidEmail() -> Bool { + // print("validate calendar: \(testStr)") + let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}" + + let emailTest = NSPredicate(format: "SELF MATCHES %@", emailRegEx) + return emailTest.evaluate(with: self) + } +}