Infinite app switching occurs when two apps claim the same webpage domain

Originator:nate
Number:rdar://22840788 Date Originated:24-Sep-2015 10:31 AM
Status:Duplicate Resolved:
Product:iOS Product Version:9.0.1
Classification: Reproducible:Yes
 
Summary:
We have one app with two bundle identifiers. One is a "Beta" for testing, and the other is our App Store version. Our apple-app-site association.son file is attached with this configuration.

Both apps claim the activitycontinuation: entitlement with the same domain.

For a webpage URL that is a prefix match (e.g. /account/*) but isn't supported in the app (e.g. /account/connect-to-facebook), the app calls application.openURL() during application(_:continueUserActivity:restorationHandler:).

If both the beta and app store version of an app are on the same phone, this process results in an infinite loop, switching between the Beta and App Store versions over-and-over as described in the video.

Steps to Reproduce:
1. Install an apple-app-site-association file on www.example.com, with two apps: "AAAA.com.example.Example" and "AAAA.com.example.Example.enterprise". 
2. Install two versions of an app on the same device with the two identifiers specified in Step 1
3. Call openURL() in those apps during application(_:continueUserActivity:restorationHandler:)
4. Navigate to one of the claimed URL paths from Safari
5. Observe the infinite app switching

Expected Results:
It would be good if there was an option to call `openURL` with an `alwaysInSafari` parameter, or perhaps document a custom URL scheme for Safari that forces this. Maybe simpler, know that all calls to `openURL` from the handoff restoration methods should not continue in any other apps.

Actual Results:
app switching continues infinitely between both versions of the app

Comments

Duplicate of 21938110


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!