diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9bce6af --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +xcuserdata 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/Example/Podfile.lock b/Example/Podfile.lock index 5d88660..ed6d9e4 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - SearchTextField (1.1.8) + - SearchTextField (1.2.2) DEPENDENCIES: - SearchTextField (from `../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - SearchTextField: 84985ff591fbb86407c9c8ad927e35a3a1d28222 + SearchTextField: 20383a9dea090bfbc9aa5ea4b7124f8ae075e7a5 PODFILE CHECKSUM: 479530ad58865b7087404979b3c82b4f43e856cc -COCOAPODS: 1.2.1 +COCOAPODS: 1.6.0.beta.1 diff --git a/Example/Pods/Local Podspecs/SearchTextField.podspec.json b/Example/Pods/Local Podspecs/SearchTextField.podspec.json index 0f733d1..5595517 100644 --- a/Example/Pods/Local Podspecs/SearchTextField.podspec.json +++ b/Example/Pods/Local Podspecs/SearchTextField.podspec.json @@ -1,7 +1,8 @@ { "name": "SearchTextField", - "version": "1.1.8", + "version": "1.2.2", "summary": "SearchTextField extends UITextField allowing you to add the autocomplete feature in a really easy way", + "swift_version": "4.2", "description": "Even though creating the autocomplete feature over a UITextField is not a big issue, dealing with screen rotation, keyboard position, the look and feel, etc, makes this task harder than expected.\n The idea behind SearchTextField is to help you adding this feature in just a few lines of code.\nSearchTextField supports two different modes: the classic dropdown list (by default) and the inline mode perfect for autocomplete email domains as an example.", "homepage": "https://github.com/apasccon/SearchTextField", "license": "MIT", @@ -10,7 +11,7 @@ }, "source": { "git": "https://github.com/apasccon/SearchTextField.git", - "tag": "1.1.8" + "tag": "1.2.2" }, "platforms": { "ios": "9.0" diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 5d88660..ed6d9e4 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - SearchTextField (1.1.8) + - SearchTextField (1.2.2) DEPENDENCIES: - SearchTextField (from `../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - SearchTextField: 84985ff591fbb86407c9c8ad927e35a3a1d28222 + SearchTextField: 20383a9dea090bfbc9aa5ea4b7124f8ae075e7a5 PODFILE CHECKSUM: 479530ad58865b7087404979b3c82b4f43e856cc -COCOAPODS: 1.2.1 +COCOAPODS: 1.6.0.beta.1 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index dfedcb9..766c425 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,63 +7,65 @@ objects = { /* Begin PBXBuildFile section */ - 16C1059EA86B47BCE4DAA395420F9F95 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; - 62FB0A7E6D8EAC01D31276C00A85E520 /* SearchTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 160ECF103247551CBC37190BB6EC53E6 /* SearchTextField.swift */; }; - 71F6C4C67F39633AD00BFD3E7C383A52 /* SearchTextField-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6252C77F38E153B96180DBE27E5994EB /* SearchTextField-dummy.m */; }; - 72065C734B8356A390F80F1662EC24DE /* Pods-SearchTextField_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4315DF0B7E1FFBE365C7043A45023E64 /* Pods-SearchTextField_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 762659F60E4D1F43A330187BE6EA148A /* Pods-SearchTextField_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 803F0411D77AF365A47A1A8EAF996DF4 /* Pods-SearchTextField_Example-dummy.m */; }; - 98D93CF3A15EE793B005FDAD1E298256 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; - BEAF6B86F86F7A2F8F69B115E1A105C3 /* SearchTextField-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 71CC67CD67D641F74F6EEFE0A8E46FED /* SearchTextField-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 333FDE63D600C788DC69A96F775F01D0 /* SearchTextField-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A2B15CB1D2CB3A255F7AF18A7411432C /* SearchTextField-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4C79512110BEB51B3547ED13A7C7269A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; + 51B87853A757F7B3042498F3FE2C566D /* SearchTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 476593343FDE12B48003B37B588302E3 /* SearchTextField.swift */; }; + 9E523A19F105F4BCCD4EA74D55DE6BDF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; + D6400D8E66DDBB1D316A780C999399A4 /* Pods-SearchTextField_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 109DCB3179FF0EE3E357F6239981A078 /* Pods-SearchTextField_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E63923B75DCD031BEA3FD1BDDFACE3AA /* Pods-SearchTextField_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 98E157816586CBD8C9C0716C75ECE5C0 /* Pods-SearchTextField_Example-dummy.m */; }; + F24CE8D8FECA0648DF1F1170267B2FA7 /* SearchTextField-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A109414D31A3D94B2A93F7A6FF4E3A18 /* SearchTextField-dummy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 9411B3F9FAD0708BD036F4313A19E639 /* PBXContainerItemProxy */ = { + 77B234776D8A6F45758AF289F8B4E882 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 940DEB8A330B442C8CDDB6B1CC001414; + remoteGlobalIDString = B8103CCE80CCEFC8EE389A125FC01E4E; remoteInfo = SearchTextField; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 0234D6DECA6C61B21D86FA7A9F8077C8 /* SearchTextField.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SearchTextField.xcconfig; sourceTree = ""; }; - 160ECF103247551CBC37190BB6EC53E6 /* SearchTextField.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SearchTextField.swift; sourceTree = ""; }; - 4315DF0B7E1FFBE365C7043A45023E64 /* Pods-SearchTextField_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SearchTextField_Example-umbrella.h"; sourceTree = ""; }; - 487270DB8947FB6762D2C66147BF2AFD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5B201448A762584A4F592FB165A1B19C /* Pods-SearchTextField_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SearchTextField_Example-acknowledgements.markdown"; sourceTree = ""; }; + 0691C1D9EA2D798732293C6796452E25 /* SearchTextField.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; path = SearchTextField.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 08CC28B3227DFE9B4B31133A8605DC27 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + 0928FD811A6BAEF1405A97E41AD36DD0 /* Pods-SearchTextField_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SearchTextField_Example.release.xcconfig"; sourceTree = ""; }; + 109DCB3179FF0EE3E357F6239981A078 /* Pods-SearchTextField_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SearchTextField_Example-umbrella.h"; sourceTree = ""; }; + 1348CD61AA5904C8B203616C6D1807FE /* SearchTextField.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SearchTextField.xcconfig; sourceTree = ""; }; + 39D4C6B9EFFCB8FF01B44C8333845001 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 3CD367E95910A3A1C18929894CA01D2A /* Pods-SearchTextField_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SearchTextField_Example-acknowledgements.plist"; sourceTree = ""; }; + 4296C73953F954239FCE10FF21B2F6AF /* Pods-SearchTextField_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SearchTextField_Example-Info.plist"; sourceTree = ""; }; + 476593343FDE12B48003B37B588302E3 /* SearchTextField.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SearchTextField.swift; path = SearchTextField/Classes/SearchTextField.swift; sourceTree = ""; }; + 50011AEABDB802926A2B2C5308A75E85 /* SearchTextField.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SearchTextField.modulemap; 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; }; 5BCA5499C27A47DA86020836C0DA14FF /* SearchTextField.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SearchTextField.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5E03236517C300CDA8CA150D4C004C0E /* Pods-SearchTextField_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-SearchTextField_Example.modulemap"; sourceTree = ""; }; - 6252C77F38E153B96180DBE27E5994EB /* SearchTextField-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SearchTextField-dummy.m"; sourceTree = ""; }; - 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 71CC67CD67D641F74F6EEFE0A8E46FED /* SearchTextField-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SearchTextField-umbrella.h"; sourceTree = ""; }; - 803F0411D77AF365A47A1A8EAF996DF4 /* Pods-SearchTextField_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SearchTextField_Example-dummy.m"; sourceTree = ""; }; - 88AE0C37FEA33591A8EE8A637A8831A4 /* Pods-SearchTextField_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SearchTextField_Example-frameworks.sh"; sourceTree = ""; }; + 60D4E6B24E504A32309DA366418160F7 /* SearchTextField-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SearchTextField-Info.plist"; sourceTree = ""; }; + 7E3F7F98D24FB557A6772833B820F339 /* Pods-SearchTextField_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SearchTextField_Example.modulemap"; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - A52CBC2367A726D3B804E8FA5F53BA83 /* SearchTextField.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SearchTextField.modulemap; sourceTree = ""; }; - AA55A6999C12CB3B13F2BBC8F2522C68 /* Pods-SearchTextField_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SearchTextField_Example.release.xcconfig"; sourceTree = ""; }; - CA631EBC59D4AF31CD8E6F104BBE96D4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - CE20F3AD248CAC43F5627D61F1CAC8BF /* Pods-SearchTextField_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SearchTextField_Example-resources.sh"; sourceTree = ""; }; + 98E157816586CBD8C9C0716C75ECE5C0 /* Pods-SearchTextField_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SearchTextField_Example-dummy.m"; sourceTree = ""; }; + 9A77583F7D651D4ACA5B14916AE6F2D5 /* Pods-SearchTextField_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SearchTextField_Example.debug.xcconfig"; sourceTree = ""; }; + A109414D31A3D94B2A93F7A6FF4E3A18 /* SearchTextField-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SearchTextField-dummy.m"; sourceTree = ""; }; + A2B15CB1D2CB3A255F7AF18A7411432C /* SearchTextField-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SearchTextField-umbrella.h"; sourceTree = ""; }; + A630B0A48A2222EBFC6F119093F31C49 /* Pods-SearchTextField_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SearchTextField_Example-frameworks.sh"; sourceTree = ""; }; CE4E98DA6AB2356EB5206126B4AC7623 /* Pods_SearchTextField_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SearchTextField_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D9806B9BEF3A2D3D4675BD74FE170306 /* Pods-SearchTextField_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SearchTextField_Example.debug.xcconfig"; sourceTree = ""; }; - F11A97087A0CF645DDAD1FE9FC24F7E8 /* SearchTextField-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SearchTextField-prefix.pch"; sourceTree = ""; }; - F69FBA112D0CA50A0A7FAEFAB9D6FA20 /* Pods-SearchTextField_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SearchTextField_Example-acknowledgements.plist"; sourceTree = ""; }; + D49996587A81EEF291C1B8913944DAB7 /* SearchTextField-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SearchTextField-prefix.pch"; sourceTree = ""; }; + D9728D02D51EC67255CF1B67AA13FCD8 /* Pods-SearchTextField_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SearchTextField_Example-acknowledgements.markdown"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 0340580C1B519A39DDAB61DE1DEB23D7 /* Frameworks */ = { + DAB34D7B59D5AAA6BD7653D2225E3F7C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 16C1059EA86B47BCE4DAA395420F9F95 /* Foundation.framework in Frameworks */, + 4C79512110BEB51B3547ED13A7C7269A /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - FD231BA2AFDA8355DB9CA61F6CAFF78C /* Frameworks */ = { + E624151BCF0CE2E03F70FB3E3A5C1405 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 98D93CF3A15EE793B005FDAD1E298256 /* Foundation.framework in Frameworks */, + 9E523A19F105F4BCCD4EA74D55DE6BDF /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -79,136 +81,131 @@ name = Products; sourceTree = ""; }; - 1FA947FC2BFCFE1BA9A647E0F1018754 /* Development Pods */ = { + 27C2BDA4D24802E63480E7CFCE36F05E /* Support Files */ = { isa = PBXGroup; children = ( - BB075A5FF5169CCB20103D968D489A59 /* SearchTextField */, + 50011AEABDB802926A2B2C5308A75E85 /* SearchTextField.modulemap */, + 1348CD61AA5904C8B203616C6D1807FE /* SearchTextField.xcconfig */, + A109414D31A3D94B2A93F7A6FF4E3A18 /* SearchTextField-dummy.m */, + 60D4E6B24E504A32309DA366418160F7 /* SearchTextField-Info.plist */, + D49996587A81EEF291C1B8913944DAB7 /* SearchTextField-prefix.pch */, + A2B15CB1D2CB3A255F7AF18A7411432C /* SearchTextField-umbrella.h */, ); - name = "Development Pods"; - sourceTree = ""; - }; - 28DAEB34E66AD528F93D36D0358F3475 /* SearchTextField */ = { - isa = PBXGroup; - children = ( - 5BF73A953263DAC8C4E10E942397150F /* Classes */, - ); - path = SearchTextField; + name = "Support Files"; + path = "Example/Pods/Target Support Files/SearchTextField"; sourceTree = ""; }; - 306D62BE6FD317F296551079645C26A4 /* Targets Support Files */ = { + 385BCD42D30A626774A8729188FA2081 /* Pods-SearchTextField_Example */ = { isa = PBXGroup; children = ( - 35B8C3AE1413C84F68D992B0364B22B7 /* Pods-SearchTextField_Example */, + 7E3F7F98D24FB557A6772833B820F339 /* Pods-SearchTextField_Example.modulemap */, + D9728D02D51EC67255CF1B67AA13FCD8 /* Pods-SearchTextField_Example-acknowledgements.markdown */, + 3CD367E95910A3A1C18929894CA01D2A /* Pods-SearchTextField_Example-acknowledgements.plist */, + 98E157816586CBD8C9C0716C75ECE5C0 /* Pods-SearchTextField_Example-dummy.m */, + A630B0A48A2222EBFC6F119093F31C49 /* Pods-SearchTextField_Example-frameworks.sh */, + 4296C73953F954239FCE10FF21B2F6AF /* Pods-SearchTextField_Example-Info.plist */, + 109DCB3179FF0EE3E357F6239981A078 /* Pods-SearchTextField_Example-umbrella.h */, + 9A77583F7D651D4ACA5B14916AE6F2D5 /* Pods-SearchTextField_Example.debug.xcconfig */, + 0928FD811A6BAEF1405A97E41AD36DD0 /* Pods-SearchTextField_Example.release.xcconfig */, ); - name = "Targets Support Files"; + name = "Pods-SearchTextField_Example"; + path = "Target Support Files/Pods-SearchTextField_Example"; sourceTree = ""; }; - 35B8C3AE1413C84F68D992B0364B22B7 /* Pods-SearchTextField_Example */ = { + 5E0D919E635D23B70123790B8308F8EF /* iOS */ = { isa = PBXGroup; children = ( - 487270DB8947FB6762D2C66147BF2AFD /* Info.plist */, - 5E03236517C300CDA8CA150D4C004C0E /* Pods-SearchTextField_Example.modulemap */, - 5B201448A762584A4F592FB165A1B19C /* Pods-SearchTextField_Example-acknowledgements.markdown */, - F69FBA112D0CA50A0A7FAEFAB9D6FA20 /* Pods-SearchTextField_Example-acknowledgements.plist */, - 803F0411D77AF365A47A1A8EAF996DF4 /* Pods-SearchTextField_Example-dummy.m */, - 88AE0C37FEA33591A8EE8A637A8831A4 /* Pods-SearchTextField_Example-frameworks.sh */, - CE20F3AD248CAC43F5627D61F1CAC8BF /* Pods-SearchTextField_Example-resources.sh */, - 4315DF0B7E1FFBE365C7043A45023E64 /* Pods-SearchTextField_Example-umbrella.h */, - D9806B9BEF3A2D3D4675BD74FE170306 /* Pods-SearchTextField_Example.debug.xcconfig */, - AA55A6999C12CB3B13F2BBC8F2522C68 /* Pods-SearchTextField_Example.release.xcconfig */, + 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */, ); - name = "Pods-SearchTextField_Example"; - path = "Target Support Files/Pods-SearchTextField_Example"; + name = iOS; sourceTree = ""; }; - 5BF73A953263DAC8C4E10E942397150F /* Classes */ = { + 7615B0D493069F7FC65D519D0A954540 /* Development Pods */ = { isa = PBXGroup; children = ( - 160ECF103247551CBC37190BB6EC53E6 /* SearchTextField.swift */, + 82D8C35F3BAEE50CACB7D6ABB34D7503 /* SearchTextField */, ); - path = Classes; + name = "Development Pods"; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 1FA947FC2BFCFE1BA9A647E0F1018754 /* Development Pods */, + 7615B0D493069F7FC65D519D0A954540 /* Development Pods */, BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 197B1DEFB55A699CAD5733CB6D868B88 /* Products */, - 306D62BE6FD317F296551079645C26A4 /* Targets Support Files */, + BEA8736193C0479D5D2CD490E42CFFB5 /* Targets Support Files */, ); sourceTree = ""; }; - A95586D6C7BC30054EE9D278F121E188 /* Support Files */ = { + 82D8C35F3BAEE50CACB7D6ABB34D7503 /* SearchTextField */ = { isa = PBXGroup; children = ( - CA631EBC59D4AF31CD8E6F104BBE96D4 /* Info.plist */, - A52CBC2367A726D3B804E8FA5F53BA83 /* SearchTextField.modulemap */, - 0234D6DECA6C61B21D86FA7A9F8077C8 /* SearchTextField.xcconfig */, - 6252C77F38E153B96180DBE27E5994EB /* SearchTextField-dummy.m */, - F11A97087A0CF645DDAD1FE9FC24F7E8 /* SearchTextField-prefix.pch */, - 71CC67CD67D641F74F6EEFE0A8E46FED /* SearchTextField-umbrella.h */, + 476593343FDE12B48003B37B588302E3 /* SearchTextField.swift */, + 938B65339B1A965DAD951C6015BD66B7 /* Pod */, + 27C2BDA4D24802E63480E7CFCE36F05E /* Support Files */, ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/SearchTextField"; + name = SearchTextField; + path = ../..; sourceTree = ""; }; - BB075A5FF5169CCB20103D968D489A59 /* SearchTextField */ = { + 938B65339B1A965DAD951C6015BD66B7 /* Pod */ = { isa = PBXGroup; children = ( - 28DAEB34E66AD528F93D36D0358F3475 /* SearchTextField */, - A95586D6C7BC30054EE9D278F121E188 /* Support Files */, + 08CC28B3227DFE9B4B31133A8605DC27 /* LICENSE */, + 39D4C6B9EFFCB8FF01B44C8333845001 /* README.md */, + 0691C1D9EA2D798732293C6796452E25 /* SearchTextField.podspec */, ); - name = SearchTextField; - path = ../..; + name = Pod; sourceTree = ""; }; BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { isa = PBXGroup; children = ( - D35AF013A5F0BAD4F32504907A52519E /* iOS */, + 5E0D919E635D23B70123790B8308F8EF /* iOS */, ); name = Frameworks; sourceTree = ""; }; - D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { + BEA8736193C0479D5D2CD490E42CFFB5 /* Targets Support Files */ = { isa = PBXGroup; children = ( - 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, + 385BCD42D30A626774A8729188FA2081 /* Pods-SearchTextField_Example */, ); - name = iOS; + name = "Targets Support Files"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 5BF3FCDDB6F25E91540FC9136C1A0E5D /* Headers */ = { + B27D3E4E3AD1226DADD6A48B2A3876F4 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - BEAF6B86F86F7A2F8F69B115E1A105C3 /* SearchTextField-umbrella.h in Headers */, + D6400D8E66DDBB1D316A780C999399A4 /* Pods-SearchTextField_Example-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - CE2CB09DF98AFAA00E1C32160DC681A7 /* Headers */ = { + F668DA9D4CCE4B61D65A46C45F051F78 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 72065C734B8356A390F80F1662EC24DE /* Pods-SearchTextField_Example-umbrella.h in Headers */, + 333FDE63D600C788DC69A96F775F01D0 /* SearchTextField-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 940DEB8A330B442C8CDDB6B1CC001414 /* SearchTextField */ = { + B8103CCE80CCEFC8EE389A125FC01E4E /* SearchTextField */ = { isa = PBXNativeTarget; - buildConfigurationList = 7CDBF2BE1FE57254B69544969597E3EC /* Build configuration list for PBXNativeTarget "SearchTextField" */; + buildConfigurationList = 4E7FD56A6F1FC3ADB99177E18FA0A310 /* Build configuration list for PBXNativeTarget "SearchTextField" */; buildPhases = ( - 79B5044A44F9D7161423FA8B5F6D68BC /* Sources */, - FD231BA2AFDA8355DB9CA61F6CAFF78C /* Frameworks */, - 5BF3FCDDB6F25E91540FC9136C1A0E5D /* Headers */, + F668DA9D4CCE4B61D65A46C45F051F78 /* Headers */, + 0FF8009E9F68E60FA51246D50F67BAC1 /* Sources */, + E624151BCF0CE2E03F70FB3E3A5C1405 /* Frameworks */, + 007143365BBAEF4920E441BEFD6E7D82 /* Resources */, ); buildRules = ( ); @@ -219,18 +216,19 @@ productReference = 5BCA5499C27A47DA86020836C0DA14FF /* SearchTextField.framework */; productType = "com.apple.product-type.framework"; }; - BFAF6D30694C1DB8654DFF52BF9F5268 /* Pods-SearchTextField_Example */ = { + C59690011C01A6B67B04796F278468F4 /* Pods-SearchTextField_Example */ = { isa = PBXNativeTarget; - buildConfigurationList = 97C24EF12468E7A3C08434D18AEFFB9C /* Build configuration list for PBXNativeTarget "Pods-SearchTextField_Example" */; + buildConfigurationList = 1D21BEC887C3308348413CED390248D3 /* Build configuration list for PBXNativeTarget "Pods-SearchTextField_Example" */; buildPhases = ( - B98810E936201B79972376F2D33CDA54 /* Sources */, - 0340580C1B519A39DDAB61DE1DEB23D7 /* Frameworks */, - CE2CB09DF98AFAA00E1C32160DC681A7 /* Headers */, + B27D3E4E3AD1226DADD6A48B2A3876F4 /* Headers */, + 6E35120D59D4F1BF6D7FCAC0FE053DDA /* Sources */, + DAB34D7B59D5AAA6BD7653D2225E3F7C /* Frameworks */, + A9A1CF663A3D2A63A5E4088045FBBF3C /* Resources */, ); buildRules = ( ); dependencies = ( - 4F35099B86C50FEE80344A4D2A40FDC9 /* PBXTargetDependency */, + 8809663DD5752F38B48819E6FCDC6072 /* PBXTargetDependency */, ); name = "Pods-SearchTextField_Example"; productName = "Pods-SearchTextField_Example"; @@ -243,14 +241,20 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0900; + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 1020; + TargetAttributes = { + B8103CCE80CCEFC8EE389A125FC01E4E = { + LastSwiftMigration = 1020; + }; + }; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; @@ -258,322 +262,345 @@ projectDirPath = ""; projectRoot = ""; targets = ( - BFAF6D30694C1DB8654DFF52BF9F5268 /* Pods-SearchTextField_Example */, - 940DEB8A330B442C8CDDB6B1CC001414 /* SearchTextField */, + C59690011C01A6B67B04796F278468F4 /* Pods-SearchTextField_Example */, + B8103CCE80CCEFC8EE389A125FC01E4E /* SearchTextField */, ); }; /* End PBXProject section */ +/* Begin PBXResourcesBuildPhase section */ + 007143365BBAEF4920E441BEFD6E7D82 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A9A1CF663A3D2A63A5E4088045FBBF3C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ - 79B5044A44F9D7161423FA8B5F6D68BC /* Sources */ = { + 0FF8009E9F68E60FA51246D50F67BAC1 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 71F6C4C67F39633AD00BFD3E7C383A52 /* SearchTextField-dummy.m in Sources */, - 62FB0A7E6D8EAC01D31276C00A85E520 /* SearchTextField.swift in Sources */, + F24CE8D8FECA0648DF1F1170267B2FA7 /* SearchTextField-dummy.m in Sources */, + 51B87853A757F7B3042498F3FE2C566D /* SearchTextField.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - B98810E936201B79972376F2D33CDA54 /* Sources */ = { + 6E35120D59D4F1BF6D7FCAC0FE053DDA /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 762659F60E4D1F43A330187BE6EA148A /* Pods-SearchTextField_Example-dummy.m in Sources */, + E63923B75DCD031BEA3FD1BDDFACE3AA /* Pods-SearchTextField_Example-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 4F35099B86C50FEE80344A4D2A40FDC9 /* PBXTargetDependency */ = { + 8809663DD5752F38B48819E6FCDC6072 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SearchTextField; - target = 940DEB8A330B442C8CDDB6B1CC001414 /* SearchTextField */; - targetProxy = 9411B3F9FAD0708BD036F4313A19E639 /* PBXContainerItemProxy */; + target = B8103CCE80CCEFC8EE389A125FC01E4E /* SearchTextField */; + targetProxy = 77B234776D8A6F45758AF289F8B4E882 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 0518DF09CFB85E58841B889653B75F37 /* Debug */ = { + 60DAF49CA7A9F362148D49C3C3123B2A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0234D6DECA6C61B21D86FA7A9F8077C8 /* SearchTextField.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + 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; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + 9FD5010F475DD630821CD964FFAED7D5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1348CD61AA5904C8B203616C6D1807FE /* SearchTextField.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "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/SearchTextField/SearchTextField-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SearchTextField/Info.plist"; + INFOPLIST_FILE = "Target Support Files/SearchTextField/SearchTextField-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/SearchTextField/SearchTextField.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_MODULE_NAME = SearchTextField; PRODUCT_NAME = SearchTextField; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 0D186F74E71EFB4E352D7F8D9BC6829F /* Release */ = { + A73DE2340560EC45C1BF7CF11A7BC535 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AA55A6999C12CB3B13F2BBC8F2522C68 /* Pods-SearchTextField_Example.release.xcconfig */; + baseConfigurationReference = 0928FD811A6BAEF1405A97E41AD36DD0 /* Pods-SearchTextField_Example.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "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-SearchTextField_Example/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_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_SearchTextField_Example; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 2D85BF1AB012B6B5E62B66065EF75E45 /* Release */ = { + A974C5400DF422653C19884EB13131A3 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0234D6DECA6C61B21D86FA7A9F8077C8 /* SearchTextField.xcconfig */; + baseConfigurationReference = 9A77583F7D651D4ACA5B14916AE6F2D5 /* Pods-SearchTextField_Example.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "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/SearchTextField/SearchTextField-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SearchTextField/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-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/SearchTextField/SearchTextField.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = SearchTextField; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; - }; - 4E487F173E6C9664F4E9E26B9635D23C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "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 = 9.0; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; name = Debug; }; - BDD0139D6EB93FA375F887ABD62DAB2E /* Release */ = { + C4EAA84F44D044E108500A81C635F21E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; }; name = Release; }; - D38538B0610BB0BA6C8AD1C977AE43FF /* Debug */ = { + D92E7A5BE2B942262204E782B0165211 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D9806B9BEF3A2D3D4675BD74FE170306 /* Pods-SearchTextField_Example.debug.xcconfig */; + baseConfigurationReference = 1348CD61AA5904C8B203616C6D1807FE /* SearchTextField.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "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-SearchTextField_Example/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/SearchTextField/SearchTextField-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SearchTextField/SearchTextField-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_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_SearchTextField_Example; + MODULEMAP_FILE = "Target Support Files/SearchTextField/SearchTextField.modulemap"; + PRODUCT_MODULE_NAME = SearchTextField; + PRODUCT_NAME = SearchTextField; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 1D21BEC887C3308348413CED390248D3 /* Build configuration list for PBXNativeTarget "Pods-SearchTextField_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4E487F173E6C9664F4E9E26B9635D23C /* Debug */, - BDD0139D6EB93FA375F887ABD62DAB2E /* Release */, + A974C5400DF422653C19884EB13131A3 /* Debug */, + A73DE2340560EC45C1BF7CF11A7BC535 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 7CDBF2BE1FE57254B69544969597E3EC /* Build configuration list for PBXNativeTarget "SearchTextField" */ = { + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 0518DF09CFB85E58841B889653B75F37 /* Debug */, - 2D85BF1AB012B6B5E62B66065EF75E45 /* Release */, + 60DAF49CA7A9F362148D49C3C3123B2A /* Debug */, + C4EAA84F44D044E108500A81C635F21E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 97C24EF12468E7A3C08434D18AEFFB9C /* Build configuration list for PBXNativeTarget "Pods-SearchTextField_Example" */ = { + 4E7FD56A6F1FC3ADB99177E18FA0A310 /* Build configuration list for PBXNativeTarget "SearchTextField" */ = { isa = XCConfigurationList; buildConfigurations = ( - D38538B0610BB0BA6C8AD1C977AE43FF /* Debug */, - 0D186F74E71EFB4E352D7F8D9BC6829F /* Release */, + 9FD5010F475DD630821CD964FFAED7D5 /* Debug */, + D92E7A5BE2B942262204E782B0165211 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcuserdata/apasccon.xcuserdatad/UserInterfaceState.xcuserstate b/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcuserdata/apasccon.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..b5983e2 Binary files /dev/null and b/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcuserdata/apasccon.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcuserdata/apasccon.xcuserdatad/WorkspaceSettings.xcsettings b/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcuserdata/apasccon.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..a8f6112 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcuserdata/apasccon.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + BuildLocationStyle + UseTargetSettings + + diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/Alejandro.xcuserdatad/xcschemes/Pods-SearchTextField_Example.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/Alejandro.xcuserdatad/xcschemes/Pods-SearchTextField_Example.xcscheme index c415dce..527fba7 100644 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/Alejandro.xcuserdatad/xcschemes/Pods-SearchTextField_Example.xcscheme +++ b/Example/Pods/Pods.xcodeproj/xcuserdata/Alejandro.xcuserdatad/xcschemes/Pods-SearchTextField_Example.xcscheme @@ -1,6 +1,6 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/Alejandro.xcuserdatad/xcschemes/SearchTextField.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/Alejandro.xcuserdatad/xcschemes/SearchTextField.xcscheme index 9b72982..746998b 100644 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/Alejandro.xcuserdatad/xcschemes/SearchTextField.xcscheme +++ b/Example/Pods/Pods.xcodeproj/xcuserdata/Alejandro.xcuserdatad/xcschemes/SearchTextField.xcscheme @@ -1,67 +1,54 @@ + buildForArchiving = "YES"> + BuildableIdentifier = 'primary' + BlueprintIdentifier = '940DEB8A330B442C8CDDB6B1CC001414' + BlueprintName = 'SearchTextField' + ReferencedContainer = 'container:Pods.xcodeproj' + BuildableName = 'SearchTextField.framework'> - - + shouldUseLaunchSchemeArgsEnv = "YES" + buildConfiguration = "Debug"> - - - - + debugDocumentVersioning = "YES" + buildConfiguration = "Release" + shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/Alejandro.xcuserdatad/xcschemes/xcschememanagement.plist b/Example/Pods/Pods.xcodeproj/xcuserdata/Alejandro.xcuserdatad/xcschemes/xcschememanagement.plist index 0814640..750e95f 100644 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/Alejandro.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Example/Pods/Pods.xcodeproj/xcuserdata/Alejandro.xcuserdatad/xcschemes/xcschememanagement.plist @@ -8,14 +8,29 @@ isShown + orderHint + 1 + + SearchTextField 2.xcscheme + + orderHint + 3 SearchTextField.xcscheme isShown + orderHint + 2 SuppressBuildableAutocreation - + + 940DEB8A330B442C8CDDB6B1CC001414 + + primary + + + diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/apasccon.xcuserdatad/xcschemes/Pods-SearchTextField_Example.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/apasccon.xcuserdatad/xcschemes/Pods-SearchTextField_Example.xcscheme new file mode 100644 index 0000000..a87cbf3 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/xcuserdata/apasccon.xcuserdatad/xcschemes/Pods-SearchTextField_Example.xcscheme @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/apasccon.xcuserdatad/xcschemes/SearchTextField.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/apasccon.xcuserdatad/xcschemes/SearchTextField.xcscheme new file mode 100644 index 0000000..7565eb2 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/xcuserdata/apasccon.xcuserdatad/xcschemes/SearchTextField.xcscheme @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/apasccon.xcuserdatad/xcschemes/xcschememanagement.plist b/Example/Pods/Pods.xcodeproj/xcuserdata/apasccon.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..0814640 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/xcuserdata/apasccon.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,21 @@ + + + + + SchemeUserState + + Pods-SearchTextField_Example.xcscheme + + isShown + + + SearchTextField.xcscheme + + isShown + + + + SuppressBuildableAutocreation + + + diff --git a/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-Info.plist b/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_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-SearchTextField_Example/Pods-SearchTextField_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-acknowledgements.plist index 7134c9c..7c82be4 100644 --- a/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-acknowledgements.plist +++ b/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-acknowledgements.plist @@ -1,58 +1,5 @@ - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2016 Alejandro Pasccon <apasccon@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 - SearchTextField - 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-SearchTextField_Example/Pods-SearchTextField_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-frameworks.sh index 3d4e2e5..aa28684 100755 --- a/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-frameworks.sh @@ -1,11 +1,28 @@ #!/bin/sh set -e +set -u +set -o pipefail + +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 +fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -23,15 +40,20 @@ install_framework() 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}" + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --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}" + 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 @@ -54,12 +76,40 @@ install_framework() fi } +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + 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 + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + 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 + 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'" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then code_sign_cmd="$code_sign_cmd &" @@ -72,11 +122,19 @@ code_sign_if_enabled() { # Strip invalid architectures strip_invalid_archs() { binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" @@ -85,14 +143,15 @@ strip_invalid_archs() { if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi + STRIP_BINARY_RETVAL=1 } if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/SearchTextField/SearchTextField.framework" + install_framework "${BUILT_PRODUCTS_DIR}/SearchTextField/SearchTextField.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/SearchTextField/SearchTextField.framework" + install_framework "${BUILT_PRODUCTS_DIR}/SearchTextField/SearchTextField.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait diff --git a/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-resources.sh b/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-resources.sh index aed060f..345301f 100755 --- a/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-resources.sh +++ b/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-resources.sh @@ -1,5 +1,13 @@ #!/bin/sh set -e +set -u +set -o pipefail + +if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then + # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy + # resources to, so exit 0 (signalling the script phase was successful). + exit 0 +fi mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" @@ -8,7 +16,11 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt XCASSET_FILES=() -case "${TARGETED_DEVICE_FAMILY}" in +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY:-}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" ;; @@ -44,29 +56,29 @@ EOM 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}" + 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}" || true 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}" + 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}" || true 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}" + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 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}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$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\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 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\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 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\"" + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) @@ -74,7 +86,7 @@ EOM XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) - echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac @@ -88,7 +100,7 @@ if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then fi rm -f "$RESOURCES_TO_COPY" -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +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) @@ -98,5 +110,9 @@ then 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}" + if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then + 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}" + else + 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}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" + fi fi diff --git a/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example.debug.xcconfig index 5f2c8e8..62e0327 100644 --- a/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example.debug.xcconfig @@ -1,11 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES $(inherited) -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SearchTextField" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SearchTextField" 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/SearchTextField/SearchTextField.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SearchTextField/SearchTextField.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "SearchTextField" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +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 diff --git a/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example.release.xcconfig index 5f2c8e8..62e0327 100644 --- a/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example.release.xcconfig @@ -1,11 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES $(inherited) -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SearchTextField" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SearchTextField" 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/SearchTextField/SearchTextField.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SearchTextField/SearchTextField.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "SearchTextField" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +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 diff --git a/Example/Pods/Target Support Files/SearchTextField/Info.plist b/Example/Pods/Target Support Files/SearchTextField/Info.plist index 723e593..e433362 100644 --- a/Example/Pods/Target Support Files/SearchTextField/Info.plist +++ b/Example/Pods/Target Support Files/SearchTextField/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.1.8 + 1.2.2 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/SearchTextField/SearchTextField-Info.plist b/Example/Pods/Target Support Files/SearchTextField/SearchTextField-Info.plist new file mode 100644 index 0000000..e433362 --- /dev/null +++ b/Example/Pods/Target Support Files/SearchTextField/SearchTextField-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.2.2 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/SearchTextField/SearchTextField.xcconfig b/Example/Pods/Target Support Files/SearchTextField/SearchTextField.xcconfig index 6bc1b87..33ac3ce 100644 --- a/Example/Pods/Target Support Files/SearchTextField/SearchTextField.xcconfig +++ b/Example/Pods/Target Support Files/SearchTextField/SearchTextField.xcconfig @@ -1,9 +1,8 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SearchTextField +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SearchTextField 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) +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} diff --git a/Example/SearchTextField.xcodeproj/project.pbxproj b/Example/SearchTextField.xcodeproj/project.pbxproj index 71ee363..e4650fe 100644 --- a/Example/SearchTextField.xcodeproj/project.pbxproj +++ b/Example/SearchTextField.xcodeproj/project.pbxproj @@ -31,7 +31,7 @@ /* Begin PBXFileReference section */ 0C9ADD7EBA81EC14C57771C6 /* Pods_SearchTextField_Example_SearchTextField_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SearchTextField_Example_SearchTextField_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 19AA95C1C36826EE01AFC01A /* Pods-SearchTextField_Example-SearchTextField_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SearchTextField_Example-SearchTextField_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SearchTextField_Example-SearchTextField_Tests/Pods-SearchTextField_Example-SearchTextField_Tests.debug.xcconfig"; sourceTree = ""; }; - 22350C90D960BF9DF69DBFAF /* SearchTextField.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SearchTextField.podspec; path = ../SearchTextField.podspec; sourceTree = ""; }; + 22350C90D960BF9DF69DBFAF /* SearchTextField.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SearchTextField.podspec; path = ../SearchTextField.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 34E1007BAC706A603DBB9426 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 47EBEE51DC74808DD1B51042 /* Pods-SearchTextField_Example-SearchTextField_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SearchTextField_Example-SearchTextField_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SearchTextField_Example-SearchTextField_Tests/Pods-SearchTextField_Example-SearchTextField_Tests.release.xcconfig"; sourceTree = ""; }; 607FACD01AFB9204008FA782 /* SearchTextField_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SearchTextField_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -177,7 +177,6 @@ 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, 1503F157D57034D1E32CF7B7 /* [CP] Embed Pods Frameworks */, - DB9092D1132976C22EE82FC3 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -213,19 +212,19 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = W2SE4VNM7C; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; ProvisioningStyle = Manual; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = X3NTASB9PV; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; ProvisioningStyle = Manual; TestTargetID = 607FACCF1AFB9204008FA782; }; @@ -233,7 +232,7 @@ }; buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "SearchTextField" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -279,13 +278,16 @@ files = ( ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/SearchTextField/SearchTextField.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SearchTextField.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 43E08A6869C029EB676C4BF4 /* [CP] Check Pods Manifest.lock */ = { @@ -294,28 +296,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SearchTextField_Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - DB9092D1132976C22EE82FC3 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SearchTextField_Example/Pods-SearchTextField_Example-resources.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -380,12 +370,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -418,9 +410,10 @@ MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -436,12 +429,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -468,7 +463,7 @@ SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -490,8 +485,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -513,8 +507,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -533,8 +526,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -548,8 +540,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Example/SearchTextField.xcodeproj/xcshareddata/xcschemes/SearchTextField-Example.xcscheme b/Example/SearchTextField.xcodeproj/xcshareddata/xcschemes/SearchTextField-Example.xcscheme index cf15489..c7b4b63 100644 --- a/Example/SearchTextField.xcodeproj/xcshareddata/xcschemes/SearchTextField-Example.xcscheme +++ b/Example/SearchTextField.xcodeproj/xcshareddata/xcschemes/SearchTextField-Example.xcscheme @@ -1,6 +1,6 @@ + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/SearchTextField.xcworkspace/xcuserdata/Alejandro.xcuserdatad/UserInterfaceState.xcuserstate b/Example/SearchTextField.xcworkspace/xcuserdata/Alejandro.xcuserdatad/UserInterfaceState.xcuserstate index 0983eb2..027b9bd 100644 Binary files a/Example/SearchTextField.xcworkspace/xcuserdata/Alejandro.xcuserdatad/UserInterfaceState.xcuserstate and b/Example/SearchTextField.xcworkspace/xcuserdata/Alejandro.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Example/SearchTextField.xcworkspace/xcuserdata/apasccon.xcuserdatad/UserInterfaceState.xcuserstate b/Example/SearchTextField.xcworkspace/xcuserdata/apasccon.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..ea94ee0 Binary files /dev/null and b/Example/SearchTextField.xcworkspace/xcuserdata/apasccon.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Example/SearchTextField/AppDelegate.swift b/Example/SearchTextField/AppDelegate.swift index 7ab635f..bfcd743 100644 --- a/Example/SearchTextField/AppDelegate.swift +++ b/Example/SearchTextField/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Example/SearchTextField/MainViewController.swift b/Example/SearchTextField/MainViewController.swift index b2cf8ce..d5b54b0 100644 --- a/Example/SearchTextField/MainViewController.swift +++ b/Example/SearchTextField/MainViewController.swift @@ -19,7 +19,7 @@ class MainViewController: UITableViewController { override func viewDidLoad() { super.viewDidLoad() - tableView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0) + tableView.contentInset = UIEdgeInsets.init(top: 0, left: 0, bottom: 0, right: 0) tableView.tableFooterView = UIView() @@ -82,7 +82,7 @@ class MainViewController: UITableViewController { acronymTextField.forceRightToLeft = false // Customize highlight attributes - Default: Bold - acronymTextField.highlightAttributes = [NSAttributedStringKey.backgroundColor: UIColor.yellow, NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: 12)] + acronymTextField.highlightAttributes = [NSAttributedString.Key.backgroundColor: UIColor.yellow, NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 12)] // Handle item selection - Default behaviour: item title set to the text field acronymTextField.itemSelectionHandler = { filteredResults, itemPosition in @@ -97,7 +97,7 @@ class MainViewController: UITableViewController { // Update data source when the user stops typing acronymTextField.userStoppedTypingHandler = { if let criteria = self.acronymTextField.text { - if criteria.characters.count > 1 { + if criteria.count > 1 { // Show loading indicator self.acronymTextField.showLoadingIndicator() @@ -131,7 +131,7 @@ class MainViewController: UITableViewController { emailInlineTextField.inlineMode = true emailInlineTextField.startFilteringAfter = "@" - emailInlineTextField.startSuggestingInmediately = true + emailInlineTextField.startSuggestingImmediately = true // Set data source emailInlineTextField.filterStrings(["gmail.com", "yahoo.com", "yahoo.com.ar"]) diff --git a/README.md b/README.md index 067023f..409e9d9 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,9 @@ mySearchTextField.startVisibleWithoutInteraction = true // Start filtering after an specific number of characters - Default: 0 mySearchTextField.minCharactersNumberToStartFiltering = 3 +// Force to show the results list without filtering (but highlighting) +mySearchTextField.forceNoFiltering = true + // Explicitly hide the results list mySearchTextField.hideResultsList() @@ -171,6 +174,10 @@ emailInlineTextField.filterStrings(["gmail.com", "yahoo.com", "yahoo.com.ar"]) ## Swift Versions +Swift 5 supported from 1.2.3 version. + +Swift 4 supported from 1.2.0 version. + Install v1.0.0 if you need to support Swift 2.3. Install v1.0.2 and above if you want to support Swift 3. diff --git a/SearchTextField.podspec b/SearchTextField.podspec index 7fe7f36..0c01f23 100644 --- a/SearchTextField.podspec +++ b/SearchTextField.podspec @@ -8,8 +8,9 @@ Pod::Spec.new do |s| s.name = "SearchTextField" - s.version = "1.1.8" + s.version = "1.2.4" s.summary = "SearchTextField extends UITextField allowing you to add the autocomplete feature in a really easy way" + s.swift_version = "5.0" # 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? diff --git a/SearchTextField/Classes/SearchTextField.swift b/SearchTextField/Classes/SearchTextField.swift index b15051d..9cf8f55 100755 --- a/SearchTextField/Classes/SearchTextField.swift +++ b/SearchTextField/Classes/SearchTextField.swift @@ -24,6 +24,9 @@ open class SearchTextField: UITextField { /// Indicate if keyboard is showing or not open var keyboardIsShowing = false + + /// How long to wait before deciding typing has stopped + open var typingStoppedDelay = 0.8 /// Set your custom visual theme, or just choose between pre-defined SearchTextFieldTheme.lightTheme() and SearchTextFieldTheme.darkTheme() themes open var theme = SearchTextFieldTheme.lightTheme() { @@ -32,11 +35,15 @@ open class SearchTextField: UITextField { if let placeholderColor = theme.placeholderColor { if let placeholderString = placeholder { - self.attributedPlaceholder = NSAttributedString(string: placeholderString, attributes: [NSAttributedStringKey.foregroundColor: placeholderColor]) + self.attributedPlaceholder = NSAttributedString(string: placeholderString, attributes: [NSAttributedString.Key.foregroundColor: placeholderColor]) } self.placeholderLabel?.textColor = placeholderColor } + + if let hightlightedFont = self.highlightAttributes[.font] as? UIFont { + self.highlightAttributes[.font] = hightlightedFont.withSize(self.theme.font.pointSize) + } } } @@ -75,7 +82,7 @@ open class SearchTextField: UITextField { open var userStoppedTypingHandler: (() -> Void)? /// Set your custom set of attributes in order to highlight the string found in each item - open var highlightAttributes: [NSAttributedStringKey: AnyObject] = [NSAttributedStringKey(rawValue: NSAttributedStringKey.font.rawValue):UIFont.boldSystemFont(ofSize: 10)] + open var highlightAttributes: [NSAttributedString.Key: AnyObject] = [.font: UIFont.boldSystemFont(ofSize: 10)] /// Start showing the default loading indicator, useful for searches that take some time. open func showLoadingIndicator() { @@ -107,15 +114,24 @@ open class SearchTextField: UITextField { /// Min number of characters to start filtering open var minCharactersNumberToStartFiltering: Int = 0 + + /// Force no filtering (display the entire filtered data source) + open var forceNoFiltering: Bool = false - /// If startFilteringAfter is set, and startSuggestingInmediately is true, the list of suggestions appear inmediately - open var startSuggestingInmediately = false + /// If startFilteringAfter is set, and startSuggestingImmediately is true, the list of suggestions appear immediately + open var startSuggestingImmediately = false /// Allow to decide the comparision options open var comparisonOptions: NSString.CompareOptions = [.caseInsensitive] /// Set the results list's header open var resultsListHeader: UIView? + + // Move the table around to customize for your layout + open var tableXOffset: CGFloat = 0.0 + open var tableYOffset: CGFloat = 0.0 + open var tableCornerRadius: CGFloat = 2.0 + open var tableBottomMargin: CGFloat = 10.0 //////////////////////////////////////////////////////////////////////// // Private implementation @@ -128,13 +144,13 @@ open class SearchTextField: UITextField { fileprivate var timer: Timer? = nil fileprivate var placeholderLabel: UILabel? fileprivate static let cellIdentifier = "APSearchTextFieldCell" - fileprivate let indicator = UIActivityIndicatorView(activityIndicatorStyle: .gray) + fileprivate let indicator = UIActivityIndicatorView(style: .gray) fileprivate var maxTableViewSize: CGFloat = 0 fileprivate var filteredResults = [SearchTextFieldItem]() fileprivate var filterDataSource = [SearchTextFieldItem]() { didSet { - filter(forceShowAll: false) + filter(forceShowAll: forceNoFiltering) buildSearchTableView() if startVisibleWithoutInteraction { @@ -162,9 +178,9 @@ open class SearchTextField: UITextField { self.addTarget(self, action: #selector(SearchTextField.textFieldDidEndEditing), for: .editingDidEnd) self.addTarget(self, action: #selector(SearchTextField.textFieldDidEndEditingOnExit), for: .editingDidEndOnExit) - NotificationCenter.default.addObserver(self, selector: #selector(SearchTextField.keyboardWillShow(_:)), name: NSNotification.Name.UIKeyboardWillShow, object: nil) - NotificationCenter.default.addObserver(self, selector: #selector(SearchTextField.keyboardWillHide(_:)), name: NSNotification.Name.UIKeyboardWillHide, object: nil) - NotificationCenter.default.addObserver(self, selector: #selector(SearchTextField.keyboardDidChangeFrame(_:)), name: NSNotification.Name.UIKeyboardDidChangeFrame, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(SearchTextField.keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(SearchTextField.keyboardWillHide(_:)), name: UIResponder.keyboardWillHideNotification, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(SearchTextField.keyboardDidChangeFrame(_:)), name: UIResponder.keyboardDidChangeFrameNotification, object: nil) } override open func layoutSubviews() { @@ -189,28 +205,30 @@ open class SearchTextField: UITextField { // Create the filter table and shadow view fileprivate func buildSearchTableView() { - if let tableView = tableView, let shadowView = shadowView { - tableView.layer.masksToBounds = true - tableView.layer.borderWidth = 0.5 - tableView.dataSource = self - tableView.delegate = self - tableView.separatorInset = UIEdgeInsets.zero - tableView.tableHeaderView = resultsListHeader - if forceRightToLeft { - tableView.semanticContentAttribute = .forceRightToLeft - } - - shadowView.backgroundColor = UIColor.lightText - shadowView.layer.shadowColor = UIColor.black.cgColor - shadowView.layer.shadowOffset = CGSize.zero - shadowView.layer.shadowOpacity = 1 - - self.window?.addSubview(tableView) - } else { - tableView = UITableView(frame: CGRect.zero) - shadowView = UIView(frame: CGRect.zero) + guard let tableView = tableView, let shadowView = shadowView else { + self.tableView = UITableView(frame: CGRect.zero) + self.shadowView = UIView(frame: CGRect.zero) + buildSearchTableView() + return + } + + tableView.layer.masksToBounds = true + tableView.layer.borderWidth = theme.borderWidth > 0 ? theme.borderWidth : 0.5 + tableView.dataSource = self + tableView.delegate = self + tableView.separatorInset = UIEdgeInsets.zero + tableView.tableHeaderView = resultsListHeader + if forceRightToLeft { + tableView.semanticContentAttribute = .forceRightToLeft } + shadowView.backgroundColor = UIColor.lightText + shadowView.layer.shadowColor = UIColor.black.cgColor + shadowView.layer.shadowOffset = CGSize.zero + shadowView.layer.shadowOpacity = 1 + + self.window?.addSubview(tableView) + redrawSearchTableView() } @@ -235,7 +253,7 @@ open class SearchTextField: UITextField { placeholderLabel?.backgroundColor = UIColor.clear placeholderLabel?.lineBreakMode = .byClipping - if let placeholderColor = self.attributedPlaceholder?.attribute(NSAttributedStringKey.foregroundColor, at: 0, effectiveRange: nil) as? UIColor { + if let placeholderColor = self.attributedPlaceholder?.attribute(NSAttributedString.Key.foregroundColor, at: 0, effectiveRange: nil) as? UIColor { placeholderLabel?.textColor = placeholderColor } else { placeholderLabel?.textColor = UIColor ( red: 0.8, green: 0.8, blue: 0.8, alpha: 1.0 ) @@ -255,6 +273,12 @@ open class SearchTextField: UITextField { if let tableView = tableView { guard let frame = self.superview?.convert(self.frame, to: nil) else { return } + //TableViews use estimated cell heights to calculate content size until they + // are on-screen. We must set this to the theme cell height to avoid getting an + // incorrect contentSize when we have specified non-standard fonts and/or + // cellHeights in the theme. We do it here to ensure updates to these settings + // are recognized if changed after the tableView is created + tableView.estimatedRowHeight = theme.cellHeight if self.direction == .down { var tableHeight: CGFloat = 0 @@ -270,13 +294,14 @@ open class SearchTextField: UITextField { // Set a bottom margin of 10p if tableHeight < tableView.contentSize.height { - tableHeight -= 10 + tableHeight -= tableBottomMargin } var tableViewFrame = CGRect(x: 0, y: 0, width: frame.size.width - 4, height: tableHeight) tableViewFrame.origin = self.convert(tableViewFrame.origin, to: nil) - tableViewFrame.origin.x += 2 - tableViewFrame.origin.y += frame.size.height + 2 + tableViewFrame.origin.x += 2 + tableXOffset + tableViewFrame.origin.y += frame.size.height + 2 + tableYOffset + self.tableView?.frame.origin = tableViewFrame.origin // Avoid animating from (0, 0) when displaying at launch UIView.animate(withDuration: 0.2, animations: { [weak self] in self?.tableView?.frame = tableViewFrame }) @@ -294,15 +319,15 @@ open class SearchTextField: UITextField { }) } - superview?.bringSubview(toFront: tableView) - superview?.bringSubview(toFront: shadowView!) + superview?.bringSubviewToFront(tableView) + superview?.bringSubviewToFront(shadowView!) if self.isFirstResponder { - superview?.bringSubview(toFront: self) + superview?.bringSubviewToFront(self) } tableView.layer.borderColor = theme.borderColor.cgColor - tableView.layer.cornerRadius = 2 + tableView.layer.cornerRadius = tableCornerRadius tableView.separatorColor = theme.separatorColor tableView.backgroundColor = theme.bgColor @@ -314,7 +339,7 @@ open class SearchTextField: UITextField { @objc open func keyboardWillShow(_ notification: Notification) { if !keyboardIsShowing && isEditing { keyboardIsShowing = true - keyboardFrame = ((notification as NSNotification).userInfo![UIKeyboardFrameEndUserInfoKey] as! NSValue).cgRectValue + keyboardFrame = ((notification as NSNotification).userInfo![UIResponder.keyboardFrameEndUserInfoKey] as! NSValue).cgRectValue interactedWith = true prepareDrawTableResult() } @@ -330,15 +355,13 @@ open class SearchTextField: UITextField { @objc open func keyboardDidChangeFrame(_ notification: Notification) { DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in - self?.keyboardFrame = ((notification as NSNotification).userInfo![UIKeyboardFrameEndUserInfoKey] as! NSValue).cgRectValue + self?.keyboardFrame = ((notification as NSNotification).userInfo![UIResponder.keyboardFrameEndUserInfoKey] as! NSValue).cgRectValue self?.prepareDrawTableResult() } } @objc open func typingDidStop() { - if userStoppedTypingHandler != nil { - self.userStoppedTypingHandler!() - } + self.userStoppedTypingHandler?() } // Handle text field changes @@ -351,7 +374,7 @@ open class SearchTextField: UITextField { // Detect pauses while typing timer?.invalidate() - timer = Timer.scheduledTimer(timeInterval: 0.8, target: self, selector: #selector(SearchTextField.typingDidStop), userInfo: self, repeats: false) + timer = Timer.scheduledTimer(timeInterval: typingStoppedDelay, target: self, selector: #selector(SearchTextField.typingDidStop), userInfo: self, repeats: false) if text!.isEmpty { clearResults() @@ -361,7 +384,7 @@ open class SearchTextField: UITextField { } self.placeholderLabel?.text = "" } else { - filter(forceShowAll: false) + filter(forceShowAll: forceNoFiltering) prepareDrawTableResult() } @@ -412,7 +435,7 @@ open class SearchTextField: UITextField { fileprivate func filter(forceShowAll addAll: Bool) { clearResults() - if text!.characters.count < minCharactersNumberToStartFiltering { + if text!.count < minCharactersNumberToStartFiltering { return } @@ -441,7 +464,7 @@ open class SearchTextField: UITextField { var textToFilter = text!.lowercased() if inlineMode, let filterAfter = startFilteringAfter { - if let suffixToFilter = textToFilter.components(separatedBy: filterAfter).last, (suffixToFilter != "" || startSuggestingInmediately == true), textToFilter != suffixToFilter { + if let suffixToFilter = textToFilter.components(separatedBy: filterAfter).last, (suffixToFilter != "" || startSuggestingImmediately == true), textToFilter != suffixToFilter { textToFilter = suffixToFilter } else { placeholderLabel?.text = "" @@ -450,7 +473,7 @@ open class SearchTextField: UITextField { } if item.title.lowercased().hasPrefix(textToFilter) { - let indexFrom = textToFilter.index(textToFilter.startIndex, offsetBy: textToFilter.characters.count) + let indexFrom = textToFilter.index(textToFilter.startIndex, offsetBy: textToFilter.count) let itemSuffix = item.title[indexFrom...] item.attributedTitle = NSMutableAttributedString(string: String(itemSuffix)) @@ -473,11 +496,11 @@ open class SearchTextField: UITextField { } // Look for Font attribute, and if it exists, adapt to the subtitle font size - fileprivate func highlightAttributesForSubtitle() -> [NSAttributedStringKey: AnyObject] { - var highlightAttributesForSubtitle = [NSAttributedStringKey: AnyObject]() + fileprivate func highlightAttributesForSubtitle() -> [NSAttributedString.Key: AnyObject] { + var highlightAttributesForSubtitle = [NSAttributedString.Key: AnyObject]() for attr in highlightAttributes { - if attr.0 == NSAttributedStringKey.font { + if attr.0 == NSAttributedString.Key.font { let fontName = (attr.1 as! UIFont).fontName let pointSize = (attr.1 as! UIFont).pointSize * fontConversionRate highlightAttributesForSubtitle[attr.0] = UIFont(name: fontName, size: pointSize) @@ -554,7 +577,7 @@ extension SearchTextField: UITableViewDelegate, UITableViewDataSource { cell!.textLabel?.font = theme.font cell!.detailTextLabel?.font = UIFont(name: theme.font.fontName, size: theme.font.pointSize * fontConversionRate) cell!.textLabel?.textColor = theme.fontColor - cell!.detailTextLabel?.textColor = theme.fontColor + cell!.detailTextLabel?.textColor = theme.subtitleFontColor cell!.textLabel?.text = filteredResults[(indexPath as NSIndexPath).row].title cell!.detailTextLabel?.text = filteredResults[(indexPath as NSIndexPath).row].subtitle @@ -591,18 +614,21 @@ public struct SearchTextFieldTheme { public var cellHeight: CGFloat public var bgColor: UIColor public var borderColor: UIColor + public var borderWidth : CGFloat = 0 public var separatorColor: UIColor public var font: UIFont public var fontColor: UIColor + public var subtitleFontColor: UIColor public var placeholderColor: UIColor? - init(cellHeight: CGFloat, bgColor:UIColor, borderColor: UIColor, separatorColor: UIColor, font: UIFont, fontColor: UIColor) { + init(cellHeight: CGFloat, bgColor:UIColor, borderColor: UIColor, separatorColor: UIColor, font: UIFont, fontColor: UIColor, subtitleFontColor: UIColor? = nil) { self.cellHeight = cellHeight self.borderColor = borderColor self.separatorColor = separatorColor self.bgColor = bgColor self.font = font self.fontColor = fontColor + self.subtitleFontColor = subtitleFontColor ?? fontColor } public static func lightTheme() -> SearchTextFieldTheme {