Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for async/await APIs #223

Open
rudrankriyam opened this issue Nov 25, 2021 · 6 comments
Open

Support for async/await APIs #223

rudrankriyam opened this issue Nov 25, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@rudrankriyam
Copy link

Are there any plans to support the async/await APIs in the near future?

Thanks!

@suriksarkisyan
Copy link
Contributor

Hi @rudrankriyam
Support of Swift async/await API is definitely in our plan, but I can’t provide you with an estimation time at this moment. Considering that it is available just with iOS15 and there are not many teams with min deployment target = iOS 15, we decided to focus on more valuable features.
There is a chance that Apple will add Swift async/await API to iOS13 (you can find more information about it here). If it happens, we will add async/await API support to our top-priority list. I’ll let you know!

@rudrankriyam
Copy link
Author

@suriksarkisyan Just want to update you that they have added support for iOS 13+. It is available with Xcode beta 13.2, and hopefully, 13.2 should be released soon!
Screen Shot 2021-11-26 at 5 16 19 PM

@suriksarkisyan
Copy link
Contributor

Hi @rudrankriyam
Sorry for the late reply 🙁
As I said, we will add this feature to our top-priority list. But I still can't give you an estimate, let's keep in touch 🤝

@suriksarkisyan suriksarkisyan added the enhancement New feature or request label Dec 8, 2021
@rudrankriyam
Copy link
Author

rudrankriyam commented Jan 20, 2022

Hi @suriksarkisyan!

I read this proposal on Concurrency Interoperability with Objective-C, and it has been implemented in Swift 5.5.

So, I don't think you require to add support for it?

I can use it like:

if #available(iOS 13, *) {
      let (result, canceled) = try await Qonversion.purchaseProduct(product)
      
      let permissions = try await Qonversion.restore()
      
      let offerings = try await Qonversion.offerings()
}

And so on.

I plan to use them in my app this weekend and let you know how it goes!

@suriksarkisyan
Copy link
Contributor

Hi @rudrankriyam
Looks awesome. I'll wait for your feedback about that 🤝

@LucasAbijmil
Copy link

LucasAbijmil commented May 3, 2023

Hi @suriksarkisyan ,

I found out that the function purchase throws an error if the user has cancelled the payment flow.
let (entitlements, isCancelled) = try await qonversion.purchase(product.identifier)

However, I would expect that if the user cancelled the payment, that the function would not throw an error since this would be stored in the isCancelled property of the tuple.

Do you plan to change this behavior or should I make a custom implementation?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants