Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion code_blocks/tools/paywalls_3_new.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ struct App: View {
.sheet(isPresented: self.$displayPaywall) {
// We handle scroll views for you, no need to wrap this in a ScrollView
PaywallView()
.onPurchaseCompleted { customerInfo in
print("Purchase completed: \(customerInfo.entitlements)")
}
.onPurchaseFailure { error in
print("Purchase error: \(error.localizedDescription)")
}
.onRestoreCompleted { customerInfo in
print("Restore completed: \(customerInfo.entitlements)")
}
.onRestoreFailure { error in
print("Purchase error: \(error.localizedDescription)")
}
}
}
}
}