From 5b7ade913240a7445416559ccd3b7d6efc8eae0a Mon Sep 17 00:00:00 2001 From: Okhan Okbay Date: Tue, 6 Feb 2024 16:19:42 +0000 Subject: [PATCH 1/2] Include Package.resolved into git as per Apple recommendation --- .gitignore | 5 +-- .../xcshareddata/swiftpm/Package.resolved | 32 +++++++++++++++ Package.resolved | 23 +++++++++++ .../xcshareddata/swiftpm/Package.resolved | 41 +++++++++++++++++++ 4 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 Package.resolved create mode 100644 iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/.gitignore b/.gitignore index 6bd835fe1..8159e6faf 100644 --- a/.gitignore +++ b/.gitignore @@ -132,8 +132,7 @@ iOSInjectionProject/ ### SwiftPM ### Packages xcuserdata -Package.resolved -*/Package.resolved +## */Package.resolved IDEWorkspaceChecks.plist @@ -148,7 +147,7 @@ contents.xcworkspacedata /*.gcno ### Xcode Patch ### -*.xcodeproj/project.workspace/xcshareddata/swiftpm/Package.resolved +## *.xcodeproj/project.workspace/xcshareddata/swiftpm/Package.resolved *.xcodeproj/* !*.xcodeproj/project.pbxproj */IDEWorkspaceChecks.plist diff --git a/Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000..e50a585e7 --- /dev/null +++ b/Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,32 @@ +{ + "pins" : [ + { + "identity" : "checkout-event-logger-ios-framework", + "kind" : "remoteSourceControl", + "location" : "https://github.com/checkout/checkout-event-logger-ios-framework.git", + "state" : { + "revision" : "a914d754b4ffb1843730e8e1f8e7e60c4bf81cf9", + "version" : "1.2.4" + } + }, + { + "identity" : "frames-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/checkout/frames-ios", + "state" : { + "revision" : "24a4585e5b7da1cc4b062e5aeadc63f1c9024db4", + "version" : "4.2.0" + } + }, + { + "identity" : "phonenumberkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/marmelroy/PhoneNumberKit.git", + "state" : { + "revision" : "6edd6e38a30aec087cb97f7377edf876c29a427e", + "version" : "3.5.9" + } + } + ], + "version" : 2 +} diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 000000000..ae979003d --- /dev/null +++ b/Package.resolved @@ -0,0 +1,23 @@ +{ + "pins" : [ + { + "identity" : "checkout-event-logger-ios-framework", + "kind" : "remoteSourceControl", + "location" : "https://github.com/checkout/checkout-event-logger-ios-framework.git", + "state" : { + "revision" : "a914d754b4ffb1843730e8e1f8e7e60c4bf81cf9", + "version" : "1.2.4" + } + }, + { + "identity" : "phonenumberkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/marmelroy/PhoneNumberKit.git", + "state" : { + "revision" : "6edd6e38a30aec087cb97f7377edf876c29a427e", + "version" : "3.5.9" + } + } + ], + "version" : 2 +} diff --git a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 000000000..5020815bd --- /dev/null +++ b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,41 @@ +{ + "pins" : [ + { + "identity" : "checkout-event-logger-ios-framework", + "kind" : "remoteSourceControl", + "location" : "https://github.com/checkout/checkout-event-logger-ios-framework.git", + "state" : { + "revision" : "a914d754b4ffb1843730e8e1f8e7e60c4bf81cf9", + "version" : "1.2.4" + } + }, + { + "identity" : "frames-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/checkout/frames-ios", + "state" : { + "revision" : "347e873ff9702d5783709bed5d4b6b28adfca3ab", + "version" : "4.3.1" + } + }, + { + "identity" : "phonenumberkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/marmelroy/PhoneNumberKit.git", + "state" : { + "revision" : "6edd6e38a30aec087cb97f7377edf876c29a427e", + "version" : "3.5.9" + } + }, + { + "identity" : "swift-snapshot-testing", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-snapshot-testing", + "state" : { + "revision" : "26ed3a2b4a2df47917ca9b790a57f91285b923fb", + "version" : "1.12.0" + } + } + ], + "version" : 2 +} From 3ec82ad51768186f35f1f89588293c9b87fb135b Mon Sep 17 00:00:00 2001 From: Okhan Okbay Date: Tue, 6 Feb 2024 18:54:15 +0000 Subject: [PATCH 2/2] Fix regression tests --- .../ExpiryDateEdgeCaseTests.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iOS Example Frame SPM/iOS Example Frame Regression Tests/ExpiryDateEdgeCaseTests.swift b/iOS Example Frame SPM/iOS Example Frame Regression Tests/ExpiryDateEdgeCaseTests.swift index 91a550e06..6a6e6c92e 100644 --- a/iOS Example Frame SPM/iOS Example Frame Regression Tests/ExpiryDateEdgeCaseTests.swift +++ b/iOS Example Frame SPM/iOS Example Frame Regression Tests/ExpiryDateEdgeCaseTests.swift @@ -22,7 +22,8 @@ final class ExpiryDateEdgeCaseTests: XCTestCase { } let previousMonthDate = Calendar.current.date(byAdding: .month, value: -1, to: Date())! - let previousMonth = String(Calendar.current.component(.month, from: previousMonthDate)) + var previousMonth = String(Calendar.current.component(.month, from: previousMonthDate)) + previousMonth = previousMonth.count == 1 ? "0" + previousMonth : previousMonth let currentYear = String(Calendar.current.component(.year, from: Date())).suffix(2) let expiryTextField = app.otherElements[AccessibilityIdentifiers.PaymentForm.cardExpiry]