Inconsistent universal/deeplinking for http://podcasts.apple.com/ links

Originator:rgfox
Number:rdar://6881192 Date Originated:7/31/2019
Status:Active Resolved:
Product:Podcasts Product Version:iOS 12.4 (16G5038d)
Classification: Reproducible:Yes
 
How to Reproduce:
You can reproduce these inconsistencies by loading the below link into `openURL` with universal link only option, and reproduce the redirect to itmss: by loading it in WKWebView.
https://podcasts.apple.com/us/podcast/podcast-me-anything/id1454336984?fbclid=IwAR0v2-g1cm03vJmBqAk9TjewcUNCUcdle8fDM-voVL7D2asB71NSQPtOerA

Description of Issue:
In WKWebView (via `loadRequest` or on link click) opens the following link in iTunes Store App:
https://podcasts.apple.com/us/podcast/podcast-me-anything/id1454336984?fbclid=IwAR0v2-g1cm03vJmBqAk9TjewcUNCUcdle8fDM-voVL7D2asB71NSQPtOerA

However, there is an apple-app-site-association file specifying this should open in Podcasts app here:
https://podcasts.apple.com/.well-known/apple-app-site-association

Along with this, we found that opening this link with `openURL` with option `UIApplicationOpenURLOptionUniversalLinksOnly` fails, 
which according to available info means that a universal link was not available for the supplied URL, contradicting what we see in the apple-app-site-association pointed out above.

This behavior is also seen for `maps` https universal links, however, I could not find the app-site-association file for it.
https://maps.apple.com/?q=222%202nd%20St%20San%20Francisco%20CA

Calling `openURL` without the option for `podcast.apple.com` link mentioned, opens the podcasts app, the correct destination app.
Calling `openURL` without the option for `maps.apple.com` link mentioned, opens the maps app, the correct destination app.

Opening in wkwebview, it attempts to open as a normal page, however, it then triggers a 301 redirect (see charles file attached),
redirecting to a url, with an itunes store deeplink scheme (itmss:) and the same path (full path below). 
Our custom wkwebview deeplink code, then handles this with openURL into iTunes Store app.
itmss://podcasts.apple.com/us/podcast/podcast-me-anything/id1454336984?fbclid=IwAR0v2-g1cm03vJmBqAk9TjewcUNCUcdle8fDM-voVL7D2asB71NSQPtOerA

The inconsistencies we see when this link is opened differs between iOS App Store apps:
- Chrome, WeChat, LinkedIn open the link in iTunes Store App.
- Safari & SFSafariViewController, FB Messenger, Messages, Mail open link in Podcasts app.

This appears to be similar to an open radar bug reported a year ago here: 
https://openradar.appspot.com/39347603

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!