Error when calling "replace all mappings" block

Hello, I am running App Inventor and using the AI Companion to run it on an iPhone. However, when I try to run a simple program, calling the "replace all mappings" block. It shows me this error: undefined variable. Irritants: (yail/string-replace-mappings-longest-string)

This is the block code used to create the simple app, which produces the error:

Is this the correct way to use this block? Is there a way to get around this problem?

Thank you,
FM

According to
https://doesappinventorrunonios.com/
that replace block is not yet supported in iOS.

In the meantime, you can make do with writing your own value procedure to loop through a given dictionary of replacements, longest key first, and applying the old text replace block repeatedly to the input text.

Or you could just use the old replace block, since you are doing just one replacement anyway.

image