From 4e0907d9e34f0f7e92e84ac21eff09c132c8090d Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Tue, 14 Aug 2018 11:54:00 +0400 Subject: [PATCH 01/14] 2-series card type identification for mastercard --- SwiftLuhn/Classes/SwiftLuhn.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SwiftLuhn/Classes/SwiftLuhn.swift b/SwiftLuhn/Classes/SwiftLuhn.swift index 3f2526c..3495f8a 100644 --- a/SwiftLuhn/Classes/SwiftLuhn.swift +++ b/SwiftLuhn/Classes/SwiftLuhn.swift @@ -37,7 +37,7 @@ open class SwiftLuhn { case .jcb: return "^(?:2131|1800|35[0-9]{3})[0-9]{3,}$" case .mastercard: - return "^5[1-5][0-9]{5,}$" + return "^5[1-5][0-9]{5,}|222[1-9][0-9]{3,}|22[3-9][0-9]{4,}|2[3-6][0-9]{5,}|27[01][0-9]{4,}|2720[0-9]{3,}$" case .visa: return "^4[0-9]{6,}$" case .maestro: @@ -60,7 +60,7 @@ open class SwiftLuhn { case .jcb: return "^(?:2131|1800|35[0-9]{3})[0-9]+$" case .mastercard: - return "^5[1-5][0-9]+$" + return "^5[1-5][0-9]{5,}|222[1-9][0-9]{3,}|22[3-9][0-9]{4,}|2[3-6][0-9]{5,}|27[01][0-9]{4,}|2720[0-9]{3,}$" case .visa: return "^4[0-9]+$" case .maestro: From dba7c7c8012f28f4e8f1cd40fddfb42424c2a34a Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Mon, 27 Aug 2018 10:36:50 +0400 Subject: [PATCH 02/14] mastercard 2 Series test card added to testCard plist --- Example/Tests/TestCreditCardNumbers.plist | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Example/Tests/TestCreditCardNumbers.plist b/Example/Tests/TestCreditCardNumbers.plist index 0fbafe1..4b858b4 100644 --- a/Example/Tests/TestCreditCardNumbers.plist +++ b/Example/Tests/TestCreditCardNumbers.plist @@ -94,6 +94,18 @@ type visa + + number + 2226350138938173 + type + mastercard + + + number + 2239468684686098 + type + mastercard + invalid From 2aa955fe53af37e6993a299a7bc1018e6d60b37f Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Sat, 1 Sep 2018 17:44:34 +0200 Subject: [PATCH 03/14] Converts project to swift 4 --- circle.yml => .circleci/config.yml | 0 Example/Podfile.lock | 6 +- .../Local Podspecs/SwiftLuhn.podspec.json | 19 +- Example/Pods/Manifest.lock | 6 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 534 +++++++++--------- .../xcshareddata/xcschemes/SwiftLuhn.xcscheme | 4 +- .../Pods-SwiftLuhn_Example-frameworks.sh | 86 ++- .../Pods-SwiftLuhn_Example-resources.sh | 46 +- .../Pods-SwiftLuhn_Example-umbrella.h | 8 + .../Pods-SwiftLuhn_Example.debug.xcconfig | 10 +- .../Pods-SwiftLuhn_Example.release.xcconfig | 10 +- .../Pods-SwiftLuhn_Tests-frameworks.sh | 82 ++- .../Pods-SwiftLuhn_Tests-resources.sh | 46 +- .../Pods-SwiftLuhn_Tests-umbrella.h | 8 + .../Pods-SwiftLuhn_Tests.debug.xcconfig | 10 +- .../Pods-SwiftLuhn_Tests.release.xcconfig | 10 +- .../Target Support Files/SwiftLuhn/Info.plist | 2 +- .../SwiftLuhn/SwiftLuhn-prefix.pch | 8 + .../SwiftLuhn/SwiftLuhn-umbrella.h | 8 + .../SwiftLuhn/SwiftLuhn.xcconfig | 8 +- Example/SwiftLuhn.xcodeproj/project.pbxproj | 79 +-- .../xcschemes/SwiftLuhn-Example.xcscheme | 2 +- .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../AppIcon.appiconset/Contents.json | 17 +- 24 files changed, 615 insertions(+), 402 deletions(-) rename circle.yml => .circleci/config.yml (100%) create mode 100644 Example/SwiftLuhn.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/circle.yml b/.circleci/config.yml similarity index 100% rename from circle.yml rename to .circleci/config.yml diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 9542208..a8e02fe 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - SwiftLuhn (0.1.0) + - SwiftLuhn (0.2.2) DEPENDENCIES: - SwiftLuhn (from `../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - SwiftLuhn: d3d68f95622f904b53d72839b701247ad15c15b5 + SwiftLuhn: fb60bc88c0aaf67a988c7c608446e4cb7ca1d75f PODFILE CHECKSUM: 9e1dbb60127e514c2f28a3f720501ce3568de03f -COCOAPODS: 1.1.1 +COCOAPODS: 1.5.3 diff --git a/Example/Pods/Local Podspecs/SwiftLuhn.podspec.json b/Example/Pods/Local Podspecs/SwiftLuhn.podspec.json index c4512b0..3eb8377 100644 --- a/Example/Pods/Local Podspecs/SwiftLuhn.podspec.json +++ b/Example/Pods/Local Podspecs/SwiftLuhn.podspec.json @@ -1,22 +1,21 @@ { "name": "SwiftLuhn", - "version": "0.1.0", - "summary": "A short description of SwiftLuhn.", - "description": "TODO: Add long description of the pod here.", - "homepage": "https://github.com//SwiftLuhn", - "license": { - "type": "MIT", - "file": "LICENSE" - }, + "version": "0.2.2", + "summary": "SwiftLuhn is a port of the Luhn algorithm, used for validating debit/credit card details.", + "description": "This is a port of the Luhn Algorithm, generally used for validating debit/credit card details, to Swift.\n\nObjective-C port can be found at [https://github.com/MaxKramer/ObjectiveLuhn](https://github.com/MaxKramer/ObjectiveLuhn).", + "homepage": "https://github.com/MaxKramer/SwiftLuhn", + "license": "MIT", "authors": { "Max Kramer": "max@maxkramer.co" }, "source": { - "git": "https://github.com//SwiftLuhn.git", - "tag": "0.1.0" + "git": "https://github.com/maxkramer/SwiftLuhn.git", + "tag": "0.2.2" }, + "social_media_url": "https://twitter.com/maxkramer", "platforms": { "ios": "8.0" }, + "requires_arc": true, "source_files": "SwiftLuhn/Classes/**/*" } diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 9542208..a8e02fe 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - SwiftLuhn (0.1.0) + - SwiftLuhn (0.2.2) DEPENDENCIES: - SwiftLuhn (from `../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - SwiftLuhn: d3d68f95622f904b53d72839b701247ad15c15b5 + SwiftLuhn: fb60bc88c0aaf67a988c7c608446e4cb7ca1d75f PODFILE CHECKSUM: 9e1dbb60127e514c2f28a3f720501ce3568de03f -COCOAPODS: 1.1.1 +COCOAPODS: 1.5.3 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 8f6cbad..7e691b4 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,17 +7,17 @@ objects = { /* Begin PBXBuildFile section */ - 3F29A7F8F78CEA1E16DADA7D5B3CA5A7 /* Pods-SwiftLuhn_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2506B9F0F21714A4ABBD68F3466867AA /* Pods-SwiftLuhn_Example-dummy.m */; }; - 41126D8E0F639490667AD23B29CBF8A6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; - 501D07741E1446AE000E09A5 /* String+SwiftLuhn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 501D07721E1446AE000E09A5 /* String+SwiftLuhn.swift */; }; - 501D07751E1446AE000E09A5 /* SwiftLuhn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 501D07731E1446AE000E09A5 /* SwiftLuhn.swift */; }; - 6F10EFF427816EC0FD6300A415E74E7A /* Pods-SwiftLuhn_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F1D4F0A702CEE2ADFE0F37BD71D7598 /* Pods-SwiftLuhn_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 71BD138D2D5ED96BBA9412A2CECF093D /* SwiftLuhn-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 97FC7C7281FA9B89045E377C0ECF7B92 /* SwiftLuhn-dummy.m */; }; - 748E1C0BF44BD6CDB010A05300D28AB7 /* Pods-SwiftLuhn_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DF6839F20BB0120C19F2BE798E4D714 /* Pods-SwiftLuhn_Tests-dummy.m */; }; - 83947882C5E2DB575182A9DFD209875D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; - A88A22C7ED0C50F430FFABBD5B993A26 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; - B9159BC8FFD2955A03897E16BE37A0B1 /* Pods-SwiftLuhn_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 807F1D3C325859E21BC118C7C1014DB9 /* Pods-SwiftLuhn_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E0B3EB5262C6F8F1AB75842A0793BE59 /* SwiftLuhn-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 24DE9FC772A65345179041F27F5A4559 /* SwiftLuhn-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 22E2873F155F72C3E225163F2C45265B /* SwiftLuhn-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B03162408AB8821109300018C35FF43D /* SwiftLuhn-dummy.m */; }; + 26B538F7FAD1CDA0B44A5F99413762A7 /* Pods-SwiftLuhn_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6AB4E6BA96FBD1F71871478E9E1B5BD7 /* Pods-SwiftLuhn_Tests-dummy.m */; }; + 3F29A7F8F78CEA1E16DADA7D5B3CA5A7 /* Pods-SwiftLuhn_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C1C9B56A27AD5BDFA1DE631EC24F22A /* Pods-SwiftLuhn_Example-dummy.m */; }; + 6F10EFF427816EC0FD6300A415E74E7A /* Pods-SwiftLuhn_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F535B5EA1E9D3B74B75CD1CDDB4BFB0 /* Pods-SwiftLuhn_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7293541665D6DAB456A58BA4953A6DAF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; + 8192BDE3213BB9E4C4CC7779844A069F /* SwiftLuhn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56CCD22648AEB2C6BC9B7D41645F6B3B /* SwiftLuhn.swift */; }; + 9C7AB5B35BC432FFE3DA089073AFE63F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; + CB42F3360177E3FCD5AB22C2F44FBCF6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; + E0B3EB5262C6F8F1AB75842A0793BE59 /* SwiftLuhn-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E05FA245C2878B0901EC8DE6AEDF7A7C /* SwiftLuhn-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E36C475D9CFAAD3BB0B2763B895CB0A0 /* Pods-SwiftLuhn_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B66C4FB20CAD2F6D629FD2D09AF15869 /* Pods-SwiftLuhn_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FA5A9A395A92ACAC18F13C768FFB032C /* String+SwiftLuhn.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8D1A9D837D5095B0241143B073B04E0 /* String+SwiftLuhn.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -28,58 +28,68 @@ remoteGlobalIDString = FD216F00596C45B2B49C1B59E717145C; remoteInfo = SwiftLuhn; }; + 941FBB706B9A134259B3E4CFD589BCF1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 675C6CC36AC897463CF2D78599612217; + remoteInfo = "Pods-SwiftLuhn_Example"; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 0FB68CDA85DD28484F0CBFDB3F0A8DA0 /* Pods-SwiftLuhn_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Example.debug.xcconfig"; sourceTree = ""; }; + 0C141DEC1591E0D0962C82E48D920126 /* Pods-SwiftLuhn_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Tests.debug.xcconfig"; sourceTree = ""; }; 198DE2F513FBA55FA5C23DCECA7F2EBA /* Pods_SwiftLuhn_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftLuhn_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1A6ECFF23B3F75CB4E0A1210F99F15AD /* Pods-SwiftLuhn_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Example-resources.sh"; sourceTree = ""; }; - 1BBBF1F8AB4763DBC89C2053AE4C9703 /* Pods-SwiftLuhn_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Tests.debug.xcconfig"; sourceTree = ""; }; - 24DE9FC772A65345179041F27F5A4559 /* SwiftLuhn-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftLuhn-umbrella.h"; sourceTree = ""; }; - 2506B9F0F21714A4ABBD68F3466867AA /* Pods-SwiftLuhn_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwiftLuhn_Example-dummy.m"; sourceTree = ""; }; + 204CD85D754C6093F47BFC8C97D321C6 /* Pods-SwiftLuhn_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Example-resources.sh"; sourceTree = ""; }; + 26612FDA601602D5B3AA7BC3614A57BA /* SwiftLuhn-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftLuhn-prefix.pch"; sourceTree = ""; }; 29A428A69D0F7195673C6A9147249D12 /* Pods_SwiftLuhn_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftLuhn_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2AF68C35E0C1946A2B9D2D37DEC91523 /* Pods-SwiftLuhn_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-SwiftLuhn_Tests.modulemap"; sourceTree = ""; }; - 3F1D4F0A702CEE2ADFE0F37BD71D7598 /* Pods-SwiftLuhn_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftLuhn_Example-umbrella.h"; sourceTree = ""; }; - 501D07721E1446AE000E09A5 /* String+SwiftLuhn.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+SwiftLuhn.swift"; sourceTree = ""; }; - 501D07731E1446AE000E09A5 /* SwiftLuhn.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftLuhn.swift; sourceTree = ""; }; - 53E6DF9DCBA3AFA9D6F9F4D785981195 /* Pods-SwiftLuhn_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Tests-resources.sh"; sourceTree = ""; }; - 6DF6839F20BB0120C19F2BE798E4D714 /* Pods-SwiftLuhn_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwiftLuhn_Tests-dummy.m"; sourceTree = ""; }; - 7BA68546CA98E437FEE8875A30498195 /* SwiftLuhn-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftLuhn-prefix.pch"; sourceTree = ""; }; - 807F1D3C325859E21BC118C7C1014DB9 /* Pods-SwiftLuhn_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftLuhn_Tests-umbrella.h"; sourceTree = ""; }; + 4128DC70CEE877C2C39986682964D300 /* Pods-SwiftLuhn_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftLuhn_Tests-acknowledgements.plist"; sourceTree = ""; }; + 42AA43B00F663E4D705F307491788668 /* Pods-SwiftLuhn_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwiftLuhn_Example.modulemap"; sourceTree = ""; }; + 463BFD3A207FE3D1582BB8B374D2C796 /* Pods-SwiftLuhn_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftLuhn_Tests-acknowledgements.markdown"; sourceTree = ""; }; + 4F535B5EA1E9D3B74B75CD1CDDB4BFB0 /* Pods-SwiftLuhn_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftLuhn_Example-umbrella.h"; sourceTree = ""; }; + 559C9FC633499ABA1FEE12A5BEAA0C51 /* SwiftLuhn.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SwiftLuhn.modulemap; sourceTree = ""; }; + 56CCD22648AEB2C6BC9B7D41645F6B3B /* SwiftLuhn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftLuhn.swift; path = SwiftLuhn/Classes/SwiftLuhn.swift; 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; }; + 5C1C9B56A27AD5BDFA1DE631EC24F22A /* Pods-SwiftLuhn_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwiftLuhn_Example-dummy.m"; sourceTree = ""; }; + 6097B071594CE185D1F4819DFC405770 /* Pods-SwiftLuhn_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftLuhn_Example-acknowledgements.plist"; sourceTree = ""; }; + 6AB4E6BA96FBD1F71871478E9E1B5BD7 /* Pods-SwiftLuhn_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwiftLuhn_Tests-dummy.m"; sourceTree = ""; }; + 7E628199A0333A7D82C66DB2C418562C /* Pods-SwiftLuhn_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Example.debug.xcconfig"; sourceTree = ""; }; + 830A303EAF03D8D5DE5BEAE152380090 /* Pods-SwiftLuhn_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Example-frameworks.sh"; sourceTree = ""; }; + 8BD4CE381879A6580776F04D9FDF2382 /* Pods-SwiftLuhn_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Tests-resources.sh"; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 97FC7C7281FA9B89045E377C0ECF7B92 /* SwiftLuhn-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftLuhn-dummy.m"; sourceTree = ""; }; - 9B343E0909D0FA6AB2A6F1CA5697C9EB /* Pods-SwiftLuhn_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftLuhn_Example-acknowledgements.markdown"; sourceTree = ""; }; - 9B7496579FF22E4189ED35B237A6B141 /* Pods-SwiftLuhn_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftLuhn_Example-acknowledgements.plist"; sourceTree = ""; }; - A7ADB97BEC35A889C286F4F43709F9A5 /* Pods-SwiftLuhn_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Tests-frameworks.sh"; sourceTree = ""; }; - C97794C0DDC37ADE7D6F96D879AAA985 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - CB94B9DD342A69D8691AD4206CFE0E81 /* Pods-SwiftLuhn_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftLuhn_Tests-acknowledgements.markdown"; sourceTree = ""; }; - CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - CF171C527475C152B654EE91A03D200B /* Pods-SwiftLuhn_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Example-frameworks.sh"; sourceTree = ""; }; + AA96A365515C1590A153121259E130D7 /* Pods-SwiftLuhn_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Example.release.xcconfig"; sourceTree = ""; }; + AA97903A1CA4320966B789B443CB842C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AB82082A144AAE54D60BC6AA53075706 /* SwiftLuhn.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLuhn.xcconfig; sourceTree = ""; }; + B03162408AB8821109300018C35FF43D /* SwiftLuhn-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftLuhn-dummy.m"; sourceTree = ""; }; + B0F8D4F2CE89DA3BCCB44E2F05C97B87 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + B5513591820750C416B674EB68212FA2 /* Pods-SwiftLuhn_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Tests-frameworks.sh"; sourceTree = ""; }; + B62707046109C81867034985742DAAA0 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + B66C4FB20CAD2F6D629FD2D09AF15869 /* Pods-SwiftLuhn_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftLuhn_Tests-umbrella.h"; sourceTree = ""; }; + B6EB4086CCE0F15D12E79D29E3334FB2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B8D1A9D837D5095B0241143B073B04E0 /* String+SwiftLuhn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+SwiftLuhn.swift"; path = "SwiftLuhn/Classes/String+SwiftLuhn.swift"; sourceTree = ""; }; + C549D11540023C192B5F5C264CDB7E12 /* Pods-SwiftLuhn_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwiftLuhn_Tests.modulemap"; sourceTree = ""; }; + CD3923616C90E58403C08FEA2F9AD881 /* Pods-SwiftLuhn_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftLuhn_Example-acknowledgements.markdown"; sourceTree = ""; }; D65B25B26C32EEAEEA6F1E578AC53F28 /* SwiftLuhn.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftLuhn.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - DBE4A46FCC9DD32B5D0DC3717253C0C7 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - ECF51FB943B934AC4EE0FBFCA862CE0D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - EF71A0983195EA37B6D3080EB69D8BC6 /* Pods-SwiftLuhn_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftLuhn_Tests-acknowledgements.plist"; sourceTree = ""; }; - F567808121B6D6B68115C995640A7005 /* SwiftLuhn.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SwiftLuhn.modulemap; sourceTree = ""; }; - FD219073A1257D814FAD755557C758BA /* Pods-SwiftLuhn_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Example.release.xcconfig"; sourceTree = ""; }; - FE514B1502AAE5A34C80278E4C003524 /* Pods-SwiftLuhn_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Tests.release.xcconfig"; sourceTree = ""; }; - FF3F04E9A19ED8C28FE448F2C4DB41C8 /* SwiftLuhn.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLuhn.xcconfig; sourceTree = ""; }; - FF7A2E5678F966E8A85FB0F1F1C65C70 /* Pods-SwiftLuhn_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-SwiftLuhn_Example.modulemap"; sourceTree = ""; }; + DE25910B1B3310003223AAA5B9476979 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E05FA245C2878B0901EC8DE6AEDF7A7C /* SwiftLuhn-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftLuhn-umbrella.h"; sourceTree = ""; }; + FB0A7A5CA98B9623E7C900EEE68FC1D1 /* SwiftLuhn.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; path = SwiftLuhn.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + FD1F678AA4B3015CF8C56068DD564BB4 /* Pods-SwiftLuhn_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Tests.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 3184825D401DED7116CCDAC68204FD68 /* Frameworks */ = { + 82E2E3FAEB83C9C08A2A6CF80CC40D9B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A88A22C7ED0C50F430FFABBD5B993A26 /* Foundation.framework in Frameworks */, + 7293541665D6DAB456A58BA4953A6DAF /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 82E2E3FAEB83C9C08A2A6CF80CC40D9B /* Frameworks */ = { + 9BE23832F29208DD460EAD2D7843A36D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 41126D8E0F639490667AD23B29CBF8A6 /* Foundation.framework in Frameworks */, + 9C7AB5B35BC432FFE3DA089073AFE63F /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -87,160 +97,155 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 83947882C5E2DB575182A9DFD209875D /* Foundation.framework in Frameworks */, + CB42F3360177E3FCD5AB22C2F44FBCF6 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1584E2058C8E53B4231178F6679AC033 /* SwiftLuhn */ = { + 30C0B05E890BFDE65848FC4C9F7C9646 /* Products */ = { isa = PBXGroup; children = ( - 373EFB81A279FFC6BA6F0EE2D699C47A /* Support Files */, - A2272CB9F901596D89427421A7D72772 /* SwiftLuhn */, + 29A428A69D0F7195673C6A9147249D12 /* Pods_SwiftLuhn_Example.framework */, + 198DE2F513FBA55FA5C23DCECA7F2EBA /* Pods_SwiftLuhn_Tests.framework */, + D65B25B26C32EEAEEA6F1E578AC53F28 /* SwiftLuhn.framework */, ); - name = SwiftLuhn; - path = ../..; + name = Products; sourceTree = ""; }; - 1FF4C845DB3D18A821ACA225C8E6591C /* Pods-SwiftLuhn_Tests */ = { + 51E5488EABCFFF226E6CDC1182D96F49 /* Pods-SwiftLuhn_Tests */ = { isa = PBXGroup; children = ( - DBE4A46FCC9DD32B5D0DC3717253C0C7 /* Info.plist */, - 2AF68C35E0C1946A2B9D2D37DEC91523 /* Pods-SwiftLuhn_Tests.modulemap */, - CB94B9DD342A69D8691AD4206CFE0E81 /* Pods-SwiftLuhn_Tests-acknowledgements.markdown */, - EF71A0983195EA37B6D3080EB69D8BC6 /* Pods-SwiftLuhn_Tests-acknowledgements.plist */, - 6DF6839F20BB0120C19F2BE798E4D714 /* Pods-SwiftLuhn_Tests-dummy.m */, - A7ADB97BEC35A889C286F4F43709F9A5 /* Pods-SwiftLuhn_Tests-frameworks.sh */, - 53E6DF9DCBA3AFA9D6F9F4D785981195 /* Pods-SwiftLuhn_Tests-resources.sh */, - 807F1D3C325859E21BC118C7C1014DB9 /* Pods-SwiftLuhn_Tests-umbrella.h */, - 1BBBF1F8AB4763DBC89C2053AE4C9703 /* Pods-SwiftLuhn_Tests.debug.xcconfig */, - FE514B1502AAE5A34C80278E4C003524 /* Pods-SwiftLuhn_Tests.release.xcconfig */, + DE25910B1B3310003223AAA5B9476979 /* Info.plist */, + C549D11540023C192B5F5C264CDB7E12 /* Pods-SwiftLuhn_Tests.modulemap */, + 463BFD3A207FE3D1582BB8B374D2C796 /* Pods-SwiftLuhn_Tests-acknowledgements.markdown */, + 4128DC70CEE877C2C39986682964D300 /* Pods-SwiftLuhn_Tests-acknowledgements.plist */, + 6AB4E6BA96FBD1F71871478E9E1B5BD7 /* Pods-SwiftLuhn_Tests-dummy.m */, + B5513591820750C416B674EB68212FA2 /* Pods-SwiftLuhn_Tests-frameworks.sh */, + 8BD4CE381879A6580776F04D9FDF2382 /* Pods-SwiftLuhn_Tests-resources.sh */, + B66C4FB20CAD2F6D629FD2D09AF15869 /* Pods-SwiftLuhn_Tests-umbrella.h */, + 0C141DEC1591E0D0962C82E48D920126 /* Pods-SwiftLuhn_Tests.debug.xcconfig */, + FD1F678AA4B3015CF8C56068DD564BB4 /* Pods-SwiftLuhn_Tests.release.xcconfig */, ); name = "Pods-SwiftLuhn_Tests"; path = "Target Support Files/Pods-SwiftLuhn_Tests"; sourceTree = ""; }; - 204EA8E1747EEED5BB836104AC76D529 /* Development Pods */ = { - isa = PBXGroup; - children = ( - 1584E2058C8E53B4231178F6679AC033 /* SwiftLuhn */, - ); - name = "Development Pods"; - sourceTree = ""; - }; - 30C0B05E890BFDE65848FC4C9F7C9646 /* Products */ = { + 551D1FE90400AA5D661ED092A4281D92 /* Pod */ = { isa = PBXGroup; children = ( - 29A428A69D0F7195673C6A9147249D12 /* Pods_SwiftLuhn_Example.framework */, - 198DE2F513FBA55FA5C23DCECA7F2EBA /* Pods_SwiftLuhn_Tests.framework */, - D65B25B26C32EEAEEA6F1E578AC53F28 /* SwiftLuhn.framework */, + B0F8D4F2CE89DA3BCCB44E2F05C97B87 /* LICENSE */, + B62707046109C81867034985742DAAA0 /* README.md */, + FB0A7A5CA98B9623E7C900EEE68FC1D1 /* SwiftLuhn.podspec */, ); - name = Products; + name = Pod; sourceTree = ""; }; - 373EFB81A279FFC6BA6F0EE2D699C47A /* Support Files */ = { + 5E0D919E635D23B70123790B8308F8EF /* iOS */ = { isa = PBXGroup; children = ( - C97794C0DDC37ADE7D6F96D879AAA985 /* Info.plist */, - F567808121B6D6B68115C995640A7005 /* SwiftLuhn.modulemap */, - FF3F04E9A19ED8C28FE448F2C4DB41C8 /* SwiftLuhn.xcconfig */, - 97FC7C7281FA9B89045E377C0ECF7B92 /* SwiftLuhn-dummy.m */, - 7BA68546CA98E437FEE8875A30498195 /* SwiftLuhn-prefix.pch */, - 24DE9FC772A65345179041F27F5A4559 /* SwiftLuhn-umbrella.h */, + 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */, ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/SwiftLuhn"; + name = iOS; sourceTree = ""; }; - 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { + 6B2D5A5A8F6997890D9E36E282067E28 /* Pods-SwiftLuhn_Example */ = { isa = PBXGroup; children = ( - CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, + AA97903A1CA4320966B789B443CB842C /* Info.plist */, + 42AA43B00F663E4D705F307491788668 /* Pods-SwiftLuhn_Example.modulemap */, + CD3923616C90E58403C08FEA2F9AD881 /* Pods-SwiftLuhn_Example-acknowledgements.markdown */, + 6097B071594CE185D1F4819DFC405770 /* Pods-SwiftLuhn_Example-acknowledgements.plist */, + 5C1C9B56A27AD5BDFA1DE631EC24F22A /* Pods-SwiftLuhn_Example-dummy.m */, + 830A303EAF03D8D5DE5BEAE152380090 /* Pods-SwiftLuhn_Example-frameworks.sh */, + 204CD85D754C6093F47BFC8C97D321C6 /* Pods-SwiftLuhn_Example-resources.sh */, + 4F535B5EA1E9D3B74B75CD1CDDB4BFB0 /* Pods-SwiftLuhn_Example-umbrella.h */, + 7E628199A0333A7D82C66DB2C418562C /* Pods-SwiftLuhn_Example.debug.xcconfig */, + AA96A365515C1590A153121259E130D7 /* Pods-SwiftLuhn_Example.release.xcconfig */, ); - name = iOS; + name = "Pods-SwiftLuhn_Example"; + path = "Target Support Files/Pods-SwiftLuhn_Example"; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 204EA8E1747EEED5BB836104AC76D529 /* Development Pods */, + F4785627AF54F8A36A778BCBB0F03575 /* Development Pods */, BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 30C0B05E890BFDE65848FC4C9F7C9646 /* Products */, 9E2CA16678D43AE17B4C23C85564D53E /* Targets Support Files */, ); sourceTree = ""; }; - 99F816772A927E1EE0833322E258D2CB /* Pods-SwiftLuhn_Example */ = { + 9E2CA16678D43AE17B4C23C85564D53E /* Targets Support Files */ = { isa = PBXGroup; children = ( - ECF51FB943B934AC4EE0FBFCA862CE0D /* Info.plist */, - FF7A2E5678F966E8A85FB0F1F1C65C70 /* Pods-SwiftLuhn_Example.modulemap */, - 9B343E0909D0FA6AB2A6F1CA5697C9EB /* Pods-SwiftLuhn_Example-acknowledgements.markdown */, - 9B7496579FF22E4189ED35B237A6B141 /* Pods-SwiftLuhn_Example-acknowledgements.plist */, - 2506B9F0F21714A4ABBD68F3466867AA /* Pods-SwiftLuhn_Example-dummy.m */, - CF171C527475C152B654EE91A03D200B /* Pods-SwiftLuhn_Example-frameworks.sh */, - 1A6ECFF23B3F75CB4E0A1210F99F15AD /* Pods-SwiftLuhn_Example-resources.sh */, - 3F1D4F0A702CEE2ADFE0F37BD71D7598 /* Pods-SwiftLuhn_Example-umbrella.h */, - 0FB68CDA85DD28484F0CBFDB3F0A8DA0 /* Pods-SwiftLuhn_Example.debug.xcconfig */, - FD219073A1257D814FAD755557C758BA /* Pods-SwiftLuhn_Example.release.xcconfig */, + 6B2D5A5A8F6997890D9E36E282067E28 /* Pods-SwiftLuhn_Example */, + 51E5488EABCFFF226E6CDC1182D96F49 /* Pods-SwiftLuhn_Tests */, ); - name = "Pods-SwiftLuhn_Example"; - path = "Target Support Files/Pods-SwiftLuhn_Example"; + name = "Targets Support Files"; sourceTree = ""; }; - 9E2CA16678D43AE17B4C23C85564D53E /* Targets Support Files */ = { + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { isa = PBXGroup; children = ( - 99F816772A927E1EE0833322E258D2CB /* Pods-SwiftLuhn_Example */, - 1FF4C845DB3D18A821ACA225C8E6591C /* Pods-SwiftLuhn_Tests */, + 5E0D919E635D23B70123790B8308F8EF /* iOS */, ); - name = "Targets Support Files"; + name = Frameworks; sourceTree = ""; }; - A2272CB9F901596D89427421A7D72772 /* SwiftLuhn */ = { + C1C52981D0B0D2940596DEC3818D1B91 /* Support Files */ = { isa = PBXGroup; children = ( - F025C458A8D67E14AEC054F80DF1FB86 /* Classes */, + B6EB4086CCE0F15D12E79D29E3334FB2 /* Info.plist */, + 559C9FC633499ABA1FEE12A5BEAA0C51 /* SwiftLuhn.modulemap */, + AB82082A144AAE54D60BC6AA53075706 /* SwiftLuhn.xcconfig */, + B03162408AB8821109300018C35FF43D /* SwiftLuhn-dummy.m */, + 26612FDA601602D5B3AA7BC3614A57BA /* SwiftLuhn-prefix.pch */, + E05FA245C2878B0901EC8DE6AEDF7A7C /* SwiftLuhn-umbrella.h */, ); - path = SwiftLuhn; + name = "Support Files"; + path = "Example/Pods/Target Support Files/SwiftLuhn"; sourceTree = ""; }; - BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { + F14627541F6D19677D9FEC203A0D3849 /* SwiftLuhn */ = { isa = PBXGroup; children = ( - 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, + B8D1A9D837D5095B0241143B073B04E0 /* String+SwiftLuhn.swift */, + 56CCD22648AEB2C6BC9B7D41645F6B3B /* SwiftLuhn.swift */, + 551D1FE90400AA5D661ED092A4281D92 /* Pod */, + C1C52981D0B0D2940596DEC3818D1B91 /* Support Files */, ); - name = Frameworks; + name = SwiftLuhn; + path = ../..; sourceTree = ""; }; - F025C458A8D67E14AEC054F80DF1FB86 /* Classes */ = { + F4785627AF54F8A36A778BCBB0F03575 /* Development Pods */ = { isa = PBXGroup; children = ( - 501D07721E1446AE000E09A5 /* String+SwiftLuhn.swift */, - 501D07731E1446AE000E09A5 /* SwiftLuhn.swift */, + F14627541F6D19677D9FEC203A0D3849 /* SwiftLuhn */, ); - path = Classes; + name = "Development Pods"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 92A501908A4340A23C2F694B1389C6AF /* Headers */ = { + BDDB063EE6422164E4DDE73B53B7B530 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - B9159BC8FFD2955A03897E16BE37A0B1 /* Pods-SwiftLuhn_Tests-umbrella.h in Headers */, + E0B3EB5262C6F8F1AB75842A0793BE59 /* SwiftLuhn-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - BDDB063EE6422164E4DDE73B53B7B530 /* Headers */ = { + C05450B2F5638647510E134634D7CCCA /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - E0B3EB5262C6F8F1AB75842A0793BE59 /* SwiftLuhn-umbrella.h in Headers */, + E36C475D9CFAAD3BB0B2763B895CB0A0 /* Pods-SwiftLuhn_Tests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -273,17 +278,18 @@ productReference = 29A428A69D0F7195673C6A9147249D12 /* Pods_SwiftLuhn_Example.framework */; productType = "com.apple.product-type.framework"; }; - C75ABBDA10D66114D85F391CE88E9B5B /* Pods-SwiftLuhn_Tests */ = { + 9994EBD246A7D35863682997C6151013 /* Pods-SwiftLuhn_Tests */ = { isa = PBXNativeTarget; - buildConfigurationList = 049755D7AB09667E1BCCB01C443997B8 /* Build configuration list for PBXNativeTarget "Pods-SwiftLuhn_Tests" */; + buildConfigurationList = B9B086E13683BE8F3819A25555F3873F /* Build configuration list for PBXNativeTarget "Pods-SwiftLuhn_Tests" */; buildPhases = ( - 565776550F35CE711FB43C35541CDCD5 /* Sources */, - 3184825D401DED7116CCDAC68204FD68 /* Frameworks */, - 92A501908A4340A23C2F694B1389C6AF /* Headers */, + 81C789184C1DC12348E9907B61E5A4BB /* Sources */, + 9BE23832F29208DD460EAD2D7843A36D /* Frameworks */, + C05450B2F5638647510E134634D7CCCA /* Headers */, ); buildRules = ( ); dependencies = ( + D1532120B0106FCA3651187B95CDD848 /* PBXTargetDependency */, ); name = "Pods-SwiftLuhn_Tests"; productName = "Pods-SwiftLuhn_Tests"; @@ -294,7 +300,7 @@ isa = PBXNativeTarget; buildConfigurationList = AAC1F6863E4C22C6112EF7BC2903DBFC /* Build configuration list for PBXNativeTarget "SwiftLuhn" */; buildPhases = ( - 183CD941591BF8095FFA81B6092A3EAB /* Sources */, + 276DD12427C2688F1E241C35CEE185DD /* Sources */, C160D65A3855DCCE86373D886FA08628 /* Frameworks */, BDDB063EE6422164E4DDE73B53B7B530 /* Headers */, ); @@ -313,14 +319,11 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0910; + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0940; TargetAttributes = { - 675C6CC36AC897463CF2D78599612217 = { - LastSwiftMigration = 0810; - }; FD216F00596C45B2B49C1B59E717145C = { - LastSwiftMigration = 0910; + LastSwiftMigration = 0940; }; }; }; @@ -337,28 +340,28 @@ projectRoot = ""; targets = ( 675C6CC36AC897463CF2D78599612217 /* Pods-SwiftLuhn_Example */, - C75ABBDA10D66114D85F391CE88E9B5B /* Pods-SwiftLuhn_Tests */, + 9994EBD246A7D35863682997C6151013 /* Pods-SwiftLuhn_Tests */, FD216F00596C45B2B49C1B59E717145C /* SwiftLuhn */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - 183CD941591BF8095FFA81B6092A3EAB /* Sources */ = { + 276DD12427C2688F1E241C35CEE185DD /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 71BD138D2D5ED96BBA9412A2CECF093D /* SwiftLuhn-dummy.m in Sources */, - 501D07741E1446AE000E09A5 /* String+SwiftLuhn.swift in Sources */, - 501D07751E1446AE000E09A5 /* SwiftLuhn.swift in Sources */, + FA5A9A395A92ACAC18F13C768FFB032C /* String+SwiftLuhn.swift in Sources */, + 22E2873F155F72C3E225163F2C45265B /* SwiftLuhn-dummy.m in Sources */, + 8192BDE3213BB9E4C4CC7779844A069F /* SwiftLuhn.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 565776550F35CE711FB43C35541CDCD5 /* Sources */ = { + 81C789184C1DC12348E9907B61E5A4BB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 748E1C0BF44BD6CDB010A05300D28AB7 /* Pods-SwiftLuhn_Tests-dummy.m in Sources */, + 26B538F7FAD1CDA0B44A5F99413762A7 /* Pods-SwiftLuhn_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -379,323 +382,336 @@ target = FD216F00596C45B2B49C1B59E717145C /* SwiftLuhn */; targetProxy = 16BBDB0CA905F203B47B9A080C585EE1 /* PBXContainerItemProxy */; }; + D1532120B0106FCA3651187B95CDD848 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Pods-SwiftLuhn_Example"; + target = 675C6CC36AC897463CF2D78599612217 /* Pods-SwiftLuhn_Example */; + targetProxy = 941FBB706B9A134259B3E4CFD589BCF1 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 1CBF34C403F1E2725F912B3ECD5E4F8B /* Debug */ = { + 749A3DA13FAAB86966885BC47FD3F100 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0FB68CDA85DD28484F0CBFDB3F0A8DA0 /* Pods-SwiftLuhn_Example.debug.xcconfig */; + baseConfigurationReference = 0C141DEC1591E0D0962C82E48D920126 /* Pods-SwiftLuhn_Tests.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + 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; 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-SwiftLuhn_Example/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-SwiftLuhn_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MODULEMAP_FILE = "Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_SwiftLuhn_Example; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 4AFD40D91B000D2153F7A7DCB9F34634 /* Debug */ = { + 82AA6015BFD2E4BE82664612D02F8B75 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1BBBF1F8AB4763DBC89C2053AE4C9703 /* Pods-SwiftLuhn_Tests.debug.xcconfig */; + baseConfigurationReference = FD1F678AA4B3015CF8C56068DD564BB4 /* Pods-SwiftLuhn_Tests.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; 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-SwiftLuhn_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_SwiftLuhn_Tests; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; - }; - 63620919A37C10577EB82E18CF9EAC1C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FF3F04E9A19ED8C28FE448F2C4DB41C8 /* SwiftLuhn.xcconfig */; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - "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/SwiftLuhn/SwiftLuhn-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftLuhn/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/SwiftLuhn/SwiftLuhn.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = SwiftLuhn; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; + name = Release; }; - 7993E9D6777F06B2D113AF7F465F5C6B /* Release */ = { + B9671808EC31CB0E79AEBDACC79A6D97 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FE514B1502AAE5A34C80278E4C003524 /* Pods-SwiftLuhn_Tests.release.xcconfig */; + baseConfigurationReference = 7E628199A0333A7D82C66DB2C418562C /* Pods-SwiftLuhn_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; - INFOPLIST_FILE = "Target Support Files/Pods-SwiftLuhn_Tests/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-SwiftLuhn_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MODULEMAP_FILE = "Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_SwiftLuhn_Tests; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 8DED8AD26D381A6ACFF202E5217EC498 /* Release */ = { + C7BE62186E17127FF3B5B27A193214BD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = 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; - ENABLE_NS_ASSERTIONS = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - 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 = 8.3; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; }; - name = Release; + name = Debug; }; - 9E1E4E48AF2EAB23169E611BF694090A /* Debug */ = { + D077E5AF30E3A09910AC48CA760A1280 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = 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 = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", + "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; 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 = 8.3; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_COMPILATION_MODE = wholemodule; SYMROOT = "${SRCROOT}/../build"; }; + name = Release; + }; + D9BBFCB6FB01E17205FD23247F2F15D3 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AB82082A144AAE54D60BC6AA53075706 /* SwiftLuhn.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/SwiftLuhn/SwiftLuhn-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftLuhn/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SwiftLuhn/SwiftLuhn.modulemap"; + PRODUCT_MODULE_NAME = SwiftLuhn; + PRODUCT_NAME = SwiftLuhn; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; name = Debug; }; - AFE9F6ECFDA2DD7DC09B4CFBEC080635 /* Release */ = { + E296458D17185B37EAE3F240B3E2880C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FD219073A1257D814FAD755557C758BA /* Pods-SwiftLuhn_Example.release.xcconfig */; + baseConfigurationReference = AA96A365515C1590A153121259E130D7 /* Pods-SwiftLuhn_Example.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + 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-SwiftLuhn_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_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_SwiftLuhn_Example; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - D0B6AF93AC1AB3D6460E664461FE9B55 /* Release */ = { + E4CF1ABABF6A8EEA683BF9BCE637BCF7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FF3F04E9A19ED8C28FE448F2C4DB41C8 /* SwiftLuhn.xcconfig */; + baseConfigurationReference = AB82082A144AAE54D60BC6AA53075706 /* SwiftLuhn.xcconfig */; buildSettings = { - CLANG_ENABLE_MODULES = YES; + 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/SwiftLuhn/SwiftLuhn-prefix.pch"; INFOPLIST_FILE = "Target Support Files/SwiftLuhn/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/SwiftLuhn/SwiftLuhn.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_MODULE_NAME = SwiftLuhn; PRODUCT_NAME = SwiftLuhn; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = On; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -704,38 +720,38 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 049755D7AB09667E1BCCB01C443997B8 /* Build configuration list for PBXNativeTarget "Pods-SwiftLuhn_Tests" */ = { + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4AFD40D91B000D2153F7A7DCB9F34634 /* Debug */, - 7993E9D6777F06B2D113AF7F465F5C6B /* Release */, + C7BE62186E17127FF3B5B27A193214BD /* Debug */, + D077E5AF30E3A09910AC48CA760A1280 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 853C23891713E10EF79A8C5078C9DEC7 /* Build configuration list for PBXNativeTarget "Pods-SwiftLuhn_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 9E1E4E48AF2EAB23169E611BF694090A /* Debug */, - 8DED8AD26D381A6ACFF202E5217EC498 /* Release */, + B9671808EC31CB0E79AEBDACC79A6D97 /* Debug */, + E296458D17185B37EAE3F240B3E2880C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 853C23891713E10EF79A8C5078C9DEC7 /* Build configuration list for PBXNativeTarget "Pods-SwiftLuhn_Example" */ = { + AAC1F6863E4C22C6112EF7BC2903DBFC /* Build configuration list for PBXNativeTarget "SwiftLuhn" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1CBF34C403F1E2725F912B3ECD5E4F8B /* Debug */, - AFE9F6ECFDA2DD7DC09B4CFBEC080635 /* Release */, + D9BBFCB6FB01E17205FD23247F2F15D3 /* Debug */, + E4CF1ABABF6A8EEA683BF9BCE637BCF7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - AAC1F6863E4C22C6112EF7BC2903DBFC /* Build configuration list for PBXNativeTarget "SwiftLuhn" */ = { + B9B086E13683BE8F3819A25555F3873F /* Build configuration list for PBXNativeTarget "Pods-SwiftLuhn_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 63620919A37C10577EB82E18CF9EAC1C /* Debug */, - D0B6AF93AC1AB3D6460E664461FE9B55 /* Release */, + 749A3DA13FAAB86966885BC47FD3F100 /* Debug */, + 82AA6015BFD2E4BE82664612D02F8B75 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/SwiftLuhn.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/SwiftLuhn.xcscheme index 2179427..ceb80bd 100644 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/SwiftLuhn.xcscheme +++ b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/SwiftLuhn.xcscheme @@ -1,6 +1,6 @@ @@ -37,7 +36,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example-frameworks.sh index 6abe9f9..ce49657 100755 --- a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_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,9 +40,9 @@ 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")" @@ -54,24 +71,65 @@ 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 + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + 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 &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" fi } # 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" @@ -80,12 +138,16 @@ 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/SwiftLuhn/SwiftLuhn.framework" + install_framework "${BUILT_PRODUCTS_DIR}/SwiftLuhn/SwiftLuhn.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/SwiftLuhn/SwiftLuhn.framework" + install_framework "${BUILT_PRODUCTS_DIR}/SwiftLuhn/SwiftLuhn.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait fi diff --git a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example-resources.sh b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example-resources.sh index 25e9d37..345301f 100755 --- a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example-resources.sh +++ b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_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" ;; @@ -18,6 +30,12 @@ case "${TARGETED_DEVICE_FAMILY}" in 2) TARGET_DEVICE_ARGS="--target-device ipad" ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; @@ -38,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) @@ -68,7 +86,7 @@ EOM XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) - echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac @@ -82,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) @@ -92,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-SwiftLuhn_Example/Pods-SwiftLuhn_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example-umbrella.h index 5565f1f..123af9b 100644 --- a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example-umbrella.h +++ b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example.debug.xcconfig index 4a4a5de..245bbdc 100644 --- a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example.debug.xcconfig @@ -1,11 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftLuhn" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftLuhn" 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/SwiftLuhn/SwiftLuhn.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SwiftLuhn/SwiftLuhn.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "SwiftLuhn" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +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-SwiftLuhn_Example/Pods-SwiftLuhn_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example.release.xcconfig index 4a4a5de..245bbdc 100644 --- a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example.release.xcconfig @@ -1,11 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftLuhn" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftLuhn" 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/SwiftLuhn/SwiftLuhn.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SwiftLuhn/SwiftLuhn.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "SwiftLuhn" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +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-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-frameworks.sh index 893c16a..08e3eaa 100755 --- a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-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,9 +40,9 @@ 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")" @@ -54,24 +71,65 @@ 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 + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + 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 &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" fi } # 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" @@ -80,5 +138,9 @@ strip_invalid_archs() { if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi + STRIP_BINARY_RETVAL=1 } +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-resources.sh b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-resources.sh index 25e9d37..345301f 100755 --- a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-resources.sh +++ b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-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" ;; @@ -18,6 +30,12 @@ case "${TARGETED_DEVICE_FAMILY}" in 2) TARGET_DEVICE_ARGS="--target-device ipad" ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; @@ -38,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) @@ -68,7 +86,7 @@ EOM XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) - echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac @@ -82,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) @@ -92,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-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-umbrella.h b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-umbrella.h index e287c44..1b5ef23 100644 --- a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-umbrella.h +++ b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests.debug.xcconfig index 81e93c4..51657f7 100644 --- a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests.debug.xcconfig @@ -1,8 +1,8 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftLuhn" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftLuhn" 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/SwiftLuhn/SwiftLuhn.framework/Headers" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SwiftLuhn/SwiftLuhn.framework/Headers" +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-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests.release.xcconfig index 81e93c4..51657f7 100644 --- a/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests.release.xcconfig @@ -1,8 +1,8 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftLuhn" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftLuhn" 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/SwiftLuhn/SwiftLuhn.framework/Headers" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/SwiftLuhn/SwiftLuhn.framework/Headers" +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/SwiftLuhn/Info.plist b/Example/Pods/Target Support Files/SwiftLuhn/Info.plist index 161a9d3..3f68a24 100644 --- a/Example/Pods/Target Support Files/SwiftLuhn/Info.plist +++ b/Example/Pods/Target Support Files/SwiftLuhn/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.1.0 + 0.2.2 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/SwiftLuhn/SwiftLuhn-prefix.pch b/Example/Pods/Target Support Files/SwiftLuhn/SwiftLuhn-prefix.pch index aa992a4..beb2a24 100644 --- a/Example/Pods/Target Support Files/SwiftLuhn/SwiftLuhn-prefix.pch +++ b/Example/Pods/Target Support Files/SwiftLuhn/SwiftLuhn-prefix.pch @@ -1,4 +1,12 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/SwiftLuhn/SwiftLuhn-umbrella.h b/Example/Pods/Target Support Files/SwiftLuhn/SwiftLuhn-umbrella.h index 4a5cf06..275b537 100644 --- a/Example/Pods/Target Support Files/SwiftLuhn/SwiftLuhn-umbrella.h +++ b/Example/Pods/Target Support Files/SwiftLuhn/SwiftLuhn-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/SwiftLuhn/SwiftLuhn.xcconfig b/Example/Pods/Target Support Files/SwiftLuhn/SwiftLuhn.xcconfig index be06898..243efa7 100644 --- a/Example/Pods/Target Support Files/SwiftLuhn/SwiftLuhn.xcconfig +++ b/Example/Pods/Target Support Files/SwiftLuhn/SwiftLuhn.xcconfig @@ -1,9 +1,9 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SwiftLuhn +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftLuhn GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/Example/SwiftLuhn.xcodeproj/project.pbxproj b/Example/SwiftLuhn.xcodeproj/project.pbxproj index 185502f..39be031 100644 --- a/Example/SwiftLuhn.xcodeproj/project.pbxproj +++ b/Example/SwiftLuhn.xcodeproj/project.pbxproj @@ -174,7 +174,6 @@ 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, 710B2CA48E125E0C3D61F25F /* [CP] Embed Pods Frameworks */, - 137E490CB254EE254A386FD6 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -193,8 +192,6 @@ 607FACE11AFB9204008FA782 /* Sources */, 607FACE21AFB9204008FA782 /* Frameworks */, 607FACE31AFB9204008FA782 /* Resources */, - 121FB19318AF053C29298B05 /* [CP] Embed Pods Frameworks */, - 63C7B3EBA6EA465BE9F44D7C /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -213,7 +210,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0810; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 607FACCF1AFB9204008FA782 = { @@ -268,64 +265,22 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 121FB19318AF053C29298B05 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 137E490CB254EE254A386FD6 /* [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-SwiftLuhn_Example/Pods-SwiftLuhn_Example-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 5B052D9C7E24EA239B85D0CC /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwiftLuhn_Tests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 63C7B3EBA6EA465BE9F44D7C /* [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-SwiftLuhn_Tests/Pods-SwiftLuhn_Tests-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; }; 710B2CA48E125E0C3D61F25F /* [CP] Embed Pods Frameworks */ = { @@ -334,9 +289,12 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/SwiftLuhn/SwiftLuhn.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftLuhn.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -349,13 +307,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwiftLuhn_Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + 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 */ @@ -408,14 +369,22 @@ 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_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; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -455,14 +424,22 @@ 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_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; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; diff --git a/Example/SwiftLuhn.xcodeproj/xcshareddata/xcschemes/SwiftLuhn-Example.xcscheme b/Example/SwiftLuhn.xcodeproj/xcshareddata/xcschemes/SwiftLuhn-Example.xcscheme index e9af6a2..a6c152c 100644 --- a/Example/SwiftLuhn.xcodeproj/xcshareddata/xcschemes/SwiftLuhn-Example.xcscheme +++ b/Example/SwiftLuhn.xcodeproj/xcshareddata/xcschemes/SwiftLuhn-Example.xcscheme @@ -1,6 +1,6 @@ + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/SwiftLuhn/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/SwiftLuhn/Images.xcassets/AppIcon.appiconset/Contents.json index d3942e9..19882d5 100644 --- a/Example/SwiftLuhn/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Example/SwiftLuhn/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -29,10 +39,15 @@ "idiom" : "iphone", "size" : "60x60", "scale" : "3x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { "version" : 1, "author" : "xcode" } -} +} \ No newline at end of file From d0db2bf12c101dc9e89bed196be250f85f2127e2 Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Sat, 1 Sep 2018 17:54:27 +0200 Subject: [PATCH 04/14] Sets up circle ci --- .circleci/config.yml | 12 +++++++++--- .travis.yml | 14 -------------- 2 files changed, 9 insertions(+), 17 deletions(-) delete mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 65f7cbd..3901b0d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,3 +1,9 @@ -machine: - xcode: - version: "8.1" +jobs: + build: + macos: + xcode: "9.4" + steps: + # Commands will execute in macOS container + # with Xcode 9.0 installed + - set -o pipefail && xcodebuild test -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example -sdk iphonesimulator11.4 ONLY_ACTIVE_ARCH=NO | xcpretty + - pod lib lint \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 851dea4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -# references: -# * http://www.objc.io/issue-6/travis-ci.html -# * https://github.com/supermarin/xcpretty#usage - -osx_image: xcode7.3 -language: objective-c -# cache: cocoapods -# podfile: Example/Podfile -# before_install: -# - gem install cocoapods # Since Travis is not always on latest version -# - pod install --project-directory=Example -script: -- set -o pipefail && xcodebuild test -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty -- pod lib lint From 9ef446b19027f26749c62ba77296407d59f09422 Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Sat, 1 Sep 2018 18:06:32 +0200 Subject: [PATCH 05/14] Bumps pod version --- .circleci/config.yml | 8 +++----- SwiftLuhn.podspec | 31 ++++++++++++++++--------------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3901b0d..3638002 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,9 +1,7 @@ jobs: build: macos: - xcode: "9.4" + xcode: 9.4 steps: - # Commands will execute in macOS container - # with Xcode 9.0 installed - - set -o pipefail && xcodebuild test -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example -sdk iphonesimulator11.4 ONLY_ACTIVE_ARCH=NO | xcpretty - - pod lib lint \ No newline at end of file + - set -o pipefail && xcodebuild test -destination "platform=iOS Simulator,name=iPhone 7" -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example | xcpretty + - pod lib lint --swift-version=4 \ No newline at end of file diff --git a/SwiftLuhn.podspec b/SwiftLuhn.podspec index ad0f284..343bae1 100644 --- a/SwiftLuhn.podspec +++ b/SwiftLuhn.podspec @@ -7,20 +7,21 @@ # Pod::Spec.new do |s| -s.name = "SwiftLuhn" -s.version = "0.2.2" -s.summary = "SwiftLuhn is a port of the Luhn algorithm, used for validating debit/credit card details." -s.description = <<-DESC -This is a port of the Luhn Algorithm, generally used for validating debit/credit card details, to Swift. + s.name = 'SwiftLuhn' + s.version = '1.0.0' + s.summary = 'SwiftLuhn is a port of the Luhn algorithm, used for validating debit/credit card details.' + s.description = <<-DESC + This is a port of the Luhn Algorithm, generally used for validating debit/credit card details, to Swift. -Objective-C port can be found at [https://github.com/MaxKramer/ObjectiveLuhn](https://github.com/MaxKramer/ObjectiveLuhn). -DESC -s.homepage = "https://github.com/MaxKramer/SwiftLuhn" -s.license = 'MIT' -s.author = { "Max Kramer" => "max@maxkramer.co" } -s.source = { :git => "https://github.com/maxkramer/SwiftLuhn.git", :tag => s.version.to_s } -s.social_media_url = 'https://twitter.com/maxkramer' -s.platform = :ios, '8.0' -s.requires_arc = true -s.source_files = 'SwiftLuhn/Classes/**/*' + Objective-C port can be found at [https://github.com/MaxKramer/ObjectiveLuhn](https://github.com/MaxKramer/ObjectiveLuhn). + DESC + s.homepage = 'https://github.com/MaxKramer/SwiftLuhn' + s.license = 'MIT' + s.author = { 'Max Kramer' => 'max@maxkramer.co' } + s.source = { :git => 'https://github.com/maxkramer/SwiftLuhn.git', :tag => s.version.to_s } + s.social_media_url = 'https://twitter.com/uint_max' + s.platform = :ios, '8.0' + s.requires_arc = true + s.source_files = 'SwiftLuhn/Classes/**/*' + s.swift_version = '4.0' end From 445b90012634c282f73cb09e3ee68e69559506c0 Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Sat, 1 Sep 2018 18:20:40 +0200 Subject: [PATCH 06/14] Fixes library search paths issue --- Example/Podfile | 3 +- Example/Podfile.lock | 6 +- .../Local Podspecs/SwiftLuhn.podspec.json | 9 +- Example/Pods/Manifest.lock | 6 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 84 +++++++++---------- .../Target Support Files/SwiftLuhn/Info.plist | 2 +- Example/SwiftLuhn.xcodeproj/project.pbxproj | 24 ++---- Example/Tests/Tests.swift | 4 +- _Pods.xcodeproj | 1 - 9 files changed, 59 insertions(+), 80 deletions(-) delete mode 120000 _Pods.xcodeproj diff --git a/Example/Podfile b/Example/Podfile index 5189601..ae932f3 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,11 +1,10 @@ use_frameworks! +platform :ios, '8.3' target 'SwiftLuhn_Example' do pod 'SwiftLuhn', :path => '../' target 'SwiftLuhn_Tests' do inherit! :search_paths - - end end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index a8e02fe..8a901a9 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - SwiftLuhn (0.2.2) + - SwiftLuhn (1.0.0) DEPENDENCIES: - SwiftLuhn (from `../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - SwiftLuhn: fb60bc88c0aaf67a988c7c608446e4cb7ca1d75f + SwiftLuhn: 4281267581a5cdab5333ee67128c27fe41c901f9 -PODFILE CHECKSUM: 9e1dbb60127e514c2f28a3f720501ce3568de03f +PODFILE CHECKSUM: 4252bf77c5c9b4aaeb2bc96a075c9e702b75d0d9 COCOAPODS: 1.5.3 diff --git a/Example/Pods/Local Podspecs/SwiftLuhn.podspec.json b/Example/Pods/Local Podspecs/SwiftLuhn.podspec.json index 3eb8377..e2432a2 100644 --- a/Example/Pods/Local Podspecs/SwiftLuhn.podspec.json +++ b/Example/Pods/Local Podspecs/SwiftLuhn.podspec.json @@ -1,6 +1,6 @@ { "name": "SwiftLuhn", - "version": "0.2.2", + "version": "1.0.0", "summary": "SwiftLuhn is a port of the Luhn algorithm, used for validating debit/credit card details.", "description": "This is a port of the Luhn Algorithm, generally used for validating debit/credit card details, to Swift.\n\nObjective-C port can be found at [https://github.com/MaxKramer/ObjectiveLuhn](https://github.com/MaxKramer/ObjectiveLuhn).", "homepage": "https://github.com/MaxKramer/SwiftLuhn", @@ -10,12 +10,13 @@ }, "source": { "git": "https://github.com/maxkramer/SwiftLuhn.git", - "tag": "0.2.2" + "tag": "1.0.0" }, - "social_media_url": "https://twitter.com/maxkramer", + "social_media_url": "https://twitter.com/uint_max", "platforms": { "ios": "8.0" }, "requires_arc": true, - "source_files": "SwiftLuhn/Classes/**/*" + "source_files": "SwiftLuhn/Classes/**/*", + "swift_version": "4.0" } diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index a8e02fe..8a901a9 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - SwiftLuhn (0.2.2) + - SwiftLuhn (1.0.0) DEPENDENCIES: - SwiftLuhn (from `../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - SwiftLuhn: fb60bc88c0aaf67a988c7c608446e4cb7ca1d75f + SwiftLuhn: 4281267581a5cdab5333ee67128c27fe41c901f9 -PODFILE CHECKSUM: 9e1dbb60127e514c2f28a3f720501ce3568de03f +PODFILE CHECKSUM: 4252bf77c5c9b4aaeb2bc96a075c9e702b75d0d9 COCOAPODS: 1.5.3 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 7e691b4..82b5e2a 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -39,10 +39,10 @@ /* Begin PBXFileReference section */ 0C141DEC1591E0D0962C82E48D920126 /* Pods-SwiftLuhn_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Tests.debug.xcconfig"; sourceTree = ""; }; - 198DE2F513FBA55FA5C23DCECA7F2EBA /* Pods_SwiftLuhn_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftLuhn_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 198DE2F513FBA55FA5C23DCECA7F2EBA /* Pods_SwiftLuhn_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwiftLuhn_Tests.framework; path = "Pods-SwiftLuhn_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 204CD85D754C6093F47BFC8C97D321C6 /* Pods-SwiftLuhn_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Example-resources.sh"; sourceTree = ""; }; 26612FDA601602D5B3AA7BC3614A57BA /* SwiftLuhn-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftLuhn-prefix.pch"; sourceTree = ""; }; - 29A428A69D0F7195673C6A9147249D12 /* Pods_SwiftLuhn_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftLuhn_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 29A428A69D0F7195673C6A9147249D12 /* Pods_SwiftLuhn_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwiftLuhn_Example.framework; path = "Pods-SwiftLuhn_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 4128DC70CEE877C2C39986682964D300 /* Pods-SwiftLuhn_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftLuhn_Tests-acknowledgements.plist"; sourceTree = ""; }; 42AA43B00F663E4D705F307491788668 /* Pods-SwiftLuhn_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwiftLuhn_Example.modulemap"; sourceTree = ""; }; 463BFD3A207FE3D1582BB8B374D2C796 /* Pods-SwiftLuhn_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftLuhn_Tests-acknowledgements.markdown"; sourceTree = ""; }; @@ -56,23 +56,23 @@ 7E628199A0333A7D82C66DB2C418562C /* Pods-SwiftLuhn_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Example.debug.xcconfig"; sourceTree = ""; }; 830A303EAF03D8D5DE5BEAE152380090 /* Pods-SwiftLuhn_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Example-frameworks.sh"; sourceTree = ""; }; 8BD4CE381879A6580776F04D9FDF2382 /* Pods-SwiftLuhn_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Tests-resources.sh"; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; AA96A365515C1590A153121259E130D7 /* Pods-SwiftLuhn_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Example.release.xcconfig"; sourceTree = ""; }; AA97903A1CA4320966B789B443CB842C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; AB82082A144AAE54D60BC6AA53075706 /* SwiftLuhn.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLuhn.xcconfig; sourceTree = ""; }; B03162408AB8821109300018C35FF43D /* SwiftLuhn-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftLuhn-dummy.m"; sourceTree = ""; }; - B0F8D4F2CE89DA3BCCB44E2F05C97B87 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + B0F8D4F2CE89DA3BCCB44E2F05C97B87 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; B5513591820750C416B674EB68212FA2 /* Pods-SwiftLuhn_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Tests-frameworks.sh"; sourceTree = ""; }; - B62707046109C81867034985742DAAA0 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + B62707046109C81867034985742DAAA0 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; B66C4FB20CAD2F6D629FD2D09AF15869 /* Pods-SwiftLuhn_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftLuhn_Tests-umbrella.h"; sourceTree = ""; }; B6EB4086CCE0F15D12E79D29E3334FB2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B8D1A9D837D5095B0241143B073B04E0 /* String+SwiftLuhn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+SwiftLuhn.swift"; path = "SwiftLuhn/Classes/String+SwiftLuhn.swift"; sourceTree = ""; }; C549D11540023C192B5F5C264CDB7E12 /* Pods-SwiftLuhn_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwiftLuhn_Tests.modulemap"; sourceTree = ""; }; CD3923616C90E58403C08FEA2F9AD881 /* Pods-SwiftLuhn_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftLuhn_Example-acknowledgements.markdown"; sourceTree = ""; }; - D65B25B26C32EEAEEA6F1E578AC53F28 /* SwiftLuhn.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftLuhn.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D65B25B26C32EEAEEA6F1E578AC53F28 /* SwiftLuhn.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SwiftLuhn.framework; path = SwiftLuhn.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DE25910B1B3310003223AAA5B9476979 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E05FA245C2878B0901EC8DE6AEDF7A7C /* SwiftLuhn-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftLuhn-umbrella.h"; sourceTree = ""; }; - FB0A7A5CA98B9623E7C900EEE68FC1D1 /* SwiftLuhn.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; path = SwiftLuhn.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + FB0A7A5CA98B9623E7C900EEE68FC1D1 /* SwiftLuhn.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = SwiftLuhn.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; FD1F678AA4B3015CF8C56068DD564BB4 /* Pods-SwiftLuhn_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Tests.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -320,12 +320,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 0940; - TargetAttributes = { - FD216F00596C45B2B49C1B59E717145C = { - LastSwiftMigration = 0940; - }; - }; + LastUpgradeCheck = 0930; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -610,15 +605,15 @@ MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_COMPILATION_MODE = wholemodule; SYMROOT = "${SRCROOT}/../build"; }; name = Release; }; - D9BBFCB6FB01E17205FD23247F2F15D3 /* Debug */ = { + E296458D17185B37EAE3F240B3E2880C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AB82082A144AAE54D60BC6AA53075706 /* SwiftLuhn.xcconfig */; + baseConfigurationReference = AA96A365515C1590A153121259E130D7 /* Pods-SwiftLuhn_Example.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -628,31 +623,31 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/SwiftLuhn/SwiftLuhn-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SwiftLuhn/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-SwiftLuhn_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/SwiftLuhn/SwiftLuhn.modulemap"; - PRODUCT_MODULE_NAME = SwiftLuhn; - PRODUCT_NAME = SwiftLuhn; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_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_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - E296458D17185B37EAE3F240B3E2880C /* Release */ = { + E553A515CC8B00D4CE43CB85F31BF810 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AA96A365515C1590A153121259E130D7 /* Pods-SwiftLuhn_Example.release.xcconfig */; + baseConfigurationReference = AB82082A144AAE54D60BC6AA53075706 /* SwiftLuhn.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -662,20 +657,19 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-SwiftLuhn_Example/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/SwiftLuhn/SwiftLuhn-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SwiftLuhn/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-SwiftLuhn_Example/Pods-SwiftLuhn_Example.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + MODULEMAP_FILE = "Target Support Files/SwiftLuhn/SwiftLuhn.modulemap"; + PRODUCT_MODULE_NAME = SwiftLuhn; + PRODUCT_NAME = SwiftLuhn; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -683,7 +677,7 @@ }; name = Release; }; - E4CF1ABABF6A8EEA683BF9BCE637BCF7 /* Release */ = { + F8B686EC869AC9DC0E18CDCA299E23E9 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = AB82082A144AAE54D60BC6AA53075706 /* SwiftLuhn.xcconfig */; buildSettings = { @@ -707,15 +701,13 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; /* End XCBuildConfiguration section */ @@ -741,8 +733,8 @@ AAC1F6863E4C22C6112EF7BC2903DBFC /* Build configuration list for PBXNativeTarget "SwiftLuhn" */ = { isa = XCConfigurationList; buildConfigurations = ( - D9BBFCB6FB01E17205FD23247F2F15D3 /* Debug */, - E4CF1ABABF6A8EEA683BF9BCE637BCF7 /* Release */, + F8B686EC869AC9DC0E18CDCA299E23E9 /* Debug */, + E553A515CC8B00D4CE43CB85F31BF810 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Target Support Files/SwiftLuhn/Info.plist b/Example/Pods/Target Support Files/SwiftLuhn/Info.plist index 3f68a24..2243fe6 100644 --- a/Example/Pods/Target Support Files/SwiftLuhn/Info.plist +++ b/Example/Pods/Target Support Files/SwiftLuhn/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.2.2 + 1.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/SwiftLuhn.xcodeproj/project.pbxproj b/Example/SwiftLuhn.xcodeproj/project.pbxproj index 39be031..c54b426 100644 --- a/Example/SwiftLuhn.xcodeproj/project.pbxproj +++ b/Example/SwiftLuhn.xcodeproj/project.pbxproj @@ -215,11 +215,11 @@ TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0810; + LastSwiftMigration = 0940; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0810; + LastSwiftMigration = 0940; TestTargetID = 607FACCF1AFB9204008FA782; }; }; @@ -471,11 +471,10 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = SwiftLuhn/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -486,11 +485,10 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = SwiftLuhn/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -498,19 +496,14 @@ isa = XCBuildConfiguration; baseConfigurationReference = AA640ED277322E98AADE4DB9 /* Pods-SwiftLuhn_Tests.debug.xcconfig */; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftLuhn_Example.app/SwiftLuhn_Example"; }; name = Debug; @@ -519,15 +512,10 @@ isa = XCBuildConfiguration; baseConfigurationReference = 8AD47538614B334D166DC901 /* Pods-SwiftLuhn_Tests.release.xcconfig */; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftLuhn_Example.app/SwiftLuhn_Example"; }; name = Release; diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift index 0e71845..7696ca0 100644 --- a/Example/Tests/Tests.swift +++ b/Example/Tests/Tests.swift @@ -45,14 +45,14 @@ class Tests: XCTestCase { let numbersRegex = "[0-9]" let replacedNumbers = cardNumber.replacingOccurrences(of: numbersRegex, with: "", options: .regularExpression, range: nil) - return replacedNumbers.characters.count == 0 + return replacedNumbers.count == 0 } func containsNoWhitespaceOrNewlines(_ cardNumber: String) -> Bool { let withProhibitedContents = " \n \n " + cardNumber + " \n \n " let formattedContents = withProhibitedContents.formattedCardNumber() - return formattedContents.characters.count == cardNumber.characters.count + return formattedContents.count == cardNumber.count } let incorrectlyFormattedNumbers = [ diff --git a/_Pods.xcodeproj b/_Pods.xcodeproj deleted file mode 120000 index 3c5a8e7..0000000 --- a/_Pods.xcodeproj +++ /dev/null @@ -1 +0,0 @@ -Example/Pods/Pods.xcodeproj \ No newline at end of file From 86c3c25df781050eefea2c248b5b0c8f68c0d51c Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Sat, 1 Sep 2018 18:32:54 +0200 Subject: [PATCH 07/14] Adds circleci version --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3638002..449af6f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,8 @@ +version: 2 jobs: build: macos: xcode: 9.4 steps: - set -o pipefail && xcodebuild test -destination "platform=iOS Simulator,name=iPhone 7" -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example | xcpretty - - pod lib lint --swift-version=4 \ No newline at end of file + - pod lib lint --swift-version=4 From a07130f380548f446db243705d50331a4cc20962 Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Sat, 1 Sep 2018 18:45:16 +0200 Subject: [PATCH 08/14] Checks out code from git and fixes circleci step syntax --- .circleci/config.yml | 5 +++-- Example/Pods/Pods.xcodeproj/project.pbxproj | 17 +++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 449af6f..a3ca229 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,5 +4,6 @@ jobs: macos: xcode: 9.4 steps: - - set -o pipefail && xcodebuild test -destination "platform=iOS Simulator,name=iPhone 7" -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example | xcpretty - - pod lib lint --swift-version=4 + - checkout + - run: set -o pipefail && xcodebuild test -destination "platform=iOS Simulator,name=iPhone 7" -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example | xcpretty + - run: pod lib lint --swift-version=4 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 82b5e2a..d2d09af 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -39,10 +39,10 @@ /* Begin PBXFileReference section */ 0C141DEC1591E0D0962C82E48D920126 /* Pods-SwiftLuhn_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Tests.debug.xcconfig"; sourceTree = ""; }; - 198DE2F513FBA55FA5C23DCECA7F2EBA /* Pods_SwiftLuhn_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwiftLuhn_Tests.framework; path = "Pods-SwiftLuhn_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 198DE2F513FBA55FA5C23DCECA7F2EBA /* Pods_SwiftLuhn_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftLuhn_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 204CD85D754C6093F47BFC8C97D321C6 /* Pods-SwiftLuhn_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Example-resources.sh"; sourceTree = ""; }; 26612FDA601602D5B3AA7BC3614A57BA /* SwiftLuhn-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftLuhn-prefix.pch"; sourceTree = ""; }; - 29A428A69D0F7195673C6A9147249D12 /* Pods_SwiftLuhn_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwiftLuhn_Example.framework; path = "Pods-SwiftLuhn_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 29A428A69D0F7195673C6A9147249D12 /* Pods_SwiftLuhn_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftLuhn_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4128DC70CEE877C2C39986682964D300 /* Pods-SwiftLuhn_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftLuhn_Tests-acknowledgements.plist"; sourceTree = ""; }; 42AA43B00F663E4D705F307491788668 /* Pods-SwiftLuhn_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwiftLuhn_Example.modulemap"; sourceTree = ""; }; 463BFD3A207FE3D1582BB8B374D2C796 /* Pods-SwiftLuhn_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftLuhn_Tests-acknowledgements.markdown"; sourceTree = ""; }; @@ -56,23 +56,23 @@ 7E628199A0333A7D82C66DB2C418562C /* Pods-SwiftLuhn_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Example.debug.xcconfig"; sourceTree = ""; }; 830A303EAF03D8D5DE5BEAE152380090 /* Pods-SwiftLuhn_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Example-frameworks.sh"; sourceTree = ""; }; 8BD4CE381879A6580776F04D9FDF2382 /* Pods-SwiftLuhn_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Tests-resources.sh"; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; AA96A365515C1590A153121259E130D7 /* Pods-SwiftLuhn_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Example.release.xcconfig"; sourceTree = ""; }; AA97903A1CA4320966B789B443CB842C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; AB82082A144AAE54D60BC6AA53075706 /* SwiftLuhn.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLuhn.xcconfig; sourceTree = ""; }; B03162408AB8821109300018C35FF43D /* SwiftLuhn-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftLuhn-dummy.m"; sourceTree = ""; }; - B0F8D4F2CE89DA3BCCB44E2F05C97B87 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; + B0F8D4F2CE89DA3BCCB44E2F05C97B87 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; B5513591820750C416B674EB68212FA2 /* Pods-SwiftLuhn_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftLuhn_Tests-frameworks.sh"; sourceTree = ""; }; - B62707046109C81867034985742DAAA0 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + B62707046109C81867034985742DAAA0 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; B66C4FB20CAD2F6D629FD2D09AF15869 /* Pods-SwiftLuhn_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftLuhn_Tests-umbrella.h"; sourceTree = ""; }; B6EB4086CCE0F15D12E79D29E3334FB2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B8D1A9D837D5095B0241143B073B04E0 /* String+SwiftLuhn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+SwiftLuhn.swift"; path = "SwiftLuhn/Classes/String+SwiftLuhn.swift"; sourceTree = ""; }; C549D11540023C192B5F5C264CDB7E12 /* Pods-SwiftLuhn_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwiftLuhn_Tests.modulemap"; sourceTree = ""; }; CD3923616C90E58403C08FEA2F9AD881 /* Pods-SwiftLuhn_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftLuhn_Example-acknowledgements.markdown"; sourceTree = ""; }; - D65B25B26C32EEAEEA6F1E578AC53F28 /* SwiftLuhn.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SwiftLuhn.framework; path = SwiftLuhn.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D65B25B26C32EEAEEA6F1E578AC53F28 /* SwiftLuhn.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftLuhn.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DE25910B1B3310003223AAA5B9476979 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E05FA245C2878B0901EC8DE6AEDF7A7C /* SwiftLuhn-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftLuhn-umbrella.h"; sourceTree = ""; }; - FB0A7A5CA98B9623E7C900EEE68FC1D1 /* SwiftLuhn.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = SwiftLuhn.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + FB0A7A5CA98B9623E7C900EEE68FC1D1 /* SwiftLuhn.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; path = SwiftLuhn.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; FD1F678AA4B3015CF8C56068DD564BB4 /* Pods-SwiftLuhn_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftLuhn_Tests.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -320,7 +320,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 0940; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -605,6 +605,7 @@ MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_COMPILATION_MODE = wholemodule; SYMROOT = "${SRCROOT}/../build"; }; name = Release; From 3fb78c97ff3beb80f8e90c775327bc8d0bc4e2b8 Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Sat, 1 Sep 2018 18:46:01 +0200 Subject: [PATCH 09/14] Uses correct xcode image --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a3ca229..30d3b04 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: macos: - xcode: 9.4 + xcode: 9.2 steps: - checkout - run: set -o pipefail && xcodebuild test -destination "platform=iOS Simulator,name=iPhone 7" -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example | xcpretty From 82b2889175d06fcc9c70a5377cf65fec3f83aa42 Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Sat, 1 Sep 2018 19:02:22 +0200 Subject: [PATCH 10/14] Corrects version again --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 30d3b04..0c94b2f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: macos: - xcode: 9.2 + xcode: 9.4.1 steps: - checkout - run: set -o pipefail && xcodebuild test -destination "platform=iOS Simulator,name=iPhone 7" -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example | xcpretty From e8a73e978a07a39b50900a799c1f1cefcabf8786 Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Sat, 1 Sep 2018 19:07:44 +0200 Subject: [PATCH 11/14] Adds names to each of the run scripts --- .circleci/config.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0c94b2f..617b4a2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,5 +5,9 @@ jobs: xcode: 9.4.1 steps: - checkout - - run: set -o pipefail && xcodebuild test -destination "platform=iOS Simulator,name=iPhone 7" -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example | xcpretty - - run: pod lib lint --swift-version=4 + - run: + name: Run tests + command: xcodebuild test -destination "platform=iOS Simulator,name=iPhone 7" -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example | xcpretty + - run: + name: Verify valid podspec + command: pod lib lint --swift-version=4.0 From af3e94ec53ac25e4a086ddaf16df11cc7215d422 Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Sat, 1 Sep 2018 19:13:22 +0200 Subject: [PATCH 12/14] Adds github templates and updates license year --- .circleci/config.yml | 8 ++++---- .github/ISSUE_TEMPLATE | 25 +++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE | 13 +++++++++++++ LICENSE | 2 +- 4 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE create mode 100644 .github/PULL_REQUEST_TEMPLATE diff --git a/.circleci/config.yml b/.circleci/config.yml index 617b4a2..3d96f23 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,8 +6,8 @@ jobs: steps: - checkout - run: - name: Run tests - command: xcodebuild test -destination "platform=iOS Simulator,name=iPhone 7" -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example | xcpretty + name: Run tests + command: xcodebuild test -destination "platform=iOS Simulator,name=iPhone 7" -workspace Example/SwiftLuhn.xcworkspace -scheme SwiftLuhn-Example | xcpretty - run: - name: Verify valid podspec - command: pod lib lint --swift-version=4.0 + name: Verify valid podspec + command: pod lib lint --swift-version=4.0 diff --git a/.github/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE new file mode 100644 index 0000000..46d8293 --- /dev/null +++ b/.github/ISSUE_TEMPLATE @@ -0,0 +1,25 @@ +### What did you do? + +Please replace this with what you did. + +### What did you expect to happen? + +Please replace this with what you expected to happen. + +### What actually happened instead? + +Please replace this with what happened instead. + +### Environment + +List the software versions you're using: + + - Xcode Version: *?.? (????)* (Open Xcode; In menubar: Xcode > About Xcode) + - Swift Version: *?.?* (Open Xcode Preferences; Components > Toolchains. If none, use `Xcode Default`.) + +Please also mention which package manager you used and its version. Delete the +other package managers in this list: + + - Cocoapods: *?.?.?* (Use `pod --version` in Terminal) + - Carthage: *?.?* (Use `carthage version` in Terminal) + - Swift Package Manager *?.?.? (swiftpm-???)* (Use `swift build --version` in Terminal) diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE new file mode 100644 index 0000000..5efff14 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE @@ -0,0 +1,13 @@ +The PR should summarize what was changed and why. Here are some questions to +help you if you're not sure: + + - What behavior was changed? + - What code was refactored / updated to support this change? + - What issues are related to this PR? Or why was this change introduced? + +Checklist - While not every PR needs it, new features should consider this list: + + - [ ] Does this have tests? + - [ ] Does this have documentation? + - [ ] Does this break the public API (Requires major version bump)? + - [ ] Is this a new feature (Requires minor version bump)? \ No newline at end of file diff --git a/LICENSE b/LICENSE index 3ddbc55..8308b06 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016 Max Kramer +Copyright (c) 2018 Max Kramer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 3e70a92eca91de65c3d258bea346c91acff58b97 Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Sat, 1 Sep 2018 19:18:27 +0200 Subject: [PATCH 13/14] Updates README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f81ee22..58d0ddc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SwiftLuhn -[![Swift](https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat)](https://swift.org) -[![Circle CI](https://circleci.com/gh/MaxKramer/SwiftLuhn.svg?style=shield)](https://circleci.com/gh/MaxKramer/SwiftLuhn) +[![Swift](https://img.shields.io/badge/Swift-4.0-orange.svg?style=flat)](https://swift.org) +[![CircleCI](https://circleci.com/gh/maxkramer/SwiftLuhn.svg?style=svg)](https://circleci.com/gh/maxkramer/SwiftLuhn) [![Version](https://img.shields.io/cocoapods/v/SwiftLuhn.svg?style=flat)](http://cocoapods.org/pods/SwiftLuhn) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![License](https://img.shields.io/cocoapods/l/SwiftLuhn.svg?style=flat)](http://cocoapods.org/pods/SwiftLuhn) @@ -8,7 +8,7 @@ This is a port of the Luhn Algorithm, generally used for validating debit/credit card details, written in Swift. -SwiftLuhn's HEAD is written in Swift 3. If your project doesn't support Swift 3 yet, please use the [0.1.0 tag](https://github.com/MaxKramer/SwiftLuhn/releases/tag/0.1.0). +SwiftLuhn's HEAD is written in Swift 4. If your project doesn't support Swift 4 yet, please use the [0.2.1 tag](https://github.com/MaxKramer/SwiftLuhn/releases/tag/0.2.1). Objective-C port can be found at [https://github.com/MaxKramer/ObjectiveLuhn](https://github.com/MaxKramer/ObjectiveLuhn). @@ -23,7 +23,7 @@ SwiftLuhn is available through [CocoaPods](http://cocoapods.org) or Carthage (wi To install it, simply add the following line to your Podfile: ```ruby -pod "SwiftLuhn" # use '0.1.0' for Swift 2.X +pod "SwiftLuhn" # use '0.2.1' for Swift 3.X ``` Or alternatively the following line to your Cartfile: From 48bb72abed4cbf37326896b1951832b9b2276d1b Mon Sep 17 00:00:00 2001 From: Max Kramer Date: Sat, 1 Sep 2018 19:29:01 +0200 Subject: [PATCH 14/14] Adds test to replicate #13 --- Example/SwiftLuhn.xcodeproj/project.pbxproj | 4 +++ Example/Tests/CardTypeTest.swift | 32 +++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 Example/Tests/CardTypeTest.swift diff --git a/Example/SwiftLuhn.xcodeproj/project.pbxproj b/Example/SwiftLuhn.xcodeproj/project.pbxproj index c54b426..3472abe 100644 --- a/Example/SwiftLuhn.xcodeproj/project.pbxproj +++ b/Example/SwiftLuhn.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ 44E4CDCF060D148312B7A33B /* Pods_SwiftLuhn_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B96891BB859C116842802B3 /* Pods_SwiftLuhn_Example.framework */; }; 501D07711E144680000E09A5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 501D07701E144680000E09A5 /* Main.storyboard */; }; 501D07771E1446E1000E09A5 /* TestCreditCardNumbers.plist in Resources */ = {isa = PBXBuildFile; fileRef = 501D07761E1446E1000E09A5 /* TestCreditCardNumbers.plist */; }; + 50CFCCA9213B026400265043 /* CardTypeTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50CFCCA8213B026400265043 /* CardTypeTest.swift */; }; 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; @@ -32,6 +33,7 @@ 0DF7860DB58A2EC870C366EC /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 501D07701E144680000E09A5 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; 501D07761E1446E1000E09A5 /* TestCreditCardNumbers.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = TestCreditCardNumbers.plist; sourceTree = ""; }; + 50CFCCA8213B026400265043 /* CardTypeTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardTypeTest.swift; sourceTree = ""; }; 5B96891BB859C116842802B3 /* Pods_SwiftLuhn_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftLuhn_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD01AFB9204008FA782 /* SwiftLuhn_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftLuhn_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -118,6 +120,7 @@ isa = PBXGroup; children = ( 607FACEB1AFB9204008FA782 /* Tests.swift */, + 50CFCCA8213B026400265043 /* CardTypeTest.swift */, 607FACE91AFB9204008FA782 /* Supporting Files */, ); path = Tests; @@ -336,6 +339,7 @@ buildActionMask = 2147483647; files = ( 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, + 50CFCCA9213B026400265043 /* CardTypeTest.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Example/Tests/CardTypeTest.swift b/Example/Tests/CardTypeTest.swift new file mode 100644 index 0000000..c501d2d --- /dev/null +++ b/Example/Tests/CardTypeTest.swift @@ -0,0 +1,32 @@ +// +// CardTypeTest.swift +// SwiftLuhn_Tests +// +// Created by Max Kramer on 01/09/2018. +// Copyright © 2018 CocoaPods. All rights reserved. +// + +import XCTest +import SwiftLuhn + +class CardTypeTest: XCTestCase { + func testStringValueShouldReturnCorrectValue() { + let mapping = [ + SwiftLuhn.CardType.amex: "American Express", + SwiftLuhn.CardType.visa: "Visa", + SwiftLuhn.CardType.mastercard: "Mastercard", + SwiftLuhn.CardType.discover: "Discover", + SwiftLuhn.CardType.dinersClub: "Diner's Club", + SwiftLuhn.CardType.jcb: "JCB", + SwiftLuhn.CardType.maestro: "Maestro", + SwiftLuhn.CardType.rupay: "Rupay", + SwiftLuhn.CardType.mir: "Mir" + ] + + mapping.forEach { key, value in + let result = key.stringValue() + XCTAssertEqual(result, value) + } + } + +}