Reputation: 5956
I need to alter the URL that the Cordova WebView loads on launch programatically. On Android, I see that I can override remapUri
using the CordovaPlugin interface. However, I do not see a similar or equivalent method for iOS Plugins. Does anyone know how to accomplish something similar on iOS?
Many Thanks, Lyle
Upvotes: 0
Views: 586
Reputation: 71
Though a little bit late. But yes, there is.
You can intercept urls via overriding
- (BOOL)shouldOverrideLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
in your custom plugin. Return Yes
when you'd like to handle the url yourself.
Check out https://github.com/joyxuLogic/cordova-plugin-iframelinks/blob/master/src/ios/IFrameLinks.m
Upvotes: 2