Skip to content

Commit

Permalink
improvements and layout changes
Browse files Browse the repository at this point in the history
  • Loading branch information
quetool committed Jan 22, 2024
1 parent 911f613 commit 5a9ab54
Show file tree
Hide file tree
Showing 49 changed files with 163 additions and 118 deletions.
15 changes: 7 additions & 8 deletions example/dapp/lib/pages/connect_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,13 @@ class ConnectPageState extends State<ConnectPage> {
},
);

_showQrCode(res);

// // Uncomment to use a wallet
// final String encodedUri = Uri.encodeComponent(res.uri.toString());
// await launchUrlString(
// 'wcflutterwallet://wc?uri=$encodedUri',
// mode: LaunchMode.externalApplication,
// );
final encodedUri = Uri.encodeComponent(res.uri.toString());
final uri = 'wcflutterwallet://wc?uri=$encodedUri';
if (await canLaunchUrlString(uri)) {
launchUrlString(uri, mode: LaunchMode.externalApplication);
} else {
_showQrCode(res);
}

try {
debugPrint('Awaiting session proposal settlement');
Expand Down
24 changes: 20 additions & 4 deletions example/wallet/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {

private var deepLinkChannel: FlutterEventChannel?
private static let CHANNEL = "com.walletconnect.flutterwallet/events"
private static let EVENTS_CHANNEL = "com.walletconnect.flutterwallet/events"
private static let METHODS_CHANNEL = "com.walletconnect.flutterwallet/methods"

private var eventsChannel: FlutterEventChannel?
private var methodsChannel: FlutterMethodChannel?
var initialLink: String?

private let linkStreamHandler = LinkStreamHandler()
Expand All @@ -14,15 +17,28 @@ import Flutter
GeneratedPluginRegistrant.register(with: self)

let controller = window.rootViewController as! FlutterViewController
deepLinkChannel = FlutterEventChannel(name: AppDelegate.CHANNEL, binaryMessenger: controller.binaryMessenger)
deepLinkChannel?.setStreamHandler(linkStreamHandler)
eventsChannel = FlutterEventChannel(name: AppDelegate.EVENTS_CHANNEL, binaryMessenger: controller.binaryMessenger)
eventsChannel?.setStreamHandler(linkStreamHandler)

methodsChannel = FlutterMethodChannel(name: AppDelegate.METHODS_CHANNEL, binaryMessenger: controller.binaryMessenger)
methodsChannel?.setMethodCallHandler({ [weak self] (call: FlutterMethodCall, result: FlutterResult) -> Void in
if (call.method == "initialLink") {
print("\(String(describing: launchOptions))")
}
})

return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
print("open url \(url)")
return linkStreamHandler.handleLink(url.absoluteString)
}
//
// override func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
// print("\(userActivity)")
// return true
// }
}

class LinkStreamHandler: NSObject, FlutterStreamHandler {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,122 +1,158 @@
{
"images" : [
{
"size" : "20x20",
"filename" : "40.png",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
"scale" : "2x",
"size" : "20x20"
},
{
"size" : "20x20",
"filename" : "60.png",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
"scale" : "3x",
"size" : "20x20"
},
{
"size" : "29x29",
"filename" : "29.png",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "1x"
"scale" : "1x",
"size" : "29x29"
},
{
"size" : "29x29",
"filename" : "58.png",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
"scale" : "2x",
"size" : "29x29"
},
{
"size" : "29x29",
"filename" : "87.png",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
"scale" : "3x",
"size" : "29x29"
},
{
"size" : "40x40",
"filename" : "80.png",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
"scale" : "2x",
"size" : "40x40"
},
{
"size" : "40x40",
"filename" : "120.png",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
"scale" : "3x",
"size" : "40x40"
},
{
"size" : "60x60",
"filename" : "57.png",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
"scale" : "1x",
"size" : "57x57"
},
{
"size" : "60x60",
"filename" : "114.png",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
"scale" : "2x",
"size" : "57x57"
},
{
"size" : "20x20",
"filename" : "120.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "180.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"filename" : "20.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"filename" : "40.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "29.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "58.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "40.png",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "1x"
"scale" : "1x",
"size" : "40x40"
},
{
"size" : "20x20",
"filename" : "80.png",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
"scale" : "2x",
"size" : "40x40"
},
{
"size" : "29x29",
"filename" : "50.png",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "1x"
"scale" : "1x",
"size" : "50x50"
},
{
"size" : "29x29",
"filename" : "100.png",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
"scale" : "2x",
"size" : "50x50"
},
{
"size" : "40x40",
"filename" : "72.png",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "1x"
"scale" : "1x",
"size" : "72x72"
},
{
"size" : "40x40",
"filename" : "144.png",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
"scale" : "2x",
"size" : "72x72"
},
{
"size" : "76x76",
"filename" : "76.png",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "1x"
"scale" : "1x",
"size" : "76x76"
},
{
"size" : "76x76",
"filename" : "152.png",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
"scale" : "2x",
"size" : "76x76"
},
{
"size" : "83.5x83.5",
"filename" : "167.png",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"size" : "1024x1024",
"filename" : "1024.png",
"idiom" : "ios-marketing",
"filename" : "[email protected]",
"scale" : "1x"
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
6 changes: 6 additions & 0 deletions example/wallet/ios/Runner/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"images" : [
{
"filename" : "appstore.png",
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
Diff not rendered.
Diff not rendered.
Diff not rendered.
22 changes: 15 additions & 7 deletions example/wallet/ios/Runner/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand All @@ -14,24 +16,30 @@
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
<rect key="frame" x="98.333333333333329" y="327.66666666666669" width="196.33333333333337" height="196.66666666666669"/>
<constraints>
<constraint firstAttribute="width" secondItem="YRO-k0-Ey4" secondAttribute="height" multiplier="1:1" id="H1H-Lv-Udz"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" red="0.95897811649999998" green="0.9287731051" blue="0.99903529879999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="width" secondItem="Ze5-6b-2t3" secondAttribute="width" multiplier="0.5" id="DmJ-8g-Nku"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
<point key="canvasLocation" x="80.916030534351137" y="264.08450704225356"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
<image name="LaunchImage" width="341" height="341"/>
</resources>
</document>
Loading

0 comments on commit 5a9ab54

Please sign in to comment.