ios, web, thoughts & notes (rss)

dreamscape by isak solheim

30 mar 2023 ~

Browser detection

I’ve wanted to detect which browser is being opened when the user clicks on an external link in my app. I first tried using the applicationWillResignActive and application(_:open:options:) methods, but they are related to the application lifecycle and will not provide information about external interactions.

One possibility might be to create an interceptor for link clicks, and then prompt the user with a selection of different browsers, but that does not seem like a smooth interaction for the user. Information about the default browser on the user’s device is hidden due to privacy restrictions in iOS.