My son Ding Wen
just ported some of his Apple IIGS programs to iPhone using GScript
The programs can run natively on iPhone by embedding a full screen WebKit browser (UIWebView) to host a web application. All iPhone web technologies, including multi-touch, canvas and animation, can be used in the application.
This is how you can also do it as an iPhone developer (you can signed up free on Apple developer site, but to get it up and running on a real iPhone or iPod touch, you will need to sign up the US$99 developer program).
Write a web application and tested them to work under iPhone Mobile Safari browser. If you have already learnt about Complete Pascal or other similar programming languages using QuickDraw, GScript
folder. Go to the Targets
folder and open up your application folder - you should see a Copy Bundle Resources
- move them to Copy Bundle Resources
In the controller.m file, change the content of the loadView
UIWebView *webView = [[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
NSString *path = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"];
self.view = webView;
[UIApplication sharedApplication].statusBarHidden = YES;
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:path]]];
This code assuming the HTML file name to be index.html - change as you will.
You can now compile and get a running native application on your iPhone!
Ding Wen ported his Apple IIGS program Doodle Kids
You can also add sounds and other native iPhone technologies to the code later. Have fun!