Skip to content

Commit

Permalink
Merge pull request #264 from NachoSoto/swift-6-not-compatible
Browse files Browse the repository at this point in the history
Fix Swift 6 compatibility
  • Loading branch information
kean committed Jun 22, 2024
2 parents 805265a + 210e868 commit e7498f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ let package = Package(
.target(name: "PulseUI", dependencies: ["Pulse"]),
.testTarget(name: "PulseTests", dependencies: ["Pulse"]),
.testTarget(name: "PulseUITests", dependencies: ["PulseUI"])
],
swiftLanguageVersions: [
.v5
]
)
4 changes: 4 additions & 0 deletions Sources/Pulse/NetworkLogger/URLSessionProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ public enum Experimental {
public extension Experimental {
/// WARNING: Experimental.
final class URLSessionProxy {
#if compiler(>=6.0)
public nonisolated(unsafe) static let shared = URLSessionProxy()
#else
public static let shared = URLSessionProxy()
#endif

private init() {
session = URLSession(configuration: .default, delegate: URLSessionProxyDelegate(logger: logger, delegate: CustomProtocolSessionDelegate.shared), delegateQueue: CustomProtocolSessionDelegate.shared.queue)
Expand Down

0 comments on commit e7498f8

Please sign in to comment.