Skip to content

Commit

Permalink
IOS-2651 Update Sentry to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-pusya committed Apr 10, 2024
1 parent ba3829c commit dea514b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Anytype.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13059,7 +13059,7 @@
repositoryURL = "https://github.com/getsentry/sentry-cocoa";
requirement = {
kind = exactVersion;
version = 8.8.0;
version = 8.23.0;
};
};
2AC1262B2B90F65F003A4A8D /* XCRemoteSwiftPackageReference "Factory" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/getsentry/sentry-cocoa",
"state" : {
"revision" : "d277532e1c8af813981ba01f591b15bbdd735615",
"version" : "8.8.0"
"revision" : "937dce13c2600cc42112c480d04f84899e08e9cc",
"version" : "8.23.0"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Anytype/Sources/CoreLayer/Sentry/SentryConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class SentryConfigurator: AppConfiguratorProtocol {

#if DEBUG
options.attachViewHierarchy = true
options.enableTimeToFullDisplay = true
options.enableTimeToFullDisplayTracing = true
#endif

options.environment = env
Expand Down
4 changes: 2 additions & 2 deletions Anytype/Sources/ServiceLayer/Auth/AuthService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ final class AuthService: AuthServiceProtocol {
AnytypeAnalytics.instance().setNetworkId(account.info.networkId)
AnytypeAnalytics.instance().logAccountCreate(analyticsId: analyticsId, middleTime: middleTime)
AnytypeAnalytics.instance().logCreateSpace(route: .navigation)
appErrorLoggerConfiguration.setUserId(analyticsId)
await appErrorLoggerConfiguration.setUserId(analyticsId)

UserDefaultsConfig.usersId = account.id

Expand Down Expand Up @@ -82,7 +82,7 @@ final class AuthService: AuthServiceProtocol {
AnytypeAnalytics.instance().setUserId(analyticsId)
AnytypeAnalytics.instance().setNetworkId(account.info.networkId)
AnytypeAnalytics.instance().logAccountOpen(analyticsId: analyticsId)
appErrorLoggerConfiguration.setUserId(analyticsId)
await appErrorLoggerConfiguration.setUserId(analyticsId)

switch account.status {
case .active, .pendingDeletion:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import Foundation
import Sentry

@MainActor
protocol AppErrorLoggerConfigurationProtocol: AnyObject {
func setUserId(_ userId: String)
func setUserId(_ userId: String) async
}

@MainActor
final class AppErrorLoggerConfiguration: AppErrorLoggerConfigurationProtocol {

nonisolated init() {}

// MARK: - AppErrorLoggerConfigurationProtocol

func setUserId(_ userId: String) {
func setUserId(_ userId: String) async {
let user = User()
user.userId = userId
SentrySDK.setUser(user)
Expand Down

0 comments on commit dea514b

Please sign in to comment.