@@ -16,7 +16,8 @@ var products: [Product] = [
1616 . library( name: " Sentry-WithoutUIKitOrAppKit " , targets: [ " Sentry-WithoutUIKitOrAppKit " , " SentryCppHelper " ] ) ,
1717 . library( name: " Sentry-WithoutUIKitOrAppKit-WithARM64e " , targets: [ " Sentry-WithoutUIKitOrAppKit-WithARM64e " , " SentryCppHelper " ] ) ,
1818 . library( name: " SentrySwiftUI " , targets: [ " Sentry " , " SentrySwiftUI " , " SentryCppHelper " ] ) ,
19- . library( name: " SentryDistribution " , targets: [ " SentryDistribution " ] )
19+ . library( name: " SentryDistribution " , targets: [ " SentryDistribution " ] ) ,
20+ . library( name: " SentrySwiftLog " , targets: [ " Sentry " , " SentrySwiftLog " ] )
2021]
2122
2223var targets : [ Target ] = [
@@ -45,21 +46,31 @@ var targets: [Target] = [
4546 url: " https://github.com/getsentry/sentry-cocoa/releases/download/8.57.1/Sentry-WithoutUIKitOrAppKit-WithARM64e.xcframework.zip " ,
4647 checksum: " 6f3b991969a02f02878d052d0edf7076110f0ea577f84b2c5ad706a9bd302c54 " //Sentry-WithoutUIKitOrAppKit-WithARM64e
4748 ) ,
48- . target (
49+ . target(
4950 name: " SentrySwiftUI " ,
5051 dependencies: [ " Sentry " , " SentryInternal " ] ,
5152 path: " Sources/SentrySwiftUI " ,
5253 exclude: [ " SentryInternal/ " , " module.modulemap " ] ,
5354 linkerSettings: [
5455 . linkedFramework( " Sentry " )
55- ] ) ,
56+ ]
57+ ) ,
58+ . target(
59+ name: " SentrySwiftLog " ,
60+ dependencies: [ " Sentry " , . product( name: " Logging " , package : " swift-log " ) ] ,
61+ path: " Sources/SentrySwiftLog " ,
62+ linkerSettings: [
63+ . linkedFramework( " Sentry " )
64+ ]
65+ ) ,
5666 . target(
5767 name: " SentryInternal " ,
5868 path: " Sources/SentrySwiftUI " ,
5969 sources: [
6070 " SentryInternal/ "
6171 ] ,
62- publicHeadersPath: " SentryInternal/ " ) ,
72+ publicHeadersPath: " SentryInternal/ "
73+ ) ,
6374 . target(
6475 name: " SentryCppHelper " ,
6576 dependencies: [ " Sentry " ] ,
@@ -101,7 +112,7 @@ if let env = env, String(cString: env, encoding: .utf8) == "1" {
101112 name: " SentryObjc " ,
102113 dependencies: [ " SentrySwift " ] ,
103114 path: " Sources " ,
104- exclude: [ " Sentry/SentryDummyPublicEmptyClass.m " , " Sentry/SentryDummyPrivateEmptyClass.m " , " Swift " , " SentrySwiftUI " , " Resources " , " Configuration " , " SentryCppHelper " , " SentryDistribution " , " SentryDistributionTests " ] ,
115+ exclude: [ " Sentry/SentryDummyPublicEmptyClass.m " , " Sentry/SentryDummyPrivateEmptyClass.m " , " Swift " , " SentrySwiftUI " , " SentrySwiftLog " , " Resources " , " Configuration " , " SentryCppHelper " , " SentryDistribution " , " SentryDistributionTests " ] ,
105116 cSettings: [
106117 . headerSearchPath( " Sentry/include/HybridPublic " ) ,
107118 . headerSearchPath( " Sentry " ) ,
@@ -118,6 +129,12 @@ let package = Package(
118129 name: " Sentry " ,
119130 platforms: [ . iOS( . v15) , . macOS( . v12) , . tvOS( . v15) , . watchOS( . v8) ] ,
120131 products: products,
132+ dependencies: [
133+ // SPM doesn't support peer-dependencies, so users are locked into our declared version.
134+ // Using `from: "1.6.0"` covers 1.6.0 < 2.0.0, resolving minor versions automatically.
135+ // See develop-docs/DECISIONS.md for discussion.
136+ . package ( url: " https://github.com/apple/swift-log " , from: " 1.6.0 " )
137+ ] ,
121138 targets: targets,
122139 cxxLanguageStandard: . cxx14
123140)
0 commit comments