Skip to content
Draft
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
18 changes: 7 additions & 11 deletions Sources/Swift/Protocol/Codable/SentryDebugMetaCodable.swift
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
@_implementationOnly import _SentryPrivate
import Foundation

#if SDK_V9
final class DebugMetaDecodable: DebugMeta {
convenience public init(from decoder: any Decoder) throws {
try self.init(decodedFrom: decoder)
}
}
#else
#if COCOAPODS
extension DebugMeta: Decodable { }
typealias DebugMetaDecodable = DebugMeta
#else
final class DebugMetaDecodable: DebugMeta, Codable { }
#endif
extension DebugMetaDecodable: Decodable {

extension DebugMeta {

private enum CodingKeys: String, CodingKey {
case uuid
Expand All @@ -22,12 +20,10 @@
case imageVmAddress = "image_vmaddr"
case codeFile = "code_file"
}

#if !SDK_V9

required convenience public init(from decoder: any Decoder) throws {

Check failure on line 24 in Sources/Swift/Protocol/Codable/SentryDebugMetaCodable.swift

View workflow job for this annotation

GitHub Actions / Build with SPM

'required' initializer must be declared directly in class 'DebugMeta' (not in an extension)
try self.init(decodedFrom: decoder)
}
#endif

private convenience init(decodedFrom decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
Expand Down
Loading