IOS batch app - fullscreen iframe?

We created an online application and now we would like to pack it for ipad and iPhone. Ideally, all we need is a full-screen browser window, such as an iframe, which downloads the full application from the Internet. Obviously, we could do this in the browser, but we need our own launch icon on the desktop, as well as removing the address bar of the browser. I heard about phoneGap and Appcelerator, but I'm not sure if this setting is possible using these platforms?

Is there an easy way to do this?

Are there any security or security issues in iOS that I should pay attention to?

+4
source share
2 answers

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]; 
+10
source

You can ask the user to add the website to the home screen using something like this .

If they did, you can use <meta name="apple-mobile-web-app-capable" content="yes" /> to remove the standard Safari interface, it will not display the standard Safari interface.

To specify an icon for the home screen, use <link rel="apple-touch-icon" href="/custom_icon.png"/> .

You can find more information here about web applications on iOS, including how to set several icon sizes and how to install a startup image.

+2
source

Source: https://habr.com/ru/post/1415421/


All Articles