Files
ladill-mini/apps/ios/LadillMini/App/LadillMiniApp.swift
T
isaaccladandCursor ea6afb80a4
Deploy Ladill Mini / deploy (push) Successful in 35s
Add Ladill Mini native Android and iOS apps.
Ship full-featured mobile clients with auth, payments, QRs, push notifications, and iOS polish including Figtree typography, app icons, and QR previews.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 22:30:35 +00:00

35 lines
1.2 KiB
Swift

import SwiftUI
@main
struct LadillMiniApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate
@StateObject private var session = SessionStore.shared
@Environment(\.scenePhase) private var scenePhase
@State private var locked = false
var body: some Scene {
WindowGroup {
AppRouter()
.environmentObject(session)
.environmentObject(PushNotificationRouter.shared)
.font(.ladill(16))
.preferredColorScheme(.light)
.task {
if session.isLoggedIn {
await PushTokenRegistrar.registerIfLoggedIn()
}
}
.overlay {
if locked && session.isLoggedIn && PinStore.shared.hasPin() {
PinLockOverlay(onUnlocked: { locked = false })
}
}
.onChange(of: scenePhase) { _, phase in
if phase == .background && session.isLoggedIn && PinStore.shared.hasPin() {
locked = true
}
}
}
}
}