Skip to content

Commit

Permalink
Trusted Entitlements: added debug log with `ResponseVerificationMod…
Browse files Browse the repository at this point in the history
…e` (#2647)

I was going through some logs, and realized I couldn't tell what mode
was configured, and I thought it would be useful.
  • Loading branch information
NachoSoto authored Jun 14, 2023
1 parent 0d448c1 commit c9aa39e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Sources/Logging/Strings/ConfigureStrings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ enum ConfigureStrings {

case observer_mode_enabled

case response_verification_mode(Signing.ResponseVerificationMode)

case delegate_set

case purchase_instance_already_set
Expand Down Expand Up @@ -98,6 +100,15 @@ extension ConfigureStrings: CustomStringConvertible {
return "StoreKit 2 support enabled"
case .observer_mode_enabled:
return "Purchases is configured in observer mode"
case let .response_verification_mode(mode):
switch mode {
case .disabled:
return "Purchases is configured with response verification disabled"
case .informational:
return "Purchases is configured with informational response verification"
case .enforced:
return "Purchases is configured with enforced response verification"
}
case .delegate_set:
return "Delegate set"
case .purchase_instance_already_set:
Expand Down
1 change: 1 addition & 0 deletions Sources/Purchasing/Purchases/Purchases.swift
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ public typealias StartPurchaseBlock = (@escaping PurchaseCompletedBlock) -> Void
Logger.debug(Strings.configure.system_version(SystemInfo.systemVersion), fileName: nil)
Logger.debug(Strings.configure.is_simulator(SystemInfo.isRunningInSimulator), fileName: nil)
Logger.user(Strings.configure.initial_app_user_id(isSet: appUserID != nil), fileName: nil)
Logger.debug(Strings.configure.response_verification_mode(systemInfo.responseVerificationMode), fileName: nil)

self.requestFetcher = requestFetcher
self.receiptFetcher = receiptFetcher
Expand Down

0 comments on commit c9aa39e

Please sign in to comment.