From 35c7ebed35e285a321ed25e3aab39e161745a7df Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Wed, 24 Jul 2024 17:12:42 +0200 Subject: [PATCH] retro compatibility of scheme --- .../dapp/android/app/src/main/AndroidManifest.xml | 15 +++++++++++++++ example/dapp/ios/Runner/Info-internal.plist | 14 ++++++++++++-- example/dapp/ios/Runner/Info.plist | 4 ++-- example/dapp/lib/main.dart | 2 +- example/dapp/lib/pages/connect_page.dart | 1 - .../android/app/src/main/AndroidManifest.xml | 8 +++++++- example/wallet/ios/Runner/Info-internal.plist | 14 ++++++++++++-- example/wallet/ios/Runner/Info.plist | 4 ++-- .../lib/dependencies/web3wallet_service.dart | 2 +- 9 files changed, 52 insertions(+), 12 deletions(-) diff --git a/example/dapp/android/app/src/main/AndroidManifest.xml b/example/dapp/android/app/src/main/AndroidManifest.xml index 4efd075..2fab401 100644 --- a/example/dapp/android/app/src/main/AndroidManifest.xml +++ b/example/dapp/android/app/src/main/AndroidManifest.xml @@ -1,4 +1,13 @@ + + + + + + + + + + + + + + + diff --git a/example/dapp/ios/Runner/Info-internal.plist b/example/dapp/ios/Runner/Info-internal.plist index 35b2acd..77e41ee 100644 --- a/example/dapp/ios/Runner/Info-internal.plist +++ b/example/dapp/ios/Runner/Info-internal.plist @@ -11,7 +11,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterdapp.internal CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,12 +28,22 @@ CFBundleTypeRole Editor CFBundleURLName - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterdapp.internal CFBundleURLSchemes wcflutterdapp-internal + + CFBundleTypeRole + Editor + CFBundleURLName + com.walletconnect.flutterdapp.internal + CFBundleURLSchemes + + wcflutterdapp + + CFBundleVersion 2 diff --git a/example/dapp/ios/Runner/Info.plist b/example/dapp/ios/Runner/Info.plist index 220aa9a..4052bbf 100644 --- a/example/dapp/ios/Runner/Info.plist +++ b/example/dapp/ios/Runner/Info.plist @@ -11,7 +11,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterdapp CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,7 +28,7 @@ CFBundleTypeRole Editor CFBundleURLName - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterdapp CFBundleURLSchemes wcflutterdapp-production diff --git a/example/dapp/lib/main.dart b/example/dapp/lib/main.dart index 50823a5..6e34f69 100644 --- a/example/dapp/lib/main.dart +++ b/example/dapp/lib/main.dart @@ -74,7 +74,7 @@ class _MyHomePageState extends State { ], redirect: Redirect( native: 'wcflutterdapp-$flavor://', - universal: 'https://walletconnect.com', + // universal: 'https://walletconnect.com', ), ), ); diff --git a/example/dapp/lib/pages/connect_page.dart b/example/dapp/lib/pages/connect_page.dart index 73a6e25..1bdbd17 100644 --- a/example/dapp/lib/pages/connect_page.dart +++ b/example/dapp/lib/pages/connect_page.dart @@ -347,7 +347,6 @@ class ConnectPageState extends State { final encodedUri = Uri.encodeComponent(connectResponse.uri.toString()); const flavor = String.fromEnvironment('FLUTTER_APP_FLAVOR'); final uri = 'wcflutterwallet-$flavor://wc?uri=$encodedUri'; - // final uri = 'metamask://wc?uri=$encodedUri'; if (await canLaunchUrlString(uri)) { final openApp = await showDialog( // ignore: use_build_context_synchronously diff --git a/example/wallet/android/app/src/main/AndroidManifest.xml b/example/wallet/android/app/src/main/AndroidManifest.xml index 6157d92..c6f892b 100644 --- a/example/wallet/android/app/src/main/AndroidManifest.xml +++ b/example/wallet/android/app/src/main/AndroidManifest.xml @@ -28,7 +28,7 @@ - + @@ -36,6 +36,12 @@ + + + + + + diff --git a/example/wallet/ios/Runner/Info-internal.plist b/example/wallet/ios/Runner/Info-internal.plist index 24398be..7588df8 100644 --- a/example/wallet/ios/Runner/Info-internal.plist +++ b/example/wallet/ios/Runner/Info-internal.plist @@ -11,7 +11,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterwallet.internal CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,12 +28,22 @@ CFBundleTypeRole Editor CFBundleURLName - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterwallet.internal CFBundleURLSchemes wcflutterwallet-internal + + CFBundleTypeRole + Editor + CFBundleURLName + com.walletconnect.flutterwallet.internal + CFBundleURLSchemes + + wcflutterwallet + + CFBundleVersion $(FLUTTER_BUILD_NUMBER) diff --git a/example/wallet/ios/Runner/Info.plist b/example/wallet/ios/Runner/Info.plist index 4346cf7..99e831c 100644 --- a/example/wallet/ios/Runner/Info.plist +++ b/example/wallet/ios/Runner/Info.plist @@ -11,7 +11,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterwallet CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -28,7 +28,7 @@ CFBundleTypeRole Editor CFBundleURLName - $(PRODUCT_BUNDLE_IDENTIFIER) + com.walletconnect.flutterwallet CFBundleURLSchemes wcflutterwallet-production diff --git a/example/wallet/lib/dependencies/web3wallet_service.dart b/example/wallet/lib/dependencies/web3wallet_service.dart index 792dd27..f5f459a 100644 --- a/example/wallet/lib/dependencies/web3wallet_service.dart +++ b/example/wallet/lib/dependencies/web3wallet_service.dart @@ -41,7 +41,7 @@ class Web3WalletService extends IWeb3WalletService { ], redirect: Redirect( native: 'wcflutterwallet-$flavor://', - universal: 'https://walletconnect.com', + // universal: 'https://walletconnect.com', ), ), );