【问题标题】:How to optimize revenue cat code to purchase subscriptions如何优化收入猫代码以购买订阅
【发布时间】:2022-12-02 16:48:01
【问题描述】:

I have the following swift code that allows me to purchase a subscription inside my IOS app. I\'m using the revenue cat SDK.

 Purchases.shared.logIn(uid) { (purchaserInfo, created, error) in
            Purchases.shared.offerings { (offerings, error) in
                if let package = offerings?.current?.lifetime {
                    Purchases.shared.purchasePackage(package) { (transaction, purchaserInfo, error, userCancelled) in
     

The issue is that this code takes a while to run. The user waits for the purchase to go through. I think it\'s getting the list of products before making a call to Apple. Is there a way to optimize this code by loading the packages on app load in the AppDelegate file for example?

    标签: ios swift revenuecat


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-09
    • 1970-01-01
    • 2014-07-19
    • 1970-01-01
    • 2015-08-12
    • 1970-01-01
    相关资源
    最近更新 更多