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

Activating AdaptyUI fails if done the same way as docs says #92

Open
nathanfallet opened this issue Nov 25, 2024 · 2 comments
Open

Activating AdaptyUI fails if done the same way as docs says #92

nathanfallet opened this issue Nov 25, 2024 · 2 comments

Comments

@nathanfallet
Copy link

nathanfallet commented Nov 25, 2024

In the docs, it's recommended to enable Adapty and AdaptyUI this way:

Adapty.activate(with: configurationBuilder) { error in
  // handle the error
}
// Only if you are going to use AdaptyUI
AdaptyUI.activate()

But when done this way, AdaptyUI fails to activate because it does not wait for Adapty to be activated.

AdaptyUI activate error: You should activate Adapty SDK before using AdaptyUI
v3.2.0, AdaptyUI/AdaptyUI+Public.swift#211

And only later in the log you can see Adapty activating:

Adapty activated successfully. [2UDtMB]
v3.2.0, Adapty/Adapty+Activate.swift#93

A way to fix this is writing it this way:

Adapty.activate(with: configurationBuilder) { error in
  if let error {
    // handle the error
    return
  }
  // Only if you are going to use AdaptyUI
  AdaptyUI.activate()
}

This way, AdaptyUI is only activated when Adapty is. (and it works)

Is this a bug or does docs need to be updated?

@yildirimatcioglu
Copy link

Same here version 3.2.1

@EgorSigolaev
Copy link

Same, version 3.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants