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

[BUG] Unable to access configurationStatus before sdk initialization. #239

Closed
ghost opened this issue Sep 17, 2024 · 1 comment
Closed

Comments

@ghost
Copy link

ghost commented Sep 17, 2024

General information

  • Superwall version: 3.8.0

Describe the bug

We are experiencing a crash when checking if the Superwall SDK has been configured. The crash occurs when using the following method:

swift
Superwall.shared.configurationStatus

Steps to Reproduce:
Attempt to check the configuration status of the Superwall SDK using the above method.
If the SDK is not configured, the app crashes immediately.
Expected Behavior: The app should handle the scenario where the SDK is not configured and should either return an appropriate status or throw a recoverable error, instead of crashing.

Actual Behavior: If the SDK is not configured, the app crashes without any error handling or fallback mechanism.

@yusuftor
Copy link
Collaborator

Hi, replied in slack but replying here too. You don't need to use configurationStatus, you should check Superwall.isInitialized. When that's true, it means that the shared instance is available to use and you can set Superwall.shared.subscriptionStatus.

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

1 participant