-
Notifications
You must be signed in to change notification settings - Fork 40
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
Activating AdaptyUI fails if done the same way as docs says #92
Comments
Same here version 3.2.1 |
Same, version 3.2.1 |
I think these fail unless you sequentially call them, either through structured concurrency (async/await) or activating within the completion. I haven't tried the latter, but assume that's why it's failing to activate. edit: I see you have the "in completion" solution marked |
Hello! I apologize for not addressing this issue sooner. Depending on the context, we suggest two ways to activate Adapty: 1. Asynchronous context with async/await:
2. Synchronous context with callbacks (e.g., within application(_:didFinishLaunchingWithOptions:)):
There is no need to wait for It would be helpful to have a demo project that reproduces the issue or, at the very least, verbose logs. |
I will try to reproduce the bug again. But that was definitely happening, I am not the only one who noticed. |
@EgorSigolaev I’m not saying there isn’t an issue, I just wanted to highlight the recommended ways to call Adapty methods and ask for additional details to reproduce it. I appreciate your help. |
I meant I used the approach of calling Adapty methods as you mentioned above. But it didn't work as expected. If I have any updates according the issue, I will write here. |
Yes I experienced the same thing @x401om. Calling the methods synchronously and then attempting to download a paywall failed immediately as "adapty not activated" |
In the docs, it's recommended to enable Adapty and AdaptyUI this way:
But when done this way, AdaptyUI fails to activate because it does not wait for Adapty to be activated.
And only later in the log you can see Adapty activating:
A way to fix this is writing it this way:
This way, AdaptyUI is only activated when Adapty is. (and it works)
Is this a bug or does docs need to be updated?
The text was updated successfully, but these errors were encountered: