From 353f11cc17fab3473a4bdb9aaba1ae4d6762eeaa Mon Sep 17 00:00:00 2001 From: Jota Melo Date: Thu, 5 Jan 2017 22:53:43 -0200 Subject: [PATCH] First commit --- .../JMMaskTextField.xcodeproj/project.pbxproj | 20 +- .../contents.xcworkspacedata | 10 + .../Base.lproj/LaunchScreen.xib | 10 +- .../Base.lproj/Main.storyboard | 32 +- Example/JMMaskTextField/ViewController.swift | 31 +- Example/Podfile.lock | 16 + .../JMMaskTextField.podspec.json | 22 + Example/Pods/Manifest.lock | 16 + Example/Pods/Pods.xcodeproj/project.pbxproj | 711 ++++++++++++++++++ .../JMMaskTextField/Info.plist | 26 + .../JMMaskTextField/JMMaskTextField-dummy.m | 5 + .../JMMaskTextField-prefix.pch | 4 + .../JMMaskTextField-umbrella.h | 8 + .../JMMaskTextField/JMMaskTextField.modulemap | 6 + .../JMMaskTextField/JMMaskTextField.xcconfig | 9 + .../Pods-JMMaskTextField_Example/Info.plist | 26 + ...extField_Example-acknowledgements.markdown | 26 + ...skTextField_Example-acknowledgements.plist | 58 ++ .../Pods-JMMaskTextField_Example-dummy.m | 5 + ...Pods-JMMaskTextField_Example-frameworks.sh | 91 +++ .../Pods-JMMaskTextField_Example-resources.sh | 96 +++ .../Pods-JMMaskTextField_Example-umbrella.h | 8 + ...ods-JMMaskTextField_Example.debug.xcconfig | 11 + .../Pods-JMMaskTextField_Example.modulemap | 6 + ...s-JMMaskTextField_Example.release.xcconfig | 11 + .../Pods-JMMaskTextField_Tests/Info.plist | 26 + ...kTextField_Tests-acknowledgements.markdown | 3 + ...MaskTextField_Tests-acknowledgements.plist | 29 + .../Pods-JMMaskTextField_Tests-dummy.m | 5 + .../Pods-JMMaskTextField_Tests-frameworks.sh | 84 +++ .../Pods-JMMaskTextField_Tests-resources.sh | 96 +++ .../Pods-JMMaskTextField_Tests-umbrella.h | 8 + .../Pods-JMMaskTextField_Tests.debug.xcconfig | 8 + .../Pods-JMMaskTextField_Tests.modulemap | 6 + ...ods-JMMaskTextField_Tests.release.xcconfig | 8 + Example/Tests/Tests.swift | 59 +- JMMaskTextField-Swift.podspec | 35 + JMMaskTextField.podspec | 42 -- JMMaskTextField/Classes/JMMaskTextField.swift | 152 ++++ JMMaskTextField/Classes/JMStringMask.swift | 115 +++ JMMaskTextField/Classes/ReplaceMe.swift | 0 README.md | 88 ++- 42 files changed, 1931 insertions(+), 97 deletions(-) create mode 100644 Example/JMMaskTextField.xcworkspace/contents.xcworkspacedata create mode 100644 Example/Podfile.lock create mode 100644 Example/Pods/Local Podspecs/JMMaskTextField.podspec.json create mode 100644 Example/Pods/Manifest.lock create mode 100644 Example/Pods/Pods.xcodeproj/project.pbxproj create mode 100644 Example/Pods/Target Support Files/JMMaskTextField/Info.plist create mode 100644 Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField-dummy.m create mode 100644 Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField-prefix.pch create mode 100644 Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField-umbrella.h create mode 100644 Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField.modulemap create mode 100644 Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField.xcconfig create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Info.plist create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-acknowledgements.markdown create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-acknowledgements.plist create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-dummy.m create mode 100755 Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-frameworks.sh create mode 100755 Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-resources.sh create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-umbrella.h create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.debug.xcconfig create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.modulemap create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.release.xcconfig create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Info.plist create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-acknowledgements.markdown create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-acknowledgements.plist create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-dummy.m create mode 100755 Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-frameworks.sh create mode 100755 Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-resources.sh create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-umbrella.h create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.debug.xcconfig create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.modulemap create mode 100644 Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.release.xcconfig create mode 100644 JMMaskTextField-Swift.podspec delete mode 100644 JMMaskTextField.podspec create mode 100644 JMMaskTextField/Classes/JMMaskTextField.swift create mode 100644 JMMaskTextField/Classes/JMStringMask.swift delete mode 100644 JMMaskTextField/Classes/ReplaceMe.swift diff --git a/Example/JMMaskTextField.xcodeproj/project.pbxproj b/Example/JMMaskTextField.xcodeproj/project.pbxproj index 6b7938f..9378ee0 100644 --- a/Example/JMMaskTextField.xcodeproj/project.pbxproj +++ b/Example/JMMaskTextField.xcodeproj/project.pbxproj @@ -31,7 +31,7 @@ 18160B83F28995C3CAE5B255 /* Pods-JMMaskTextField_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JMMaskTextField_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.release.xcconfig"; sourceTree = ""; }; 247460C522CF945415AA5021 /* Pods_JMMaskTextField_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JMMaskTextField_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 401BE1C3511B0A1F7ED8379B /* Pods-JMMaskTextField_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JMMaskTextField_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.release.xcconfig"; sourceTree = ""; }; - 4A653B572D000E57686D318A /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; + 4A653B572D000E57686D318A /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 607FACD01AFB9204008FA782 /* JMMaskTextField_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JMMaskTextField_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -44,9 +44,9 @@ 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 945882128EEAF985308707CF /* Pods_JMMaskTextField_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JMMaskTextField_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 964F50B58B959374ED03B556 /* Pods-JMMaskTextField_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JMMaskTextField_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.debug.xcconfig"; sourceTree = ""; }; - B0B19D301D7A1FD41A2C5380 /* JMMaskTextField.podspec */ = {isa = PBXFileReference; includeInIndex = 1; name = JMMaskTextField.podspec; path = ../JMMaskTextField.podspec; sourceTree = ""; }; + B0B19D301D7A1FD41A2C5380 /* JMMaskTextField-Swift.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = "JMMaskTextField-Swift.podspec"; path = "../JMMaskTextField-Swift.podspec"; sourceTree = ""; }; E4B6EB4E3904CA3F0D36528B /* Pods-JMMaskTextField_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JMMaskTextField_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.debug.xcconfig"; sourceTree = ""; }; - F8171FA29F1A2D1416306E2C /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; name = README.md; path = ../README.md; sourceTree = ""; }; + F8171FA29F1A2D1416306E2C /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -152,7 +152,7 @@ 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { isa = PBXGroup; children = ( - B0B19D301D7A1FD41A2C5380 /* JMMaskTextField.podspec */, + B0B19D301D7A1FD41A2C5380 /* JMMaskTextField-Swift.podspec */, F8171FA29F1A2D1416306E2C /* README.md */, 4A653B572D000E57686D318A /* LICENSE */, ); @@ -489,11 +489,13 @@ baseConfigurationReference = 964F50B58B959374ED03B556 /* Pods-JMMaskTextField_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = JMMaskTextField/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -502,11 +504,13 @@ baseConfigurationReference = 18160B83F28995C3CAE5B255 /* Pods-JMMaskTextField_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = JMMaskTextField/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; }; name = Release; }; @@ -514,6 +518,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = E4B6EB4E3904CA3F0D36528B /* Pods-JMMaskTextField_Tests.debug.xcconfig */; buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", @@ -526,6 +532,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/JMMaskTextField_Example.app/JMMaskTextField_Example"; }; name = Debug; }; @@ -533,6 +541,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 401BE1C3511B0A1F7ED8379B /* Pods-JMMaskTextField_Tests.release.xcconfig */; buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", @@ -541,6 +551,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/JMMaskTextField_Example.app/JMMaskTextField_Example"; }; name = Release; }; diff --git a/Example/JMMaskTextField.xcworkspace/contents.xcworkspacedata b/Example/JMMaskTextField.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..e486ef7 --- /dev/null +++ b/Example/JMMaskTextField.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Example/JMMaskTextField/Base.lproj/LaunchScreen.xib b/Example/JMMaskTextField/Base.lproj/LaunchScreen.xib index 8b5078a..5053464 100644 --- a/Example/JMMaskTextField/Base.lproj/LaunchScreen.xib +++ b/Example/JMMaskTextField/Base.lproj/LaunchScreen.xib @@ -1,7 +1,9 @@ - - + + - + + + @@ -24,7 +26,7 @@ - + diff --git a/Example/JMMaskTextField/Base.lproj/Main.storyboard b/Example/JMMaskTextField/Base.lproj/Main.storyboard index 52ea29e..4662050 100644 --- a/Example/JMMaskTextField/Base.lproj/Main.storyboard +++ b/Example/JMMaskTextField/Base.lproj/Main.storyboard @@ -1,13 +1,16 @@ - - + + - + + + + - + @@ -15,7 +18,26 @@ - + + + + + + + + + + + + + + + + + + + + diff --git a/Example/JMMaskTextField/ViewController.swift b/Example/JMMaskTextField/ViewController.swift index 351e378..6780c87 100644 --- a/Example/JMMaskTextField/ViewController.swift +++ b/Example/JMMaskTextField/ViewController.swift @@ -7,18 +7,25 @@ // import UIKit +import JMMaskTextField -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. +class ViewController: UIViewController, UITextFieldDelegate { + + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + + guard let text = textField.text as NSString? else { return true } + let newText = text.replacingCharacters(in: range, with: string) + + let maskTextField = textField as! JMMaskTextField + guard let unmaskedText = maskTextField.stringMask?.unmask(string: newText) else { return true } + + if unmaskedText.characters.count >= 11 { + maskTextField.maskString = "(00) 0 0000-0000" + } else { + maskTextField.maskString = "(00) 0000-0000" + } + + return true } - + } - diff --git a/Example/Podfile.lock b/Example/Podfile.lock new file mode 100644 index 0000000..aa86464 --- /dev/null +++ b/Example/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - JMMaskTextField (0.1.0) + +DEPENDENCIES: + - JMMaskTextField (from `../`) + +EXTERNAL SOURCES: + JMMaskTextField: + :path: "../" + +SPEC CHECKSUMS: + JMMaskTextField: e7e33ace619da1a5612b67ea89aa0d61110cbde1 + +PODFILE CHECKSUM: 20ce40da8eecb62c232aa8df30134c359d5ae79f + +COCOAPODS: 1.1.1 diff --git a/Example/Pods/Local Podspecs/JMMaskTextField.podspec.json b/Example/Pods/Local Podspecs/JMMaskTextField.podspec.json new file mode 100644 index 0000000..4da8f5f --- /dev/null +++ b/Example/Pods/Local Podspecs/JMMaskTextField.podspec.json @@ -0,0 +1,22 @@ +{ + "name": "JMMaskTextField", + "version": "0.1.0", + "summary": "A short description of JMMaskTextField.", + "description": "TODO: Add long description of the pod here.", + "homepage": "https://github.com//JMMaskTextField", + "license": { + "type": "MIT", + "file": "LICENSE" + }, + "authors": { + "Jota Melo": "jpmfagundes@gmail.com" + }, + "source": { + "git": "https://github.com//JMMaskTextField.git", + "tag": "0.1.0" + }, + "platforms": { + "ios": "8.0" + }, + "source_files": "JMMaskTextField/Classes/**/*" +} diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock new file mode 100644 index 0000000..aa86464 --- /dev/null +++ b/Example/Pods/Manifest.lock @@ -0,0 +1,16 @@ +PODS: + - JMMaskTextField (0.1.0) + +DEPENDENCIES: + - JMMaskTextField (from `../`) + +EXTERNAL SOURCES: + JMMaskTextField: + :path: "../" + +SPEC CHECKSUMS: + JMMaskTextField: e7e33ace619da1a5612b67ea89aa0d61110cbde1 + +PODFILE CHECKSUM: 20ce40da8eecb62c232aa8df30134c359d5ae79f + +COCOAPODS: 1.1.1 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..635c9b6 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,711 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0A577C232053AA40064679CABFFDB05D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; + 251298364CC31DC4899802A2D7CFCF0C /* JMMaskTextField-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E6B91D0DCB7B618CB9842C3F2F7A29A /* JMMaskTextField-dummy.m */; }; + 3606C78C77175AEED0DEBADCCBD1C01B /* Pods-JMMaskTextField_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 322D6CF61C22E18014C21C918D486E32 /* Pods-JMMaskTextField_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 37360ADD1C38A6C3D66D07E8EF51EA87 /* JMMaskTextField-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 52C3473EC9B8E54A35AF5AB2158D0B1F /* JMMaskTextField-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3DFE7166E71B966CF215537093EC3A25 /* Pods-JMMaskTextField_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8404048A9FA0B48F6C045EA12DB0826F /* Pods-JMMaskTextField_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5E1F7F7A1245B7A71C8793605018902A /* Pods-JMMaskTextField_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E457ED349141CBB35BA4423D79EA36E /* Pods-JMMaskTextField_Tests-dummy.m */; }; + 77AB63358D19567B84CC665E95C9B55C /* Pods-JMMaskTextField_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E296D3E34FBBE10E06FDA9360A84B3B0 /* Pods-JMMaskTextField_Example-dummy.m */; }; + 8424F60B1E1F1E3000F8EEAF /* JMMaskTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8424F6091E1F1E3000F8EEAF /* JMMaskTextField.swift */; }; + 8424F60C1E1F1E3000F8EEAF /* JMStringMask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8424F60A1E1F1E3000F8EEAF /* JMStringMask.swift */; }; + C09462C7C43004D9CACBC565286C77D8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; + D98166A2DA665D2D099EA83924CE1B60 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 8A5B94B78F80324D19E60C3C08DC50B7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = A11912BD4BB1A0DAE92E82CF4F1E88B7; + remoteInfo = JMMaskTextField; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 064E31047EA68AB39D286F97AB09D7E2 /* Pods-JMMaskTextField_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-JMMaskTextField_Tests.modulemap"; sourceTree = ""; }; + 2753EB276B24FB0A6FB3F8A0538491C5 /* Pods-JMMaskTextField_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-JMMaskTextField_Tests.release.xcconfig"; sourceTree = ""; }; + 322D6CF61C22E18014C21C918D486E32 /* Pods-JMMaskTextField_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-JMMaskTextField_Example-umbrella.h"; sourceTree = ""; }; + 38BE8084FA7DA0FC547FC662901D617B /* Pods-JMMaskTextField_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-JMMaskTextField_Tests-resources.sh"; sourceTree = ""; }; + 38EB50A0C1F2DD2FAEA842DD1105BD79 /* Pods_JMMaskTextField_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JMMaskTextField_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 43D71B9C1388095166EBEBCDDB4038AB /* Pods-JMMaskTextField_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-JMMaskTextField_Example-resources.sh"; sourceTree = ""; }; + 4E457ED349141CBB35BA4423D79EA36E /* Pods-JMMaskTextField_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-JMMaskTextField_Tests-dummy.m"; sourceTree = ""; }; + 4E6B91D0DCB7B618CB9842C3F2F7A29A /* JMMaskTextField-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "JMMaskTextField-dummy.m"; sourceTree = ""; }; + 50C3016817C1C4E490D1A98A76A3BBAC /* JMMaskTextField-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JMMaskTextField-prefix.pch"; sourceTree = ""; }; + 52C3473EC9B8E54A35AF5AB2158D0B1F /* JMMaskTextField-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JMMaskTextField-umbrella.h"; sourceTree = ""; }; + 643DF798263425FFC1A0EC714FEB9D37 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 661AFBAA1C8DBFBF06CA282DF51719BE /* JMMaskTextField.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = JMMaskTextField.xcconfig; sourceTree = ""; }; + 66542E0E1BA59898453FE84680C3E136 /* Pods-JMMaskTextField_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-JMMaskTextField_Example-frameworks.sh"; sourceTree = ""; }; + 6739E0EF141D859512AC63079A925307 /* Pods-JMMaskTextField_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-JMMaskTextField_Example-acknowledgements.plist"; sourceTree = ""; }; + 7A0D6D0531999B28475EC300271AB9AC /* Pods-JMMaskTextField_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-JMMaskTextField_Example.release.xcconfig"; sourceTree = ""; }; + 81272BB06432562E4784C267632D2883 /* Pods_JMMaskTextField_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JMMaskTextField_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8404048A9FA0B48F6C045EA12DB0826F /* Pods-JMMaskTextField_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-JMMaskTextField_Tests-umbrella.h"; sourceTree = ""; }; + 8424F6091E1F1E3000F8EEAF /* JMMaskTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JMMaskTextField.swift; sourceTree = ""; }; + 8424F60A1E1F1E3000F8EEAF /* JMStringMask.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JMStringMask.swift; sourceTree = ""; }; + 920725CE3526F97B18483C67872B8FA5 /* Pods-JMMaskTextField_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-JMMaskTextField_Example.modulemap"; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + DCA365462788E7CEC3A83805210F5079 /* Pods-JMMaskTextField_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-JMMaskTextField_Tests-frameworks.sh"; sourceTree = ""; }; + DF56973528060B6624D1A2AE25CD580E /* Pods-JMMaskTextField_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-JMMaskTextField_Tests.debug.xcconfig"; sourceTree = ""; }; + E00A2F6A4193335D7565C78DE6EFD860 /* JMMaskTextField.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JMMaskTextField.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E1010107128FF3A152B2E4F936F790EF /* JMMaskTextField.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = JMMaskTextField.modulemap; sourceTree = ""; }; + E12F3936AB32224D0BAA0EAAABA6054D /* Pods-JMMaskTextField_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-JMMaskTextField_Example.debug.xcconfig"; sourceTree = ""; }; + E1CFE83CADF0BDD81A8379325B1C25DB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E296D3E34FBBE10E06FDA9360A84B3B0 /* Pods-JMMaskTextField_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-JMMaskTextField_Example-dummy.m"; sourceTree = ""; }; + E9A944FFA046D847246562436545E52B /* Pods-JMMaskTextField_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-JMMaskTextField_Tests-acknowledgements.plist"; sourceTree = ""; }; + EABBD96A125589A1A34E298CF384020C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F2F00776FB537965E9DE65D200368D3B /* Pods-JMMaskTextField_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-JMMaskTextField_Tests-acknowledgements.markdown"; sourceTree = ""; }; + FDFF69042A066A41038ADC4A9FA666B0 /* Pods-JMMaskTextField_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-JMMaskTextField_Example-acknowledgements.markdown"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 238DD56D2C7DD7DE88AEC0B88F4EB645 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C09462C7C43004D9CACBC565286C77D8 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3A2BC3515BA9B307E0DB36E2E07DECDE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0A577C232053AA40064679CABFFDB05D /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F2E9D2E984029BE843D5A215212E51D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D98166A2DA665D2D099EA83924CE1B60 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0B6F7F8B08AB79F7AC51ADEABF1909ED /* JMMaskTextField */ = { + isa = PBXGroup; + children = ( + 14555AB397B08CD46572A924591A527E /* JMMaskTextField */, + 44DD3DBDC97EC2ACB8AF494260706209 /* Support Files */, + ); + name = JMMaskTextField; + path = ../..; + sourceTree = ""; + }; + 14555AB397B08CD46572A924591A527E /* JMMaskTextField */ = { + isa = PBXGroup; + children = ( + 756E0FDC25F6FC63DB3571A0339F1241 /* Classes */, + ); + path = JMMaskTextField; + sourceTree = ""; + }; + 3687D26934AE2DDB705A27314DA57F86 /* Products */ = { + isa = PBXGroup; + children = ( + E00A2F6A4193335D7565C78DE6EFD860 /* JMMaskTextField.framework */, + 81272BB06432562E4784C267632D2883 /* Pods_JMMaskTextField_Example.framework */, + 38EB50A0C1F2DD2FAEA842DD1105BD79 /* Pods_JMMaskTextField_Tests.framework */, + ); + name = Products; + sourceTree = ""; + }; + 3DB94DDFDE2D42BE3F0AD0EDD39CBB11 /* Development Pods */ = { + isa = PBXGroup; + children = ( + 0B6F7F8B08AB79F7AC51ADEABF1909ED /* JMMaskTextField */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + 44DD3DBDC97EC2ACB8AF494260706209 /* Support Files */ = { + isa = PBXGroup; + children = ( + 643DF798263425FFC1A0EC714FEB9D37 /* Info.plist */, + E1010107128FF3A152B2E4F936F790EF /* JMMaskTextField.modulemap */, + 661AFBAA1C8DBFBF06CA282DF51719BE /* JMMaskTextField.xcconfig */, + 4E6B91D0DCB7B618CB9842C3F2F7A29A /* JMMaskTextField-dummy.m */, + 50C3016817C1C4E490D1A98A76A3BBAC /* JMMaskTextField-prefix.pch */, + 52C3473EC9B8E54A35AF5AB2158D0B1F /* JMMaskTextField-umbrella.h */, + ); + name = "Support Files"; + path = "Example/Pods/Target Support Files/JMMaskTextField"; + sourceTree = ""; + }; + 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { + isa = PBXGroup; + children = ( + CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + 756E0FDC25F6FC63DB3571A0339F1241 /* Classes */ = { + isa = PBXGroup; + children = ( + 8424F6091E1F1E3000F8EEAF /* JMMaskTextField.swift */, + 8424F60A1E1F1E3000F8EEAF /* JMStringMask.swift */, + ); + path = Classes; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + 3DB94DDFDE2D42BE3F0AD0EDD39CBB11 /* Development Pods */, + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, + 3687D26934AE2DDB705A27314DA57F86 /* Products */, + C54FB6D6EB69D5C838D36A80BC419267 /* Targets Support Files */, + ); + sourceTree = ""; + }; + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + C54FB6D6EB69D5C838D36A80BC419267 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + F547AA336ADB555C32E37119A0490262 /* Pods-JMMaskTextField_Example */, + E20E91FE6163064C0B2FF82D62291A9A /* Pods-JMMaskTextField_Tests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + E20E91FE6163064C0B2FF82D62291A9A /* Pods-JMMaskTextField_Tests */ = { + isa = PBXGroup; + children = ( + EABBD96A125589A1A34E298CF384020C /* Info.plist */, + 064E31047EA68AB39D286F97AB09D7E2 /* Pods-JMMaskTextField_Tests.modulemap */, + F2F00776FB537965E9DE65D200368D3B /* Pods-JMMaskTextField_Tests-acknowledgements.markdown */, + E9A944FFA046D847246562436545E52B /* Pods-JMMaskTextField_Tests-acknowledgements.plist */, + 4E457ED349141CBB35BA4423D79EA36E /* Pods-JMMaskTextField_Tests-dummy.m */, + DCA365462788E7CEC3A83805210F5079 /* Pods-JMMaskTextField_Tests-frameworks.sh */, + 38BE8084FA7DA0FC547FC662901D617B /* Pods-JMMaskTextField_Tests-resources.sh */, + 8404048A9FA0B48F6C045EA12DB0826F /* Pods-JMMaskTextField_Tests-umbrella.h */, + DF56973528060B6624D1A2AE25CD580E /* Pods-JMMaskTextField_Tests.debug.xcconfig */, + 2753EB276B24FB0A6FB3F8A0538491C5 /* Pods-JMMaskTextField_Tests.release.xcconfig */, + ); + name = "Pods-JMMaskTextField_Tests"; + path = "Target Support Files/Pods-JMMaskTextField_Tests"; + sourceTree = ""; + }; + F547AA336ADB555C32E37119A0490262 /* Pods-JMMaskTextField_Example */ = { + isa = PBXGroup; + children = ( + E1CFE83CADF0BDD81A8379325B1C25DB /* Info.plist */, + 920725CE3526F97B18483C67872B8FA5 /* Pods-JMMaskTextField_Example.modulemap */, + FDFF69042A066A41038ADC4A9FA666B0 /* Pods-JMMaskTextField_Example-acknowledgements.markdown */, + 6739E0EF141D859512AC63079A925307 /* Pods-JMMaskTextField_Example-acknowledgements.plist */, + E296D3E34FBBE10E06FDA9360A84B3B0 /* Pods-JMMaskTextField_Example-dummy.m */, + 66542E0E1BA59898453FE84680C3E136 /* Pods-JMMaskTextField_Example-frameworks.sh */, + 43D71B9C1388095166EBEBCDDB4038AB /* Pods-JMMaskTextField_Example-resources.sh */, + 322D6CF61C22E18014C21C918D486E32 /* Pods-JMMaskTextField_Example-umbrella.h */, + E12F3936AB32224D0BAA0EAAABA6054D /* Pods-JMMaskTextField_Example.debug.xcconfig */, + 7A0D6D0531999B28475EC300271AB9AC /* Pods-JMMaskTextField_Example.release.xcconfig */, + ); + name = "Pods-JMMaskTextField_Example"; + path = "Target Support Files/Pods-JMMaskTextField_Example"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + A83DE5578218E0AE5EE9C8AC6B6E9E5E /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 37360ADD1C38A6C3D66D07E8EF51EA87 /* JMMaskTextField-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D3857960A4CB69C7A892B56F358D97E9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 3606C78C77175AEED0DEBADCCBD1C01B /* Pods-JMMaskTextField_Example-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E155A9603D258E58FA3B32740320B57A /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 3DFE7166E71B966CF215537093EC3A25 /* Pods-JMMaskTextField_Tests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 435E65CACCF8889BC5EE4D53A833F42A /* Pods-JMMaskTextField_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = E33879F11C562FC3E98487F94E0A0237 /* Build configuration list for PBXNativeTarget "Pods-JMMaskTextField_Example" */; + buildPhases = ( + 595E934DBF395C81377F26CB485A1CBA /* Sources */, + 238DD56D2C7DD7DE88AEC0B88F4EB645 /* Frameworks */, + D3857960A4CB69C7A892B56F358D97E9 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 9E3F4FE04A3097269EEBF45A1EDAC271 /* PBXTargetDependency */, + ); + name = "Pods-JMMaskTextField_Example"; + productName = "Pods-JMMaskTextField_Example"; + productReference = 81272BB06432562E4784C267632D2883 /* Pods_JMMaskTextField_Example.framework */; + productType = "com.apple.product-type.framework"; + }; + A11912BD4BB1A0DAE92E82CF4F1E88B7 /* JMMaskTextField */ = { + isa = PBXNativeTarget; + buildConfigurationList = CFD82E18BE7231B21BC23D1818D19275 /* Build configuration list for PBXNativeTarget "JMMaskTextField" */; + buildPhases = ( + B0C261067EDD426D963436A84A93E8BC /* Sources */, + 3A2BC3515BA9B307E0DB36E2E07DECDE /* Frameworks */, + A83DE5578218E0AE5EE9C8AC6B6E9E5E /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = JMMaskTextField; + productName = JMMaskTextField; + productReference = E00A2F6A4193335D7565C78DE6EFD860 /* JMMaskTextField.framework */; + productType = "com.apple.product-type.framework"; + }; + AB8E3132DCD76608671B45E325C0ED5C /* Pods-JMMaskTextField_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6C7A5AF4A52EC87459A81FD0222E0C5A /* Build configuration list for PBXNativeTarget "Pods-JMMaskTextField_Tests" */; + buildPhases = ( + 13F9A357C666FD6419F2EF069F2BE3B8 /* Sources */, + 4F2E9D2E984029BE843D5A215212E51D /* Frameworks */, + E155A9603D258E58FA3B32740320B57A /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Pods-JMMaskTextField_Tests"; + productName = "Pods-JMMaskTextField_Tests"; + productReference = 38EB50A0C1F2DD2FAEA842DD1105BD79 /* Pods_JMMaskTextField_Tests.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0700; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = 3687D26934AE2DDB705A27314DA57F86 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A11912BD4BB1A0DAE92E82CF4F1E88B7 /* JMMaskTextField */, + 435E65CACCF8889BC5EE4D53A833F42A /* Pods-JMMaskTextField_Example */, + AB8E3132DCD76608671B45E325C0ED5C /* Pods-JMMaskTextField_Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 13F9A357C666FD6419F2EF069F2BE3B8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5E1F7F7A1245B7A71C8793605018902A /* Pods-JMMaskTextField_Tests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 595E934DBF395C81377F26CB485A1CBA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 77AB63358D19567B84CC665E95C9B55C /* Pods-JMMaskTextField_Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B0C261067EDD426D963436A84A93E8BC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 251298364CC31DC4899802A2D7CFCF0C /* JMMaskTextField-dummy.m in Sources */, + 8424F60B1E1F1E3000F8EEAF /* JMMaskTextField.swift in Sources */, + 8424F60C1E1F1E3000F8EEAF /* JMStringMask.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 9E3F4FE04A3097269EEBF45A1EDAC271 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = JMMaskTextField; + target = A11912BD4BB1A0DAE92E82CF4F1E88B7 /* JMMaskTextField */; + targetProxy = 8A5B94B78F80324D19E60C3C08DC50B7 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 2F778287269F78A56DFD52B1917791B8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2753EB276B24FB0A6FB3F8A0538491C5 /* Pods-JMMaskTextField_Tests.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-JMMaskTextField_Tests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_JMMaskTextField_Tests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 60DF6B0D9278CFCCB80C6940E36358D3 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DF56973528060B6624D1A2AE25CD580E /* Pods-JMMaskTextField_Tests.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-JMMaskTextField_Tests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_JMMaskTextField_Tests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 8DED8AD26D381A6ACFF202E5217EC498 /* 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_VERSION = 3.0; + SYMROOT = "${SRCROOT}/../build"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 9E1E4E48AF2EAB23169E611BF694090A /* 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_VERSION = 3.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + A29F54BF3AD186269A43756960CC5B32 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7A0D6D0531999B28475EC300271AB9AC /* Pods-JMMaskTextField_Example.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-JMMaskTextField_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_JMMaskTextField_Example; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + DE00D36A4B2621FF44488A0868B71DE6 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 661AFBAA1C8DBFBF06CA282DF51719BE /* JMMaskTextField.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/JMMaskTextField/JMMaskTextField-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/JMMaskTextField/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/JMMaskTextField/JMMaskTextField.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = JMMaskTextField; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + DF1FD7CF365DF4C3ACA7FADD6F17CA04 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E12F3936AB32224D0BAA0EAAABA6054D /* Pods-JMMaskTextField_Example.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-JMMaskTextField_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_JMMaskTextField_Example; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + E1977FAC3C1F47E66C75E5C29E034F1E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 661AFBAA1C8DBFBF06CA282DF51719BE /* JMMaskTextField.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/JMMaskTextField/JMMaskTextField-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/JMMaskTextField/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/JMMaskTextField/JMMaskTextField.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = JMMaskTextField; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9E1E4E48AF2EAB23169E611BF694090A /* Debug */, + 8DED8AD26D381A6ACFF202E5217EC498 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6C7A5AF4A52EC87459A81FD0222E0C5A /* Build configuration list for PBXNativeTarget "Pods-JMMaskTextField_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 60DF6B0D9278CFCCB80C6940E36358D3 /* Debug */, + 2F778287269F78A56DFD52B1917791B8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + CFD82E18BE7231B21BC23D1818D19275 /* Build configuration list for PBXNativeTarget "JMMaskTextField" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E1977FAC3C1F47E66C75E5C29E034F1E /* Debug */, + DE00D36A4B2621FF44488A0868B71DE6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E33879F11C562FC3E98487F94E0A0237 /* Build configuration list for PBXNativeTarget "Pods-JMMaskTextField_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DF1FD7CF365DF4C3ACA7FADD6F17CA04 /* Debug */, + A29F54BF3AD186269A43756960CC5B32 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/Example/Pods/Target Support Files/JMMaskTextField/Info.plist b/Example/Pods/Target Support Files/JMMaskTextField/Info.plist new file mode 100644 index 0000000..161a9d3 --- /dev/null +++ b/Example/Pods/Target Support Files/JMMaskTextField/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.1.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField-dummy.m b/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField-dummy.m new file mode 100644 index 0000000..4615637 --- /dev/null +++ b/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_JMMaskTextField : NSObject +@end +@implementation PodsDummy_JMMaskTextField +@end diff --git a/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField-prefix.pch b/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField-umbrella.h b/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField-umbrella.h new file mode 100644 index 0000000..c1ef912 --- /dev/null +++ b/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField-umbrella.h @@ -0,0 +1,8 @@ +#ifdef __OBJC__ +#import +#endif + + +FOUNDATION_EXPORT double JMMaskTextFieldVersionNumber; +FOUNDATION_EXPORT const unsigned char JMMaskTextFieldVersionString[]; + diff --git a/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField.modulemap b/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField.modulemap new file mode 100644 index 0000000..5decce7 --- /dev/null +++ b/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField.modulemap @@ -0,0 +1,6 @@ +framework module JMMaskTextField { + umbrella header "JMMaskTextField-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField.xcconfig b/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField.xcconfig new file mode 100644 index 0000000..6ea71db --- /dev/null +++ b/Example/Pods/Target Support Files/JMMaskTextField/JMMaskTextField.xcconfig @@ -0,0 +1,9 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/JMMaskTextField +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Info.plist b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-acknowledgements.markdown new file mode 100644 index 0000000..ae537ff --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-acknowledgements.markdown @@ -0,0 +1,26 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## JMMaskTextField + +Copyright (c) 2017 Jota Melo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-acknowledgements.plist new file mode 100644 index 0000000..3d8caae --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-acknowledgements.plist @@ -0,0 +1,58 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2017 Jota Melo <jpmfagundes@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + License + MIT + Title + JMMaskTextField + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-dummy.m b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-dummy.m new file mode 100644 index 0000000..6621400 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_JMMaskTextField_Example : NSObject +@end +@implementation PodsDummy_Pods_JMMaskTextField_Example +@end diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-frameworks.sh new file mode 100755 index 0000000..ce70b34 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-frameworks.sh @@ -0,0 +1,91 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "$BUILT_PRODUCTS_DIR/JMMaskTextField/JMMaskTextField.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "$BUILT_PRODUCTS_DIR/JMMaskTextField/JMMaskTextField.framework" +fi diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-resources.sh b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-resources.sh new file mode 100755 index 0000000..25e9d37 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-resources.sh @@ -0,0 +1,96 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-umbrella.h new file mode 100644 index 0000000..b0e68ef --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example-umbrella.h @@ -0,0 +1,8 @@ +#ifdef __OBJC__ +#import +#endif + + +FOUNDATION_EXPORT double Pods_JMMaskTextField_ExampleVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_JMMaskTextField_ExampleVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.debug.xcconfig new file mode 100644 index 0000000..8f40697 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.debug.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JMMaskTextField" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/JMMaskTextField/JMMaskTextField.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "JMMaskTextField" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.modulemap b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.modulemap new file mode 100644 index 0000000..e6826ae --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.modulemap @@ -0,0 +1,6 @@ +framework module Pods_JMMaskTextField_Example { + umbrella header "Pods-JMMaskTextField_Example-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.release.xcconfig new file mode 100644 index 0000000..8f40697 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Example/Pods-JMMaskTextField_Example.release.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JMMaskTextField" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/JMMaskTextField/JMMaskTextField.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "JMMaskTextField" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Info.plist b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-acknowledgements.markdown new file mode 100644 index 0000000..102af75 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-acknowledgements.markdown @@ -0,0 +1,3 @@ +# Acknowledgements +This application makes use of the following third party libraries: +Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-acknowledgements.plist new file mode 100644 index 0000000..7acbad1 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-acknowledgements.plist @@ -0,0 +1,29 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-dummy.m b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-dummy.m new file mode 100644 index 0000000..8a6df2a --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_JMMaskTextField_Tests : NSObject +@end +@implementation PodsDummy_Pods_JMMaskTextField_Tests +@end diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-frameworks.sh new file mode 100755 index 0000000..893c16a --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-frameworks.sh @@ -0,0 +1,84 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" + /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-resources.sh b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-resources.sh new file mode 100755 index 0000000..25e9d37 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-resources.sh @@ -0,0 +1,96 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-umbrella.h b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-umbrella.h new file mode 100644 index 0000000..765a304 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests-umbrella.h @@ -0,0 +1,8 @@ +#ifdef __OBJC__ +#import +#endif + + +FOUNDATION_EXPORT double Pods_JMMaskTextField_TestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_JMMaskTextField_TestsVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.debug.xcconfig new file mode 100644 index 0000000..046f6fe --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.debug.xcconfig @@ -0,0 +1,8 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JMMaskTextField" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/JMMaskTextField/JMMaskTextField.framework/Headers" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.modulemap b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.modulemap new file mode 100644 index 0000000..83aa468 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_JMMaskTextField_Tests { + umbrella header "Pods-JMMaskTextField_Tests-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.release.xcconfig new file mode 100644 index 0000000..046f6fe --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-JMMaskTextField_Tests/Pods-JMMaskTextField_Tests.release.xcconfig @@ -0,0 +1,8 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JMMaskTextField" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/JMMaskTextField/JMMaskTextField.framework/Headers" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift index c54c738..f00f6d5 100644 --- a/Example/Tests/Tests.swift +++ b/Example/Tests/Tests.swift @@ -4,26 +4,49 @@ import JMMaskTextField class Tests: XCTestCase { - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. + func testStringMask() { + + var mask = JMStringMask(mask: "00000-000") + + XCTAssertEqual(mask.mask(string: "abcbe-343"), nil) + XCTAssertEqual(mask.mask(string: "30310360"), "30310-360") + XCTAssertEqual(mask.mask(string: "30310-360"), "30310-360") + XCTAssertEqual(mask.mask(string: "303103600"), nil) + XCTAssertEqual(mask.mask(string: nil), nil) + + mask = JMStringMask(mask: "AAA-0000") + XCTAssertEqual(mask.mask(string: "123-EIEIEIEIE"), nil) + XCTAssertEqual(mask.mask(string: "ETO1192"), "ETO-1192") + XCTAssertEqual(mask.mask(string: "ETO-1192"), "ETO-1192") + XCTAssertEqual(mask.mask(string: "ETO11922"), nil) } - 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. - XCTAssert(true, "Pass") - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measureBlock() { - // Put the code you want to measure the time of here. - } + func testTextFieldMask() { + + let textField = JMMaskTextField(frame: CGRect.zero) + textField.maskString = "00000-000" + + // pasting + _ = textField.textField(textField, shouldChangeCharactersIn: NSRange(location: 0, length: 0), replacementString: "30310-360") + XCTAssertEqual(textField.text, "30310-360") + + textField.text = "" + + // pasting unformatted + _ = textField.textField(textField, shouldChangeCharactersIn: NSRange(location: 0, length: 0), replacementString: "30310360") + XCTAssertEqual(textField.text, "30310-360") + + textField.text = "" + + // pasting invalid + _ = textField.textField(textField, shouldChangeCharactersIn: NSRange(location: 0, length: 0), replacementString: "30310-3600") + XCTAssertEqual(textField.text, "") + + textField.text = "30310-360" + + // deleting from middle + _ = textField.textField(textField, shouldChangeCharactersIn: NSRange(location: 2, length: 1), replacementString: "") + XCTAssertEqual(textField.text, "30103-60") } } diff --git a/JMMaskTextField-Swift.podspec b/JMMaskTextField-Swift.podspec new file mode 100644 index 0000000..7b8ef3b --- /dev/null +++ b/JMMaskTextField-Swift.podspec @@ -0,0 +1,35 @@ +# +# Be sure to run `pod lib lint JMMaskTextField.podspec' to ensure this is a +# valid spec before submitting. +# +# Any lines starting with a # are optional, but their use is encouraged +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html +# + +Pod::Spec.new do |s| +s.name = 'JMMaskTextField-Swift' +s.version = '0.1.0' +s.summary = 'JMMaskTextField - text field masking the easy way' + +# This description is used to generate tags and improve search results. +# * Think: What does it do? Why did you write it? What is the focus? +# * Try to keep it short, snappy and to the point. +# * Write the description between the DESC delimiters below. +# * Finally, don't worry about the indent, CocoaPods strips it! + +s.description = <<-DESC +JMMaskTextField makes creating masked UITextFields as easy as setting a mask string, like (000) 000-0000 for phone numbers, or AAA-0000 for a Brazilian license plate. +JMMaskTextField supports pasting, inserting and deleting from the middle. +DESC + +s.homepage = 'https://github.com/JotaMelo/JMMaskTextField-Swift' +# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' +s.license = { :type => 'MIT', :file => 'LICENSE' } +s.author = { 'Jota Melo' => 'jpmfagundes@gmail.com' } +s.source = { :git => 'https://github.com/JotaMelo/JMMaskTextField-Swift.git', :tag => s.version.to_s } +s.social_media_url = 'https://twitter.com/Jota' + +s.ios.deployment_target = '8.0' + +s.source_files = 'JMMaskTextField/Classes/**/*' +end diff --git a/JMMaskTextField.podspec b/JMMaskTextField.podspec deleted file mode 100644 index 7662ada..0000000 --- a/JMMaskTextField.podspec +++ /dev/null @@ -1,42 +0,0 @@ -# -# Be sure to run `pod lib lint JMMaskTextField.podspec' to ensure this is a -# valid spec before submitting. -# -# Any lines starting with a # are optional, but their use is encouraged -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html -# - -Pod::Spec.new do |s| - s.name = 'JMMaskTextField' - s.version = '0.1.0' - s.summary = 'A short description of JMMaskTextField.' - -# This description is used to generate tags and improve search results. -# * Think: What does it do? Why did you write it? What is the focus? -# * Try to keep it short, snappy and to the point. -# * Write the description between the DESC delimiters below. -# * Finally, don't worry about the indent, CocoaPods strips it! - - s.description = <<-DESC -TODO: Add long description of the pod here. - DESC - - s.homepage = 'https://github.com//JMMaskTextField' - # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' - s.license = { :type => 'MIT', :file => 'LICENSE' } - s.author = { 'Jota Melo' => 'jpmfagundes@gmail.com' } - s.source = { :git => 'https://github.com//JMMaskTextField.git', :tag => s.version.to_s } - # s.social_media_url = 'https://twitter.com/' - - s.ios.deployment_target = '8.0' - - s.source_files = 'JMMaskTextField/Classes/**/*' - - # s.resource_bundles = { - # 'JMMaskTextField' => ['JMMaskTextField/Assets/*.png'] - # } - - # s.public_header_files = 'Pod/Classes/**/*.h' - # s.frameworks = 'UIKit', 'MapKit' - # s.dependency 'AFNetworking', '~> 2.3' -end diff --git a/JMMaskTextField/Classes/JMMaskTextField.swift b/JMMaskTextField/Classes/JMMaskTextField.swift new file mode 100644 index 0000000..08e953e --- /dev/null +++ b/JMMaskTextField/Classes/JMMaskTextField.swift @@ -0,0 +1,152 @@ +// +// JMMaskTextField.swift +// JMMaskTextField Swift +// +// Created by Jota Melo on 02/01/17. +// Copyright © 2017 Jota. All rights reserved. +// + +import UIKit + +public class JMMaskTextField: UITextField { + + // damn, maskView is just mask in Swift + public private(set) var stringMask: JMStringMask? + fileprivate weak var realDelegate: UITextFieldDelegate? + + override weak public var delegate: UITextFieldDelegate? { + get { + return self.realDelegate + } + + set (newValue) { + self.realDelegate = newValue + super.delegate = self + } + } + + public var unmaskedText: String? { + get { + return self.stringMask?.mask(string: self.text) ?? self.text + } + } + + @IBInspectable public var maskString: String? { + didSet { + guard let maskString = self.maskString else { return } + self.stringMask = JMStringMask(mask: maskString) + } + } + + override public init(frame: CGRect) { + super.init(frame: frame) + + self.commonInit() + } + + required public init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + + self.commonInit() + } + + override public func awakeFromNib() { + super.awakeFromNib() + + self.commonInit() + } + + func commonInit() { + super.delegate = self + } + +} + +extension JMMaskTextField: UITextFieldDelegate { + + public func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool { + return self.realDelegate?.textFieldShouldBeginEditing?(textField) ?? true + } + + public func textFieldDidBeginEditing(_ textField: UITextField) { + self.realDelegate?.textFieldDidBeginEditing?(textField) + } + + public func textFieldShouldEndEditing(_ textField: UITextField) -> Bool { + return self.realDelegate?.textFieldShouldBeginEditing?(textField) ?? true + } + + public func textFieldDidEndEditing(_ textField: UITextField) { + self.realDelegate?.textFieldDidEndEditing?(textField) + } + + public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + + let previousMask = self.stringMask + let currentText: NSString = textField.text as NSString? ?? "" + + if let realDelegate = self.realDelegate, realDelegate.responds(to: #selector(textField(_:shouldChangeCharactersIn:replacementString:))) { + let delegateResponse = realDelegate.textField!(textField, shouldChangeCharactersIn: range, replacementString: string) + + if !delegateResponse { + return false + } + } + + guard let mask = self.stringMask else { return true } + + let newText = currentText.replacingCharacters(in: range, with: string) + var formattedString = mask.mask(string: newText) + + // if the mask changed or if the text couldn't be formatted, + // unmask the newText and mask it again + if (previousMask != nil && mask != previousMask!) || formattedString == nil { + let unmaskedString = mask.unmask(string: newText) + formattedString = mask.mask(string: unmaskedString) + } + + guard let finalText = formattedString as NSString? else { return false } + + // if the cursor is not at the end and the string hasn't changed + // it means the user tried to delete a mask character, so we'll + // change the range to include the character right before it + if finalText == currentText && range.location < currentText.length && range.location > 0 { + return self.textField(textField, shouldChangeCharactersIn: NSRange(location: range.location - 1, length: range.length + 1) , replacementString: string) + } + + if finalText != currentText { + textField.text = finalText as String + + // the user is trying to delete something so we need to + // move the cursor accordingly + if range.location < currentText.length { + var cursorLocation = 0 + + if range.location > finalText.length { + cursorLocation = finalText.length + } else if currentText.length > finalText.length { + cursorLocation = range.location + } else { + cursorLocation = range.location + 1 + } + + guard let startPosition = textField.position(from: textField.beginningOfDocument, offset: cursorLocation) else { return false } + guard let endPosition = textField.position(from: startPosition, offset: 0) else { return false } + textField.selectedTextRange = textField.textRange(from: startPosition, to: endPosition) + } + + return false + } + + return true + } + + public func textFieldShouldClear(_ textField: UITextField) -> Bool { + return self.realDelegate?.textFieldShouldClear?(textField) ?? true + } + + public func textFieldShouldReturn(_ textField: UITextField) -> Bool { + return self.realDelegate?.textFieldShouldReturn?(textField) ?? true + } + +} diff --git a/JMMaskTextField/Classes/JMStringMask.swift b/JMMaskTextField/Classes/JMStringMask.swift new file mode 100644 index 0000000..aaa833f --- /dev/null +++ b/JMMaskTextField/Classes/JMStringMask.swift @@ -0,0 +1,115 @@ +// +// JMStringMask.swift +// JMMaskTextField Swift +// +// Created by Jota Melo on 02/01/17. +// Copyright © 2017 Jota. All rights reserved. +// + +import Foundation + +fileprivate struct Constants { + static let letterMaskCharacter: Character = "A" + static let numberMaskCharacter: Character = "0" +} + +public struct JMStringMask: Equatable { + + var mask: String = "" + + private init() { } + + public init(mask: String) { + self.init() + + self.mask = mask + } + + public static func ==(lhs: JMStringMask, rhs: JMStringMask) -> Bool { + return lhs.mask == rhs.mask + } + + public func mask(string: String?) -> String? { + + guard let string = string else { return nil } + + if string.characters.count > self.mask.characters.count { + return nil + } + + var formattedString = "" + + var currentMaskIndex = 0 + for i in 0..= self.mask.characters.count { + return nil + } + + let currentCharacter = string[string.index(string.startIndex, offsetBy: i)] + var maskCharacter = self.mask[self.mask.index(string.startIndex, offsetBy: currentMaskIndex)] + + if currentCharacter == maskCharacter { + formattedString.append(currentCharacter) + } else { + while (maskCharacter != Constants.letterMaskCharacter && maskCharacter != Constants.numberMaskCharacter) { + formattedString.append(maskCharacter) + + currentMaskIndex += 1 + maskCharacter = self.mask[self.mask.index(string.startIndex, offsetBy: currentMaskIndex)] + } + + let isValidLetter = maskCharacter == Constants.letterMaskCharacter && self.isValidLetterCharacter(currentCharacter) + let isValidNumber = maskCharacter == Constants.numberMaskCharacter && self.isValidNumberCharacter(currentCharacter) + + if !isValidLetter && !isValidNumber { + return nil + } + + formattedString.append(currentCharacter) + } + + currentMaskIndex += 1 + } + + return formattedString + } + + public func unmask(string: String?) -> String? { + + guard let string = string else { return nil } + var unmaskedValue = "" + + for character in string.characters { + if self.isValidLetterCharacter(character) || self.isValidNumberCharacter(character) { + unmaskedValue.append(character) + } + } + + return unmaskedValue + } + + private func isValidLetterCharacter(_ character: Character) -> Bool { + + let string = String(character) + if string.unicodeScalars.count > 1 { + return false + } + + let lettersSet = NSCharacterSet.letters + let unicodeScalars = string.unicodeScalars + return lettersSet.contains(unicodeScalars[unicodeScalars.startIndex]) + } + + private func isValidNumberCharacter(_ character: Character) -> Bool { + + let string = String(character) + if string.unicodeScalars.count > 1 { + return false + } + + let lettersSet = NSCharacterSet.decimalDigits + let unicodeScalars = string.unicodeScalars + return lettersSet.contains(unicodeScalars[unicodeScalars.startIndex]) + } + +} diff --git a/JMMaskTextField/Classes/ReplaceMe.swift b/JMMaskTextField/Classes/ReplaceMe.swift deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md index 98ae8ca..f045d33 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,92 @@ # JMMaskTextField -[![CI Status](http://img.shields.io/travis/Jota Melo/JMMaskTextField.svg?style=flat)](https://travis-ci.org/Jota Melo/JMMaskTextField) -[![Version](https://img.shields.io/cocoapods/v/JMMaskTextField.svg?style=flat)](http://cocoapods.org/pods/JMMaskTextField) -[![License](https://img.shields.io/cocoapods/l/JMMaskTextField.svg?style=flat)](http://cocoapods.org/pods/JMMaskTextField) -[![Platform](https://img.shields.io/cocoapods/p/JMMaskTextField.svg?style=flat)](http://cocoapods.org/pods/JMMaskTextField) +[![CI Status](http://img.shields.io/travis/JotaMelo/JMMaskTextField-Swift.svg?style=flat)](https://travis-ci.org/JotaMelo/JMMaskTextField-Swift) +[![Version](https://img.shields.io/cocoapods/v/JMMaskTextField-Swift.svg?style=flat)](http://cocoapods.org/pods/JMMaskTextField-Swift) +[![License](https://img.shields.io/cocoapods/l/JMMaskTextField-Swift.svg?style=flat)](http://cocoapods.org/pods/JMMaskTextField-Swift) +[![Platform](https://img.shields.io/cocoapods/p/JMMaskTextField-Swift.svg?style=flat)](http://cocoapods.org/pods/JMMaskTextField-Swift) -## Example -To run the example project, clone the repo, and run `pod install` from the Example directory first. +Back in my JavaScript days (oh what dark ages) it was quite simple to apply a mask to an input with some jQuery plugin, you just had to set the mask to something like ```(999) 999-9999``` and you had a great masked input for a phone number. +I never found anything that simple on iOS. Some libs required you to write a regex pattern and other crazy stuff. Sure, that can be useful for more complex cases, but I just wanted something simple and straightforward. From that need came ```JMMaskTextField```. -## Requirements +```JMMaskTextField``` allows you to mask your ```UITextField``` by simply setting a mask pattern string. Mask characters are: +* `A` for letters +* `0` for numbers + +So for a Brazilian license plate, which has 3 letters, a dash and then 4 numbers, the mask would be: ```AAA-0000```. + +```JMMaskTextField``` also handles pasting, inserting and deleting from the middle. + +There's also an [Objective-C version](https://github.com/JotaMelo/JMMaskTextField) ## Installation -JMMaskTextField is available through [CocoaPods](http://cocoapods.org). To install -it, simply add the following line to your Podfile: +### CocoaPods + +You can install ```JMMaskTextField``` with [CocoaPods](http://cocoapods.org) + +* Add this line to your Podfile ```pod "JMMaskTextField-Swift"``` +* Run ```pod install``` + +### Manual + +Just drop the JMMaskTextField folder in your project and you're all set! + +## Usage + +Funcionality is broken down into 2 classes: + +* ```JMStringMask``` - all the string masking functionality. You can use this yourself outside of the ```JMMaskTextField```. +* ```JMMaskTextField``` - the ```UITextField``` subclass, handling all editing events. Uses an instance of ```JMStringMask```. + +### Interface Builder +Set the class of your text field to ```JMMaskTextField``` in the Identity Inspector. And then on the Attributes Inspector set your mask. And that's it! + +![](http://i.imgur.com/HPFXSQC.png) + +![](http://i.imgur.com/rIWUNC3.png) + +### Code +Initialize an instance of ```JMMaskTextField``` and set the mask property: +```swift + +let maskTextField = JMMaskTextField(frame: CGRect.zero) +maskTextField.maskString = "(00) 0 0000-0000" +``` +And that's it! + +### JMStringMask +You can use the string masking functionality outside of the text field. Usage is also simple: +```swift +let mask = JMStringMask(mask: "00000-000") +let maskedString = mask.mask(string: "30310360") // returns "30310-360" +let unmaskedString = mask.unmask(string: maskedString) // returns "30310360" +``` -```ruby -pod "JMMaskTextField" +### Changing the mask while editing +In Brazil we a problem: cell phone numbers are 9 digits (and until recently not all of them were 9 digits), and landlines are 8 digits. That creates a problem with masking. ```JMMaskTextField``` supports changing the mask while editing. So when we identify the user typed a 9 digit number, we switch the mask to the longer format. If they delete a digit, we go back to the original mask. An example: +```swift +func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { + + guard let text = textField.text as NSString? else { return true } + let newText = text.replacingCharacters(in: range, with: string) + + let maskTextField = textField as! JMMaskTextField + guard let unmaskedText = maskTextField.stringMask?.unmask(string: newText) else { return true } + + if unmaskedText.characters.count >= 11 { + maskTextField.maskString = "(00) 0 0000-0000" + } else { + maskTextField.maskString = "(00) 0000-0000" + } + + return true +} ``` ## Author -Jota Melo, jpmfagundes@gmail.com +[Jota Melo](https://twitter.com/Jota), jpmfagundes@gmail.com ## License