Search code examples
ioscase-sensitiveurl-scheme

Are URL Schemes on iOS case-sensitive?


The official Apple documentation doesn't seem to specify whether iOS URL schemes are case-sensitive or not.

Can I register myApp and still get opened for someone calling openURL: on MyApp://params?


Solution

  • They are not case-sensitive.

    You can verify this by entering both sms:// and sMs:// into the URL box in Safari.

    Also, it seems that third-party URL schemes in the Safari address bar now lead to a page not found error. This must be new in iOS 9.3.x, because it did not do this before. Entering the URL into another app (e.g. Notes) and then opening it still works.

    Edit: the above hypothesis about iOS 9.3.x is actually a bit more nuanced...

    They work if…

    • You are starting from a ​blank​ screen
    • A page is still loading when you request the custom URL scheme

    They do NOT work if…

    • You are on a webpage that has fully loaded before you request the custom URL scheme

    Go figure