Skip to content

Commit

Permalink
PurchaseTester: fixed compilation for internal entitlement verifi…
Browse files Browse the repository at this point in the history
…cation (#2417)
  • Loading branch information
NachoSoto committed Apr 19, 2023
1 parent 3b3713b commit d2dc5c4
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ public final class ConfiguredPurchases {
apiKey: String,
proxyURL: String?,
useStoreKit2: Bool,
observerMode: Bool,
entitlementVerificationMode: Configuration.EntitlementVerificationMode
observerMode: Bool
// Trusted Entitlements is internal until ready to be made public.
// entitlementVerificationMode: Configuration.EntitlementVerificationMode
) {
Purchases.logLevel = .verbose
Purchases.logHandler = Self.logger.logHandler
Expand All @@ -41,7 +42,8 @@ public final class ConfiguredPurchases {
with: .builder(withAPIKey: apiKey)
.with(usesStoreKit2IfAvailable: useStoreKit2)
.with(observerMode: observerMode)
.with(entitlementVerificationMode: entitlementVerificationMode)
// Trusted Entitlements is internal until ready to be made public.
// .with(entitlementVerificationMode: entitlementVerificationMode)
.build()
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ extension CacheFetchPolicy: Identifiable {

}

// Trusted Entitlements is internal until ready to be made public.

/*
extension Configuration.EntitlementVerificationMode {
var label: String {
Expand Down Expand Up @@ -84,3 +87,4 @@ extension VerificationResult: CustomStringConvertible {
}
}
*/
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ struct PurchaseTesterApp: App {
apiKey: data.apiKey,
proxyURL: data.proxy.nonEmpty,
useStoreKit2: data.storeKit2Enabled,
observerMode: data.observerMode,
entitlementVerificationMode: data.verificationMode
observerMode: data.observerMode
// Trusted Entitlements is internal until ready to be made public.
// entitlementVerificationMode: data.verificationMode
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ struct ConfigurationView: View {
with: "")
var proxy: String = ""
var storeKit2Enabled: Bool = true
var verificationMode: Configuration.EntitlementVerificationMode = .disabled
// Trusted Entitlements is internal until ready to be made public.
// var verificationMode: Configuration.EntitlementVerificationMode = .disabled
var observerMode: Bool = false
}

Expand Down Expand Up @@ -49,11 +50,14 @@ struct ConfigurationView: View {
}

Section(header: Text("Settings")) {
// Trusted Entitlements is internal until ready to be made public.
/*
Picker("Entitlement Verification", selection: self.$data.verificationMode) {
ForEach(Configuration.EntitlementVerificationMode.all) { mode in
Text(mode.label).tag(mode)
}
}
*/

Toggle(isOn: self.$data.storeKit2Enabled) {
Text("StoreKit2 enabled")
Expand Down Expand Up @@ -132,7 +136,8 @@ struct ConfigurationView: View {

}

extension Configuration.EntitlementVerificationMode: Codable {}
// Trusted Entitlements is internal until ready to be made public.
//extension Configuration.EntitlementVerificationMode: Codable {}

// MARK: -

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ private extension CustomerInfoView {
("Original Application Version", self.customerInfo.originalApplicationVersion ?? "-"),
("Original Purchase Date", self.date(customerInfo.originalPurchaseDate) ?? "-"),
("Latest Expiration Date", self.date(customerInfo.latestExpirationDate) ?? "-"),
("Request Date", self.date(customerInfo.requestDate) ?? "-"),
("Entitlement Verification", self.customerInfo.entitlements.verification.description),
("Request Date", self.date(customerInfo.requestDate) ?? "-")
// Trusted Entitlements is internal until ready to be made public.
// ("Entitlement Verification", self.customerInfo.entitlements.verification.description),
]
}

Expand Down

0 comments on commit d2dc5c4

Please sign in to comment.