Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Webviews

 Webviews

How to implement them and why you probably shouldn't.

Kotaro Fujita

May 08, 2014
Tweet

More Decks by Kotaro Fujita

Other Decks in Technology

Transcript

  1. Technical Points to Consider • No Nitro Engine (JIT Compiler)/WebGL.

    • No real access to hardware like BLE. • Touch support can be spotty and have a slight lag. • Webview/Mobile Safari speed differences on not as dramatic on high speed networks. Really obvious on 3G networks. • May get reject by App Store if you only wrap it around a web app.
  2. -(void)viewDidLoad { [super viewDidLoad]; UIWebView* webView = [UIWebView alloc] initWithFrame:self.view.frame];

    [self.view addSubView:webView]; NSString* url = @"http://google.com?get=something&..."; NSURL* nsUrl = [NSURL URLWithString:url]; NSURLRequest* request = [NSURLRequest requestWithURL:nsUrl cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:30]; [webView loadRequest:request]; } Quick Code Example:
  3. Common Themes of User Feedback of Webviews • “JANKY” •

    “SLOW” • “CONFUSING” • “UNRESPONSIVE” • “1 STAR!”
  4. IF YOU HAVE TO USE WEBVIEW! • Minimize your js/css/html

    files. Make sure they’re lean. • Optimize all your images. Consider using texture sheets to improve performance. • Consider the offline situation. • AppCache can be a douchbag but you still might consider • You assume responsibility for the ENTIRE UI experience. • Test how much data you’re bring down on average. • Test with VoiceOver. • Consider using a framework like Phonegap which are optimized to work in a web view and have tons of plug-ins and support.