Skip to content

Commit

Permalink
default user.name in addition to user.username
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight committed Dec 13, 2024
1 parent fc35119 commit a2764d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Samples/iOS-Swift/iOS-Swift/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
user.email = env["--io.sentry.user.email"] ?? "tony@example.com"
// first check if the username has been overridden in the scheme for testing purposes; then try to use the system username so each person gets an automatic way to easily filter things on the dashboard; then fall back on a hardcoded value if none of these are present
let username = env["--io.sentry.user.username"] ?? (env["SIMULATOR_HOST_HOME"] as? NSString)?
.lastPathComponent ?? "cocoa developer"
.lastPathComponent ?? "cocoadev"
user.username = username
user.name = env["--io.sentry.user.name"]
user.name = env["--io.sentry.user.name"] ?? "cocoa developer"
scope.setUser(user)

if let path = Bundle.main.path(forResource: "Tongariro", ofType: "jpg") {
Expand Down

0 comments on commit a2764d8

Please sign in to comment.