Fix for NSE and ShareExtension individual builds (#5856)

This commit is contained in:
Michael
2026-07-13 05:33:36 -05:00
committed by GitHub
parent e8db3cff77
commit c69ebd8898
@@ -8,7 +8,9 @@
import Combine import Combine
import Foundation import Foundation
#if IS_MAIN_APP
import MapLibre import MapLibre
#endif
import MatrixRustSDK import MatrixRustSDK
nonisolated enum Target: String { nonisolated enum Target: String {
@@ -63,6 +65,18 @@ nonisolated enum Target: String {
MXLog.configure(currentTarget: rawValue) MXLog.configure(currentTarget: rawValue)
configureMapLibreIfAvailable()
let hookCancellable = rageshakeURL.publisher
.sink { _ in
appHooks.tracingHook.update(tracingConfiguration, with: rageshakeURL)
}
return ConfigurationResult(hookCancellable: hookCancellable)
}
private func configureMapLibreIfAvailable() {
#if IS_MAIN_APP
MLNLoggingConfiguration.shared.loggingLevel = .debug MLNLoggingConfiguration.shared.loggingLevel = .debug
MLNLoggingConfiguration.shared.handler = { loggingLevel, _, _, message in MLNLoggingConfiguration.shared.handler = { loggingLevel, _, _, message in
switch loggingLevel { switch loggingLevel {
@@ -80,13 +94,7 @@ nonisolated enum Target: String {
break break
} }
} }
#endif
let hookCancellable = rageshakeURL.publisher
.sink { _ in
appHooks.tracingHook.update(tracingConfiguration, with: rageshakeURL)
}
return ConfigurationResult(hookCancellable: hookCancellable)
} }
/// The result of calling ``configure(logLevel:traceLogPacks:sentryURL:)``. /// The result of calling ``configure(logLevel:traceLogPacks:sentryURL:)``.