I am using the code below to purchase inapp in my app but when I purchase on my device, I don't get an apple server notification. Is this the right code to make purchases using revenue cat?
Purchases.shared.getOfferings { (offerings, error) in
if let offerings = offerings {
for offering in offerings.all {
let packages = offering.value.availablePackages
if let indexOfItem = packages.firstIndex(where: { $0.storeProduct.productIdentifier == productId }) {
let package = packages[indexOfItem]
Purchases.shared.purchase(package: package) { (transaction, customerInfo, error, userCancelled) in
if customerInfo?.entitlements["sumizeit_premium"]?.isActive == true {
// turn feature on
} else if userCancelled {
} else if error != nil {
} else {
}
}
}
}
} else {
}
}
Why am I not getting an apple server notification for successful purchases?