Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pass deep link into iOS Simulator?

I would like to find an easier way to call deep links in the iOS simulator.

On Android you can use ADB to pipe links into the simulator by using the console.

Is there a similar way or a workaround to open deep links with the latest iOS Simulator?

like image 643
patreu22 Avatar asked Oct 10 '17 15:10

patreu22


People also ask

How do I open a deep link in iOS?

Another very simple method of opening deeplinks in iOS simulator is: Copy the deeplink to clipboard. Open Safari application in your iOS simulator and paste your deeplink url in safari.

Can I test universal link on simulator?

Unlike most of the discussion you'll see on the web that suggests otherwise, it turns out you can actually test out your Universal Links on the iPhone simulator.


2 Answers

You can type this into your Terminal :

xcrun simctl openurl booted <INSERT_URL_HERE> 

You can even share documents using the builtin Share Extension from the Finder to the iOS Simulator.

like image 81
Adam Avatar answered Sep 17 '22 03:09

Adam


Here's another approach:

In the Simulator

  1. Open the Contacts app
  2. Go to one of the pre-defined contacts, like "John Appleseed"
  3. Tap Edit
  4. Tap add url (at the bottom) - and set your link as a "homepage" URL for this contact
  5. Tap Done to save the contact
  6. Tap on the link you just added

Pro tip: You can add custom labels to the URL entries, for example if you want to test different URLs and be able to identify them quickly.

Note: If you reset the Simulator, the Contacts app will be reset to default and lose the URL.

like image 36
Nikolay Suvandzhiev Avatar answered Sep 18 '22 03:09

Nikolay Suvandzhiev