diff options
Diffstat (limited to 'makima/ios/Sources/Makima/App/ScreenshotMode.swift')
| -rw-r--r-- | makima/ios/Sources/Makima/App/ScreenshotMode.swift | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/makima/ios/Sources/Makima/App/ScreenshotMode.swift b/makima/ios/Sources/Makima/App/ScreenshotMode.swift new file mode 100644 index 0000000..a1062db --- /dev/null +++ b/makima/ios/Sources/Makima/App/ScreenshotMode.swift @@ -0,0 +1,21 @@ +import Foundation + +/// Enabled via `-DSCREENSHOT_MODE` in the CI build. Short-circuits auth with +/// a fake client and seeds the app with deterministic demo data so we can +/// grab reproducible screenshots without hitting a real Makima server. +enum ScreenshotMode { + static var isEnabled: Bool { + #if SCREENSHOT_MODE + return true + #else + return false + #endif + } + + /// Fake server profile used by the stub authenticated state. + static var profile: ServerProfile { + ServerProfile(label: "makima.jp", baseURLString: "https://makima.jp") + } + + static var apiKey: String { "mk_demo0000deadbeef0000cafe" } +} |
