Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWA mobile (iOS) couldn't trigger Xbull wallet when attempt to connect wallet #13

Open
yuesth opened this issue Jan 23, 2024 · 2 comments

Comments

@yuesth
Copy link

yuesth commented Jan 23, 2024

Hi @earrietadev, thanks for providing the Xbull which help our PWA integrate to stellar net, even it still on testnet.

Background

Our PWA expect to running both on desktop and mobile, when I was connecting xbull from our dApp on my desktop web or desktop PWA it looks like works, but when running on mobile (iOS), it wouldn't trigger a wallet app to connect wallet, although I had setup my wallet before. I assume that local storage between on safari/iOS browser and dApp have different origin, based on this https://stackoverflow.com/questions/77189402/sharing-session-between-safari-and-pwa. Is there any suggestion which will address the issue from the wallet kit? or is there any compatibility issue about sharing storage between PWA and iOS (android was worked) so that wouldn't trigger anything to pop up the wallet?

Expectation

my PWA is able to connect and sign tx to xbull both on desktop and mobile

Here is my short code relates to the issue

const onOpenWallet = async (
		onClosed?: (error: any) => void,
		onSuccess?: (option: ISupportedWallet) => void,
		onError?: (error: any) => void,
	) => {
		kit?.openModal({
			onWalletSelected: async (option: ISupportedWallet) => {
				try {
					onSetWallet(option.type)
					const publicKey = await kit?.getPublicKey()
					onSetPublicKey(publicKey)
					await onGetBalances(publicKey)
					await onGetAuthToken(publicKey)
					setShowToastWithTimeout({
						toast: {
							message: `${option.name} connected`,
							type: 'success',
						},
						timeout: 3000,
					})
					onSuccess?.(option)
				} catch (error: any) {
					removeLocal(LOCAL.ZIRIZ_SELECTED_WALLET)
					removeLocal(LOCAL.ZIRIZ_PUBLIC_KEY)
					setShowToastWithTimeout({
						toast: {
							message: error?.error?.message || 'Connect wallet rejected',
							type: 'error',
						},
						timeout: 3000,
					})
					onError?.(error)
				}
			},
                        .....

WhatsApp Image 2024-01-23 at 09 30 31 (1)
WhatsApp Image 2024-01-23 at 09 30 31

@earrietadev
Copy link
Collaborator

Hi there, that's expected. iOS PWA support is near to nothing and unfortunately that's something I don't believe it will change in the near future (Apple is highly opposed to give more support to PWA technologies). Android on the other hand, the support is higher (Google has pushed a lot for PWA support).

Because of those known issues from iOS, we are building xBull Signer (an iOS/Android app) which is currently in beta testing. If you want to be added to the TestFlight list, you can check about it: https://twitter.com/xBullWallet/status/1739348163691946324

@yuesth
Copy link
Author

yuesth commented Feb 1, 2024

Hi, I've just signed up xBull Signer for beta testing. Does xBull signer actually could bridging connection between my PWA and xBull wallet? or it only works bridging for common web app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants