Go to homepage

Reid Main

  1. Archives
  2. Tags
  3. About Me
  4. Email
  5. Resume

🔗 Alex Bush: Opening a URL in the currently running simulator

iOS/Swift coding tip: use xcrun simctl openurl booted "https://your-deep-link" to open a given link in your currently running simulator. It will either trigger deep linking into your app or open safari.

Historically I would do this by copying a URL outside of the simulator, pasting it into the simulator, then open Safari and paste the URL into the address bar. Now I can do it from the command line!

This really highlights how little I actually use xcrun. It is an incredibly powerful command line tool but because the iOS Simulator is so visual my brain defaults to clicking on it.