Support Runtime Code Injection
| Originator: | johntmcintosh | ||
| Number: | rdar://27786873 | Date Originated: | 10-Aug-2016 11:00 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | 10.12 / XC8 |
| Classification: | Security | Reproducible: | Always |
This is a duplicate of rdar://26878132 Over time the iteration cycle on an application has taken longer. Adopting modern technologies like Swift can make your apps run faster, but at the trade-off of developer iteration time as compiles can take longer. On top of that, when building an iOS application, you need to close your application and replace it with the new build to validate your changes. All this time, comes up to roughly 6-10 seconds per iteration on a default iOS template project. Even when doing an incremental build. -- For the last 4 years - there has been 2 Xcode plugins called Injection for Xcode, and DyCI that provide a way to iterate faster on your applications. https://github.com/johnno1962/injectionforxcode https://github.com/DyCI/dyci-main If you'd like a quick overview of how this works, and a few videos examples. You can find a 15m video I authored showcasing Injection for Xcode here: http://artsy.github.io/blog/2016/03/05/iOS-Code-Injection/ Injection allows me to rapidly build out view controllers and business logic in an elegant way, iteration times go down from seconds to microseconds. I can recieve a notification in my app that injection has occured and I then re-create the development state. Obviously the Xcode plugins are based on clever hacks, but they work. With Swift too. For contrast, in the Android world, this is considered a key feature of their development environment: http://android-developers.blogspot.com/2016/04/android-studio-2-0.html > Instant Run - For every developer who loves faster build speeds. Make changes and see them appear live in your running app. With many build/run accelerations ranging from VM hot swapping to warm swapping app resources, Instant Run will save you time every day. https://developer.android.com/studio/run/index.html#instant-run A quick look over their official dev page shows that Android Studio supports a few types of injection methods, hot swap, warm swap and cold swap - depending on the complexity of the changes. As iOS also has the same process model ( I think ) similar options could be available for developers using Xcode. This technique of saves me so much time, makes it significantly easier to work on building new application functionality that I'd love to see it being taken on officially within Xcode. -- Currently in order to continue using Xcode plugins you either have to use Xcode 7, unsign Xcode 8, or disable SIP entirely. For me, that is worth the tradeoff of keeping a 0.5 second iteration time. At least until I can get a separate Mac app to do the Injection work.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!