I'm trying to use Communications.PhoneAppMessage and I'm following the example given in the Toybox API documentation as:
using Communications;
// set up somewhere to store the message
var message = new Communications.PhoneAppMessage;
// set up phoneMessageCallback
function phoneMessageCallback(msg) {
message = msg.data;
}
// register the messages from the callback to capture the results
Communications.registerForPhoneAppMessages(method(:phoneMessageCallback));
In the Connect IQ Device simulator, I use the menu entry: Simulation/Phone App Message and I enter {"my message"}. The simulator crash with:
Error: JSON Error
Stack:
Encountered app crash.
On macOs 12.2.1 with connectiq-sdk-mac-4.0.9-2022-01-24-2154651d3