6

When I click “share” => “open in safari” for any post in the stack overflow site in my iOS Stack Exchange app, Instead of actually opening the post in safari, as it said it would, it opens the post in my Stack Overflow app. I’ll have to click “share” => “open in safari” again in the Stack Overflow app to make it actually open in the safari. I don’t believe this is intended to happen.

Here’s a animated gif of it happening:

gif of this happening

If it matters, I’m using Stack Exchange app version 1.6.6.2 (the beta version) running on iOS 11.0 (but it happens as well when I’m using iOS 10.3)

0

1 Answer 1

4

The problem here is that the title is truncated. It should read "Open in Safari or the Stack Overflow app! We don't know. Do you?" but everything after "Open in Safari" is truncated by the system.

In all seriousness, this is a shortcoming of Universal Links and URL schemes in general on iOS.

When I open a link in Firefox or Chrome, I use their specific URL scheme (firefox://open-url?https://... or googlechromes://...). To open a link in Safari, I ask the system to open the URL directly, with something like UIApplication.shared.openUrl(URL("https://stackoverflow.com/q/1732348")).

The system then uses registered Universal Links and your preferences (which are implicitly set by your behavior) to determine whether to open that link in Safari or our other app. Unfortunately, that box is completely opaque for us and we have no way of knowing what app will open. You'll see the same behavior if you open a Stack Overflow question in Facebook or Twitter and select "Open in Safari". You'd think we'd have better information as the app developer but we don't. User privacy reasons, probably.

Anyway, things you can do as a workaround:

  1. If you weren't screen recording, you would have seen "stackoverflow.com" in the right side of the status bar, where the battery indicator normally is. Tapping that side of the status bar will take you to the question in Safari and turn off Universal Links for Stack Overflow on your device. There's more details in this answer: Links in the mobile web browser may jump to the Stack Overflow app

  2. Do "Open in Safari" again from inside the Stack Overflow app. This time it will actually work because iOS ignored universal links for apps opening the URL. This is not great but it won't change your preferences for links from browsers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .