Iterable / swift-sdk

Iterable's iOS SDK. Receive and track pushes to Iterable from your iOS app.
https://iterable.com/
MIT License
86 stars 67 forks source link

Fix custom payload decoding #642

Closed anlinguist closed 1 year ago

anlinguist commented 1 year ago

This PR fixes the custom payload decoding in embedded messages. Should work on most standard JSON structures. Tested with the following payload:

{
  "test": null,
  "testObj": [
    {
      "testObjKey1": 1,
      "testObjKey2": "two"
    },
    {
      "testObj2Key1": {
        "Obj2NestedKey1": 1,
        "obj2NestedKey2": "two"
      },
      "testObj2key2": "2"
    }
  ],
  "messageImportance": "low"
}