-
Notifications
You must be signed in to change notification settings - Fork 114
Description
I'm currently integrating the Solana.Unity-SDK into a WebGL game, and I've encountered an inconsistency in how the LoginWithWalletAdapter function behaves on different platforms.
Android: When I call LoginWithWalletAdapter from the web.cs script in the WebGL build, it redirects to the installed Phantom Wallet app. After connecting the wallet, it successfully returns to the WebGL game without issues.
iOS: On iOS, when I click LoginWithWalletAdapter, it redirects to the Phantom Browser. The game restarts from there, and upon calling LoginWithWalletAdapter again, it prompts me to connect the wallet again, even though the wallet was already connected.
Expected Behavior:
The behavior on iOS should mirror that of Android, where the app connects to the Phantom Wallet and returns directly to the WebGL game without requiring a second wallet connection.
Steps to Reproduce:
Launch the WebGL game.
On Android, call the LoginWithWalletAdapter function from the web.cs script.
The Phantom Wallet app opens, connects, and returns to the game.
On iOS, call the LoginWithWalletAdapter function.
The Phantom Browser opens, the game restarts, and when LoginWithWalletAdapter is called again, it connects to the wallet successfully.
Environment:
Unity version: [6000.31f1]
SDK version: [v1.2.8]
Platform: WebGL (iOS, Android)
Please advise on potential solutions or if additional configuration is needed for iOS to match the behavior on Android.