SDK should use isDebugEnabledField instead of BuildConfig.DEBUG
marcin-adamczewski opened this issue · comments
Checklist before submitting a bug report
- I've updated to the latest released version of the SDK
- I've searched for existing Github issues
- I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- I've read the Code of Conduct
- This issue is not security related and can safely be disclosed publicly on GitHub
Java version
irrelevant
Android version
irrelevant
Android SDK version
irrelevant - exists on latest main branch
Installation platform & version
Gradle
Package
Core & AppEvents
Goals
AppEventUtility
uses BuildConfig.DEBUG, which always returns false as you also claim in troubleshooting here
https://developers.facebook.com/docs/android/troubleshooting/#faq_491357261067442
This code and probably other places in SDK should use FacebookSdk.isDebugEnabledField
flag.
For example
AppEventsLogger.clearUserID()
should not be called on the main thread as it calls assertIsNotMainThread()
inside. Because of this bug, developer doesn't know about it as the app wouldn't crash in debug mode and because this is not documented.
Expected results
Replace BuildConfig.DEBUG with FacebookSdk.isDebugEnabledField
Actual results
App didn't crash in debug, while it should
Steps to reproduce
No response
Code samples & details
// INSERT YOUR CODE HERE