SwiftUI - Open Deeplink url from your terminal

Dec 17, 22

For the longest time when I had to test deeplinks, I would send myself an email with the link and open gmail in the iPhone simulator. But thanks for Stewart Lynch and his Navigation stack video I learnt a way to open deeplink urls from the terminal in my simulator.

xcrun simctl openurl booted <URL Scheme>://PathComponent1/PathComponent2

Your URL Scheme is defined under Targets > Info > URL Types and PathComponent can be anything that we want to read in our app to define where we want to go or what data is being sent from the Deep Link