Skip to content

Commit e9d6a1e

Browse files
committed
fix SPM circular dependency issue
1 parent f1e0dc3 commit e9d6a1e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/Swift/Tools/SentryLogger.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ public final class SentryLogger: NSObject {
188188
attributes: logAttributes
189189
)
190190

191+
#if SWIFT_PACKAGE
192+
// Work around Swift-to-Objective-C bridging limitations in SPM builds.
193+
// SentryLog is only forward declared in SentryHub.h, so we use dynamic dispatch.
194+
hub.perform(Selector("captureLog:"), with: log)
195+
#else
191196
hub.capture(log: log)
197+
#endif
192198
}
193199
}

0 commit comments

Comments
 (0)