diff --git a/.swift-version b/.swift-version deleted file mode 100644 index 9f55b2c..0000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -3.0 diff --git a/README.md b/README.md index 99a103b..2cd0881 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,10 @@ # SVPinView SVPinView is a light-weight customisable library used for accepting pin numbers or one-time passwords. -

-Swift 4 compatible -CocoaPods compatible -Platform iOS -License: MIT -

+[![Swift 5.1](https://img.shields.io/badge/Swift-5.1-orange.svg?style=flat)](https://developer.apple.com/swift/) +[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/SVPinView.svg)](https://developer.apple.com/swift/) +[![Platforms iOS](https://img.shields.io/badge/Platforms-iOS-lightgray.svg?style=flat)](http://www.apple.com/ios/) +[![License MIT](https://img.shields.io/badge/License-MIT-lightgrey.svg?style=flat)](https://opensource.org/licenses/MIT) ![demo](SVPinView/Screenshots/SVPinView.gif) @@ -65,9 +63,9 @@ The `isContentTypeOneTimeCode` property sets the contentType of the first pinFie #### Styles ```swift enum SVPinViewStyle : Int { -case none = 0 -case underline -case box + case none = 0 + case underline + case box } ``` There are two inbuilt styes; `underline` & `box`. However, the *fieldBackgroundColor* & *fieldCornerRadius* properties along with *activeFieldBackgroundColor* & *activeCornerRadius* properties can be used to create custom styles. @@ -80,20 +78,20 @@ pinView.fieldCornerRadius = 0 - **getPin()**: Returns the entered pin as a String. If the method is called when the pin entry is incomplete, it returns an *empty* String for validation. - **pastePin()**: Takes a String as an argument and enters it into the pinView. Useful for showing default values or for pasting from clipboard. Long-press on the pin field will also allow pasting from the clipboard. -- **clearPin()**: Clears the entered pin. +- **clearPin()**: Clears the entered pin and also refreshes the view. ### Callbacks - **didFinishCallback**: Gets executed after the entire pin has been entered. This is useful when a network call has to be made or for navigating to a different ViewController after the pin has been entered. - **didChangeCallback**: Gets executed when any of the pinFields have been changed. This gives additional control to the parent VC - Eg: if a submit button has to be enabled/disabled based on the pin validation. ```swift -pinView.didFinishCallback = { pin in -print("The pin entered is \(pin)") +pinView.didFinishCallback = { [weak self] pin in + print("The pin entered is \(pin)") } ``` ```swift -pinView.didChangeCallback = { pin in -submitButton.isEnabled = isValid(pin) +pinView.didChangeCallback = { [weak self] pin in + submitButton.isEnabled = isValid(pin) } ``` diff --git a/SVPinView.podspec b/SVPinView.podspec index 1e26a56..7cfa2a6 100644 --- a/SVPinView.podspec +++ b/SVPinView.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = "SVPinView" - s.version = "1.0.7" + s.version = "1.0.8" s.summary = "SVPinView is a customisable library used for accepting alphanumeric pins or one-time passwords." s.homepage = "https://github.com/xornorik/SVPinView" @@ -14,6 +14,7 @@ Pod::Spec.new do |s| s.platform = :ios s.ios.deployment_target = "9.0" + s.swift_version = '5.0' s.source = { :git => "https://github.com/xornorik/SVPinView.git", :tag => "#{s.version}" } s.source_files = "SVPinView/Source/**/*.{swift}" diff --git a/SVPinView.xcodeproj/project.pbxproj b/SVPinView.xcodeproj/project.pbxproj index 92b0f31..7f20083 100644 --- a/SVPinView.xcodeproj/project.pbxproj +++ b/SVPinView.xcodeproj/project.pbxproj @@ -264,6 +264,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -318,6 +319,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -339,7 +341,7 @@ PRODUCT_BUNDLE_IDENTIFIER = in.svemuri.SVPinView; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -359,7 +361,7 @@ PRODUCT_BUNDLE_IDENTIFIER = in.svemuri.SVPinView; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/SVPinView.xcodeproj/project.xcworkspace/xcuserdata/svemuri.xcuserdatad/UserInterfaceState.xcuserstate b/SVPinView.xcodeproj/project.xcworkspace/xcuserdata/svemuri.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..8b74a25 Binary files /dev/null and b/SVPinView.xcodeproj/project.xcworkspace/xcuserdata/svemuri.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/SVPinView.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/xcschememanagement.plist b/SVPinView.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..87f5db3 --- /dev/null +++ b/SVPinView.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + SVPinView.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/SVPinView/Example/Podfile.lock b/SVPinView/Example/Podfile.lock index 7bf88e8..a1746b6 100644 --- a/SVPinView/Example/Podfile.lock +++ b/SVPinView/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - SVPinView (1.0.5) + - SVPinView (1.0.7) DEPENDENCIES: - SVPinView (from `../../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - SVPinView: 7b64d6ae30abbd46e3654bc876770ed07b074b06 + SVPinView: 6c1da57e4a1273298802f460c60511ba10f7c831 PODFILE CHECKSUM: b9b57fc0cf7226021a70e6e19e5c127fb3eb5d37 -COCOAPODS: 1.5.3 +COCOAPODS: 1.8.3 diff --git a/SVPinView/Example/Pods/Local Podspecs/SVPinView.podspec.json b/SVPinView/Example/Pods/Local Podspecs/SVPinView.podspec.json index 74f9f17..6098e01 100644 --- a/SVPinView/Example/Pods/Local Podspecs/SVPinView.podspec.json +++ b/SVPinView/Example/Pods/Local Podspecs/SVPinView.podspec.json @@ -1,6 +1,6 @@ { "name": "SVPinView", - "version": "1.0.5", + "version": "1.0.7", "summary": "SVPinView is a customisable library used for accepting alphanumeric pins or one-time passwords.", "homepage": "https://github.com/xornorik/SVPinView", "license": "MIT", @@ -12,7 +12,7 @@ }, "source": { "git": "https://github.com/xornorik/SVPinView.git", - "tag": "1.0.5" + "tag": "1.0.7" }, "source_files": "SVPinView/Source/**/*.{swift}", "resources": "SVPinView/Source/**/*.{png,jpeg,jpg,storyboard,xib,xcassets`}" diff --git a/SVPinView/Example/Pods/Manifest.lock b/SVPinView/Example/Pods/Manifest.lock index 7bf88e8..a1746b6 100644 --- a/SVPinView/Example/Pods/Manifest.lock +++ b/SVPinView/Example/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - SVPinView (1.0.5) + - SVPinView (1.0.7) DEPENDENCIES: - SVPinView (from `../../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - SVPinView: 7b64d6ae30abbd46e3654bc876770ed07b074b06 + SVPinView: 6c1da57e4a1273298802f460c60511ba10f7c831 PODFILE CHECKSUM: b9b57fc0cf7226021a70e6e19e5c127fb3eb5d37 -COCOAPODS: 1.5.3 +COCOAPODS: 1.8.3 diff --git a/SVPinView/Example/Pods/Pods.xcodeproj/project.pbxproj b/SVPinView/Example/Pods/Pods.xcodeproj/project.pbxproj index b2a2b5b..54b076f 100644 --- a/SVPinView/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/SVPinView/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -3,247 +3,245 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 48; objects = { /* Begin PBXBuildFile section */ - 02FA5E5F92267457EA0809A2B86D8BFC /* SVPinView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E83DDCD521B025A29A02DCB98EEE8BD /* SVPinView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2619D09B4A6FA08AF29B68C963C59783 /* Pods-SVPinViewExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F1D50ED46D7B49B491057002EE7AEAEC /* Pods-SVPinViewExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7E1DF05B164503102FA8286BAB077619 /* SVPinView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 72861C654DC1A45AF72E4FE1095B4A1F /* SVPinView-dummy.m */; }; - 9750CC264F6E3D380A51970839BAD7B5 /* Pods-SVPinViewExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FB7DE8EC6D4951D10AC87811AF0BC30 /* Pods-SVPinViewExample-dummy.m */; }; - 9B8EE805A5F636DCE1AF41552B858B19 /* SVPinField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24C0DD17A36BC547A0332CA683A66F9B /* SVPinField.swift */; }; - B5E51189519FDFCAE7A1BA1E65989C69 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; - B9F658104CFCD52E5C8F6A13DD0C90A6 /* SVPinView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 034A1CDAC12D1ACB3B95FB537611F849 /* SVPinView.swift */; }; - BC015662D34276A46AEE04DC7857497E /* SVPinCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5F52F3767BCC4D91D3CE61CB08A9E001 /* SVPinCell.xib */; }; - EAB4DE5D525B87FA0CAC857930A6B530 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; - EF558A3A0E08E0F0C21E457C7CA3256A /* SVPinView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0E28C39078121D5DF404CC1441EABA2 /* SVPinView.xib */; }; + 0CE9882955D52F7AF8E9BCABEB0A2EB2 /* SVPinView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AC21FDAB1D91B08CBBEB69808520EADC /* SVPinView.xib */; }; + 36345FDDF4CEBC4EE794B01503DDFAF9 /* SVPinView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C705FE97C8FE6C1ED9B096AE982D5770 /* SVPinView-dummy.m */; }; + 4397819CF9F059B163715C218292585B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; + 801144A07FFDEE5232AECC693005BC0B /* SVPinCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E4E7705D0E21E7BAED3629B430F924AA /* SVPinCell.xib */; }; + 87D894A18490A787808973AC84AA3FF8 /* SVPinView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1897E4E024EB0A4A04BFF3E1158778E2 /* SVPinView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8CE56FAF1E7DF36A9915DA6E25F937DF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; + 9A70CAC0CCC2D531FC3EAA0E9130E92B /* Pods-SVPinViewExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A405ECEDDEDCD9EC217E1CBFBF2E962 /* Pods-SVPinViewExample-dummy.m */; }; + AC5844840F7CAEEC0C6F18980D8E62CF /* SVPinField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58D21E73A0BD1CE173D26EB372A4B460 /* SVPinField.swift */; }; + CD3B5B55541434541BBD74EC742B4E01 /* Pods-SVPinViewExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B3AEDF2592275D4CFEB168148C1C2AC7 /* Pods-SVPinViewExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DC909D9C1B8D2BBB9465DCFC8EACD698 /* SVPinView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27F0FE457B31B4DEE894BC93111765B4 /* SVPinView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 222F2289CA388C68043B7BB4CFBC94AA /* PBXContainerItemProxy */ = { + F50DA76B04A1E2D372501182344DD3B9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = A881189A76AF3616523561C6F602F3CA; + remoteGlobalIDString = 8C48B6722F02A3772707DAF5E1572C89; remoteInfo = SVPinView; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 012EA0EC646A6D4E912A32D1F68F3A9D /* Pods-SVPinViewExample-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SVPinViewExample-resources.sh"; sourceTree = ""; }; - 034A1CDAC12D1ACB3B95FB537611F849 /* SVPinView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SVPinView.swift; path = SVPinView/Source/Classes/SVPinView.swift; sourceTree = ""; }; - 0DE3526CBE420FF24328E26FE0F70580 /* Pods-SVPinViewExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SVPinViewExample.modulemap"; sourceTree = ""; }; - 24C0DD17A36BC547A0332CA683A66F9B /* SVPinField.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SVPinField.swift; path = SVPinView/Source/Classes/SVPinField.swift; sourceTree = ""; }; - 264C386FA3520298C05A1C65CE7A3DF7 /* Pods_SVPinViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SVPinViewExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2730ACE08929BEADFE5AF0B18D1606AA /* Pods-SVPinViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SVPinViewExample.debug.xcconfig"; sourceTree = ""; }; - 27C6DF6658E4E3526215AFC9AA25D8E1 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - 2B80A8D27C6B5E9940C0813A5D4829FB /* SVPinView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SVPinView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2E1A20D4E3C188418DE6CBABEE17CC8A /* SVPinView.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; path = SVPinView.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 3C46225987996D3E477B5E48A108B832 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 5CF321F460F78DC0BA70E734B9BEE666 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5F52F3767BCC4D91D3CE61CB08A9E001 /* SVPinCell.xib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.xib; name = SVPinCell.xib; path = "SVPinView/Source/XIB's/SVPinCell.xib"; sourceTree = ""; }; - 5FB7DE8EC6D4951D10AC87811AF0BC30 /* Pods-SVPinViewExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SVPinViewExample-dummy.m"; sourceTree = ""; }; - 69393ECC8C8B3B6C2B53CC5694E8D81B /* Pods-SVPinViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SVPinViewExample.release.xcconfig"; sourceTree = ""; }; - 6E83DDCD521B025A29A02DCB98EEE8BD /* SVPinView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SVPinView-umbrella.h"; sourceTree = ""; }; - 72861C654DC1A45AF72E4FE1095B4A1F /* SVPinView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SVPinView-dummy.m"; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 96EA68A4D7E841B17E89DFB735596802 /* Pods-SVPinViewExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SVPinViewExample-acknowledgements.markdown"; sourceTree = ""; }; - 984CC7F4A3CF1BBA871349530067DC75 /* Pods-SVPinViewExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SVPinViewExample-frameworks.sh"; sourceTree = ""; }; - CC268C55282DAFD373C043D3D0876C54 /* Pods-SVPinViewExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SVPinViewExample-acknowledgements.plist"; sourceTree = ""; }; - D1AD75AF1FA3A3689CDE761E509AC652 /* SVPinView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SVPinView.xcconfig; sourceTree = ""; }; - E8372E2E70F73F9AE9BA417E7C13E1BB /* SVPinView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SVPinView-prefix.pch"; sourceTree = ""; }; - EBD30C47D51796869C9B00EA79601AFD /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - EE55A9977D3BF33B36E593472B26C044 /* SVPinView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SVPinView.modulemap; sourceTree = ""; }; - F0E28C39078121D5DF404CC1441EABA2 /* SVPinView.xib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.xib; name = SVPinView.xib; path = "SVPinView/Source/XIB's/SVPinView.xib"; sourceTree = ""; }; - F1D50ED46D7B49B491057002EE7AEAEC /* Pods-SVPinViewExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SVPinViewExample-umbrella.h"; sourceTree = ""; }; + 0A405ECEDDEDCD9EC217E1CBFBF2E962 /* Pods-SVPinViewExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SVPinViewExample-dummy.m"; sourceTree = ""; }; + 11EA81E2ABBB1FAAB1B2323ED6104A68 /* SVPinView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SVPinView.framework; path = SVPinView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 12CD34A143B848FE1C0FEA4BA898795B /* SVPinView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SVPinView.xcconfig; sourceTree = ""; }; + 1897E4E024EB0A4A04BFF3E1158778E2 /* SVPinView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SVPinView-umbrella.h"; sourceTree = ""; }; + 27F0FE457B31B4DEE894BC93111765B4 /* SVPinView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SVPinView.swift; path = SVPinView/Source/Classes/SVPinView.swift; sourceTree = ""; }; + 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 3BAF3829F03276BDE590462D6B2D53A4 /* Pods-SVPinViewExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SVPinViewExample-acknowledgements.markdown"; sourceTree = ""; }; + 45260B8F86467EEFFB39FC4783131533 /* SVPinView.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = SVPinView.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 53355ADECC3ACFECA524EA5C1C4795F6 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; + 58D21E73A0BD1CE173D26EB372A4B460 /* SVPinField.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SVPinField.swift; path = SVPinView/Source/Classes/SVPinField.swift; sourceTree = ""; }; + 65A46B0980EEEFEE268EB1F9A4CEB558 /* Pods-SVPinViewExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SVPinViewExample-acknowledgements.plist"; sourceTree = ""; }; + 671231BB717DA822EEBE7C191AA6EC65 /* Pods-SVPinViewExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SVPinViewExample.modulemap"; sourceTree = ""; }; + 94675043DBC8B2157B95C5C4B7C2B82F /* SVPinView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SVPinView-prefix.pch"; sourceTree = ""; }; + 9700E5FEB75A9FBDD88D6053DC4F372D /* SVPinView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SVPinView.modulemap; sourceTree = ""; }; + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + A5EE2D90066D641CE6D504FFB25B5E03 /* Pods-SVPinViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SVPinViewExample.debug.xcconfig"; sourceTree = ""; }; + AC21FDAB1D91B08CBBEB69808520EADC /* SVPinView.xib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.xib; name = SVPinView.xib; path = "SVPinView/Source/XIB's/SVPinView.xib"; sourceTree = ""; }; + B3AEDF2592275D4CFEB168148C1C2AC7 /* Pods-SVPinViewExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SVPinViewExample-umbrella.h"; sourceTree = ""; }; + B473D82872B860479154E6DAD68E20A6 /* Pods-SVPinViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SVPinViewExample.release.xcconfig"; sourceTree = ""; }; + C1C0AB3AB6DB244506895AB7F499D595 /* Pods_SVPinViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SVPinViewExample.framework; path = "Pods-SVPinViewExample.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + C3E90BAE22637B0B829CF16B186F222D /* SVPinView-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SVPinView-Info.plist"; sourceTree = ""; }; + C705FE97C8FE6C1ED9B096AE982D5770 /* SVPinView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SVPinView-dummy.m"; sourceTree = ""; }; + E123F9FF8B00D5CD04C373688C09C25E /* Pods-SVPinViewExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SVPinViewExample-frameworks.sh"; sourceTree = ""; }; + E4E7705D0E21E7BAED3629B430F924AA /* SVPinCell.xib */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = file.xib; name = SVPinCell.xib; path = "SVPinView/Source/XIB's/SVPinCell.xib"; sourceTree = ""; }; + E61F8A2682795EAB3ABDB2199E73CE69 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + F34256457BDA89C30497B7B0E938FD9A /* Pods-SVPinViewExample-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SVPinViewExample-Info.plist"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 78B3C37E01DEA92068523BF852FEC042 /* Frameworks */ = { + 2DB441BA8C8761C4B87EA0A535F8A39D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - EAB4DE5D525B87FA0CAC857930A6B530 /* Foundation.framework in Frameworks */, + 8CE56FAF1E7DF36A9915DA6E25F937DF /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - B1DADBC7AEEAB9B6E6B1D35F199FC6DF /* Frameworks */ = { + F5280B62ADE5F3A82F70CDBCA912D976 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B5E51189519FDFCAE7A1BA1E65989C69 /* Foundation.framework in Frameworks */, + 4397819CF9F059B163715C218292585B /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 4D8B414D2B471C154BB1979208899A9F /* Development Pods */ = { + 07C5FD3AFBB07170849AB1FCE167BDE2 /* Pod */ = { isa = PBXGroup; children = ( - AFEF65E921D4163BDC2E29AD022ABE6D /* SVPinView */, + 53355ADECC3ACFECA524EA5C1C4795F6 /* LICENSE */, + E61F8A2682795EAB3ABDB2199E73CE69 /* README.md */, + 45260B8F86467EEFFB39FC4783131533 /* SVPinView.podspec */, ); - name = "Development Pods"; + name = Pod; sourceTree = ""; }; - 564FB6697954A219AF9544B840B872D1 /* Resources */ = { + 0E01EABB7E99FB6F87BC2192913F9FB7 /* Pods-SVPinViewExample */ = { isa = PBXGroup; children = ( - 5F52F3767BCC4D91D3CE61CB08A9E001 /* SVPinCell.xib */, - F0E28C39078121D5DF404CC1441EABA2 /* SVPinView.xib */, + 671231BB717DA822EEBE7C191AA6EC65 /* Pods-SVPinViewExample.modulemap */, + 3BAF3829F03276BDE590462D6B2D53A4 /* Pods-SVPinViewExample-acknowledgements.markdown */, + 65A46B0980EEEFEE268EB1F9A4CEB558 /* Pods-SVPinViewExample-acknowledgements.plist */, + 0A405ECEDDEDCD9EC217E1CBFBF2E962 /* Pods-SVPinViewExample-dummy.m */, + E123F9FF8B00D5CD04C373688C09C25E /* Pods-SVPinViewExample-frameworks.sh */, + F34256457BDA89C30497B7B0E938FD9A /* Pods-SVPinViewExample-Info.plist */, + B3AEDF2592275D4CFEB168148C1C2AC7 /* Pods-SVPinViewExample-umbrella.h */, + A5EE2D90066D641CE6D504FFB25B5E03 /* Pods-SVPinViewExample.debug.xcconfig */, + B473D82872B860479154E6DAD68E20A6 /* Pods-SVPinViewExample.release.xcconfig */, ); - name = Resources; + name = "Pods-SVPinViewExample"; + path = "Target Support Files/Pods-SVPinViewExample"; sourceTree = ""; }; - 5E0D919E635D23B70123790B8308F8EF /* iOS */ = { + 4DC16FE0452961D1498035E7B362FF6F /* Products */ = { isa = PBXGroup; children = ( - 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */, + C1C0AB3AB6DB244506895AB7F499D595 /* Pods_SVPinViewExample.framework */, + 11EA81E2ABBB1FAAB1B2323ED6104A68 /* SVPinView.framework */, ); - name = iOS; + name = Products; sourceTree = ""; }; - 6C1207089A1D4F102CCE257B580D785D /* Products */ = { + 7E9B285E3D15D299312882242AA03BA0 /* SVPinView */ = { isa = PBXGroup; children = ( - 264C386FA3520298C05A1C65CE7A3DF7 /* Pods_SVPinViewExample.framework */, - 2B80A8D27C6B5E9940C0813A5D4829FB /* SVPinView.framework */, + 58D21E73A0BD1CE173D26EB372A4B460 /* SVPinField.swift */, + 27F0FE457B31B4DEE894BC93111765B4 /* SVPinView.swift */, + 07C5FD3AFBB07170849AB1FCE167BDE2 /* Pod */, + D43C7CD2E1B1E8BA32F7D05E1F589A4E /* Resources */, + B7456E16278C9F030BA05F80C48F5BAE /* Support Files */, ); - name = Products; + name = SVPinView; + path = ../../..; sourceTree = ""; }; - 7DB346D0F39D3F0E887471402A8071AB = { + A8E9B01BED3D09077E264A8521C7EBA5 /* Targets Support Files */ = { isa = PBXGroup; children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 4D8B414D2B471C154BB1979208899A9F /* Development Pods */, - BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, - 6C1207089A1D4F102CCE257B580D785D /* Products */, - A367DD02938D6E92AA1C23293610968E /* Targets Support Files */, + 0E01EABB7E99FB6F87BC2192913F9FB7 /* Pods-SVPinViewExample */, ); + name = "Targets Support Files"; sourceTree = ""; }; - A367DD02938D6E92AA1C23293610968E /* Targets Support Files */ = { + B7456E16278C9F030BA05F80C48F5BAE /* Support Files */ = { isa = PBXGroup; children = ( - FFBC7690452CBD103C4DA856A945F585 /* Pods-SVPinViewExample */, + 9700E5FEB75A9FBDD88D6053DC4F372D /* SVPinView.modulemap */, + 12CD34A143B848FE1C0FEA4BA898795B /* SVPinView.xcconfig */, + C705FE97C8FE6C1ED9B096AE982D5770 /* SVPinView-dummy.m */, + C3E90BAE22637B0B829CF16B186F222D /* SVPinView-Info.plist */, + 94675043DBC8B2157B95C5C4B7C2B82F /* SVPinView-prefix.pch */, + 1897E4E024EB0A4A04BFF3E1158778E2 /* SVPinView-umbrella.h */, ); - name = "Targets Support Files"; + name = "Support Files"; + path = "SVPinView/Example/Pods/Target Support Files/SVPinView"; sourceTree = ""; }; - AFEF65E921D4163BDC2E29AD022ABE6D /* SVPinView */ = { + C0834CEBB1379A84116EF29F93051C60 /* iOS */ = { isa = PBXGroup; children = ( - 24C0DD17A36BC547A0332CA683A66F9B /* SVPinField.swift */, - 034A1CDAC12D1ACB3B95FB537611F849 /* SVPinView.swift */, - C88C36B5EC7A1FBDD87CB98A0B31A32C /* Pod */, - 564FB6697954A219AF9544B840B872D1 /* Resources */, - C600E9579473427BF5FE68362A991C6B /* Support Files */, + 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */, ); - name = SVPinView; - path = ../../..; + name = iOS; sourceTree = ""; }; - BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { + CF1408CF629C7361332E53B88F7BD30C = { isa = PBXGroup; children = ( - 5E0D919E635D23B70123790B8308F8EF /* iOS */, + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, + D5D25BC4270A0E637943C856265A50DD /* Development Pods */, + D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, + 4DC16FE0452961D1498035E7B362FF6F /* Products */, + A8E9B01BED3D09077E264A8521C7EBA5 /* Targets Support Files */, ); - name = Frameworks; sourceTree = ""; }; - C600E9579473427BF5FE68362A991C6B /* Support Files */ = { + D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = { isa = PBXGroup; children = ( - 3C46225987996D3E477B5E48A108B832 /* Info.plist */, - EE55A9977D3BF33B36E593472B26C044 /* SVPinView.modulemap */, - D1AD75AF1FA3A3689CDE761E509AC652 /* SVPinView.xcconfig */, - 72861C654DC1A45AF72E4FE1095B4A1F /* SVPinView-dummy.m */, - E8372E2E70F73F9AE9BA417E7C13E1BB /* SVPinView-prefix.pch */, - 6E83DDCD521B025A29A02DCB98EEE8BD /* SVPinView-umbrella.h */, + C0834CEBB1379A84116EF29F93051C60 /* iOS */, ); - name = "Support Files"; - path = "SVPinView/Example/Pods/Target Support Files/SVPinView"; + name = Frameworks; sourceTree = ""; }; - C88C36B5EC7A1FBDD87CB98A0B31A32C /* Pod */ = { + D43C7CD2E1B1E8BA32F7D05E1F589A4E /* Resources */ = { isa = PBXGroup; children = ( - 27C6DF6658E4E3526215AFC9AA25D8E1 /* LICENSE */, - EBD30C47D51796869C9B00EA79601AFD /* README.md */, - 2E1A20D4E3C188418DE6CBABEE17CC8A /* SVPinView.podspec */, + E4E7705D0E21E7BAED3629B430F924AA /* SVPinCell.xib */, + AC21FDAB1D91B08CBBEB69808520EADC /* SVPinView.xib */, ); - name = Pod; + name = Resources; sourceTree = ""; }; - FFBC7690452CBD103C4DA856A945F585 /* Pods-SVPinViewExample */ = { + D5D25BC4270A0E637943C856265A50DD /* Development Pods */ = { isa = PBXGroup; children = ( - 5CF321F460F78DC0BA70E734B9BEE666 /* Info.plist */, - 0DE3526CBE420FF24328E26FE0F70580 /* Pods-SVPinViewExample.modulemap */, - 96EA68A4D7E841B17E89DFB735596802 /* Pods-SVPinViewExample-acknowledgements.markdown */, - CC268C55282DAFD373C043D3D0876C54 /* Pods-SVPinViewExample-acknowledgements.plist */, - 5FB7DE8EC6D4951D10AC87811AF0BC30 /* Pods-SVPinViewExample-dummy.m */, - 984CC7F4A3CF1BBA871349530067DC75 /* Pods-SVPinViewExample-frameworks.sh */, - 012EA0EC646A6D4E912A32D1F68F3A9D /* Pods-SVPinViewExample-resources.sh */, - F1D50ED46D7B49B491057002EE7AEAEC /* Pods-SVPinViewExample-umbrella.h */, - 2730ACE08929BEADFE5AF0B18D1606AA /* Pods-SVPinViewExample.debug.xcconfig */, - 69393ECC8C8B3B6C2B53CC5694E8D81B /* Pods-SVPinViewExample.release.xcconfig */, + 7E9B285E3D15D299312882242AA03BA0 /* SVPinView */, ); - name = "Pods-SVPinViewExample"; - path = "Target Support Files/Pods-SVPinViewExample"; + name = "Development Pods"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 06F14C9F2F0F364CE0141E4E5819C90B /* Headers */ = { + 354F7338DDABD47B2D387C2F88F3FA8F /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 02FA5E5F92267457EA0809A2B86D8BFC /* SVPinView-umbrella.h in Headers */, + 87D894A18490A787808973AC84AA3FF8 /* SVPinView-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - E8A829B5689ACB248ACD81CB71652FBA /* Headers */ = { + 401D102C73864C29182618C4F62FC58B /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 2619D09B4A6FA08AF29B68C963C59783 /* Pods-SVPinViewExample-umbrella.h in Headers */, + CD3B5B55541434541BBD74EC742B4E01 /* Pods-SVPinViewExample-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 0884BDBA761469797689310267104877 /* Pods-SVPinViewExample */ = { + 65CD46C8E4EAC271D1E068FFE9C6922F /* Pods-SVPinViewExample */ = { isa = PBXNativeTarget; - buildConfigurationList = 9B8EDCBEDA00680414B4D1939D8F31BC /* Build configuration list for PBXNativeTarget "Pods-SVPinViewExample" */; + buildConfigurationList = 07F724045D3FA17E4CE3B620E197913F /* Build configuration list for PBXNativeTarget "Pods-SVPinViewExample" */; buildPhases = ( - E8A829B5689ACB248ACD81CB71652FBA /* Headers */, - 041C5162C750D20642EB7058C2D0AFBB /* Sources */, - B1DADBC7AEEAB9B6E6B1D35F199FC6DF /* Frameworks */, - 617D2A5051E35729FB3DE0E1911A073C /* Resources */, + 401D102C73864C29182618C4F62FC58B /* Headers */, + EF0143DFC1EE8F3CE05BA68FFACEDEC8 /* Sources */, + F5280B62ADE5F3A82F70CDBCA912D976 /* Frameworks */, + 203525A532923A447BEEE4D26D9F84C7 /* Resources */, ); buildRules = ( ); dependencies = ( - 50584E444105FF6432A1414ECDBDCD17 /* PBXTargetDependency */, + 065FDF5CE4E38DE378AD72FB3D6FD792 /* PBXTargetDependency */, ); name = "Pods-SVPinViewExample"; productName = "Pods-SVPinViewExample"; - productReference = 264C386FA3520298C05A1C65CE7A3DF7 /* Pods_SVPinViewExample.framework */; + productReference = C1C0AB3AB6DB244506895AB7F499D595 /* Pods_SVPinViewExample.framework */; productType = "com.apple.product-type.framework"; }; - A881189A76AF3616523561C6F602F3CA /* SVPinView */ = { + 8C48B6722F02A3772707DAF5E1572C89 /* SVPinView */ = { isa = PBXNativeTarget; - buildConfigurationList = B830566162F9EF8231C1D42DA10942AF /* Build configuration list for PBXNativeTarget "SVPinView" */; + buildConfigurationList = F0E8BCAA6594A5FEE890E98E2D0EEC45 /* Build configuration list for PBXNativeTarget "SVPinView" */; buildPhases = ( - 06F14C9F2F0F364CE0141E4E5819C90B /* Headers */, - 27F990EBFF1B88AB59469B07D7F6ED83 /* Sources */, - 78B3C37E01DEA92068523BF852FEC042 /* Frameworks */, - 0B7E024659B140692157DBE122BDF8E7 /* Resources */, + 354F7338DDABD47B2D387C2F88F3FA8F /* Headers */, + 374BB9944936DDEEC2136F69115E293C /* Sources */, + 2DB441BA8C8761C4B87EA0A535F8A39D /* Frameworks */, + AAA97D7BCE3414AC8D043B2321CFE942 /* Resources */, ); buildRules = ( ); @@ -251,94 +249,89 @@ ); name = SVPinView; productName = SVPinView; - productReference = 2B80A8D27C6B5E9940C0813A5D4829FB /* SVPinView.framework */; + productReference = 11EA81E2ABBB1FAAB1B2323ED6104A68 /* SVPinView.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + BFDFE7DC352907FC980B868725387E98 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 0930; - TargetAttributes = { - A881189A76AF3616523561C6F602F3CA = { - LastSwiftMigration = 1010; - }; - }; + LastSwiftUpdateCheck = 1100; + LastUpgradeCheck = 1100; }; - buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 6C1207089A1D4F102CCE257B580D785D /* Products */; + mainGroup = CF1408CF629C7361332E53B88F7BD30C; + productRefGroup = 4DC16FE0452961D1498035E7B362FF6F /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 0884BDBA761469797689310267104877 /* Pods-SVPinViewExample */, - A881189A76AF3616523561C6F602F3CA /* SVPinView */, + 65CD46C8E4EAC271D1E068FFE9C6922F /* Pods-SVPinViewExample */, + 8C48B6722F02A3772707DAF5E1572C89 /* SVPinView */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 0B7E024659B140692157DBE122BDF8E7 /* Resources */ = { + 203525A532923A447BEEE4D26D9F84C7 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - BC015662D34276A46AEE04DC7857497E /* SVPinCell.xib in Resources */, - EF558A3A0E08E0F0C21E457C7CA3256A /* SVPinView.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 617D2A5051E35729FB3DE0E1911A073C /* Resources */ = { + AAA97D7BCE3414AC8D043B2321CFE942 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 801144A07FFDEE5232AECC693005BC0B /* SVPinCell.xib in Resources */, + 0CE9882955D52F7AF8E9BCABEB0A2EB2 /* SVPinView.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 041C5162C750D20642EB7058C2D0AFBB /* Sources */ = { + 374BB9944936DDEEC2136F69115E293C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 9750CC264F6E3D380A51970839BAD7B5 /* Pods-SVPinViewExample-dummy.m in Sources */, + AC5844840F7CAEEC0C6F18980D8E62CF /* SVPinField.swift in Sources */, + 36345FDDF4CEBC4EE794B01503DDFAF9 /* SVPinView-dummy.m in Sources */, + DC909D9C1B8D2BBB9465DCFC8EACD698 /* SVPinView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 27F990EBFF1B88AB59469B07D7F6ED83 /* Sources */ = { + EF0143DFC1EE8F3CE05BA68FFACEDEC8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 9B8EE805A5F636DCE1AF41552B858B19 /* SVPinField.swift in Sources */, - 7E1DF05B164503102FA8286BAB077619 /* SVPinView-dummy.m in Sources */, - B9F658104CFCD52E5C8F6A13DD0C90A6 /* SVPinView.swift in Sources */, + 9A70CAC0CCC2D531FC3EAA0E9130E92B /* Pods-SVPinViewExample-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 50584E444105FF6432A1414ECDBDCD17 /* PBXTargetDependency */ = { + 065FDF5CE4E38DE378AD72FB3D6FD792 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SVPinView; - target = A881189A76AF3616523561C6F602F3CA /* SVPinView */; - targetProxy = 222F2289CA388C68043B7BB4CFBC94AA /* PBXContainerItemProxy */; + target = 8C48B6722F02A3772707DAF5E1572C89 /* SVPinView */; + targetProxy = F50DA76B04A1E2D372501182344DD3B9 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 58FA44CD2459BF51603A7C4F73A679B0 /* Release */ = { + 0351FFF542F293BA886B1CB52F0EF71E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D1AD75AF1FA3A3689CDE761E509AC652 /* SVPinView.xcconfig */; + baseConfigurationReference = 12CD34A143B848FE1C0FEA4BA898795B /* SVPinView.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -350,7 +343,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_PREFIX_HEADER = "Target Support Files/SVPinView/SVPinView-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SVPinView/Info.plist"; + INFOPLIST_FILE = "Target Support Files/SVPinView/SVPinView-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -360,8 +353,7 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -369,7 +361,38 @@ }; name = Release; }; - 60DAF49CA7A9F362148D49C3C3123B2A /* Debug */ = { + 50265E90A7CB28B96F73865D29FA8A27 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 12CD34A143B848FE1C0FEA4BA898795B /* SVPinView.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/SVPinView/SVPinView-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SVPinView/SVPinView-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SVPinView/SVPinView.modulemap"; + PRODUCT_MODULE_NAME = SVPinView; + PRODUCT_NAME = SVPinView; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 8F17DC3A99F99FBAD606CE6963886315 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -401,19 +424,14 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_ALLOWED = NO; - CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", + "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -423,51 +441,20 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; SYMROOT = "${SRCROOT}/../build"; }; - name = Debug; - }; - 6E06DC69800D0FC96744C93D314EF316 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D1AD75AF1FA3A3689CDE761E509AC652 /* SVPinView.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/SVPinView/SVPinView-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SVPinView/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/SVPinView/SVPinView.modulemap"; - PRODUCT_MODULE_NAME = SVPinView; - PRODUCT_NAME = SVPinView; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; + name = Release; }; - 943F6B6527FDB17E9E3855A8591A076A /* Release */ = { + 90BE0CA8DB2939F1B8B4D45647D7A84B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 69393ECC8C8B3B6C2B53CC5694E8D81B /* Pods-SVPinViewExample.release.xcconfig */; + baseConfigurationReference = B473D82872B860479154E6DAD68E20A6 /* Pods-SVPinViewExample.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; @@ -479,7 +466,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SVPinViewExample/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -492,7 +479,6 @@ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -500,7 +486,7 @@ }; name = Release; }; - C4EAA84F44D044E108500A81C635F21E /* Release */ = { + 916E0404255105F480DC4950B7625F7A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -532,16 +518,17 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_ALLOWED = NO; - CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -551,17 +538,21 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; SYMROOT = "${SRCROOT}/../build"; }; - name = Release; + name = Debug; }; - D8CE71E82F38B253CE070FEAABCC923A /* Debug */ = { + CB93DB260B9AD05EFDA186C8B84283E3 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2730ACE08929BEADFE5AF0B18D1606AA /* Pods-SVPinViewExample.debug.xcconfig */; + baseConfigurationReference = A5EE2D90066D641CE6D504FFB25B5E03 /* Pods-SVPinViewExample.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; @@ -573,7 +564,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SVPinViewExample/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -586,8 +577,6 @@ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -597,34 +586,34 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 07F724045D3FA17E4CE3B620E197913F /* Build configuration list for PBXNativeTarget "Pods-SVPinViewExample" */ = { isa = XCConfigurationList; buildConfigurations = ( - 60DAF49CA7A9F362148D49C3C3123B2A /* Debug */, - C4EAA84F44D044E108500A81C635F21E /* Release */, + CB93DB260B9AD05EFDA186C8B84283E3 /* Debug */, + 90BE0CA8DB2939F1B8B4D45647D7A84B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 9B8EDCBEDA00680414B4D1939D8F31BC /* Build configuration list for PBXNativeTarget "Pods-SVPinViewExample" */ = { + 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - D8CE71E82F38B253CE070FEAABCC923A /* Debug */, - 943F6B6527FDB17E9E3855A8591A076A /* Release */, + 916E0404255105F480DC4950B7625F7A /* Debug */, + 8F17DC3A99F99FBAD606CE6963886315 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - B830566162F9EF8231C1D42DA10942AF /* Build configuration list for PBXNativeTarget "SVPinView" */ = { + F0E8BCAA6594A5FEE890E98E2D0EEC45 /* Build configuration list for PBXNativeTarget "SVPinView" */ = { isa = XCConfigurationList; buildConfigurations = ( - 6E06DC69800D0FC96744C93D314EF316 /* Debug */, - 58FA44CD2459BF51603A7C4F73A679B0 /* Release */, + 50265E90A7CB28B96F73865D29FA8A27 /* Debug */, + 0351FFF542F293BA886B1CB52F0EF71E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; } diff --git a/SVPinView/Example/Pods/Pods.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/Pods-SVPinViewExample.xcscheme b/SVPinView/Example/Pods/Pods.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/Pods-SVPinViewExample.xcscheme new file mode 100644 index 0000000..0ea4c1d --- /dev/null +++ b/SVPinView/Example/Pods/Pods.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/Pods-SVPinViewExample.xcscheme @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SVPinView/Example/Pods/Pods.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/SVPinView.xcscheme b/SVPinView/Example/Pods/Pods.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/SVPinView.xcscheme new file mode 100644 index 0000000..870f3c2 --- /dev/null +++ b/SVPinView/Example/Pods/Pods.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/SVPinView.xcscheme @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SVPinView/Example/Pods/Pods.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/xcschememanagement.plist b/SVPinView/Example/Pods/Pods.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..4594eb5 --- /dev/null +++ b/SVPinView/Example/Pods/Pods.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,21 @@ + + + + + SchemeUserState + + Pods-SVPinViewExample.xcscheme + + isShown + + + SVPinView.xcscheme + + isShown + + + + SuppressBuildableAutocreation + + + diff --git a/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-Info.plist b/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-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/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-frameworks.sh b/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-frameworks.sh index 11ece6b..b8e02b6 100755 --- a/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-frameworks.sh +++ b/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-frameworks.sh @@ -3,10 +3,15 @@ set -e set -u set -o pipefail +function on_error { + echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" +} +trap 'on_error $LINENO' ERR + if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" @@ -36,8 +41,8 @@ install_framework() local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" + echo "Symlinked..." + source="$(readlink "${source}")" fi # Use filter instead of exclude so missing patterns don't throw errors. @@ -47,8 +52,13 @@ install_framework() local basename basename="$(basename -s .framework "$1")" binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then binary="${destination}/${basename}" + elif [ -L "${binary}" ]; then + echo "Destination binary is symlinked..." + dirname="$(dirname "${binary}")" + binary="${dirname}/$(readlink "${binary}")" fi # Strip invalid architectures so "fat" simulator / device frameworks work on device @@ -62,7 +72,7 @@ install_framework() # 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]}) + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) for lib in $swift_runtime_libs; do echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" @@ -84,7 +94,7 @@ install_dsym() { binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then strip_invalid_archs "$binary" fi @@ -99,10 +109,18 @@ install_dsym() { fi } +# Copies the bcsymbolmap files of a vendored framework +install_bcsymbolmap() { + local bcsymbolmap_path="$1" + local destination="${BUILT_PRODUCTS_DIR}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" +} + # 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 + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identity echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" @@ -131,7 +149,7 @@ strip_invalid_archs() { for arch in $binary_archs; do if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + lipo -remove "$arch" -output "$binary" "$binary" stripped="$stripped $arch" fi done diff --git a/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample.debug.xcconfig b/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample.debug.xcconfig index 7c95911..35d6f2a 100644 --- a/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample.debug.xcconfig +++ b/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample.debug.xcconfig @@ -1,11 +1,12 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SVPinView" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SVPinView/SVPinView.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SVPinView/SVPinView.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "SVPinView" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample.release.xcconfig b/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample.release.xcconfig index 7c95911..35d6f2a 100644 --- a/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample.release.xcconfig +++ b/SVPinView/Example/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample.release.xcconfig @@ -1,11 +1,12 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SVPinView" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SVPinView/SVPinView.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SVPinView/SVPinView.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "SVPinView" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/SVPinView/Example/Pods/Target Support Files/SVPinView/SVPinView-Info.plist b/SVPinView/Example/Pods/Target Support Files/SVPinView/SVPinView-Info.plist new file mode 100644 index 0000000..1bd6a77 --- /dev/null +++ b/SVPinView/Example/Pods/Target Support Files/SVPinView/SVPinView-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.7 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/SVPinView/Example/Pods/Target Support Files/SVPinView/SVPinView.xcconfig b/SVPinView/Example/Pods/Target Support Files/SVPinView/SVPinView.xcconfig index b621a7b..0f54ddd 100644 --- a/SVPinView/Example/Pods/Target Support Files/SVPinView/SVPinView.xcconfig +++ b/SVPinView/Example/Pods/Target Support Files/SVPinView/SVPinView.xcconfig @@ -1,9 +1,10 @@ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SVPinView GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +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_TARGET_SRCROOT = ${PODS_ROOT}/../../.. PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/SVPinView/Example/SVPinViewExample.xcodeproj/project.pbxproj b/SVPinView/Example/SVPinViewExample.xcodeproj/project.pbxproj index 293942b..2261031 100644 --- a/SVPinView/Example/SVPinViewExample.xcodeproj/project.pbxproj +++ b/SVPinView/Example/SVPinViewExample.xcodeproj/project.pbxproj @@ -124,7 +124,7 @@ TargetAttributes = { B31AAF802089DD67004F5BE4 = { CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1010; + LastSwiftMigration = 1110; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.SafariKeychain = { @@ -172,7 +172,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-frameworks.sh", "${BUILT_PRODUCTS_DIR}/SVPinView/SVPinView.framework", ); name = "[CP] Embed Pods Frameworks"; @@ -181,7 +181,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SVPinViewExample/Pods-SVPinViewExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 7BBB3D94E88064EF5E22712B /* [CP] Check Pods Manifest.lock */ = { @@ -292,6 +292,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -343,6 +344,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -353,13 +355,13 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 9SNLPB24SN; INFOPLIST_FILE = SVPinViewExample/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.xornorik.SVPinView; + PRODUCT_BUNDLE_IDENTIFIER = com.xor.SVPinView; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -370,13 +372,13 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 9SNLPB24SN; INFOPLIST_FILE = SVPinViewExample/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.xornorik.SVPinView; + PRODUCT_BUNDLE_IDENTIFIER = com.xor.SVPinView; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/SVPinView/Example/SVPinViewExample.xcodeproj/xcshareddata/xcschemes/SVPinViewExample.xcscheme b/SVPinView/Example/SVPinViewExample.xcodeproj/xcshareddata/xcschemes/SVPinViewExample.xcscheme new file mode 100644 index 0000000..a9c58b0 --- /dev/null +++ b/SVPinView/Example/SVPinViewExample.xcodeproj/xcshareddata/xcschemes/SVPinViewExample.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SVPinView/Example/SVPinViewExample.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/xcschememanagement.plist b/SVPinView/Example/SVPinViewExample.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..5dfe467 --- /dev/null +++ b/SVPinView/Example/SVPinViewExample.xcodeproj/xcuserdata/svemuri.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + SVPinViewExample.xcscheme_^#shared#^_ + + orderHint + 2 + + + SuppressBuildableAutocreation + + B31AAF802089DD67004F5BE4 + + primary + + + + + diff --git a/SVPinView/Example/SVPinViewExample.xcworkspace/xcuserdata/svemuri.xcuserdatad/UserInterfaceState.xcuserstate b/SVPinView/Example/SVPinViewExample.xcworkspace/xcuserdata/svemuri.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..93189e8 Binary files /dev/null and b/SVPinView/Example/SVPinViewExample.xcworkspace/xcuserdata/svemuri.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/SVPinView/Example/SVPinViewExample.xcworkspace/xcuserdata/svemuri.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/SVPinView/Example/SVPinViewExample.xcworkspace/xcuserdata/svemuri.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..2915fa3 --- /dev/null +++ b/SVPinView/Example/SVPinViewExample.xcworkspace/xcuserdata/svemuri.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/SVPinView/Example/SVPinViewExample/PinViewController.swift b/SVPinView/Example/SVPinViewExample/PinViewController.swift index 0ffdb8d..665a2d5 100644 --- a/SVPinView/Example/SVPinViewExample/PinViewController.swift +++ b/SVPinView/Example/SVPinViewExample/PinViewController.swift @@ -10,7 +10,7 @@ import SVPinView class PinViewController: UIViewController { - @IBOutlet var pinView:SVPinView! + @IBOutlet var pinView: SVPinView! override func viewDidLoad() { super.viewDidLoad() @@ -29,7 +29,7 @@ class PinViewController: UIViewController { func configurePinView() { - pinView.pinLength = 4 + pinView.pinLength = 6 pinView.secureCharacter = "\u{25CF}" pinView.interSpace = 10 pinView.textColor = UIColor.white @@ -45,6 +45,7 @@ class PinViewController: UIViewController { pinView.activeFieldCornerRadius = 15 pinView.placeholder = "******" pinView.becomeFirstResponderAtIndex = 0 + pinView.shouldDismissKeyboardOnEmptyFirstField = false pinView.font = UIFont.systemFont(ofSize: 15) pinView.keyboardType = .phonePad @@ -96,7 +97,7 @@ class PinViewController: UIViewController { @IBAction func toggleStyle() { var nextStyle = pinView.style.rawValue + 1 - if nextStyle == 3 {nextStyle = 0} + if nextStyle == 3 { nextStyle = 0 } let style = SVPinViewStyle(rawValue: nextStyle)! switch style { case .none: diff --git a/SVPinView/Source/Classes/SVPinField.swift b/SVPinView/Source/Classes/SVPinField.swift index 95b87b7..d338c41 100644 --- a/SVPinView/Source/Classes/SVPinField.swift +++ b/SVPinView/Source/Classes/SVPinField.swift @@ -20,4 +20,19 @@ class SVPinField: UITextField { } return super.canPerformAction(action, withSender: sender) } + + override func deleteBackward() { + super.deleteBackward() + + let isBackSpace = { () -> Bool in + let char = self.text!.cString(using: String.Encoding.utf8)! + return strcmp(char, "\\b") == -92 + }() + + if isBackSpace { + if let nextResponder = self.superview?.superview?.superview?.superview?.viewWithTag(self.tag - 1) as UIResponder? { + nextResponder.becomeFirstResponder() + } + } + } } diff --git a/SVPinView/Source/Classes/SVPinView.swift b/SVPinView/Source/Classes/SVPinView.swift index 0892bea..a456ec3 100644 --- a/SVPinView/Source/Classes/SVPinView.swift +++ b/SVPinView/Source/Classes/SVPinView.swift @@ -19,46 +19,47 @@ public enum SVPinViewStyle : Int { public class SVPinView: UIView { // MARK: - Private Properties - - @IBOutlet fileprivate var collectionView : UICollectionView! + @IBOutlet fileprivate var collectionView: UICollectionView! + @IBOutlet fileprivate var errorView: UIView! fileprivate var flowLayout: UICollectionViewFlowLayout { return self.collectionView?.collectionViewLayout as! UICollectionViewFlowLayout } - fileprivate var view:UIView! + fileprivate var view: UIView! fileprivate var reuseIdentifier = "SVPinCell" fileprivate var isLoading = true fileprivate var password = [String]() // MARK: - Public Properties - - @IBInspectable public var pinLength:Int = 5 - @IBInspectable public var secureCharacter:String = "\u{25CF}" - @IBInspectable public var interSpace:CGFloat = 5 - @IBInspectable public var textColor:UIColor = UIColor.black - @IBInspectable public var shouldSecureText:Bool = true - @IBInspectable public var allowsWhitespaces:Bool = true - @IBInspectable public var placeholder:String = "" + @IBInspectable public var pinLength: Int = 5 + @IBInspectable public var secureCharacter: String = "\u{25CF}" + @IBInspectable public var interSpace: CGFloat = 5 + @IBInspectable public var textColor: UIColor = UIColor.black + @IBInspectable public var shouldSecureText: Bool = true + @IBInspectable public var allowsWhitespaces: Bool = true + @IBInspectable public var placeholder: String = "" - @IBInspectable public var borderLineColor:UIColor = UIColor.black - @IBInspectable public var activeBorderLineColor:UIColor = UIColor.black + @IBInspectable public var borderLineColor: UIColor = UIColor.black + @IBInspectable public var activeBorderLineColor: UIColor = UIColor.black - @IBInspectable public var borderLineThickness:CGFloat = 2 - @IBInspectable public var activeBorderLineThickness:CGFloat = 4 + @IBInspectable public var borderLineThickness: CGFloat = 2 + @IBInspectable public var activeBorderLineThickness: CGFloat = 4 - @IBInspectable public var fieldBackgroundColor:UIColor = UIColor.clear - @IBInspectable public var activeFieldBackgroundColor:UIColor = UIColor.clear + @IBInspectable public var fieldBackgroundColor: UIColor = UIColor.clear + @IBInspectable public var activeFieldBackgroundColor: UIColor = UIColor.clear - @IBInspectable public var fieldCornerRadius:CGFloat = 0 - @IBInspectable public var activeFieldCornerRadius:CGFloat = 0 + @IBInspectable public var fieldCornerRadius: CGFloat = 0 + @IBInspectable public var activeFieldCornerRadius: CGFloat = 0 - public var style:SVPinViewStyle = .underline + public var style: SVPinViewStyle = .underline - public var font:UIFont = UIFont.systemFont(ofSize: 15) - public var keyboardType:UIKeyboardType = UIKeyboardType.phonePad - public var becomeFirstResponderAtIndex:Int? = nil - public var isContentTypeOneTimeCode:Bool = true - public var shouldDismissKeyboardOnEmptyFirstField:Bool = false - public var pinInputAccessoryView:UIView? { + public var font: UIFont = UIFont.systemFont(ofSize: 15) + public var keyboardType: UIKeyboardType = UIKeyboardType.phonePad + public var becomeFirstResponderAtIndex: Int? = nil + public var isContentTypeOneTimeCode: Bool = true + public var shouldDismissKeyboardOnEmptyFirstField: Bool = false + public var pinInputAccessoryView: UIView? { didSet { refreshPinView() } } @@ -84,7 +85,7 @@ public class SVPinView: UIView { // for CollectionView let collectionViewNib = UINib(nibName: "SVPinCell", bundle:podBundle) collectionView.register(collectionViewNib, forCellWithReuseIdentifier: reuseIdentifier) - flowLayout.scrollDirection = .vertical //weird!!! + flowLayout.scrollDirection = .vertical collectionView.isScrollEnabled = false self.addSubview(view) @@ -96,24 +97,26 @@ public class SVPinView: UIView { @objc fileprivate func textFieldDidChange(_ textField: UITextField) { var nextTag = textField.tag let index = nextTag - 100 - let placeholderLabel = textField.superview?.viewWithTag(400) as! UILabel + guard let placeholderLabel = textField.superview?.viewWithTag(400) as? UILabel else { + showPinError(error: "ERR-101: Type Mismatch - Line 100") + return + } // ensure single character in text box and trim spaces - if textField.text!.count > 1 { + if textField.text?.count ?? 0 > 1 { textField.text?.removeFirst() textField.text = { () -> String in let text = textField.text ?? "" return String(text[.. Bool in - let char = textField.text!.cString(using: String.Encoding.utf8)! + guard let char = textField.text?.cString(using: String.Encoding.utf8) else { return false } return strcmp(char, "\\b") == -92 } - if !self.allowsWhitespaces && !isBackSpace() && textField.text!.trimmingCharacters(in: .whitespacesAndNewlines).count == 0 { + if !self.allowsWhitespaces && !isBackSpace() && textField.text?.trimmingCharacters(in: .whitespacesAndNewlines).count == 0 { return } @@ -122,7 +125,8 @@ public class SVPinView: UIView { // Try to find next responder if let nextResponder = textField.superview?.superview?.superview?.superview?.viewWithTag(nextTag) as UIResponder? { - nextResponder.becomeFirstResponder() // Found next responder, so set it. + // Found next responder, so set it. + nextResponder.becomeFirstResponder() } else { // Not found, so dismiss keyboard if index == 1 && shouldDismissKeyboardOnEmptyFirstField { @@ -131,17 +135,13 @@ public class SVPinView: UIView { } // activate the placeholder if textField empty - placeholderLabel.isHidden = !textField.text!.isEmpty + placeholderLabel.isHidden = !(textField.text?.isEmpty ?? true) // secure text after a bit DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(500), execute: { - if textField.text == "" { - textField.text = " " - placeholderLabel.isHidden = false - textField.layer.sublayerTransform = CATransform3DMakeTranslation(-4, 0, 0) - } else { + if !(textField.text?.isEmpty ?? true) { placeholderLabel.isHidden = true - if self.shouldSecureText { textField.text = self.secureCharacter } else {} + if self.shouldSecureText { textField.text = self.secureCharacter } } }) @@ -150,7 +150,7 @@ public class SVPinView: UIView { let passwordIndex = index - 1 if password.count > (passwordIndex) { // delete if space - password[passwordIndex] = text == " " ? "" : text + password[passwordIndex] = text } else { password.append(text) } @@ -169,8 +169,9 @@ public class SVPinView: UIView { for (index, char) in placeholder.enumerated() { guard index < pinLength else { return } - let placeholderLabel = collectionView.cellForItem(at: IndexPath(item: index, section: 0))?.viewWithTag(400) as! UILabel - placeholderLabel.text = String(char) + if let placeholderLabel = collectionView.cellForItem(at: IndexPath(item: index, section: 0))?.viewWithTag(400) as? UILabel { + placeholderLabel.text = String(char) + } else { showPinError(error: "ERR-102: Type Mismatch - Line 172") } } } @@ -201,13 +202,21 @@ public class SVPinView: UIView { } } - fileprivate func refreshPinView() { + @IBAction fileprivate func refreshPinView() { view.removeFromSuperview() view = nil isLoading = true + errorView.isHidden = true loadView() } + fileprivate func showPinError(error: String) { + errorView.isHidden = false + print("\n----------SVPinView Error----------") + print(error) + print("-----------------------------------") + } + // MARK: - Public methods - /// Returns the entered PIN; returns empty string if incomplete @@ -241,27 +250,27 @@ public class SVPinView: UIView { password = [] for (index,char) in pin.enumerated() { - + guard index < pinLength else { return } - + //Get the first textField - let textField = collectionView.cellForItem(at: IndexPath(item: index, section: 0))?.viewWithTag(101 + index) as! SVPinField - let placeholderLabel = collectionView.cellForItem(at: IndexPath(item: index, section: 0))?.viewWithTag(400) as! UILabel - + guard let textField = collectionView.cellForItem(at: IndexPath(item: index, section: 0))?.viewWithTag(101 + index) as? SVPinField, + let placeholderLabel = collectionView.cellForItem(at: IndexPath(item: index, section: 0))?.viewWithTag(400) as? UILabel + else { + showPinError(error: "ERR-103: Type Mismatch - Line 257") + return + } + textField.text = String(char) - textField.layer.sublayerTransform = CATransform3DMakeTranslation(0, 0, 0) placeholderLabel.isHidden = true - + //secure text after a bit DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(500), execute: { - if textField.text == "" { - textField.text = " " - placeholderLabel.isHidden = false - } else { + if textField.text != "" { if self.shouldSecureText { textField.text = self.secureCharacter } else {} } }) - + // store text password.append(String(char)) validateAndSendCallback() @@ -279,15 +288,17 @@ extension SVPinView : UICollectionViewDataSource, UICollectionViewDelegate, UICo public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) - let textField = cell.viewWithTag(100) as! SVPinField - let containerView = cell.viewWithTag(51)! - let underLine = cell.viewWithTag(50)! - let placeholderLabel = cell.viewWithTag(400) as! UILabel + guard let textField = cell.viewWithTag(100) as? SVPinField, + let containerView = cell.viewWithTag(51), + let underLine = cell.viewWithTag(50), + let placeholderLabel = cell.viewWithTag(400) as? UILabel + else { + showPinError(error: "ERR-104: Tag Mismatch - Line 291") + return UICollectionViewCell() + } // Setting up textField textField.tag = 101 + indexPath.row - textField.text = " " - textField.layer.sublayerTransform = CATransform3DMakeTranslation(-4, 0, 0) textField.isSecureTextEntry = false textField.textColor = self.textColor textField.tintColor = textColor @@ -332,7 +343,7 @@ extension SVPinView : UICollectionViewDataSource, UICollectionViewDelegate, UICo return CGSize(width: min(width, height), height: min(width, height)) } - public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { + public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { return interSpace } @@ -362,33 +373,33 @@ extension SVPinView : UICollectionViewDataSource, UICollectionViewDelegate, UICo extension SVPinView : UITextFieldDelegate { public func textFieldDidBeginEditing(_ textField: UITextField) { - let text = textField.text! - let placeholderLabel = textField.superview?.viewWithTag(400) as! UILabel - placeholderLabel.isHidden = true - - if text.count == 0 { - textField.isSecureTextEntry = false - textField.text = " " - placeholderLabel.isHidden = false - } + let text = textField.text ?? "" + if let placeholderLabel = textField.superview?.viewWithTag(400) as? UILabel { + placeholderLabel.isHidden = true + + if text.count == 0 { + textField.isSecureTextEntry = false + placeholderLabel.isHidden = false + } + } else { showPinError(error: "ERR-105: Type Mismatch - Line 377") } - let containerView = textField.superview?.viewWithTag(51)! - let underLine = textField.superview?.viewWithTag(50)! - self.stylePinField(containerView: containerView!, underLine: underLine!, isActive: true) + if let containerView = textField.superview?.viewWithTag(51), + let underLine = textField.superview?.viewWithTag(50) { + self.stylePinField(containerView: containerView, underLine: underLine, isActive: true) + } else { showPinError(error: "ERR-106: Type Mismatch - Line 387") } } public func textFieldDidEndEditing(_ textField: UITextField) { - let containerView = textField.superview?.viewWithTag(51)! - let underLine = textField.superview?.viewWithTag(50)! - self.stylePinField(containerView: containerView!, underLine: underLine!, isActive: false) + if let containerView = textField.superview?.viewWithTag(51), + let underLine = textField.superview?.viewWithTag(50) { + self.stylePinField(containerView: containerView, underLine: underLine, isActive: false) + } else { showPinError(error: "ERR-107: Type Mismatch - Line 394") } } public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { if (string == UIPasteboard.general.string) || (isContentTypeOneTimeCode && string.count >= pinLength) { textField.resignFirstResponder() - DispatchQueue.main.async { - self.pastePin(pin: string) - } + DispatchQueue.main.async { self.pastePin(pin: string) } return false } return true diff --git a/SVPinView/Source/XIB's/SVPinView.xib b/SVPinView/Source/XIB's/SVPinView.xib index 8af9262..7fee311 100644 --- a/SVPinView/Source/XIB's/SVPinView.xib +++ b/SVPinView/Source/XIB's/SVPinView.xib @@ -1,17 +1,16 @@ - - - - + + - + + @@ -21,7 +20,7 @@ - + @@ -34,12 +33,46 @@ + + + + +