Skip to content

Commit

Permalink
Merge pull request #46 from DatepollSystems/WR-36-crash-reporting
Browse files Browse the repository at this point in the history
WR-36: Crash reporting
  • Loading branch information
dev-Fabi authored Nov 11, 2024
2 parents f105c67 + 46907c7 commit 99640a3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
14 changes: 14 additions & 0 deletions WaiterRobot/Ui/Login/LoginScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ struct LoginScreen: View {
@EnvironmentObject var navigator: UIPilot<Screen>

@StateObject private var viewModel = ObservableLoginViewModel()
@State private var showLinkInput = false
@State private var debugLoginLink = ""

var body: some View {
switch viewModel.state.viewState {
Expand Down Expand Up @@ -37,6 +39,9 @@ struct LoginScreen: View {
.scaledToFit()
.frame(maxWidth: 250)
.padding()
.onLongPressGesture {
showLinkInput = true
}
Text(localize.login.title())
.font(.title)
.padding()
Expand All @@ -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)
}
}
5 changes: 2 additions & 3 deletions WaiterRobot/WaiterRobotApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
7 changes: 6 additions & 1 deletion project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -44,6 +47,8 @@ targetTemplates:
- package: shared
- package: UIPilot
- package: CodeScanner
- package: Sentry
product: Sentry-Dynamic

info:
path: ".generated/${target_name}.plist"
Expand Down

0 comments on commit 99640a3

Please sign in to comment.