Closed malcommac closed 2 years ago
Hi @malcommac,
Thank you for the feedback, this is not a bug but a documented behavior ([wipeData()
](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/wipedata()), enabled
).
Calling wipeData()
or braze.enable = false
is persistent across app launches. I agree the behavior is unintuitive, but is there to avoid cases where the user would decline an analytics notice (e.g. GDPR) and the app mistakenly initializes the SDK for the next session. This is a behavior consistent with our Android and Web SDKs.
In practice, this means that you need to call braze.enabled = true
at some point after wipeData()
.
We'll look into making these apis more ergonomic.
Platform
iOS
Platform Version
16.0.1
Braze SDK Version
5.5.1
Xcode Version
XCode 14.0.1
Computer Processor
Apple (M1)
Repro Rate
100%
Steps To Reproduce
After initializing the SDK (it seems to happens since the 5.5.1) we got the following errors on console (with debug mode active):
The same
Braze SDK disabled: Cannot perform action
is repeated with any triggered event.The only workaround is to call the
enable()
function explicitly on SDK:with this, it seems working fine; otherwise, the same error is logged over and over again.
I think we should assume enable the SDK after initialization unless explicitly calling
disable()
method.This is weird behavior, probably a bug inside the
init
function of the SDK itself.Expected Behavior
it should work fine
Actual Incorrect Behavior
report the SDK disabled error and no events are correctly logged.
Verbose Logs
No response
Additional Information
No response