Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CHANGELOG-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Removes deprecated SentryDebugImageProvider class (#5598)
Makes app hang tracking V2 the default and removes the option to enable/disable it (#5615)
Removes segment property on SentryUser, SentryBaggage, and SentryTraceContext (#5638)
Removes public SentrySerializable conformance from many public models (#5636, #5840, #5982)
Removes Decodable conformances from the public API of model classes (#5691)
Removes enableTracing property from SentryOptions (#5694)
Removes deprecated `setExtraValue` from SentrySpan (#5864)
Removes `integrations` property from `SentryOptions` (#5749)
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

### Breaking Changes

Removes deprecated user feedback API, this is replaced with the new feedback API (#5591)
Removes `enablePerformanceV2` option and makes this the default. The app start duration will now finish when the first frame is drawn instead of when the OS posts the UIWindowDidBecomeVisibleNotification. (#6008)
- Removes Decodable conformances from the public API of model classes (#5691)
- Removes deprecated user feedback API, this is replaced with the new feedback API (#5591)
- Removes `enablePerformanceV2` option and makes this the default. The app start duration will now finish when the first frame is drawn instead of when the OS posts the UIWindowDidBecomeVisibleNotification. (#6008)

### Features

Expand Down
2 changes: 1 addition & 1 deletion Sources/Sentry/SentryUser.m
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ - (BOOL)isEqual:(id _Nullable)other
if (other == self) {
return YES;
}
if (!other || ![[other class] isEqual:[self class]]) {
if (!other || ![other isKindOfClass:[SentryUser class]]) {
return NO;
}

Expand Down
12 changes: 1 addition & 11 deletions Sources/Swift/Protocol/Codable/SentryUserCodable.swift
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
@_implementationOnly import _SentryPrivate
import Foundation

#if SDK_V9
final class UserDecodable: User {
@available(*, deprecated)
convenience public init(from decoder: any Decoder) throws {
try self.init(decodedFrom: decoder)
}
}
#else
typealias UserDecodable = User
#endif

extension UserDecodable: Decodable {

enum CodingKeys: String, CodingKey {
Expand All @@ -24,13 +21,6 @@ extension UserDecodable: Decodable {
case data
}

#if !SDK_V9
@available(*, deprecated)
required convenience public init(from decoder: any Decoder) throws {
try self.init(decodedFrom: decoder)
}
#endif

@available(*, deprecated, message: """
This method is only deprecated to silence the deprecation warning of the property \
segment. Our Xcode project has deprecations as warnings and warnings as errors \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class SentryScopePersistentStoreTests: XCTestCase {
XCTAssertTrue(fm.fileExists(atPath: userFileURL.path))

let writtenData = try Data(contentsOf: userFileURL)
let decodedUser = try JSONDecoder().decode(User.self, from: writtenData)
let decodedUser = try JSONDecoder().decode(UserDecodable.self, from: writtenData)

XCTAssertEqual(decodedUser.userId, "test-user")
XCTAssertEqual(decodedUser.email, "[email protected]")
Expand Down
4 changes: 2 additions & 2 deletions Tests/SentryTests/Protocol/SentryUserTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class SentryUserTests: XCTestCase {
let data = try XCTUnwrap(SentrySerializationSwift.data(withJSONObject: actual))

// Act
let decoded = decodeFromJSONData(jsonData: data) as User?
let decoded = decodeFromJSONData(jsonData: data) as UserDecodable?

// Assert
XCTAssertEqual(user, decoded)
Expand All @@ -94,7 +94,7 @@ class SentryUserTests: XCTestCase {
let data = try XCTUnwrap(SentrySerializationSwift.data(withJSONObject: actual))

// Act
let decoded = decodeFromJSONData(jsonData: data) as User?
let decoded = decodeFromJSONData(jsonData: data) as UserDecodable?

// Assert
XCTAssertEqual(user, decoded)
Expand Down
Loading