I have question about using Google search. Can I use a custom google search in my native iOS app instead of using their api tools, is this a problem for google?
I write html page ( http://barzyczak.vot.pl/search.html?q=test ):
<!DOCTYPE html>
<html>
<head>
<title>Element V2: Results Only Layout Demo</title>
<!-- Put the following javascript before the closing </head> tag. -->
<script>
(function() {
var cx = 'xyz';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
</script>
</head>
<body>
<!-- Place this tag where you want the search results to render -->
<gcse:searchresults-only enableOrderBy="false"></gcse:searchresults-only>
</body>
I do request to site with above content in my iOS app and receives the results. I show this results in UIWebView:
So Can I use
- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationTyp
and redirect user to my UIViewController? Is this ok for Google policy?
Can I intercept/catch user's click on the link and open native application view instead of webview or should I open desired page in webview, and then redirect (with 301 code) with iOS schema URL, which open native app view (so really simulate click in google)?
Ps. I know about Google API, but this is not ok for me.