Web View Post Message/Receive Message Error

Im using the Thunkable Web Viewer Extensions (https://github.com/thunkable/webviewer-extension) to pass a simple object from my web app to the thunkable web viewer:

Screenshot 2022-02-08 at 19.23.48

and catch it like that:
Screenshot 2022-02-08 at 19.12.22

it works well on the live preview:

but when previewing on iOS using the Thunkable Live app im getting the following error:

it works when im passing a simple string instead of an object. is this a bug or am i missing something?
any help is much appreciated.

2 Likes

in your code, use this

ThunkableWebviewerExtension.postMessage(JSON.stringify(messasgeObj)

and in your blocks use it like this
Screen Shot 2022-02-08 at 1.53.36 PM

1 Like

awesome, works perfectly! thanks.

was not aware that the component expects a string…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.