More info in this talk: Introduction to Modern Webkit Api https://developer.apple.com/videos/wwdc/2014/
It's just becoming a more interesting trade-off with OpenGL.
Apple is not abandoning OpenGL, heck, SpriteKit and SceneKit are both laid on top of OpenGL.
The fact is OpenGL doesn't allow the underlying hardware to be fully utilized, so now those demanding best performance can use Metal. A good example would be a high-end gaming engine like Unreal. And those who don't, can keep using OpenGL forever.
All the FUD about walled garden and proprietary APIs ignore how Metal is supposed to be used. Engines like Unreal already support OpenGL, DirectX, the PlayStation variation of OpenGL-ish API, Mantle (AMD) and so on.
Now it'll support also Metal.
People who use the Unreal engine can still write cross-platform games for it, but now they'll get even better performance under iOS thanks to Metal.
That's really it. No conspiracy theories.
Here's the details of my complaint: http://stackoverflow.com/questions/19365175/with-html5-audio... and http://stackoverflow.com/questions/19365931/does-phonegap-co...
In practice, you probably want to take a look at Howler.js - it's pretty comprehensive library that tries its best to overcome the various limitations and problems.
Not to mention the games market for the iOS App Store is very saturated and most of the money has likely been sucked out of it for the time being, so now Apple finds they don't have much to lose by allowing the possibility of OpenGL-based games for iOS which bypass the App Store.
In case anyone is quick doubt or dismiss the above criticism, just recall that for years Apple's iAd framework officially supported WebGL, but Safari and UIWebView did not. This implies that Apple could have released WebGL support in Safari and/or UIWebView any time they wanted; they simply chose not to for for non-technical (i.e., business) reasons.
Although I disagree that it was purely non-technical limitations. Quite possibly they didn't want to enable webgl in the wild until they had the out-of-process, super sandboxed webview implementation.
Btw, I did pretty much call this one out two weeks ago: https://news.ycombinator.com/item?id=7783137
Metal isnt really an OpenGL replacement. Most people would use it in their apps - you don't write games in metal, you write game engines in it.
Has there been confirmation at WWDC that this will remain enabled through the final release of iOS8?
Edit: On second thought, don't take that as proof. I was thinking of the Mac OS X portion, and I don't recall them calling it out specifically for iOS.
Mostly, I just want to avoid learning each mobile platform just to make one app. That's been turning me off from mobile development for years. I'd rather use something like Cordova with webgl and hit all mobile platforms in one shot.
No WebRTC audio/video or data!
Hell, even Microsoft beat them to the punch with IE11, but at least the implementation in Safari is 'complete' and 'comprehensive', as opposed to the silly restrictions in IE like 'floating point vertex attributes only'.
MacOS since 10.3 has the handy WebScriptObject / JSContext stuff, which made it into iOS 7, but wasn't very well documented, and took some tricks to use. You have to fish a JSContext out of the WebView with [webView valueForKeyPath: @"documentView.webView.mainFrame.javaScriptContext"] ...
https://developer.apple.com/library/mac/documentation/Cocoa/...
http://blog.impathic.com/post/64171814244/true-javascript-ui...
http://asciiwwdc.com/2013/sessions/615
http://www.steamclock.com/blog/2013/05/apple-objective-c-jav...
http://stackoverflow.com/questions/2254372/calling-javascrip...
http://will.thimbleby.net/script/
Here is the header file, the best documentation available:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/JavaScriptCore.framework/Headers/JSContext.h
Unfortunately, the images do not appear to be cached.