I have an app that will display web pages within a UIWebView. The pages it shows may contain links to other iPhone apps on the App Store.
In a normal browser on a desktop computer, clicking these App Store links would take me through a number of URL redirects and eventually end up opening iTunes and taking me to the page for that App.
Is there a way to ensure that when an App Store link is clicked inside my UIWebView that the App Store app on the iPhone will open and show the app?
What I've been seeing in my tests is that there are several types of links that can result in an App Store page, those being:
When I open any of these links in a desktop browser they will work and eventually open iTunes. When I open any of these links from within the iPhone the UIWebView goes through a number of redirects and eventually one of two things will happen:
The only time I've been able to get the App Store app to open is by using a direct iTunes link to the app without any referral or redirects.
Obviously for referral or affiliate links, I do not want to strip out the referral ID or affiliate ID. I shouldn't deprive them of a referral if it was their link that is clicked.
So any help would be greatly appreciated.
Thanks.
Apple will no longer allow applications on the App Store that include the UIWebview control. More details on timelines and potential solutions can be found below. What changed and how was I affected?
As of iOS 12.0, 'UIWebView' has been explicitly marked as deprecated. Apple is encouraging developers to adopt WKWebView instead, which was introduced in iOS 8.0.
Your app should include features, content, and UI that elevate it beyond a repackaged website. If your app is not particularly useful, unique, or “app-like,” it doesn't belong on the App Store. According to the App Store Review Guidelines, Apple will reject simple WebView apps without any additional functionality.
A view that embeds web content in your app.
I found this Technical Q&A from Apple that answers my question:
The basic gist is this:
phobos.apple.com links constructed properly will redirect directly to the App Store app. itunes.apple.com links must be converted into phobos links. referral/affiliate links must be traversed using NSURLConnection and the final resulting URL will be a phobos link that can be used.
Thanks for your help guys.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With