iPhone apps using Codea

Does anyone have any experience in actually making iPhone / iPod builds using Codea.
I’ve got all the resolution independent stuff working so that’s not an issue.

What I was wondering about was handling device events such as responding to the following functions


- (void)applicationWillResignActive:(UIApplication *)application
- (void)applicationDidEnterBackground:(UIApplication *)application
- (void)applicationWillEnterForeground:(UIApplication *)application
- (void)applicationDidBecomeActive:(UIApplication *)application
- (void)applicationWillTerminate:(UIApplication *)application

and how to respond to these in Codea?

Any help / advice greatly appreciated.

Thanks

@Crumble - when I do my device testing, I just have a table of entries of WIDTH’s and HEIGHT’s and I set them to the relevant values depending on the device and it works a treat. On my iPad 3 emulating an iPhone4 res of 320x480 (just ignore retina) gives a screen that’s about 10% larger than a real iPhone so it’s not perfect, but certainly good enough.

@JakAttak - any timings based on DeltaTime could cause problems, you CAN get away without detecting these events, but it does make for a better product if you do.

@TechDojo, all of my apps are universal and I’ve never bothered with any of those functions.

@JakAttak - from a usability point of view, what happens with your app if your in the middle of playing a game and you get a phone call or you press the home button and then want to return to your app later.

It’d be nice to be able to ensure that state is saved when this happens - or at the very least have your app be in “paused” mode when it restarts.

Lastly - regarding universal builds, I’ve had an app rejected in the past because I didn’t significantly differentiate the layout between iPhone / iPad (basically it was the same layout just scaled up), at the time I just resubmitted it as a phone only build and it was accepted, then on the iPad it just the system scaling and it looked exactly the same…

Should I worry about my app scaling down to an iPhone? I’ve just been going along assuming that since everything has WIDTH and HEIGHT in it that it ahould work out fine.

I have done my universal apps with all fixed numbers (even font size, etc.) relative to WIDTH and HEIGHT, and they work perfect as universal.

Easiest way to test is to make WIDTH and HEIGHT 320x480 or visa versa. and see how it translates. Then be sure to remove that part before submitting.

@TechDojo, I suppose being rejected for ui is more relevant for apps that for games. When you answer a call or press home or whatever, the state is saved and you can return to it later unless your phone runs out of memory and needs to clear it to get some more.