views:

344

answers:

5

I have a HTML Ajax website which consists only of one HTML file. How can I create an iPhone App out of it? The HTML file should be stored locally on the iPhone so it functions offline.

+2  A: 

Depending on what level of AJAX you're using, the "CSS Ninja" has a nice tutorial on how to add the proper code your HTML file to make it accessible offline.

Dillie-O
Good hint! But I want to build a native iPhone App for the shop.
powtac
+2  A: 

You can look at something like PhoneGap or iui.

larrys
Thanks, these links seem to be similar to http://iwebkit.net/.
powtac
+5  A: 
UIWebView *htmlView = [[UIWebView alloc] initWithFrame:CGRectMake(0.0,0.0,320.0,380.0)];
[htmlView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]isDirectory:NO]]];
[self.view addSubview:htmlView];
[htmlView release];
Cirrostratus
+1  A: 

You will probably want to do at least a tab bar with the webpage in one tab and an "about" or something in the other. Apple has been known to refuse apps that are just a straight up wrapper of a single page.

Joe Cannatti
Thanks for this information! Good to know!
powtac
A: 

Finally I found two very good video tutorials which are explaining how to build an "UIWebView for iPhone App"

  1. http://www.youtube.com/watch?v=_ZcND6ZVOYw
  2. http://www.youtube.com/watch?v=EZKSbb40Jp8
powtac