Can anyone advise where to place the following code suggested by RC in the app? Currently, the sample code I’ve seen so far only places the logLevel and configure in the init() of the App struct. Not sure where to put the shared.delegate and AppDelegate extension. Thank you for sharing!
// Option 1: using PurchasesDelegate:
Purchases.logLevel = .debug
Purchases.configure(withAPIKey: <public_sdk_key>)
Purchases.shared.delegate = self // make sure to set this after calling configure
extension AppDelegate: PurchasesDelegate {
func purchases(_ purchases: Purchases, receivedUpdated customerInfo: Purchases.CustomerInfo) {
// handle any changes to customerInfo
}
}