Can I use Monkey Types syntax and still target older devices?

Hello everyone,

I want to excuse myself in advance for probably asking a dumb question but... I would really like to use Monkey Types in compile time to ensure type-safety of my app but I really don't want to drop support for older devices in my apps. I would also be happy to not have to a different code base and deploy another app just because of that.

Is that possible to achieve? In other words, does the Monkey Types compiler produce backwards compatible bytecode?

Thank you!

  • Along with the announcement for the 4.0 preview is a sample watch face with money types that you can build and run in the sim.  So yes, they can be used on older devices.  There are no 4.0 devices available yet.

    But also note, this is a preview and things like building an iq file are disabled, so if you start converting all your apps to use monkey types, you won't be able to update them in the store.  It's best to copy one of your apps and experiment with monkey types using that, while keeping the original, where you can switch back to the 3.2 SDK to build iq files and update the store.

  • Oh, I think I found my answer in the docs:

    Compatibility - Breaking changes to the Monkey C language would require re-work to thousands of Connect IQ apps. Monkey Types extends the Monkey C grammar but avoids breaking changes. Monkey Types is also designed to not rely on additional run time information. Because of this you can use Monkey Types for apps that run on Connect IQ 1.x compatible devices.

  • But understand that if you convert all your apps to use monkey types today, you won't be able to publish them until 4.0 comes out of preview/beta and that could be a while.

    So you want to save off your current code so it can be maintained until the 4.0 SDK is released.