mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-22 08:32:11 +00:00
Fall back to production if beta receipt is missing (#1031)
When level is .beta, it was relying on beta receipt exclusively without falling back to production receipt. This was preventing the sandbox receipt ("production" in TestFlight) from being read unless the AppUserLevel was explicitly set to .freemium (0).
This commit is contained in:
parent
46d236cb5e
commit
0d3af046b4
@ -64,7 +64,9 @@ private extension FallbackReceiptReader {
|
||||
pp_log(.App.iap, .debug, "\tParse receipt for user level \(userLevel)")
|
||||
if userLevel == .beta, let betaReader {
|
||||
pp_log(.App.iap, .debug, "\tTestFlight, read beta receipt")
|
||||
return await betaReader.receipt()
|
||||
if let receipt = await betaReader.receipt() {
|
||||
return receipt
|
||||
}
|
||||
}
|
||||
pp_log(.App.iap, .debug, "\tProduction, read main receipt")
|
||||
return await mainReader.receipt()
|
||||
|
@ -1,12 +0,0 @@
|
||||
views.preferences.erase_icloud
|
||||
views.preferences.erase_icloud.footer
|
||||
views.profile.sections.name.footer
|
||||
views.purchased.sections.features.header
|
||||
modules.openvpn.credentials.guidance.web
|
||||
modules.openvpn.remotes
|
||||
features.dns
|
||||
features.http_proxy
|
||||
features.routing
|
||||
global.actions.reconnect
|
||||
errors.app.tunnel
|
||||
errors.app.passepartout.missing_provider_entity
|
@ -236,8 +236,8 @@ private extension AppContext {
|
||||
|
||||
private extension Dependencies {
|
||||
var customUserLevel: AppUserLevel? {
|
||||
guard let userLevelString = BundleConfiguration.mainIntegerIfPresent(for: .userLevel),
|
||||
let userLevel = AppUserLevel(rawValue: userLevelString) else {
|
||||
guard let userLevelInteger = BundleConfiguration.mainIntegerIfPresent(for: .userLevel),
|
||||
let userLevel = AppUserLevel(rawValue: userLevelInteger) else {
|
||||
return nil
|
||||
}
|
||||
return userLevel
|
||||
|
Loading…
Reference in New Issue
Block a user