KeenClient-iOS
KeenClient-iOS copied to clipboard
Crash with a blank read key
KeenClient v3.6.1 crashes with a blank read key, with the error 'KeenNoWriteKeyProvided', reason: 'You tried to add an event without setting a write key, please set one!
This is after setting up the shared client with KeenClient.sharedClient(withProjectID: "xxxxxx", andWriteKey: "xxxxxx", andReadKey: "")
in Swift.
Using any String (even a single letter) for andReadKey
prevents the crash. andReadKey
should really be optional and default to nil since it's not required to send events.
Thanks for reporting the issue, @hallee!
I'm trying to repro the issue and I'm not having much luck, maybe you can help me.
If I try to initialize the shared client with KeenClient.sharedClient(withProjectID: "xxxxxx", andWriteKey: "xxxxxx", andReadKey: "")
, I get an error message E:Your readKey cannot be an empty string.
with a nil
value returned from sharedClient...
.
Could you provide a short snippet I could run to reproduce the exception?