Skip to content

BundleSandboxEnvironmentDetector: always return true when running on simulator#2276

Merged
NachoSoto merged 3 commits into
mainfrom
simulator-receipt
Feb 12, 2023
Merged

BundleSandboxEnvironmentDetector: always return true when running on simulator#2276
NachoSoto merged 3 commits into
mainfrom
simulator-receipt

Conversation

@NachoSoto

Copy link
Copy Markdown
Contributor

Thanks to @chrisvasselli for the find and initial implementation (#2275).

This supersedes the workaround introduced in #1730, now making IntegrationTests not override the SandboxEnvironmentDetector.

… on simulator

Thanks to @chrisvasselli for the find and initial implementation.
This supersedes the workaround introduced in #1730, now making `IntegrationTests` not override the `SandboxEnvironmentDetector`.
@NachoSoto NachoSoto added the pr:fix A bug fix label Feb 9, 2023
@NachoSoto NachoSoto requested a review from a team February 9, 2023 17:46
}
}

#if DEBUG

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer needed. This is the main change from #2275.

@codecov

codecov Bot commented Feb 9, 2023

Copy link
Copy Markdown

Codecov Report

Merging #2276 (c75ab7a) into main (766df08) will increase coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2276      +/-   ##
==========================================
+ Coverage   86.07%   86.21%   +0.14%     
==========================================
  Files         186      186              
  Lines       12282    12285       +3     
==========================================
+ Hits        10572    10592      +20     
+ Misses       1710     1693      -17     
Impacted Files Coverage Δ
Sources/Misc/SandboxEnvironmentDetector.swift 95.23% <100.00%> (+1.48%) ⬆️
Sources/Misc/SystemInfo.swift 98.26% <100.00%> (-0.03%) ⬇️
...s/Purchasing/Purchases/PurchasesOrchestrator.swift 86.04% <0.00%> (+0.11%) ⬆️
Sources/Error Handling/ErrorUtils.swift 85.42% <0.00%> (+1.16%) ⬆️
...king/Operations/GetIntroEligibilityOperation.swift 100.00% <0.00%> (+1.58%) ⬆️
...s/LocalReceiptParsing/Helpers/ReceiptStrings.swift 84.05% <0.00%> (+4.34%) ⬆️
...rces/Purchasing/StoreKit1/ProductsFetcherSK1.swift 94.35% <0.00%> (+4.51%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread Tests/UnitTests/Misc/SandboxEnvironmentDetectorTests.swift Outdated
@NachoSoto NachoSoto enabled auto-merge (squash) February 10, 2023 10:10
@tonidero

Copy link
Copy Markdown
Contributor

Ah will need to fix the usages of that function as well @NachoSoto

@NachoSoto NachoSoto merged commit 5117cee into main Feb 12, 2023
@NachoSoto NachoSoto deleted the simulator-receipt branch February 12, 2023 01:30
NachoSoto pushed a commit that referenced this pull request Feb 15, 2023
**This is an automatic release.**

### Bugfixes
* `PurchaseOrchestrator`: always refresh receipt purchasing in sandbox
(#2280) via NachoSoto (@NachoSoto)
* `BundleSandboxEnvironmentDetector`: always return `true` when running
on simulator (#2276) via NachoSoto (@NachoSoto)
* `OfferingsManager`: ensure underlying
`OfferingsManager.Error.configurationError` is logged (#2266) via
NachoSoto (@NachoSoto)
### Other Changes
* `UserDefaultsDefaultTests`: fixed flaky failures (#2284) via NachoSoto
(@NachoSoto)
* `BaseBackendTest`: improved test failure message (#2285) via NachoSoto
(@NachoSoto)
* Updated targets and schemes for Xcode 14.2 (#2282) via NachoSoto
(@NachoSoto)
* `HTTPRequest.Path.health`: don't cache using `ETagManager` (#2278) via
NachoSoto (@NachoSoto)
* `EntitlementInfos.all`: fixed docstring (#2279) via NachoSoto
(@NachoSoto)
* `StoreKit2StorefrontListener`: added tests to fix flaky code coverage
(#2265) via NachoSoto (@NachoSoto)
* `NetworkError`: added underlying error to description (#2263) via
NachoSoto (@NachoSoto)
* Created `Signing.verify(message:hasValidSignature:with:)` (#2216) via
NachoSoto (@NachoSoto)
NachoSoto added a commit to RevenueCat/purchases-hybrid-common that referenced this pull request Feb 21, 2023
NachoSoto added a commit that referenced this pull request Nov 9, 2023
NachoSoto added a commit that referenced this pull request Nov 9, 2023
NachoSoto added a commit that referenced this pull request Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants