I am downloading webpage and storing it through may app; so that I can access it offline through my app. I am loading that webpage (.html) in UIWebView. I am playing audio or video on click. If that webpage contains video then it plays fine on all devices (iPhones, and iPads). But when I access a webpage which has audio in it; then that audio is played successfully on iPhone; but on iPad (on device and simulator as well) it does not play audio file in UIWebView. How can I do this ?
@Vicky_Vignesh your answer was partially right (Anyways thanks for providing foundation). You need to provide device type and OS version with UserAgent string. I have done this way:
NSString *userAgentString = @"Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1";
NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys:userAgentString,@"UserAgent", nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:dictionary];