Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PurchaseTester: fixed compilation for internal entitlement verification #2417

Merged
merged 1 commit into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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