So at this time i think it isnt possible to inject a variable from :
[theWebView stringByEvaluatingJavaScriptFromString:@"var valueFromNativ = 1"];
to the DOM of the browser Website :
example :
$(document).ready(function(){
var clientValue = valueFromNativ;
});
so a very easy workaround is to catch via userAgend the Device which visit your Page:
$(document).ready(function() {
var isMobile = navigator.userAgent.match(/(iPhone|iPod|iPad|Android)/);
if (isMobile == null) {
$('#justTablets').hide();
}
});<br>
If now somebody visit with ipad my website a <div id="justTablets">Content ...</div>
will shown, but if you are a simple desktop, laptop, it will be hidden ...
see here
http://jsfiddle.net/konstheinrich188/jASy8/