amplitude / experiment-ios-client

MIT License
2 stars 9 forks source link

Cached payload data is returned as base64 string #39

Closed AlTavares closed 9 months ago

AlTavares commented 9 months ago

I got some JSON Decoding crashes while trying to read the payload for my experiments variants while the app is offline. For some reason it's returning as a base64 string.

When the user has connection it doesn't happen.

Example:

returned payload: eyJwYXlsb2FkIjp7InVzZV90b2RheV9yZWRlc2lnbiI6dHJ1ZX19 base64 decoded: {"payload":{"use_today_redesign":true}}

Expected payload (this is returned when the app is online):

([String : Any?]) 1 key/value pair {
  [0] = {
    key = "use_today_redesign"
    value = true
  }
}
bgiori commented 9 months ago

Hi @AlTavares, thanks for reporting. What version of the SDK are you using?

AlTavares commented 9 months ago

1.12.0

bgiori commented 9 months ago

fixed in v1.12.2