From 159168c66ad3b3a56d32b6692ae67b838d95e9f1 Mon Sep 17 00:00:00 2001 From: Sarthak Agrawal Date: Sun, 23 Aug 2026 17:39:18 +0530 Subject: [PATCH] fix: let empty Kith users reach the app --- ios/Kith.xcodeproj/project.pbxproj | 4 ++-- ios/Sources/Kith/KithOnboardingView.swift | 4 ++++ ios/Tests/KithUITests/KithUITests.swift | 12 ++++++++++++ ios/project.yml | 2 +- ios/scripts/check.sh | 6 +++++- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ios/Kith.xcodeproj/project.pbxproj b/ios/Kith.xcodeproj/project.pbxproj index a050839..89a443d 100644 --- a/ios/Kith.xcodeproj/project.pbxproj +++ b/ios/Kith.xcodeproj/project.pbxproj @@ -565,7 +565,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 7; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 8F7LXHTJZR; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -762,7 +762,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 7; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 8F7LXHTJZR; ENABLE_NS_ASSERTIONS = NO; diff --git a/ios/Sources/Kith/KithOnboardingView.swift b/ios/Sources/Kith/KithOnboardingView.swift index 6770115..2cf5895 100644 --- a/ios/Sources/Kith/KithOnboardingView.swift +++ b/ios/Sources/Kith/KithOnboardingView.swift @@ -86,6 +86,10 @@ struct KithOnboardingView: View { .disabled(name.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty) .opacity(name.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty ? 0.5 : 1) + Button("Open Kith first") { model.finishOnboarding() } + .font(.headline) + .frame(maxWidth: .infinity, minHeight: 44) + Text("No Contacts permission. This is saved on your iPhone first and works offline.") .font(.footnote) .foregroundStyle(KithPalette.espresso.opacity(0.58)) diff --git a/ios/Tests/KithUITests/KithUITests.swift b/ios/Tests/KithUITests/KithUITests.swift index 1d66752..bdeb68d 100644 --- a/ios/Tests/KithUITests/KithUITests.swift +++ b/ios/Tests/KithUITests/KithUITests.swift @@ -73,6 +73,18 @@ final class KithUITests: XCTestCase { XCTAssertTrue(app.staticTexts["Coffee after the market."].waitForExistence(timeout: 4)) } + func testOnboardingCanOpenKithWithoutCreatingAPerson() { + let app = launch(["--onboarding-demo"]) + + let openKith = app.buttons["Open Kith first"] + XCTAssertTrue(openKith.waitForExistence(timeout: 4)) + openKith.tap() + + XCTAssertTrue(app.staticTexts["Who do you want to keep close?"].waitForExistence(timeout: 4)) + XCTAssertTrue(app.buttons["Add someone"].exists) + XCTAssertFalse(app.buttons.matching(NSPredicate(format: "label CONTAINS[c] %@", "Leela")).firstMatch.exists) + } + func testOnboardingResumesAtContextForItsSavedPerson() { let app = launch(["--onboarding-resume-demo"]) diff --git a/ios/project.yml b/ios/project.yml index 76f57d1..131f6f8 100644 --- a/ios/project.yml +++ b/ios/project.yml @@ -15,7 +15,7 @@ settings: DEVELOPMENT_TEAM: 8F7LXHTJZR CODE_SIGN_STYLE: Automatic TARGETED_DEVICE_FAMILY: "1" - CURRENT_PROJECT_VERSION: 6 + CURRENT_PROJECT_VERSION: 7 MARKETING_VERSION: 1.0.0 ENABLE_USER_SCRIPT_SANDBOXING: YES packages: diff --git a/ios/scripts/check.sh b/ios/scripts/check.sh index bfa7b54..3e2d157 100755 --- a/ios/scripts/check.sh +++ b/ios/scripts/check.sh @@ -20,7 +20,11 @@ devices = json.load(sys.stdin).get("devices", {}) candidates = [] for runtime, entries in devices.items(): for device in entries: - if device.get("isAvailable") and device.get("name") == "iPhone 17 Pro": + if ( + device.get("isAvailable") + and device.get("deviceTypeIdentifier") + == "com.apple.CoreSimulator.SimDeviceType.iPhone-17-Pro" + ): candidates.append((runtime != "com.apple.CoreSimulator.SimRuntime.iOS-26-2", runtime, device["udid"])) if candidates: print(sorted(candidates)[0][2])