mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-11 22:55:55 +05:45
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:
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)
|
||||
|
||||
Reference in new issue
Block a user