Update examples for api updates (#918)

Add deprecations for renamed purchase methods so Xcode can suggest the rename.
Update purchase methods for named completion block instead of _
This commit is contained in:
Joshua Liebowitz authored and GitHub committed 2021-10-22 15:59:13 -07:00
1 parent 526570bdca
commit 271fd11412
28 files changed
+155 -101

No files matched your search

@@ -19,14 +19,14 @@ class InitialViewController: UIViewController {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
// Get the latest purchaserInfo to see if we have a pro cat user or not
Purchases.shared.purchaserInfo { (purchaserInfo, error) in
// Get the latest customerInfo to see if we have a pro cat user or not
Purchases.shared.getCustomerInfo { (customerInfo, error) in
if let e = error {
print(e.localizedDescription)
}
// Route the view depending if we have a premium cat user or not
if purchaserInfo?.entitlements["pro_cat"]?.isActive == true {
if customerInfo?.entitlements["pro_cat"]?.isActive == true {
// if we have a pro_cat subscriber, send them to the cat screen
let storyboard = UIStoryboard(name: "Main", bundle: nil)