diff --git a/WaiterRobot/Ui/Login/LoginScreen.swift b/WaiterRobot/Ui/Login/LoginScreen.swift index 7f1829d..c2350c9 100644 --- a/WaiterRobot/Ui/Login/LoginScreen.swift +++ b/WaiterRobot/Ui/Login/LoginScreen.swift @@ -7,6 +7,8 @@ struct LoginScreen: View { @EnvironmentObject var navigator: UIPilot @StateObject private var viewModel = ObservableLoginViewModel() + @State private var showLinkInput = false + @State private var debugLoginLink = "" var body: some View { switch viewModel.state.viewState { @@ -37,6 +39,9 @@ struct LoginScreen: View { .scaledToFit() .frame(maxWidth: 250) .padding() + .onLongPressGesture { + showLinkInput = true + } Text(localize.login.title()) .font(.title) .padding() @@ -56,6 +61,15 @@ struct LoginScreen: View { Spacer() } + .alert(localize.login.title(), isPresented: $showLinkInput) { + TextField(localize.login.debugDialog.inputLabel(), text: $debugLoginLink) + Button(localize.dialog.cancel(), role: .cancel) { + showLinkInput = false + } + Button(localize.login.title()) { + viewModel.actual.onDebugLogin(link: debugLoginLink) + } + } .withViewModel(viewModel, navigator) } } diff --git a/WaiterRobot/WaiterRobotApp.swift b/WaiterRobot/WaiterRobotApp.swift index a695966..ba7df08 100644 --- a/WaiterRobot/WaiterRobotApp.swift +++ b/WaiterRobot/WaiterRobotApp.swift @@ -24,12 +24,11 @@ struct WaiterRobotApp: App { phoneModel: UIDevice.current.model, os: OS.Ios(version: UIDevice.current.systemVersion), allowedHostsCsv: readFromInfoPlist(withKey: "ALLOWED_HOSTS"), - stripeProvider: nil + stripeProvider: nil, + koinPlatformDeclaration: nil ) - KoinKt.doInitKoinIos() let logger = koin.logger(tag: "AppDelegate") - logger.d { "initialized Koin" } KMMResourcesLocalizationKt.localizationBundle = Bundle(for: shared.L.self) logger.d { "initialized localization bundle" } diff --git a/project.yml b/project.yml index f4efd64..ecfc1a1 100644 --- a/project.yml +++ b/project.yml @@ -17,13 +17,16 @@ fileGroups: packages: shared: url: https://github.com/DatepollSystems/WaiterRobot-Shared-Android.git - version: 1.6.9 + version: 1.6.10 UIPilot: url: https://github.com/canopas/UIPilot.git from: 1.3.1 CodeScanner: url: https://github.com/twostraws/CodeScanner from: 2.2.1 + Sentry: + url: https://github.com/getsentry/sentry-cocoa.git + version: 8.36.0 # must be updated together with the "Sentry-Dynamic.xcframework" in the shared project settings: base: @@ -44,6 +47,8 @@ targetTemplates: - package: shared - package: UIPilot - package: CodeScanner + - package: Sentry + product: Sentry-Dynamic info: path: ".generated/${target_name}.plist"