-
Notifications
You must be signed in to change notification settings - Fork 797
Product Information
Sam Spencer edited this page Jul 15, 2021
·
3 revisions
You can retrieve product information using known product IDs.
SwiftyStoreKit.retrieveProductsInfo(["com.musevisions.SwiftyStoreKit.Purchase1"]) { result in
if let product = result.retrievedProducts.first {
let priceString = product.localizedPrice!
print("Product: \(product.localizedDescription), price: \(priceString)")
} else if let invalidProductId = result.invalidProductIDs.first {
print("Invalid product identifier: \(invalidProductId)")
} else {
print("Error: \(result.error)")
}
}