a native ios client for gitbay

client ios swift

https://gitbay.org

Commit 5e66f22e43

5e66f22e43a45f05e4a28aebbf50632f25492faa

parent: af4bf316f0

Verified · cmc

cmc <hello@cleberg.net> · 2026-08-28T19:59:23Z

screenshots: let the checkpoint force light as well as dark

The app forced dark on request and otherwise followed the device, so a
"light" run on a dark clone produced dark screenshots — both appearance
sets came out identical. GITBAY_UITEST_DARK=0 now forces light; unset
still follows the system, as a real launch does.
gitbay/gitbayApp.swift +11 −3
@@ -17,9 +17,17 @@ struct gitbayApp: App {
1717 .tint(.gbAccent)
1818 // The screenshot checkpoint forces appearance per run;
1919 // simulator clones ignore the base device's setting.
20 .preferredColorScheme(
21 ProcessInfo.processInfo.arguments.contains("-gb-dark") ? .dark : nil
22 )
20 .preferredColorScheme(Self.forcedColorScheme)
2321 }
2422 }
23
24 /// A clone follows whatever appearance it was created with, so the
25 /// checkpoint has to name the one it wants. Neither flag means the
26 /// app follows the system, as it does for real users.
27 private static var forcedColorScheme: ColorScheme? {
28 let args = ProcessInfo.processInfo.arguments
29 if args.contains("-gb-dark") { return .dark }
30 if args.contains("-gb-light") { return .light }
31 return nil
32 }
2533 }
gitbayUITests/LiveSmokeUITests.swift +4 −2
@@ -33,8 +33,10 @@ final class LiveSmokeUITests: XCTestCase {
3333 app = XCUIApplication()
3434 // xcodebuild runs tests on simulator clones, so the base
3535 // device's appearance never applies; force it per run.
36 if ProcessInfo.processInfo.environment["GITBAY_UITEST_DARK"] == "1" {
37 app.launchArguments.append("-gb-dark")
36 switch ProcessInfo.processInfo.environment["GITBAY_UITEST_DARK"] {
37 case "1": app.launchArguments.append("-gb-dark")
38 case "0": app.launchArguments.append("-gb-light")
39 default: break // follow the device, as a real launch does
3840 }
3941 app.launch()
4042 if name.contains("testRepoManagementFlows") {