I agree. For me code swapping is such an important feature. I can't imagine how people are doing game development without it. On the other hand, there are a lot of games for mobile devices, so I guess it's not impossible...
Actually, it's not so bad. Libraries like libgdx allow you to target native Java and the phone via the same API. You can easily do 99.9% of the development on your PC and then deploy to phone to fix a few shader bugs here and there and be done with it.
On iOS a system could be build to support some form of hot code swapping. Reason being that application can load NSBundle objects at runtime and NSBundles can contain (among other things) executable code.
Sadly, Apple doesn't allow apps to use this in release versions, as apps could more easily exploit potential flaws in the system this way, since one could bypass Apple's approval process.
It already exists. The manifest has a "debuggable" flag that allows for a remote debugger to attach to a running app. Nothing on the Play Store is debuggable.
As I recall from my distant Android app development, you could redeploy to your phone (connected via a USB cable) in seconds, and it was never a big hindrance.
You typically just have a 'cheat code' to take you to any level or whatever so you are never far play-wise from where you want to be debugging.
You are right. Deploying takes seconds + a bit more to get to the state you're testing. This isn't bad, it's actually quite amazing when you think about it. But compared to instant feedback, it's in a completely different ball park.
Okay, but let's say you want to test a few looks. You tipically change back and forth and make small changes, so a few seconds for the redeploy, and mabe a few clicks here and there to get to where you want to be. That might take 10s each time. So testing if what looks nicer is is a matter of instant change and 10s per change and extra clicking all the time. I personally don't like repeating anything more than 5 times if it's not necesery.
If the state that you're in is more coplicated, you might need to type something, log in and do some crazy stuff to get to where you're debuging, then you see how much more anoying that gets.
You can also run arbitrary code from the standard debugger although it may not be possible to actually change the code substantially it can be useful for exploring and experimenting.
It's not just mobile; the only implementation of hot swapping for C I know of is MSVC's debugger, so I'm out of luck as an OS X and Linux user. Would be cool to implement.
14 comments
[ 0.24 ms ] story [ 45.6 ms ] threadCompile, re-deploy
Sadly, Apple doesn't allow apps to use this in release versions, as apps could more easily exploit potential flaws in the system this way, since one could bypass Apple's approval process.
More info on NSBundles here: https://developer.apple.com/library/ios/#documentation/Cocoa...
Apparently a more "low-level" approach is possible as well, but again not allowed by Apple: http://stackoverflow.com/a/10509453/250164
While this is handy for development work, the temptation to leave it in the final version ("Hey, it works now, why 'fix' it?") would be pretty high.
You typically just have a 'cheat code' to take you to any level or whatever so you are never far play-wise from where you want to be debugging.
If the state that you're in is more coplicated, you might need to type something, log in and do some crazy stuff to get to where you're debuging, then you see how much more anoying that gets.
http://vimeo.com/50137444
It packages it all up as a plugin for Xcode.