I am trying to implement an NSURLProtocol
in my app that will fetch URLs starting with myApp://...
I created the Protocol in a new SWIFT file and implemented in the AppDelegate
:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
NSURLProtocol.registerClass(myURLProtocol)
return true
}
But i keep getting this error. I can't figure out how to define the canInitWithRequest to my webViews..
2014-08-03 21:10:27.632 SubViewTest[6628:156910] * WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: * -canInitWithRequest: only defined for abstract class. Define -[_TtC11SubViewTest13myURLProtocol canInitWithRequest:]!