Under the Bridge

App Tweaking

So do you really really want to be tweaking your app a whole lot at runtime? Well, if you do, here is an article

Tweak Away

that goes through how to set things up to telnet into your running app and muck with it using the Lua Objective-C Bridge. An intriguing option, certainly…

… but be careful, otherwise the righteous wrath of the Review Team shalt descend upon thou:

… If that was not enough, this morning you got rejected again… by Apple! They discovered they could use your binary to upload Lua scripts and run all kinds of hacks on the device. Somehow they didn’t thought that was cool.

Yeah, we could actually have seen that one coming quite a ways away. [EDIT: At least, we can foresee it; note in comments below the author gently corrects us that the presented situation was actually a pastiche. Oops.] So if that idea does interest you, grab the source code here from the second post that explains how to sort this out in proper fashion.

Personally, we’d be more inclined to just have the iPhone app access changing data files/config settings from our developing Mac via http:// rather than go to all this trouble. But hey, it’s a moderately nifty thing to know how to do in any case!

h/t: ManiacDev!

UPDATE:

And here’s a followup building on the above link: Tuning Your Game Made Easy!

3
  • http://mysterycoconut.com Miguel A. Friginal

    Hi! I am the author of both articles. Just to clarify, the “rejected by Apple” part from the second one is pure fiction; there was no “righteous wrath”, I was just voicing other people’s concerns.

    The first article explained that you need to use #ifdefs all over the place to make sure the Telnet server is not used in a Release version. The second article expands on that and explains a different procedure that doesn’t require modifying the code.

    The advantage of having a Telnet server as opposed to reading config files through http is really quick turn-around. You don’t need to open/change/save/reload anything, just send the right command and you are done. With the addition of Lua, is really easy to have access to any method of any of your Objective-C objects. The negative is of course that you don’t end up saving all these changes at the end, but still great for quick tweaking and prototyping.

    Hope both articles helped. Cheers!

  • http://www.alexcurylo.com/ Alex

    > Just to clarify, the “rejected by Apple” part from the second one is pure fiction;

    Oops, skimmed too quickly to catch the sarcasm, cha. Still, the concern may not be completely misplaced…

  • http://www.bestfinance-blog.com BarkerALLIE

    Some specialists tell that credit loans help people to live the way they want, just because they can feel free to buy needed stuff. Furthermore, different banks offer credit loan for young and old people.