DSLs for Safe iOS/watchOS Communication

I'm currently writing an Apple Watch counterpart app for Podcatcher . The Watch Connectivity framework that iOS apps use to communicate with watchOS apps offers a limited API for communication: you can either send untyped dictionaries or arbitrary byte strings between the two. In a large app, you want more structure than that framework offers. One approach you can take is to encode shared structs…