Today, we’re excited to announce a new way for developers to integrate Phantom into their iOS and Android applications. As of Phantom v22.04.01, iOS apps can now natively interact with Phantom through either universal links (recommended) or deeplinks. We also plan to extend this functionality to Android during the release of our Android wallet which is currently in beta.
Unlocking New Functionality
Until now, applications could only interact with Phantom via an injected Provider, which is globally accessible at
window.solana. While this method works well for web applications running on desktop browsers, it leaves mobile apps and most mobile browsers stranded. With deeplinks, developers can now seamlessly integrate Phantom across all devices and environments.
Better mobile app integrations
Before deeplinks, Phantom mobile users would interact with web apps from within Phantom’s in-app browser. Starting today, mobile apps can now prompt users to connect, sign, and send with Phantom directly. These new workflows will provide a smoother user experience and unlock new kinds of mobile functionality, including:
- Signing in with a Phantom address
- Verifying NFTs within social apps
- Placing orders within mobile trading apps
Solana Pay Transaction Requests
In addition to these new workflows, deeplinks also provide an enhancement for the next iteration of Solana Pay. Specifically, merchants can now specify transaction requests via a
solana:<link> URL that can be opened within Phantom mobile. Phantom will now open a transaction preview when a user both clicks on a
solana: link or scans it with their camera app. We are currently working on an updated design for Solana Pay transactions and look forward to sharing more in the coming weeks.
Scan to open within the Phantom in-app browser
Deeplinks also make it easy for users to open web apps within Phantom. Using their phone’s camera, users can now scan a QR code to open a page directly within Phantom’s in-app browser. If a web app detects that a user is on mobile, it can also prompt the user to open a specific page within Phantom. This feature was highly requested by many popular web apps, as it reduces friction between browsing NFT marketplaces and making purchases within Phantom.
Read the Docs and Start Building
We can’t wait to see what killer apps you end up building with Phantom deeplinks. To get started, we recommend reviewing our deeplinking documentation and React Native demo application. For questions and feedback, please reach out to Brian Friel on Twitter.