I have a purchase manager class and an entitlement manager class. Everything is working great, but this code is not working.
init(entitlementManager: EntitlementManager) {
self.entitlementManager = entitlementManager
super.init()
self.updates = observeTransactionUpdates()
SKPaymentQueue.default().add(self)
}
extension SubscriptionsManager: SKPaymentTransactionObserver {
func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
}
func paymentQueue(_ queue: SKPaymentQueue, shouldAddStorePayment payment: SKPayment, for product: SKProduct) -> Bool {
return true
}
}
The Xcode warning message is:
SKPaymentQueue was deprecated in iOS 18.0: No longer supported
SKPaymentTransaction was deprecated in iOS 18.0: Use PurchaseResult from Product.purchase(confirmIn:options:)
I want to support in-app purchases from the App Store. How should I do this?