Skip to content
Convert links to native iOS app URL schemes.
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A jQuery plugin that converts regular links to iOS app URL schemes so your visitors can visit your social profiles in native apps.

Converts HTML href attributes like: to twitter://user?screen_name=ryanscherf

Written by Ryan Scherf : -

In Action

Visit on your iOS device and tap either Twitter or LinkedIn.


Originally written with jQuery 2.X, but is probably backwards compatible.

Script is only enabled on iOS devices (iPhone, iPod and iPad) based on browser userAgent.


Markup your social profile links:

<div class="social">
  <a href="">@ryanscherf</a>

Target them with a single jQuery selector:

$(".social a").switcher();


Some apps (liked LinkedIn) require an id to access, and not the pretty username.

<a class="linkedin" href="" data-username="10998304">
  @ryanscherf on LinkedIn

Switcher will scan all the links in the set and determine if any can be deeplinked to native apps. If a username can't be found in data-username attribute, Switcher will attempt to derive it from the URL.

If the native iOS app isn't installed, Switcher will load the link as expected.


Option Default Description
debug false Converts links on non-iOS devices for testing
iOS iPhone, iPod, iPad Defines the navigator.userAgent to look for on iOS
additionalSchemas [] An array of patterns and schemes for additional native apps


I don't use every app, so I didn't include all the app URL schemes available to the world. Want to add more? Do it.

  1. Fork/clone the repository
  2. Add whatever you'd like
  3. Submit a Pull Request


  1. Star the Github repository
  2. Follow on Twitter and tell me how much you love this plugin
  3. Use it however you'd like
You can’t perform that action at this time.