Okay, listen up friends! I've been to the web developer community and it has changed me. I got used to saving a file and having the changes reflected within my software instantly through a technology JavaScript developers call Hot Module Reloading, or HMR.
When I returned from the far away lands of JavaScript, I became sad and frustrated by how long it took to see my changes reflected in running software. Here's my dream scenario:
I hit save, Xcode recompiles my file (just my file so its really fast) and sends the compiled code over to the simulator. There, it's patched into the runtime. Visible view controllers and the app delegate get a message that the app has been reloaded, so they refresh their contents. I see my changes in under a second.
Sure, it isn't always gonna work. Some files do stuff with the runtime that wouldn't be HMRable. But that's not the point. It's okay if HMR only works nine out of ten times, because I can always do a recompile if something isn't working. HMR doesn't work 100% of the time in JS either, but it still drastically improves the developer experience and drastically decreases the amount of time I spend waiting. I really don't like waiting.
This isn't just fantasy, it already exists: https://github.com/johnno1962/injectionforxcode But it's a bit clumsy. I want first-party support because no one else but Apple has the opportunity to look at all the layers of software involved in this process. No one but you can pull this off.
Description
Okay, listen up friends! I've been to the web developer community and it has changed me. I got used to saving a file and having the changes reflected within my software instantly through a technology JavaScript developers call Hot Module Reloading, or HMR.
When I returned from the far away lands of JavaScript, I became sad and frustrated by how long it took to see my changes reflected in running software. Here's my dream scenario:
I hit save, Xcode recompiles my file (just my file so its really fast) and sends the compiled code over to the simulator. There, it's patched into the runtime. Visible view controllers and the app delegate get a message that the app has been reloaded, so they refresh their contents. I see my changes in under a second.
Sure, it isn't always gonna work. Some files do stuff with the runtime that wouldn't be HMRable. But that's not the point. It's okay if HMR only works nine out of ten times, because I can always do a recompile if something isn't working. HMR doesn't work 100% of the time in JS either, but it still drastically improves the developer experience and drastically decreases the amount of time I spend waiting. I really don't like waiting.
This isn't just fantasy, it already exists: https://github.com/johnno1962/injectionforxcode But it's a bit clumsy. I want first-party support because no one else but Apple has the opportunity to look at all the layers of software involved in this process. No one but you can pull this off.
- Product Version: Created: 2017-10-08T15:57:34.697370 Originated: 2017-08-10T00:00:00 Open Radar Link: http://www.openradar.me/34875826