From 77e6820fd489835f0a28dbc34a68c28d2466a37b Mon Sep 17 00:00:00 2001 From: Mark Villacampa Date: Thu, 29 Feb 2024 12:57:31 +0100 Subject: [PATCH] use fixed snapshot testing library --- Package.swift | 2 +- Package@swift-5.7.swift | 2 +- Package@swift-5.8.swift | 2 +- RevenueCat.xcodeproj/project.pbxproj | 104 ++++++++++++------ .../xcshareddata/swiftpm/Package.resolved | 6 +- 5 files changed, 77 insertions(+), 39 deletions(-) diff --git a/Package.swift b/Package.swift index 082d1134ef..0711e5d3cc 100644 --- a/Package.swift +++ b/Package.swift @@ -12,7 +12,7 @@ let shouldIncludeDocCPlugin = environmentVariables["INCLUDE_DOCC_PLUGIN"] == "tr var dependencies: [Package.Dependency] = [ .package(url: "git@github.com:Quick/Nimble.git", from: "10.0.0"), // SST requires iOS 13 starting from version 1.13.0 - .package(url: "git@github.com:pointfreeco/swift-snapshot-testing.git", .upToNextMinor(from: "1.12.0")) + .package(url: "git@github.com:markvillacampa/swift-snapshot-testing.git", branch: "1.12.0-fix-test-observer") ] if shouldIncludeDocCPlugin { dependencies.append(.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")) diff --git a/Package@swift-5.7.swift b/Package@swift-5.7.swift index c3460f2270..3960065107 100644 --- a/Package@swift-5.7.swift +++ b/Package@swift-5.7.swift @@ -11,7 +11,7 @@ let shouldIncludeDocCPlugin = environmentVariables["INCLUDE_DOCC_PLUGIN"] == "tr var dependencies: [Package.Dependency] = [ .package(url: "git@github.com:Quick/Nimble.git", from: "10.0.0"), - .package(url: "git@github.com:pointfreeco/swift-snapshot-testing.git", from: "1.11.0") + .package(url: "git@github.com:markvillacampa/swift-snapshot-testing.git", branch: "1.12.0-fix-test-observer") ] if shouldIncludeDocCPlugin { dependencies.append(.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")) diff --git a/Package@swift-5.8.swift b/Package@swift-5.8.swift index 5c7690efdf..8c60799f7e 100644 --- a/Package@swift-5.8.swift +++ b/Package@swift-5.8.swift @@ -11,7 +11,7 @@ let shouldIncludeDocCPlugin = environmentVariables["INCLUDE_DOCC_PLUGIN"] == "tr var dependencies: [Package.Dependency] = [ .package(url: "git@github.com:Quick/Nimble.git", from: "10.0.0"), - .package(url: "git@github.com:pointfreeco/swift-snapshot-testing.git", from: "1.11.0") + .package(url: "git@github.com:markvillacampa/swift-snapshot-testing.git", branch: "1.12.0-fix-test-observer") ] if shouldIncludeDocCPlugin { dependencies.append(.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")) diff --git a/RevenueCat.xcodeproj/project.pbxproj b/RevenueCat.xcodeproj/project.pbxproj index d23f9305ec..8e1c698b03 100644 --- a/RevenueCat.xcodeproj/project.pbxproj +++ b/RevenueCat.xcodeproj/project.pbxproj @@ -209,6 +209,9 @@ 4DBF1F362B4D572400D52354 /* LocalReceiptFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DBF1F352B4D572400D52354 /* LocalReceiptFetcher.swift */; }; 4DBF1F372B4D572400D52354 /* LocalReceiptFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DBF1F352B4D572400D52354 /* LocalReceiptFetcher.swift */; }; 4DC546272AD44BBE005CDB35 /* EncodedAppleReceipt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DC546262AD44BBE005CDB35 /* EncodedAppleReceipt.swift */; }; + 4DFF0D732B90A83800BBBE71 /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 4DFF0D722B90A83800BBBE71 /* SnapshotTesting */; }; + 4DFF0D752B90A84000BBBE71 /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 4DFF0D742B90A84000BBBE71 /* SnapshotTesting */; }; + 4DFF0D792B90A84A00BBBE71 /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 4DFF0D782B90A84A00BBBE71 /* SnapshotTesting */; }; 4F0201C42A13C85500091612 /* Assertions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F0201C32A13C85500091612 /* Assertions.swift */; }; 4F05876F2A5DE03F00E9A834 /* PaywallDataTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F05876E2A5DE03F00E9A834 /* PaywallDataTests.swift */; }; 4F062D322A85A11600A8A613 /* PaywallData+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F062D312A85A11600A8A613 /* PaywallData+Localization.swift */; }; @@ -310,7 +313,6 @@ 4FC883822AA7A2BD00A3DE03 /* ProcessInfo+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FC883802AA7A2BD00A3DE03 /* ProcessInfo+Extensions.swift */; }; 4FC972172A712DCC008593DE /* CachingProductsManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FC972162A712DCC008593DE /* CachingProductsManagerTests.swift */; }; 4FCBA84F2A15391B004134BD /* SnapshotTesting+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 576C8A9127D27DDD0058FA6E /* SnapshotTesting+Extensions.swift */; }; - 4FCBA8512A153940004134BD /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 4FCBA8502A153940004134BD /* SnapshotTesting */; }; 4FCEEA5E2A379B80002C2112 /* DebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FCEEA5D2A379B80002C2112 /* DebugViewController.swift */; }; 4FD291BE2A1E9A2E0098D1B9 /* StoreKit2TransactionFetcherTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FD291BD2A1E9A2E0098D1B9 /* StoreKit2TransactionFetcherTests.swift */; }; 4FD3688B2AA7C12600F63354 /* PaywallEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FD3688A2AA7C12600F63354 /* PaywallEvent.swift */; }; @@ -455,7 +457,6 @@ 576C8A9227D27DDD0058FA6E /* SnapshotTesting+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 576C8A9127D27DDD0058FA6E /* SnapshotTesting+Extensions.swift */; }; 576C8AB927D2996C0058FA6E /* CurrentTestCaseTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575A17AA2773A59300AA6F22 /* CurrentTestCaseTracker.swift */; }; 576C8ABC27D2997C0058FA6E /* SnapshotTesting+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 576C8A9127D27DDD0058FA6E /* SnapshotTesting+Extensions.swift */; }; - 576C8ABE27D299860058FA6E /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 576C8ABD27D299860058FA6E /* SnapshotTesting */; }; 576C8AD927D2BCB90058FA6E /* HTTPRequestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 576C8AD827D2BCB90058FA6E /* HTTPRequestTests.swift */; }; 5774F9B62805E6CC00997128 /* CustomerInfoResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5774F9B52805E6CC00997128 /* CustomerInfoResponse.swift */; }; 5774F9BE2805E71100997128 /* Fixtures in Resources */ = {isa = PBXBuildFile; fileRef = 5774F9BD2805E71100997128 /* Fixtures */; }; @@ -569,7 +570,6 @@ 57DE80AF28075D77008D6C6F /* OSVersionEquivalent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57DE80AD28075D77008D6C6F /* OSVersionEquivalent.swift */; }; 57DE80BE28077010008D6C6F /* XCTestCase+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D22BF6626F3CBFB001AE2F9 /* XCTestCase+Extensions.swift */; }; 57DE80BF2807705F008D6C6F /* XCTestCase+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D22BF6626F3CBFB001AE2F9 /* XCTestCase+Extensions.swift */; }; - 57E0473B277260DE0082FE91 /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 57E0473A277260DE0082FE91 /* SnapshotTesting */; }; 57E2230727500BB1002DB06E /* AtomicTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57E2230627500BB1002DB06E /* AtomicTests.swift */; }; 57E415EB2846962500EA5460 /* PurchasesSyncPurchasesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57E415EA2846962500EA5460 /* PurchasesSyncPurchasesTests.swift */; }; 57E415EF284697A300EA5460 /* PurchasesDeferredPurchasesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57E415EE284697A300EA5460 /* PurchasesDeferredPurchasesTests.swift */; }; @@ -1450,7 +1450,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 576C8ABE27D299860058FA6E /* SnapshotTesting in Frameworks */, + 4DFF0D792B90A84A00BBBE71 /* SnapshotTesting in Frameworks */, 2D803F6926F149E70069D717 /* RevenueCat.framework in Frameworks */, 2D9C5ED726F281750057FC45 /* OHHTTPStubsSwift in Frameworks */, 2D9C5ED526F281750057FC45 /* OHHTTPStubs in Frameworks */, @@ -1471,7 +1471,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 57E0473B277260DE0082FE91 /* SnapshotTesting in Frameworks */, + 4DFF0D732B90A83800BBBE71 /* SnapshotTesting in Frameworks */, B36824BE268FBC5B00957E4C /* XCTest.framework in Frameworks */, 2D9C5ED326F2816F0057FC45 /* OHHTTPStubsSwift in Frameworks */, 2D9C5ED126F2816F0057FC45 /* OHHTTPStubs in Frameworks */, @@ -1484,7 +1484,7 @@ buildActionMask = 2147483647; files = ( 2D803F6626F144BF0069D717 /* Nimble in Frameworks */, - 4FCBA8512A153940004134BD /* SnapshotTesting in Frameworks */, + 4DFF0D752B90A84000BBBE71 /* SnapshotTesting in Frameworks */, 2DA85A8C26DEA7FB00F1136D /* RevenueCat.framework in Frameworks */, 2DE20B7626408807004C597D /* StoreKitTest.framework in Frameworks */, ); @@ -2902,6 +2902,7 @@ buildRules = ( ); dependencies = ( + 4DFF0D772B90A84700BBBE71 /* PBXTargetDependency */, 2DAC5F7726F13C9800C5258F /* PBXTargetDependency */, 2D803F6B26F150190069D717 /* PBXTargetDependency */, ); @@ -2910,7 +2911,7 @@ 2D803F6726F144C40069D717 /* Nimble */, 2D9C5ED426F281750057FC45 /* OHHTTPStubs */, 2D9C5ED626F281750057FC45 /* OHHTTPStubsSwift */, - 576C8ABD27D299860058FA6E /* SnapshotTesting */, + 4DFF0D782B90A84A00BBBE71 /* SnapshotTesting */, ); productName = StoreKitUnitTests; productReference = 2DAC5F7226F13C9800C5258F /* StoreKitUnitTests.xctest */; @@ -2948,6 +2949,7 @@ buildRules = ( ); dependencies = ( + 4DFF0D712B90A83200BBBE71 /* PBXTargetDependency */, 2DC5622124EC63430031F69B /* PBXTargetDependency */, 2DFF6C55270CA11400ECAFAB /* PBXTargetDependency */, ); @@ -2956,7 +2958,7 @@ 2D803F6226F144830069D717 /* Nimble */, 2D9C5ED026F2816F0057FC45 /* OHHTTPStubs */, 2D9C5ED226F2816F0057FC45 /* OHHTTPStubsSwift */, - 57E0473A277260DE0082FE91 /* SnapshotTesting */, + 4DFF0D722B90A83800BBBE71 /* SnapshotTesting */, ); productName = PurchasesTests; productReference = 2DC5621E24EC63430031F69B /* UnitTests.xctest */; @@ -2973,13 +2975,14 @@ buildRules = ( ); dependencies = ( + 4DFF0D522B90A4F300BBBE71 /* PBXTargetDependency */, 2D803F6D26F150200069D717 /* PBXTargetDependency */, 2DE20B8F26409EC0004C597D /* PBXTargetDependency */, ); name = BackendIntegrationTests; packageProductDependencies = ( 2D803F6526F144BF0069D717 /* Nimble */, - 4FCBA8502A153940004134BD /* SnapshotTesting */, + 4DFF0D742B90A84000BBBE71 /* SnapshotTesting */, ); productName = BackendIntegrationTests; productReference = 2DE20B6C264087FB004C597D /* BackendIntegrationTests.xctest */; @@ -3136,7 +3139,7 @@ packageReferences = ( 2D803F6126F144830069D717 /* XCRemoteSwiftPackageReference "nimble" */, 2D9C5ECB26F2815E0057FC45 /* XCRemoteSwiftPackageReference "OHHTTPStubs" */, - 57E04739277260DE0082FE91 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */, + 4DFF0D6F2B90A82900BBBE71 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */, ); productRefGroup = 352629FF1F7C4B9100C04F2C /* Products */; projectDirPath = ""; @@ -4059,6 +4062,18 @@ target = 2DEAC2D926EFE46E006914ED /* UnitTestsHostApp */; targetProxy = 2DFF6C54270CA11400ECAFAB /* PBXContainerItemProxy */; }; + 4DFF0D522B90A4F300BBBE71 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = 4DFF0D512B90A4F300BBBE71 /* SnapshotTesting */; + }; + 4DFF0D712B90A83200BBBE71 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = 4DFF0D702B90A83200BBBE71 /* SnapshotTesting */; + }; + 4DFF0D772B90A84700BBBE71 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = 4DFF0D762B90A84700BBBE71 /* SnapshotTesting */; + }; 4F6BEE072A27B02400CD9322 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 2DE20B7E26409EB7004C597D /* BackendIntegrationTestsHostApp */; @@ -4881,6 +4896,22 @@ minimumVersion = 9.0.0; }; }; + 4DFF0D4E2B90A4D200BBBE71 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/MarkVillacampa/swift-snapshot-testing"; + requirement = { + branch = "1.12.0-fix-test-observer"; + kind = branch; + }; + }; + 4DFF0D6F2B90A82900BBBE71 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/MarkVillacampa/swift-snapshot-testing"; + requirement = { + branch = "1.12.0-fix-test-observer"; + kind = branch; + }; + }; 4F6BEE0A2A27B02400CD9322 /* XCRemoteSwiftPackageReference "nimble" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/quick/nimble"; @@ -4913,14 +4944,6 @@ minimumVersion = 10.0.0; }; }; - 57E04739277260DE0082FE91 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 1.11.0; - }; - }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -4959,6 +4982,36 @@ package = 2D9C5ECB26F2815E0057FC45 /* XCRemoteSwiftPackageReference "OHHTTPStubs" */; productName = OHHTTPStubsSwift; }; + 4DFF0D512B90A4F300BBBE71 /* SnapshotTesting */ = { + isa = XCSwiftPackageProductDependency; + package = 4DFF0D4E2B90A4D200BBBE71 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */; + productName = SnapshotTesting; + }; + 4DFF0D702B90A83200BBBE71 /* SnapshotTesting */ = { + isa = XCSwiftPackageProductDependency; + package = 4DFF0D6F2B90A82900BBBE71 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */; + productName = SnapshotTesting; + }; + 4DFF0D722B90A83800BBBE71 /* SnapshotTesting */ = { + isa = XCSwiftPackageProductDependency; + package = 4DFF0D6F2B90A82900BBBE71 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */; + productName = SnapshotTesting; + }; + 4DFF0D742B90A84000BBBE71 /* SnapshotTesting */ = { + isa = XCSwiftPackageProductDependency; + package = 4DFF0D6F2B90A82900BBBE71 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */; + productName = SnapshotTesting; + }; + 4DFF0D762B90A84700BBBE71 /* SnapshotTesting */ = { + isa = XCSwiftPackageProductDependency; + package = 4DFF0D6F2B90A82900BBBE71 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */; + productName = SnapshotTesting; + }; + 4DFF0D782B90A84A00BBBE71 /* SnapshotTesting */ = { + isa = XCSwiftPackageProductDependency; + package = 4DFF0D6F2B90A82900BBBE71 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */; + productName = SnapshotTesting; + }; 4F6BEE092A27B02400CD9322 /* Nimble */ = { isa = XCSwiftPackageProductDependency; package = 4F6BEE0A2A27B02400CD9322 /* XCRemoteSwiftPackageReference "nimble" */; @@ -4974,26 +5027,11 @@ package = 4F6BEE0E2A27B02400CD9322 /* XCRemoteSwiftPackageReference "purchases-ios" */; productName = RevenueCat_CustomEntitlementComputation; }; - 4FCBA8502A153940004134BD /* SnapshotTesting */ = { - isa = XCSwiftPackageProductDependency; - package = 57E04739277260DE0082FE91 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */; - productName = SnapshotTesting; - }; 5759B335296DF65D002472D5 /* Nimble */ = { isa = XCSwiftPackageProductDependency; package = 5759B336296DF65D002472D5 /* XCRemoteSwiftPackageReference "nimble" */; productName = Nimble; }; - 576C8ABD27D299860058FA6E /* SnapshotTesting */ = { - isa = XCSwiftPackageProductDependency; - package = 57E04739277260DE0082FE91 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */; - productName = SnapshotTesting; - }; - 57E0473A277260DE0082FE91 /* SnapshotTesting */ = { - isa = XCSwiftPackageProductDependency; - package = 57E04739277260DE0082FE91 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */; - productName = SnapshotTesting; - }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 352629F51F7C4B9100C04F2C /* Project object */; diff --git a/RevenueCat.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/RevenueCat.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index fd3612a039..dd9ef4288d 100644 --- a/RevenueCat.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/RevenueCat.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -39,10 +39,10 @@ { "identity" : "swift-snapshot-testing", "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-snapshot-testing", + "location" : "https://github.com/MarkVillacampa/swift-snapshot-testing", "state" : { - "revision" : "26ed3a2b4a2df47917ca9b790a57f91285b923fb", - "version" : "1.12.0" + "branch" : "1.12.0-fix-test-observer", + "revision" : "eb2a5e7de035790b1455f90729fe2e5bc8fa8cad" } } ],