Many web applications are in the app store. They simply put the UIWebView in an empty application and point it to the web application. Everything will work the same as in Safari, but there will be no toolbars, etc. This will require that you have Xcode and membership in the developer program.
If you do not want to go through the application store, you can still configure your application to save it on your device, and it will work as if it were native. Here is a link to an example:
http://sixrevisions.com/web-development/html5-iphone-app/
So, you need to decide what is best for you.
Embedded iOS app with UIWebView
- App Store Exposure
- Provides the ability to combine your application with user interface elements of iOS, if you want
- The ability to use the accelerometer, Bluetooth, Game Center and other built-in functions of the application.
Inactive HTML5 Application
- No membership required or Xcode
- Full control over your application (without saving)
- Easy to adapt to work on other devices
- You do not need to pay a 30% discount if you are selling something
In many cases, the user interface will be identical for each parameter if the application is on the device. Weigh the options and find out what is best for you.
Instructions for setting up your own iOS application with UIWebView
- Open Xcode and choose File> New> Project ...
- Enter a product name and select a device family. Check the "Use automatic link counting" box and uncheck the "Use storyboards" and "Enable unit tests" boxes.
- Choose where to place the project
- Open ViewController.m and paste the code below into
viewDidLoad
right above the [super viewDidLoad]
. - Change the URL "http://www.google.com" to the address of your web application.
UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.frame]; NSString *urlAddress = @"http://www.google.com"; NSURL *url = [NSURL URLWithString:urlAddress]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [webView loadRequest:request]; [self.view addSubview:webView];
source share