Capt. Jack Sparrow
Capt. Jack Sparrow

Reputation: 81

safari can't open the specified address because Mac OS X doesn’t recognize Internet addresses starting with

We have an app with custom URL scheme, let's say "com.company.app". In a javascript file, we invoke the app by window.location = "com.company.app://";. If the app is not installed, Safari throws the erorr "Safari can't open the specified address..... doesn't recognise Internet addresses starting with 'com.company.app'". This happens only on Safari and not other browsers.

Chrome and Firefox don't throw any errors in similar situation i.e they know that com.company.app is a protocol handler and if the app isn't installed, they don't throw any errors and just continue execution.

Safari thinks that com.company.app is a website and tries to load it instead of trying to open the app.

Note that this happens only when the app is not installed. Works fine with Safari if the app is installed.

I've also tried restarting browsers, restarting machine, removing default app using "Default Apps" app etc.

Safari version: 12.0 (xxxx) macOS version : 10.14.x (Mojave)

Upvotes: 1

Views: 3000

Answers (0)

Related Questions