I have the following NSSURL
:
myURL - myPlatform://sdk/functionName?key1=value1&key2=value2
How can I get the URL components?
NSString *myPlatform = [myURL...?
NSString *functionName = [myURL...?
NSString *key1 = [myURL...?
NSString *value1 = [myURL...?
NSString *key2 = [myURL...?
NSString *value2 = [myURL...?
I have this code:
- (BOOL)webView:(UIWebView *)webView2 shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
NSURL *url= [request URL];
Log(@"url: %@", url);
NSArray *components = [url pathComponents];
for (NSString *c in components)
Log(@"URL component: %@", c);
}
And this in the log: url:
url: myPlatform://sdk/functionName?key1=value1&key2=value2
component: /
component: functionName
Thanks in advance