Skip to content

Commit cbe9bac

Browse files
committed
Fix CocoaPods build
1 parent 26e2888 commit cbe9bac

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Sources/Sentry/include/SentryPrivate.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#import "SentryRandom.h"
88
#import "SentryScope+Private.h"
99
#import "SentryTime.h"
10-
#import "SentryUser+Private.h"
1110
#import "SentryUserAccess.h"
1211
#import "_SentryDispatchQueueWrapperInternal.h"
1312

Sources/Swift/Persistence/SentryScopeUserPersistentStore.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ import Foundation
4646
}
4747

4848
private func decodeUser(from data: Data) -> User? {
49-
guard let deserialized = SentrySerialization.deserializeDictionary(fromJsonData: data) else {
50-
SentrySDKLog.error("Failed to deserialize user, reason: data is not valid json")
49+
do {
50+
let decoder = JSONDecoder()
51+
return try decoder.decode(UserDecodable.self, from: data)
52+
} catch {
53+
SentrySDKLog.error("Failed to decode user, reason: \(error)")
5154
return nil
5255
}
53-
54-
return User(dictionary: deserialized)
5556
}
5657
}

0 commit comments

Comments
 (0)