Implementing a Custom URL Scheme (iOS)

Somebody asked me to add a custom URL scheme to my app, so that they could open the app from a launcher. Before that, I had only done it once, so it took me some time to Google this topic and remind myself of how it’s done.

This post will serve as another memo for me. This is how you add a custom URL scheme to your app:

Defining your app’s custom URL scheme is all done in the Info.plist file. Click on the last line in the file and then click the “+” sign off to the right to add a new line. Select URL Types for the new item. Once that’s added, click the grey arrow next to “URL Types” to show “Item 0”. Set your URL identifier to a unique string – something like com.yourcompany.yourappname.

After you’ve set the URL identifier, select that line and click the “+” sign again, and add a new item for URL Schemes. Then click the grey arrow next to “URL Schemes” to reveal “Item 0”. Set the value for Item 0 to be your URL scheme name.

The quote and the image are from this site.

[SW]

Facebooktwitterredditpinterestlinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *