Hy everyone.
I'm making an mobile app that use a WKWebView.
When I load some site in iPhone it returns the mobile website but when I try to load some site in iPad it request the desktop site and I want to make a button that switches between desktop and mobile site.
I try this on iPad but not success:
self.webView.customUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Mobile/14B72"
like you can see I try to force the webView in iPad to use the iPhone userAgent but it keep requesting some desktop sites.
If you guys need more of my code I'll be happy to provide.
Thank you!