-
-
Notifications
You must be signed in to change notification settings - Fork 12
ref: Improve initialization flow #322
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
Conversation
| should_enable = false; | ||
| #endif | ||
| } | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: SDK Initialization Fails on Unsupported Platforms
The _auto_initialize method doesn't correctly update the enabled flag when the SDK is effectively disabled. This occurs on unsupported platforms or when the Android plugin is missing. Although the constructor correctly sets internal_sdk to DisabledSDK in these cases, is_enabled() returns an incorrect true, leading to an inconsistent SDK state.
This PR cleans up and restructures initialization flow in preparation for lifecycle methods, extracted from #321.
prepare_and_auto_initialize()method.These changes make it easier to follow the initialization flow and reduce the risk of errors.