Skip to content

Commit

Permalink
- update to recommended project settings for Xcode 16
Browse files Browse the repository at this point in the history
- remove broken reference to font
- allow listeningForDevices screen to re-check for bluetooth connection on resume
  • Loading branch information
simonmcl committed Oct 23, 2024
1 parent 4168c72 commit ba494fc
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 28 deletions.
8 changes: 1 addition & 7 deletions Kukai Mobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1250;
LastUpgradeCheck = 1540;
LastUpgradeCheck = 1600;
TargetAttributes = {
C0B0363E269EE2070071ACD0 = {
CreatedOnToolsVersion = 12.5;
Expand Down Expand Up @@ -2509,7 +2509,6 @@
C0B0366D269EE2070071ACD0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = TK7KK2VPJP;
Expand All @@ -2531,7 +2530,6 @@
C0B0366E269EE2070071ACD0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = TK7KK2VPJP;
Expand All @@ -2553,7 +2551,6 @@
C0B03670269EE2070071ACD0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = TK7KK2VPJP;
INFOPLIST_FILE = "Kukai MobileUITests/Info.plist";
Expand All @@ -2574,7 +2571,6 @@
C0B03671269EE2070071ACD0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = TK7KK2VPJP;
INFOPLIST_FILE = "Kukai MobileUITests/Info.plist";
Expand Down Expand Up @@ -2697,7 +2693,6 @@
C0B03677269EE3080071ACD0 /* Beta */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = TK7KK2VPJP;
Expand All @@ -2719,7 +2714,6 @@
C0B03678269EE3080071ACD0 /* Beta */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = TK7KK2VPJP;
INFOPLIST_FILE = "Kukai MobileUITests/Info.plist";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
5 changes: 1 addition & 4 deletions Kukai Mobile/Modules/Home/Base.lproj/Home.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
<array key="Figtree-SemiBold.ttf">
<string>Figtree-SemiBold</string>
</array>
<array key="Roboto-Bold.ttf">
<string>Roboto-Bold</string>
</array>
</customFonts>
<scenes>
<!--Home Tab Bar Controller-->
Expand All @@ -45,7 +42,7 @@
<button key="titleView" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="d7D-y1-ezY" customClass="AccountButton" customModule="Kukai_Mobile" customModuleProvider="target">
<rect key="frame" x="108" y="0.0" width="174" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="Roboto-Bold" family="Roboto" pointSize="14"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<inset key="contentEdgeInsets" minX="4" minY="4" maxX="4" maxY="4"/>
<inset key="titleEdgeInsets" minX="6" minY="0.0" maxX="8" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="4" maxY="0.0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ class LookingForDevicesViewController: UIViewController, UITableViewDelegate, UI
self.tableView.alpha = 0
self.tableView.delegate = self
self.tableView.dataSource = self

NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification).sink { [weak self] _ in
self?.startListening()
}.store(in: &bag)
}

override func viewWillAppear(_ animated: Bool) {
Expand All @@ -42,21 +46,28 @@ class LookingForDevicesViewController: UIViewController, UITableViewDelegate, UI
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)

self.tableView.reloadData()
LedgerService.shared.listenForDevices()
.convertToResult()
.sink { [weak self] result in
guard let devices = try? result.get() else {
let error = (try? result.getError()) ?? KukaiError.unknown()
self?.windowError(withTitle: "error".localized(), description: "Unable to search for devices, please check bluetooth is enabled and turned on. Error: \(error)")
return
startListening()
}

private func startListening() {

if !didStartReceiving {
self.tableView.reloadData()
LedgerService.shared.listenForDevices()
.convertToResult()
.sink { [weak self] result in
guard let devices = try? result.get() else {
let error = (try? result.getError()) ?? KukaiError.unknown()
self?.windowError(withTitle: "error".localized(), description: "Unable to search for devices, please check bluetooth is enabled and turned on. Error: \(error)")
return
}

self?.didStartReceiving = true
self?.deviceList = devices
self?.tableView.reloadData()
}

self?.didStartReceiving = true
self?.deviceList = devices
self?.tableView.reloadData()
}
.store(in: &bag)
.store(in: &bag)
}
}

override func viewWillDisappear(_ animated: Bool) {
Expand All @@ -69,6 +80,7 @@ class LookingForDevicesViewController: UIViewController, UITableViewDelegate, UI
}

LedgerService.shared.stopListening()
didStartReceiving = false
}

func animateTableViewIn() {
Expand Down

0 comments on commit ba494fc

Please sign in to comment.