Home Screen Web Apps and Universal Links
| Originator: | jbrayton | ||
| Number: | rdar://28792859 | Date Originated: | 2016-10-16 |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | 10.0.2 (14A456) |
| Classification: | Other Bug | Reproducible: | Always |
In my iOS site-specific browser app, Marcato (https://www.goldenhillsoftware.com/marcato/), I allow the user to create home screen bookmarks to individual site-specific browsers. This is analogous to and inspired by the way Workflow (https://workflow.is) allows the user to save bookmarks to the home screen. The app generates a web page and opens it in Safari. When opened in Safari, the web page encourages the user to save that web page to the home screen. When opened from the home screen, the web page opens the app with a URL scheme. I would like to update the home screen bookmarking functionality to use Universal Links, but I am hitting a snag. Specifically, if a home screen web app attempts to open the app with a universal link by setting document.location.href, the corresponding web page will be opened instead of the app. Steps to Reproduce: 1. Install the attached sample app on an iOS device. Since universal links require a specific Team ID, you may need to install the signed app from the archive rather than recompiling the app. 2. Open this page with Safari on the iOS device: https://secure.goldenhillsoftware.com/noindex/universal-link-demo-simple-link.html 3. Tap on the link on that page. That link has an href value of "https://universal-link-demo.goldenhillsoftware.com/". Observe that tapping on the link opens the app. 4. Open this page with Safari on the iOS device: https://secure.goldenhillsoftware.com/noindex/universal-link-demo-javascript-open-app.html 5. Open the Share Sheet and select "Add to Home Screen". 6. Open the web app from the home screen. When opened from the home screen, this line of JavaScript will be executed: document.location.href='https://universal-link-demo.goldenhillsoftware.com/'; Expected Results: I expect the home screen web app to open the app. Actual Results: The home screen web app displays the https://universal-link-demo.goldenhillsoftware.com/ HTML content. Configuration: iOS 10 on my iPhone 5S Version & Build: iOS 10.0.2 (14A456) Links to the attachments: https://www.dropbox.com/s/kofnellfqimyme0/Universal%20Link%20Demo.ipa?dl=0 https://www.dropbox.com/s/fl2r0p5dpb5vhzh/Universal%20Link%20Demo.zip?dl=0
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!