Here I come with a new challenge for you all, Objective-C developers:
I'm trying to load some HTML5 exports from Articulate into an UIWebView. Well, at first sight it's quite simple: just put the HTML5 resources into the project and call index.html.
Well, that simply doesn't work if the HTML5 resource have a complex javascript structure. Specially with <audio>
and <video>
tags.
Any idea?
I've been investigating for hours and the solution appeared with some lateral thinking:
If the main problem is that reading locally doesn't work, but the app requirements forces you to maintain the content offline, then let's serve the content locally!.
Here are the steps I followed to resolve this issue:
[webServer startWithOptions:@{@"BindToLocalhost": @YES} error:nil];
WKWebView
to call your local web server with: [wkView loadRequest:[NSURLRequest requestWithURL:webServer.serverURL]];
Then you will see your Articulate storyline working perfectly in your app inside a window, with iOS8.
Hope this can help someone.