The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Failed to build PushNotifications, reference 4.0.0 (037435), with Swift 6.0 for Linux on 28 Nov 2024 03:53:31 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-1":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1

Build Log

 78 |     @objc public func registerForRemoteNotifications() {
    |      `- error: Objective-C interoperability is disabled
 79 |         PushNotificationsStatic.registerForRemoteNotifications()
 80 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:110:6: error: Objective-C interoperability is disabled
108 |     */
109 |     /// - Tag: setUserId
110 |     @objc public func setUserId(_ userId: String, tokenProvider: TokenProvider, completion: @escaping (Error?) -> Void) {
    |      `- error: Objective-C interoperability is disabled
111 |         if startHasBeenCalledThisSession == false {
112 |             completion(PushNotificationsError.error("[PushNotifications] - `start` method must be called before setting `userId`"))
/host/spi-builder-workspace/Sources/PushNotifications.swift:156:6: error: Objective-C interoperability is disabled
154 |     }
155 |
156 |     @objc private func printHelpfulMessage() {
    |      `- error: Objective-C interoperability is disabled
157 |         print("[PushNotifications] - It looks like setUserId hasn't completed yet -- have you called `registerDeviceToken`?")
158 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:167:6: error: Objective-C interoperability is disabled
165 |      */
166 |     /// - Tag: stop
167 |     @objc public func stop(completion: @escaping () -> Void) {
    |      `- error: Objective-C interoperability is disabled
168 |         let hadAnyInterests: Bool = InstanceDeviceStateStore.synchronize {
169 |             let hadAnyInterests = self.deviceStateStore.getInterests()?.isEmpty ?? false
/host/spi-builder-workspace/Sources/PushNotifications.swift:196:6: error: Objective-C interoperability is disabled
194 |      */
195 |     /// - Tag: clearAllState
196 |     @objc public func clearAllState(completion: @escaping () -> Void) {
    |      `- error: Objective-C interoperability is disabled
197 |         let storedAPNsToken = self.deviceStateStore.getAPNsToken()
198 |         let hasStartAlreadyBeenCalled = self.deviceStateStore.getStartJobHasBeenEnqueued()
/host/spi-builder-workspace/Sources/PushNotifications.swift:218:6: error: Objective-C interoperability is disabled
216 |      */
217 |     /// - Tag: registerDeviceToken
218 |     @objc public func registerDeviceToken(_ deviceToken: Data) {
    |      `- error: Objective-C interoperability is disabled
219 |         PushNotificationsStatic.registerDeviceToken(deviceToken)
220 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:232:6: error: Objective-C interoperability is disabled
230 |      */
231 |     /// - Tag: addDeviceInterest
232 |     @objc public func addDeviceInterest(interest: String) throws {
    |      `- error: Objective-C interoperability is disabled
233 |         guard self.validateInterestName(interest) else {
234 |             throw InvalidInterestError.invalidName(interest)
/host/spi-builder-workspace/Sources/PushNotifications.swift:258:6: error: Objective-C interoperability is disabled
256 |      */
257 |     /// - Tag: setDeviceInterests
258 |     @objc public func setDeviceInterests(interests: [String]) throws {
    |      `- error: Objective-C interoperability is disabled
259 |         if let invalidInterests = self.validateInterestNames(interests), invalidInterests.count > 0 {
260 |             throw MultipleInvalidInterestsError.invalidNames(invalidInterests)
/host/spi-builder-workspace/Sources/PushNotifications.swift:283:7: error: Objective-C interoperability is disabled
281 |      */
282 |     /// - Tag: removeDeviceInterest
283 |      @objc public func removeDeviceInterest(interest: String) throws {
    |       `- error: Objective-C interoperability is disabled
284 |         guard self.validateInterestName(interest) else {
285 |             throw InvalidInterestError.invalidName(interest)
/host/spi-builder-workspace/Sources/PushNotifications.swift:300:6: error: Objective-C interoperability is disabled
298 |     /// Unsubscribes the device from all the interests.
299 |     /// - Tag: clearDeviceInterests
300 |     @objc public func clearDeviceInterests() throws {
    |      `- error: Objective-C interoperability is disabled
301 |         try self.setDeviceInterests(interests: [])
302 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:310:6: error: Objective-C interoperability is disabled
308 |      */
309 |     /// - Tag: getDeviceInterests
310 |     @objc public func getDeviceInterests() -> [String]? {
    |      `- error: Objective-C interoperability is disabled
311 |         return InstanceDeviceStateStore.synchronize {
312 |             return self.deviceStateStore.getInterests()
/host/spi-builder-workspace/Sources/PushNotifications.swift:333:6: error: Objective-C interoperability is disabled
331 |     /// - Tag: handleNotification
332 |     @discardableResult
333 |     @objc public func handleNotification(userInfo: [AnyHashable: Any]) -> RemoteNotificationType {
    |      `- error: Objective-C interoperability is disabled
334 |         return PushNotificationsStatic.handleNotification(userInfo: userInfo)
335 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:352:2: error: Objective-C interoperability is disabled
350 |  Method `interestsSetOnDeviceDidChange(interests:)` will be called when interests set changes.
351 |  */
352 | @objc public protocol InterestsChangedDelegate: AnyObject {
    |  `- error: Objective-C interoperability is disabled
353 |     /**
354 |      Tells the delegate that the device's interests subscriptions list has changed.
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
/host/spi-builder-workspace/Sources/PushNotifications.swift:141:91: error: '#selector' can only be used with the Objective-C runtime
139 |         }
140 |
141 |         let helpfulTimer = Timer.scheduledTimer(timeInterval: 15, target: self, selector: #selector(printHelpfulMessage), userInfo: nil, repeats: false)
    |                                                                                           `- error: '#selector' can only be used with the Objective-C runtime
142 |
143 |         let wrapperCompletion: (Error?) -> Void = { error in
/host/spi-builder-workspace/Sources/PushNotifications.swift:339:37: error: 'init(format:_:)' has been renamed to 'init(block:)': Predicate strings and key-value coding are not supported in swift-corelibs-foundation. Use a closure instead if possible.
337 |     private func validateInterestName(_ interest: String) -> Bool {
338 |         let interestNameRegex = "^[a-zA-Z0-9_\\-=@,.;]{1,164}$"
339 |         let interestNamePredicate = NSPredicate(format: "SELF MATCHES %@", interestNameRegex)
    |                                     `- error: 'init(format:_:)' has been renamed to 'init(block:)': Predicate strings and key-value coding are not supported in swift-corelibs-foundation. Use a closure instead if possible.
340 |         return interestNamePredicate.evaluate(with: interest)
341 |     }
Foundation.NSPredicate:3:24: note: 'init(format:_:)' has been explicitly marked unavailable here
1 | extension NSPredicate {
2 |     @available(*, unavailable, renamed: "init(block:)", message: "Predicate strings and key-value coding are not supported in swift-corelibs-foundation. Use a closure instead if possible.")
3 |     public convenience init(format predicateFormat: String, _ args: any CVarArg...)
  |                        `- note: 'init(format:_:)' has been explicitly marked unavailable here
4 | }
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:11:2: error: Objective-C interoperability is disabled
  9 |
 10 | /// A static equivalent of the `PushNotifications` type.
 11 | @objc public final class PushNotificationsStatic: NSObject {
    |  `- error: Objective-C interoperability is disabled
 12 |
 13 |     override private init() {
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:17:24: warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 15 |     }
 16 |
 17 |     private static var instance: PushNotifications?
    |                        |- warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'instance' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'instance' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 18 |     internal static var tokenProvider = [String: TokenProvider]()
 19 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:28:6: error: Objective-C interoperability is disabled
 26 |      */
 27 |     /// - Tag: start
 28 |     @objc public static func start(instanceId: String) {
    |      `- error: Objective-C interoperability is disabled
 29 |         if instance == nil {
 30 |             instance = PushNotifications(instanceId: instanceId)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:50:6: error: Objective-C interoperability is disabled
 48 |      */
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
    |      `- error: Objective-C interoperability is disabled
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
 52 |     }
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:102:6: error: Objective-C interoperability is disabled
100 |      */
101 |     /// - Tag: setUserId
102 |     @objc public static func setUserId(_ userId: String, tokenProvider: TokenProvider, completion: @escaping (Error?) -> Void) {
    |      `- error: Objective-C interoperability is disabled
103 |         if let staticInstance = instance {
104 |             staticInstance.setUserId(userId, tokenProvider: tokenProvider, completion: completion)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:117:6: error: Objective-C interoperability is disabled
115 |      */
116 |     /// - Tag: stop
117 |     @objc public static func stop(completion: @escaping () -> Void) {
    |      `- error: Objective-C interoperability is disabled
118 |         let instances = DeviceStateStore().getInstanceIds()
119 |         let dispatchGroup = DispatchGroup()
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:139:6: error: Objective-C interoperability is disabled
137 |      */
138 |     /// - Tag: clearAllState
139 |     @objc public static func clearAllState(completion: @escaping () -> Void) {
    |      `- error: Objective-C interoperability is disabled
140 |         let instances = DeviceStateStore().getInstanceIds()
141 |         let dispatchGroup = DispatchGroup()
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:161:6: error: Objective-C interoperability is disabled
159 |      */
160 |     /// - Tag: registerDeviceToken
161 |     @objc public static func registerDeviceToken(_ deviceToken: Data) {
    |      `- error: Objective-C interoperability is disabled
162 |         let instances = DeviceStateStore().getInstanceIds()
163 |         var hasAnInstanceBeenStarted = false
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:192:6: error: Objective-C interoperability is disabled
190 |      */
191 |     /// - Tag: addDeviceInterest
192 |     @objc public static func addDeviceInterest(interest: String) throws {
    |      `- error: Objective-C interoperability is disabled
193 |         if let staticInstance = instance {
194 |             try staticInstance.addDeviceInterest(interest: interest)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:211:6: error: Objective-C interoperability is disabled
209 |      */
210 |     /// - Tag: setDeviceInterests
211 |     @objc public static func setDeviceInterests(interests: [String]) throws {
    |      `- error: Objective-C interoperability is disabled
212 |         if let staticInstance = instance {
213 |             try staticInstance.setDeviceInterests(interests: interests)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:229:6: error: Objective-C interoperability is disabled
227 |      */
228 |     /// - Tag: removeDeviceInterest
229 |     @objc public static func removeDeviceInterest(interest: String) throws {
    |      `- error: Objective-C interoperability is disabled
230 |         if let staticInstance = instance {
231 |             try staticInstance.removeDeviceInterest(interest: interest)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:239:6: error: Objective-C interoperability is disabled
237 |     /// Unsubscribes the device from all the interests.
238 |     /// - Tag: clearDeviceInterests
239 |     @objc public static func clearDeviceInterests() throws {
    |      `- error: Objective-C interoperability is disabled
240 |         if let staticInstance = instance {
241 |             try staticInstance.clearDeviceInterests()
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:253:6: error: Objective-C interoperability is disabled
251 |      */
252 |     /// - Tag: getDeviceInterests
253 |     @objc public static func getDeviceInterests() -> [String]? {
    |      `- error: Objective-C interoperability is disabled
254 |         if let staticInstance = instance {
255 |             return staticInstance.getDeviceInterests()
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:268:6: error: Objective-C interoperability is disabled
266 |     /// - Tag: handleNotification
267 |     @discardableResult
268 |     @objc public static func handleNotification(userInfo: [AnyHashable: Any]) -> RemoteNotificationType {
    |      `- error: Objective-C interoperability is disabled
269 |         guard FeatureFlags.DeliveryTrackingEnabled else {
270 |             return .ShouldProcess
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:51:14: error: type 'PushNotificationsStatic' has no member 'registerForPushNotifications'
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
    |              `- error: type 'PushNotificationsStatic' has no member 'registerForPushNotifications'
 52 |     }
 53 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:51:54: error: reference to member 'alert' cannot be resolved without a contextual type
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
    |                                                      `- error: reference to member 'alert' cannot be resolved without a contextual type
 52 |     }
 53 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:51:62: error: reference to member 'sound' cannot be resolved without a contextual type
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
    |                                                              `- error: reference to member 'sound' cannot be resolved without a contextual type
 52 |     }
 53 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:51:70: error: reference to member 'badge' cannot be resolved without a contextual type
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
    |                                                                      `- error: reference to member 'badge' cannot be resolved without a contextual type
 52 |     }
 53 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:284:84: error: cannot find 'eventType' in scope
282 |         #endif
283 |
284 |         let serverSyncProcessHandler = ServerSyncProcessHandler.obtain(instanceId: eventType.getInstanceId())
    |                                                                                    `- error: cannot find 'eventType' in scope
285 |         serverSyncProcessHandler?.sendMessage(serverSyncJob: .reportEventJob(eventType: eventType))
286 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:285:89: error: cannot find 'eventType' in scope
283 |
284 |         let serverSyncProcessHandler = ServerSyncProcessHandler.obtain(instanceId: eventType.getInstanceId())
285 |         serverSyncProcessHandler?.sendMessage(serverSyncJob: .reportEventJob(eventType: eventType))
    |                                                                                         `- error: cannot find 'eventType' in scope
286 |
287 |         return EventTypeHandler.getRemoteNotificationType(userInfo)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:285:63: error: cannot infer contextual base in reference to member 'reportEventJob'
283 |
284 |         let serverSyncProcessHandler = ServerSyncProcessHandler.obtain(instanceId: eventType.getInstanceId())
285 |         serverSyncProcessHandler?.sendMessage(serverSyncJob: .reportEventJob(eventType: eventType))
    |                                                               `- error: cannot infer contextual base in reference to member 'reportEventJob'
286 |
287 |         return EventTypeHandler.getRemoteNotificationType(userInfo)
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:4:2: error: Objective-C interoperability is disabled
 2 |
 3 | /// Used to generate tokens for users to authenticate against.
 4 | @objc public final class BeamsTokenProvider: NSObject, TokenProvider {
   |  `- error: Objective-C interoperability is disabled
 5 |
 6 |     /// The authentication endpoint URL `String`.
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:16:6: error: Objective-C interoperability is disabled
14 |     ///   - authURL: The authentication endpoint URL `String`.
15 |     ///   - getAuthData: A closure that returns an `AuthData` object.
16 |     @objc public init(authURL: String, getAuthData: @escaping () -> (AuthData)) {
   |      `- error: Objective-C interoperability is disabled
17 |         self.authURL = authURL
18 |         self.getAuthData = getAuthData
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:30:26: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
28 |         let queryParams = authData.queryParams
29 |
30 |         let urlSession = URLSession(configuration: .ephemeral)
   |                          `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
31 |
32 |         guard var components = URLComponents(string: authURL) else {
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:30:53: error: cannot infer contextual base in reference to member 'ephemeral'
28 |         let queryParams = authData.queryParams
29 |
30 |         let urlSession = URLSession(configuration: .ephemeral)
   |                                                     `- error: cannot infer contextual base in reference to member 'ephemeral'
31 |
32 |         guard var components = URLComponents(string: authURL) else {
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:43:26: error: cannot find 'URLRequest' in scope
41 |         }
42 |
43 |         var urlRequest = URLRequest(url: url)
   |                          `- error: cannot find 'URLRequest' in scope
44 |         urlRequest.httpMethod = "GET"
45 |         for header in headers {
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:56:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
54 |                 return completion("", TokenProviderError.error("[PushNotifications] - BeamsTokenProvider: Error while casting response object to `HTTPURLResponse`"))
55 |             }
56 |             let statusCode = httpURLResponse.statusCode
   |                                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
57 |             guard statusCode >= 200 && statusCode < 300 else {
58 |                 return completion("", TokenProviderError.error("[PushNotifications] - BeamsTokenProvider: Received HTTP Status Code: \(statusCode)"))
/host/spi-builder-workspace/Sources/Services/DeviceStateStore.swift:206:24: error: value of type 'UserDefaults' has no member 'value'
204 |
205 |     func getServerConfirmedInterestsHash() -> String {
206 |         return service.value(forKey: PersistenceConstants.PersistenceService.hashKey) as? String ?? ""
    |                        `- error: value of type 'UserDefaults' has no member 'value'
207 |     }
208 |
[7/46] Compiling PushNotifications BeamsTokenProvider.swift
/host/spi-builder-workspace/Sources/Protocols/TokenProvider.swift:24:2: error: Objective-C interoperability is disabled
22 |  Conform to the TokenProvider protocol in order to generate the token for the user that you want to authenticate.
23 |  */
24 | @objc public protocol TokenProvider {
   |  `- error: Objective-C interoperability is disabled
25 |     /**
26 |      Method `fetchToken` will return the token on success or error on failure.
/host/spi-builder-workspace/Sources/PushNotifications.swift:11:2: error: Objective-C interoperability is disabled
  9 |
 10 | /// The top-level entrypoint to the Beams Swift SDK.
 11 | @objc public final class PushNotifications: NSObject {
    |  `- error: Objective-C interoperability is disabled
 12 |
 13 |     internal let instanceId: String
/host/spi-builder-workspace/Sources/PushNotifications.swift:22:6: error: Objective-C interoperability is disabled
 20 |     /// Creates a `PushNotifications` object with a given `instanceId`.
 21 |     /// - Parameter instanceId: The instance identifier (from your app dashboard).
 22 |     @objc public init(instanceId: String) {
    |      `- error: Objective-C interoperability is disabled
 23 |         self.instanceId = instanceId
 24 |         self.deviceStateStore = InstanceDeviceStateStore(instanceId)
/host/spi-builder-workspace/Sources/PushNotifications.swift:35:6: error: Objective-C interoperability is disabled
 33 |     /// Returns a shared singleton PushNotifications object
 34 |     /// that can be accessed from anywhere in your project.
 35 |     @objc public static let shared = PushNotificationsStatic.self
    |      `- error: Objective-C interoperability is disabled
 36 |
 37 |     private lazy var serverSyncHandler = ServerSyncProcessHandler.obtain(
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:18:25: warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 16 |
 17 |     private static var instance: PushNotifications?
 18 |     internal static var tokenProvider = [String: TokenProvider]()
    |                         |- warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                         |- note: convert 'tokenProvider' to a 'let' constant to make 'Sendable' shared state immutable
    |                         |- note: annotate 'tokenProvider' with '@MainActor' if property should only be accessed from the main actor
    |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 19 |
 20 |     /**
/host/spi-builder-workspace/Sources/PushNotifications.swift:51:6: error: Objective-C interoperability is disabled
 49 |      */
 50 |     /// - Tag: start
 51 |     @objc public func start() {
    |      `- error: Objective-C interoperability is disabled
 52 |         if UUID(uuidString: instanceId) == nil {
 53 |             print("[PushNotifications]: '\(instanceId)' is not a valid instance id.")
/host/spi-builder-workspace/Sources/PushNotifications.swift:78:6: error: Objective-C interoperability is disabled
 76 |      */
 77 |     /// - Tag: register
 78 |     @objc public func registerForRemoteNotifications() {
    |      `- error: Objective-C interoperability is disabled
 79 |         PushNotificationsStatic.registerForRemoteNotifications()
 80 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:110:6: error: Objective-C interoperability is disabled
108 |     */
109 |     /// - Tag: setUserId
110 |     @objc public func setUserId(_ userId: String, tokenProvider: TokenProvider, completion: @escaping (Error?) -> Void) {
    |      `- error: Objective-C interoperability is disabled
111 |         if startHasBeenCalledThisSession == false {
112 |             completion(PushNotificationsError.error("[PushNotifications] - `start` method must be called before setting `userId`"))
/host/spi-builder-workspace/Sources/PushNotifications.swift:156:6: error: Objective-C interoperability is disabled
154 |     }
155 |
156 |     @objc private func printHelpfulMessage() {
    |      `- error: Objective-C interoperability is disabled
157 |         print("[PushNotifications] - It looks like setUserId hasn't completed yet -- have you called `registerDeviceToken`?")
158 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:167:6: error: Objective-C interoperability is disabled
165 |      */
166 |     /// - Tag: stop
167 |     @objc public func stop(completion: @escaping () -> Void) {
    |      `- error: Objective-C interoperability is disabled
168 |         let hadAnyInterests: Bool = InstanceDeviceStateStore.synchronize {
169 |             let hadAnyInterests = self.deviceStateStore.getInterests()?.isEmpty ?? false
/host/spi-builder-workspace/Sources/PushNotifications.swift:196:6: error: Objective-C interoperability is disabled
194 |      */
195 |     /// - Tag: clearAllState
196 |     @objc public func clearAllState(completion: @escaping () -> Void) {
    |      `- error: Objective-C interoperability is disabled
197 |         let storedAPNsToken = self.deviceStateStore.getAPNsToken()
198 |         let hasStartAlreadyBeenCalled = self.deviceStateStore.getStartJobHasBeenEnqueued()
/host/spi-builder-workspace/Sources/PushNotifications.swift:218:6: error: Objective-C interoperability is disabled
216 |      */
217 |     /// - Tag: registerDeviceToken
218 |     @objc public func registerDeviceToken(_ deviceToken: Data) {
    |      `- error: Objective-C interoperability is disabled
219 |         PushNotificationsStatic.registerDeviceToken(deviceToken)
220 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:232:6: error: Objective-C interoperability is disabled
230 |      */
231 |     /// - Tag: addDeviceInterest
232 |     @objc public func addDeviceInterest(interest: String) throws {
    |      `- error: Objective-C interoperability is disabled
233 |         guard self.validateInterestName(interest) else {
234 |             throw InvalidInterestError.invalidName(interest)
/host/spi-builder-workspace/Sources/PushNotifications.swift:258:6: error: Objective-C interoperability is disabled
256 |      */
257 |     /// - Tag: setDeviceInterests
258 |     @objc public func setDeviceInterests(interests: [String]) throws {
    |      `- error: Objective-C interoperability is disabled
259 |         if let invalidInterests = self.validateInterestNames(interests), invalidInterests.count > 0 {
260 |             throw MultipleInvalidInterestsError.invalidNames(invalidInterests)
/host/spi-builder-workspace/Sources/PushNotifications.swift:283:7: error: Objective-C interoperability is disabled
281 |      */
282 |     /// - Tag: removeDeviceInterest
283 |      @objc public func removeDeviceInterest(interest: String) throws {
    |       `- error: Objective-C interoperability is disabled
284 |         guard self.validateInterestName(interest) else {
285 |             throw InvalidInterestError.invalidName(interest)
/host/spi-builder-workspace/Sources/PushNotifications.swift:300:6: error: Objective-C interoperability is disabled
298 |     /// Unsubscribes the device from all the interests.
299 |     /// - Tag: clearDeviceInterests
300 |     @objc public func clearDeviceInterests() throws {
    |      `- error: Objective-C interoperability is disabled
301 |         try self.setDeviceInterests(interests: [])
302 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:310:6: error: Objective-C interoperability is disabled
308 |      */
309 |     /// - Tag: getDeviceInterests
310 |     @objc public func getDeviceInterests() -> [String]? {
    |      `- error: Objective-C interoperability is disabled
311 |         return InstanceDeviceStateStore.synchronize {
312 |             return self.deviceStateStore.getInterests()
/host/spi-builder-workspace/Sources/PushNotifications.swift:333:6: error: Objective-C interoperability is disabled
331 |     /// - Tag: handleNotification
332 |     @discardableResult
333 |     @objc public func handleNotification(userInfo: [AnyHashable: Any]) -> RemoteNotificationType {
    |      `- error: Objective-C interoperability is disabled
334 |         return PushNotificationsStatic.handleNotification(userInfo: userInfo)
335 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:352:2: error: Objective-C interoperability is disabled
350 |  Method `interestsSetOnDeviceDidChange(interests:)` will be called when interests set changes.
351 |  */
352 | @objc public protocol InterestsChangedDelegate: AnyObject {
    |  `- error: Objective-C interoperability is disabled
353 |     /**
354 |      Tells the delegate that the device's interests subscriptions list has changed.
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
/host/spi-builder-workspace/Sources/PushNotifications.swift:141:91: error: '#selector' can only be used with the Objective-C runtime
139 |         }
140 |
141 |         let helpfulTimer = Timer.scheduledTimer(timeInterval: 15, target: self, selector: #selector(printHelpfulMessage), userInfo: nil, repeats: false)
    |                                                                                           `- error: '#selector' can only be used with the Objective-C runtime
142 |
143 |         let wrapperCompletion: (Error?) -> Void = { error in
/host/spi-builder-workspace/Sources/PushNotifications.swift:339:37: error: 'init(format:_:)' has been renamed to 'init(block:)': Predicate strings and key-value coding are not supported in swift-corelibs-foundation. Use a closure instead if possible.
337 |     private func validateInterestName(_ interest: String) -> Bool {
338 |         let interestNameRegex = "^[a-zA-Z0-9_\\-=@,.;]{1,164}$"
339 |         let interestNamePredicate = NSPredicate(format: "SELF MATCHES %@", interestNameRegex)
    |                                     `- error: 'init(format:_:)' has been renamed to 'init(block:)': Predicate strings and key-value coding are not supported in swift-corelibs-foundation. Use a closure instead if possible.
340 |         return interestNamePredicate.evaluate(with: interest)
341 |     }
Foundation.NSPredicate:3:24: note: 'init(format:_:)' has been explicitly marked unavailable here
1 | extension NSPredicate {
2 |     @available(*, unavailable, renamed: "init(block:)", message: "Predicate strings and key-value coding are not supported in swift-corelibs-foundation. Use a closure instead if possible.")
3 |     public convenience init(format predicateFormat: String, _ args: any CVarArg...)
  |                        `- note: 'init(format:_:)' has been explicitly marked unavailable here
4 | }
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:11:2: error: Objective-C interoperability is disabled
  9 |
 10 | /// A static equivalent of the `PushNotifications` type.
 11 | @objc public final class PushNotificationsStatic: NSObject {
    |  `- error: Objective-C interoperability is disabled
 12 |
 13 |     override private init() {
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:17:24: warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 15 |     }
 16 |
 17 |     private static var instance: PushNotifications?
    |                        |- warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'instance' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'instance' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 18 |     internal static var tokenProvider = [String: TokenProvider]()
 19 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:28:6: error: Objective-C interoperability is disabled
 26 |      */
 27 |     /// - Tag: start
 28 |     @objc public static func start(instanceId: String) {
    |      `- error: Objective-C interoperability is disabled
 29 |         if instance == nil {
 30 |             instance = PushNotifications(instanceId: instanceId)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:50:6: error: Objective-C interoperability is disabled
 48 |      */
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
    |      `- error: Objective-C interoperability is disabled
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
 52 |     }
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:102:6: error: Objective-C interoperability is disabled
100 |      */
101 |     /// - Tag: setUserId
102 |     @objc public static func setUserId(_ userId: String, tokenProvider: TokenProvider, completion: @escaping (Error?) -> Void) {
    |      `- error: Objective-C interoperability is disabled
103 |         if let staticInstance = instance {
104 |             staticInstance.setUserId(userId, tokenProvider: tokenProvider, completion: completion)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:117:6: error: Objective-C interoperability is disabled
115 |      */
116 |     /// - Tag: stop
117 |     @objc public static func stop(completion: @escaping () -> Void) {
    |      `- error: Objective-C interoperability is disabled
118 |         let instances = DeviceStateStore().getInstanceIds()
119 |         let dispatchGroup = DispatchGroup()
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:139:6: error: Objective-C interoperability is disabled
137 |      */
138 |     /// - Tag: clearAllState
139 |     @objc public static func clearAllState(completion: @escaping () -> Void) {
    |      `- error: Objective-C interoperability is disabled
140 |         let instances = DeviceStateStore().getInstanceIds()
141 |         let dispatchGroup = DispatchGroup()
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:161:6: error: Objective-C interoperability is disabled
159 |      */
160 |     /// - Tag: registerDeviceToken
161 |     @objc public static func registerDeviceToken(_ deviceToken: Data) {
    |      `- error: Objective-C interoperability is disabled
162 |         let instances = DeviceStateStore().getInstanceIds()
163 |         var hasAnInstanceBeenStarted = false
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:192:6: error: Objective-C interoperability is disabled
190 |      */
191 |     /// - Tag: addDeviceInterest
192 |     @objc public static func addDeviceInterest(interest: String) throws {
    |      `- error: Objective-C interoperability is disabled
193 |         if let staticInstance = instance {
194 |             try staticInstance.addDeviceInterest(interest: interest)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:211:6: error: Objective-C interoperability is disabled
209 |      */
210 |     /// - Tag: setDeviceInterests
211 |     @objc public static func setDeviceInterests(interests: [String]) throws {
    |      `- error: Objective-C interoperability is disabled
212 |         if let staticInstance = instance {
213 |             try staticInstance.setDeviceInterests(interests: interests)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:229:6: error: Objective-C interoperability is disabled
227 |      */
228 |     /// - Tag: removeDeviceInterest
229 |     @objc public static func removeDeviceInterest(interest: String) throws {
    |      `- error: Objective-C interoperability is disabled
230 |         if let staticInstance = instance {
231 |             try staticInstance.removeDeviceInterest(interest: interest)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:239:6: error: Objective-C interoperability is disabled
237 |     /// Unsubscribes the device from all the interests.
238 |     /// - Tag: clearDeviceInterests
239 |     @objc public static func clearDeviceInterests() throws {
    |      `- error: Objective-C interoperability is disabled
240 |         if let staticInstance = instance {
241 |             try staticInstance.clearDeviceInterests()
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:253:6: error: Objective-C interoperability is disabled
251 |      */
252 |     /// - Tag: getDeviceInterests
253 |     @objc public static func getDeviceInterests() -> [String]? {
    |      `- error: Objective-C interoperability is disabled
254 |         if let staticInstance = instance {
255 |             return staticInstance.getDeviceInterests()
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:268:6: error: Objective-C interoperability is disabled
266 |     /// - Tag: handleNotification
267 |     @discardableResult
268 |     @objc public static func handleNotification(userInfo: [AnyHashable: Any]) -> RemoteNotificationType {
    |      `- error: Objective-C interoperability is disabled
269 |         guard FeatureFlags.DeliveryTrackingEnabled else {
270 |             return .ShouldProcess
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:51:14: error: type 'PushNotificationsStatic' has no member 'registerForPushNotifications'
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
    |              `- error: type 'PushNotificationsStatic' has no member 'registerForPushNotifications'
 52 |     }
 53 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:51:54: error: reference to member 'alert' cannot be resolved without a contextual type
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
    |                                                      `- error: reference to member 'alert' cannot be resolved without a contextual type
 52 |     }
 53 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:51:62: error: reference to member 'sound' cannot be resolved without a contextual type
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
    |                                                              `- error: reference to member 'sound' cannot be resolved without a contextual type
 52 |     }
 53 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:51:70: error: reference to member 'badge' cannot be resolved without a contextual type
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
    |                                                                      `- error: reference to member 'badge' cannot be resolved without a contextual type
 52 |     }
 53 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:284:84: error: cannot find 'eventType' in scope
282 |         #endif
283 |
284 |         let serverSyncProcessHandler = ServerSyncProcessHandler.obtain(instanceId: eventType.getInstanceId())
    |                                                                                    `- error: cannot find 'eventType' in scope
285 |         serverSyncProcessHandler?.sendMessage(serverSyncJob: .reportEventJob(eventType: eventType))
286 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:285:89: error: cannot find 'eventType' in scope
283 |
284 |         let serverSyncProcessHandler = ServerSyncProcessHandler.obtain(instanceId: eventType.getInstanceId())
285 |         serverSyncProcessHandler?.sendMessage(serverSyncJob: .reportEventJob(eventType: eventType))
    |                                                                                         `- error: cannot find 'eventType' in scope
286 |
287 |         return EventTypeHandler.getRemoteNotificationType(userInfo)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:285:63: error: cannot infer contextual base in reference to member 'reportEventJob'
283 |
284 |         let serverSyncProcessHandler = ServerSyncProcessHandler.obtain(instanceId: eventType.getInstanceId())
285 |         serverSyncProcessHandler?.sendMessage(serverSyncJob: .reportEventJob(eventType: eventType))
    |                                                               `- error: cannot infer contextual base in reference to member 'reportEventJob'
286 |
287 |         return EventTypeHandler.getRemoteNotificationType(userInfo)
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:4:2: error: Objective-C interoperability is disabled
 2 |
 3 | /// Used to generate tokens for users to authenticate against.
 4 | @objc public final class BeamsTokenProvider: NSObject, TokenProvider {
   |  `- error: Objective-C interoperability is disabled
 5 |
 6 |     /// The authentication endpoint URL `String`.
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:16:6: error: Objective-C interoperability is disabled
14 |     ///   - authURL: The authentication endpoint URL `String`.
15 |     ///   - getAuthData: A closure that returns an `AuthData` object.
16 |     @objc public init(authURL: String, getAuthData: @escaping () -> (AuthData)) {
   |      `- error: Objective-C interoperability is disabled
17 |         self.authURL = authURL
18 |         self.getAuthData = getAuthData
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:30:26: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
28 |         let queryParams = authData.queryParams
29 |
30 |         let urlSession = URLSession(configuration: .ephemeral)
   |                          `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
31 |
32 |         guard var components = URLComponents(string: authURL) else {
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:30:53: error: cannot infer contextual base in reference to member 'ephemeral'
28 |         let queryParams = authData.queryParams
29 |
30 |         let urlSession = URLSession(configuration: .ephemeral)
   |                                                     `- error: cannot infer contextual base in reference to member 'ephemeral'
31 |
32 |         guard var components = URLComponents(string: authURL) else {
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:43:26: error: cannot find 'URLRequest' in scope
41 |         }
42 |
43 |         var urlRequest = URLRequest(url: url)
   |                          `- error: cannot find 'URLRequest' in scope
44 |         urlRequest.httpMethod = "GET"
45 |         for header in headers {
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:56:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
54 |                 return completion("", TokenProviderError.error("[PushNotifications] - BeamsTokenProvider: Error while casting response object to `HTTPURLResponse`"))
55 |             }
56 |             let statusCode = httpURLResponse.statusCode
   |                                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
57 |             guard statusCode >= 200 && statusCode < 300 else {
58 |                 return completion("", TokenProviderError.error("[PushNotifications] - BeamsTokenProvider: Received HTTP Status Code: \(statusCode)"))
/host/spi-builder-workspace/Sources/Services/DeviceStateStore.swift:206:24: error: value of type 'UserDefaults' has no member 'value'
204 |
205 |     func getServerConfirmedInterestsHash() -> String {
206 |         return service.value(forKey: PersistenceConstants.PersistenceService.hashKey) as? String ?? ""
    |                        `- error: value of type 'UserDefaults' has no member 'value'
207 |     }
208 |
[8/46] Compiling PushNotifications DeviceStateStore.swift
/host/spi-builder-workspace/Sources/Protocols/TokenProvider.swift:24:2: error: Objective-C interoperability is disabled
22 |  Conform to the TokenProvider protocol in order to generate the token for the user that you want to authenticate.
23 |  */
24 | @objc public protocol TokenProvider {
   |  `- error: Objective-C interoperability is disabled
25 |     /**
26 |      Method `fetchToken` will return the token on success or error on failure.
/host/spi-builder-workspace/Sources/PushNotifications.swift:11:2: error: Objective-C interoperability is disabled
  9 |
 10 | /// The top-level entrypoint to the Beams Swift SDK.
 11 | @objc public final class PushNotifications: NSObject {
    |  `- error: Objective-C interoperability is disabled
 12 |
 13 |     internal let instanceId: String
/host/spi-builder-workspace/Sources/PushNotifications.swift:22:6: error: Objective-C interoperability is disabled
 20 |     /// Creates a `PushNotifications` object with a given `instanceId`.
 21 |     /// - Parameter instanceId: The instance identifier (from your app dashboard).
 22 |     @objc public init(instanceId: String) {
    |      `- error: Objective-C interoperability is disabled
 23 |         self.instanceId = instanceId
 24 |         self.deviceStateStore = InstanceDeviceStateStore(instanceId)
/host/spi-builder-workspace/Sources/PushNotifications.swift:35:6: error: Objective-C interoperability is disabled
 33 |     /// Returns a shared singleton PushNotifications object
 34 |     /// that can be accessed from anywhere in your project.
 35 |     @objc public static let shared = PushNotificationsStatic.self
    |      `- error: Objective-C interoperability is disabled
 36 |
 37 |     private lazy var serverSyncHandler = ServerSyncProcessHandler.obtain(
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:18:25: warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 16 |
 17 |     private static var instance: PushNotifications?
 18 |     internal static var tokenProvider = [String: TokenProvider]()
    |                         |- warning: static property 'tokenProvider' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                         |- note: convert 'tokenProvider' to a 'let' constant to make 'Sendable' shared state immutable
    |                         |- note: annotate 'tokenProvider' with '@MainActor' if property should only be accessed from the main actor
    |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 19 |
 20 |     /**
/host/spi-builder-workspace/Sources/PushNotifications.swift:51:6: error: Objective-C interoperability is disabled
 49 |      */
 50 |     /// - Tag: start
 51 |     @objc public func start() {
    |      `- error: Objective-C interoperability is disabled
 52 |         if UUID(uuidString: instanceId) == nil {
 53 |             print("[PushNotifications]: '\(instanceId)' is not a valid instance id.")
/host/spi-builder-workspace/Sources/PushNotifications.swift:78:6: error: Objective-C interoperability is disabled
 76 |      */
 77 |     /// - Tag: register
 78 |     @objc public func registerForRemoteNotifications() {
    |      `- error: Objective-C interoperability is disabled
 79 |         PushNotificationsStatic.registerForRemoteNotifications()
 80 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:110:6: error: Objective-C interoperability is disabled
108 |     */
109 |     /// - Tag: setUserId
110 |     @objc public func setUserId(_ userId: String, tokenProvider: TokenProvider, completion: @escaping (Error?) -> Void) {
    |      `- error: Objective-C interoperability is disabled
111 |         if startHasBeenCalledThisSession == false {
112 |             completion(PushNotificationsError.error("[PushNotifications] - `start` method must be called before setting `userId`"))
/host/spi-builder-workspace/Sources/PushNotifications.swift:156:6: error: Objective-C interoperability is disabled
154 |     }
155 |
156 |     @objc private func printHelpfulMessage() {
    |      `- error: Objective-C interoperability is disabled
157 |         print("[PushNotifications] - It looks like setUserId hasn't completed yet -- have you called `registerDeviceToken`?")
158 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:167:6: error: Objective-C interoperability is disabled
165 |      */
166 |     /// - Tag: stop
167 |     @objc public func stop(completion: @escaping () -> Void) {
    |      `- error: Objective-C interoperability is disabled
168 |         let hadAnyInterests: Bool = InstanceDeviceStateStore.synchronize {
169 |             let hadAnyInterests = self.deviceStateStore.getInterests()?.isEmpty ?? false
/host/spi-builder-workspace/Sources/PushNotifications.swift:196:6: error: Objective-C interoperability is disabled
194 |      */
195 |     /// - Tag: clearAllState
196 |     @objc public func clearAllState(completion: @escaping () -> Void) {
    |      `- error: Objective-C interoperability is disabled
197 |         let storedAPNsToken = self.deviceStateStore.getAPNsToken()
198 |         let hasStartAlreadyBeenCalled = self.deviceStateStore.getStartJobHasBeenEnqueued()
/host/spi-builder-workspace/Sources/PushNotifications.swift:218:6: error: Objective-C interoperability is disabled
216 |      */
217 |     /// - Tag: registerDeviceToken
218 |     @objc public func registerDeviceToken(_ deviceToken: Data) {
    |      `- error: Objective-C interoperability is disabled
219 |         PushNotificationsStatic.registerDeviceToken(deviceToken)
220 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:232:6: error: Objective-C interoperability is disabled
230 |      */
231 |     /// - Tag: addDeviceInterest
232 |     @objc public func addDeviceInterest(interest: String) throws {
    |      `- error: Objective-C interoperability is disabled
233 |         guard self.validateInterestName(interest) else {
234 |             throw InvalidInterestError.invalidName(interest)
/host/spi-builder-workspace/Sources/PushNotifications.swift:258:6: error: Objective-C interoperability is disabled
256 |      */
257 |     /// - Tag: setDeviceInterests
258 |     @objc public func setDeviceInterests(interests: [String]) throws {
    |      `- error: Objective-C interoperability is disabled
259 |         if let invalidInterests = self.validateInterestNames(interests), invalidInterests.count > 0 {
260 |             throw MultipleInvalidInterestsError.invalidNames(invalidInterests)
/host/spi-builder-workspace/Sources/PushNotifications.swift:283:7: error: Objective-C interoperability is disabled
281 |      */
282 |     /// - Tag: removeDeviceInterest
283 |      @objc public func removeDeviceInterest(interest: String) throws {
    |       `- error: Objective-C interoperability is disabled
284 |         guard self.validateInterestName(interest) else {
285 |             throw InvalidInterestError.invalidName(interest)
/host/spi-builder-workspace/Sources/PushNotifications.swift:300:6: error: Objective-C interoperability is disabled
298 |     /// Unsubscribes the device from all the interests.
299 |     /// - Tag: clearDeviceInterests
300 |     @objc public func clearDeviceInterests() throws {
    |      `- error: Objective-C interoperability is disabled
301 |         try self.setDeviceInterests(interests: [])
302 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:310:6: error: Objective-C interoperability is disabled
308 |      */
309 |     /// - Tag: getDeviceInterests
310 |     @objc public func getDeviceInterests() -> [String]? {
    |      `- error: Objective-C interoperability is disabled
311 |         return InstanceDeviceStateStore.synchronize {
312 |             return self.deviceStateStore.getInterests()
/host/spi-builder-workspace/Sources/PushNotifications.swift:333:6: error: Objective-C interoperability is disabled
331 |     /// - Tag: handleNotification
332 |     @discardableResult
333 |     @objc public func handleNotification(userInfo: [AnyHashable: Any]) -> RemoteNotificationType {
    |      `- error: Objective-C interoperability is disabled
334 |         return PushNotificationsStatic.handleNotification(userInfo: userInfo)
335 |     }
/host/spi-builder-workspace/Sources/PushNotifications.swift:352:2: error: Objective-C interoperability is disabled
350 |  Method `interestsSetOnDeviceDidChange(interests:)` will be called when interests set changes.
351 |  */
352 | @objc public protocol InterestsChangedDelegate: AnyObject {
    |  `- error: Objective-C interoperability is disabled
353 |     /**
354 |      Tells the delegate that the device's interests subscriptions list has changed.
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
/host/spi-builder-workspace/Sources/PushNotifications.swift:141:91: error: '#selector' can only be used with the Objective-C runtime
139 |         }
140 |
141 |         let helpfulTimer = Timer.scheduledTimer(timeInterval: 15, target: self, selector: #selector(printHelpfulMessage), userInfo: nil, repeats: false)
    |                                                                                           `- error: '#selector' can only be used with the Objective-C runtime
142 |
143 |         let wrapperCompletion: (Error?) -> Void = { error in
/host/spi-builder-workspace/Sources/PushNotifications.swift:339:37: error: 'init(format:_:)' has been renamed to 'init(block:)': Predicate strings and key-value coding are not supported in swift-corelibs-foundation. Use a closure instead if possible.
337 |     private func validateInterestName(_ interest: String) -> Bool {
338 |         let interestNameRegex = "^[a-zA-Z0-9_\\-=@,.;]{1,164}$"
339 |         let interestNamePredicate = NSPredicate(format: "SELF MATCHES %@", interestNameRegex)
    |                                     `- error: 'init(format:_:)' has been renamed to 'init(block:)': Predicate strings and key-value coding are not supported in swift-corelibs-foundation. Use a closure instead if possible.
340 |         return interestNamePredicate.evaluate(with: interest)
341 |     }
Foundation.NSPredicate:3:24: note: 'init(format:_:)' has been explicitly marked unavailable here
1 | extension NSPredicate {
2 |     @available(*, unavailable, renamed: "init(block:)", message: "Predicate strings and key-value coding are not supported in swift-corelibs-foundation. Use a closure instead if possible.")
3 |     public convenience init(format predicateFormat: String, _ args: any CVarArg...)
  |                        `- note: 'init(format:_:)' has been explicitly marked unavailable here
4 | }
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:11:2: error: Objective-C interoperability is disabled
  9 |
 10 | /// A static equivalent of the `PushNotifications` type.
 11 | @objc public final class PushNotificationsStatic: NSObject {
    |  `- error: Objective-C interoperability is disabled
 12 |
 13 |     override private init() {
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:17:24: warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 15 |     }
 16 |
 17 |     private static var instance: PushNotifications?
    |                        |- warning: static property 'instance' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'instance' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'instance' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 18 |     internal static var tokenProvider = [String: TokenProvider]()
 19 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:28:6: error: Objective-C interoperability is disabled
 26 |      */
 27 |     /// - Tag: start
 28 |     @objc public static func start(instanceId: String) {
    |      `- error: Objective-C interoperability is disabled
 29 |         if instance == nil {
 30 |             instance = PushNotifications(instanceId: instanceId)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:50:6: error: Objective-C interoperability is disabled
 48 |      */
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
    |      `- error: Objective-C interoperability is disabled
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
 52 |     }
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:102:6: error: Objective-C interoperability is disabled
100 |      */
101 |     /// - Tag: setUserId
102 |     @objc public static func setUserId(_ userId: String, tokenProvider: TokenProvider, completion: @escaping (Error?) -> Void) {
    |      `- error: Objective-C interoperability is disabled
103 |         if let staticInstance = instance {
104 |             staticInstance.setUserId(userId, tokenProvider: tokenProvider, completion: completion)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:117:6: error: Objective-C interoperability is disabled
115 |      */
116 |     /// - Tag: stop
117 |     @objc public static func stop(completion: @escaping () -> Void) {
    |      `- error: Objective-C interoperability is disabled
118 |         let instances = DeviceStateStore().getInstanceIds()
119 |         let dispatchGroup = DispatchGroup()
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:139:6: error: Objective-C interoperability is disabled
137 |      */
138 |     /// - Tag: clearAllState
139 |     @objc public static func clearAllState(completion: @escaping () -> Void) {
    |      `- error: Objective-C interoperability is disabled
140 |         let instances = DeviceStateStore().getInstanceIds()
141 |         let dispatchGroup = DispatchGroup()
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:161:6: error: Objective-C interoperability is disabled
159 |      */
160 |     /// - Tag: registerDeviceToken
161 |     @objc public static func registerDeviceToken(_ deviceToken: Data) {
    |      `- error: Objective-C interoperability is disabled
162 |         let instances = DeviceStateStore().getInstanceIds()
163 |         var hasAnInstanceBeenStarted = false
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:192:6: error: Objective-C interoperability is disabled
190 |      */
191 |     /// - Tag: addDeviceInterest
192 |     @objc public static func addDeviceInterest(interest: String) throws {
    |      `- error: Objective-C interoperability is disabled
193 |         if let staticInstance = instance {
194 |             try staticInstance.addDeviceInterest(interest: interest)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:211:6: error: Objective-C interoperability is disabled
209 |      */
210 |     /// - Tag: setDeviceInterests
211 |     @objc public static func setDeviceInterests(interests: [String]) throws {
    |      `- error: Objective-C interoperability is disabled
212 |         if let staticInstance = instance {
213 |             try staticInstance.setDeviceInterests(interests: interests)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:229:6: error: Objective-C interoperability is disabled
227 |      */
228 |     /// - Tag: removeDeviceInterest
229 |     @objc public static func removeDeviceInterest(interest: String) throws {
    |      `- error: Objective-C interoperability is disabled
230 |         if let staticInstance = instance {
231 |             try staticInstance.removeDeviceInterest(interest: interest)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:239:6: error: Objective-C interoperability is disabled
237 |     /// Unsubscribes the device from all the interests.
238 |     /// - Tag: clearDeviceInterests
239 |     @objc public static func clearDeviceInterests() throws {
    |      `- error: Objective-C interoperability is disabled
240 |         if let staticInstance = instance {
241 |             try staticInstance.clearDeviceInterests()
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:253:6: error: Objective-C interoperability is disabled
251 |      */
252 |     /// - Tag: getDeviceInterests
253 |     @objc public static func getDeviceInterests() -> [String]? {
    |      `- error: Objective-C interoperability is disabled
254 |         if let staticInstance = instance {
255 |             return staticInstance.getDeviceInterests()
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:268:6: error: Objective-C interoperability is disabled
266 |     /// - Tag: handleNotification
267 |     @discardableResult
268 |     @objc public static func handleNotification(userInfo: [AnyHashable: Any]) -> RemoteNotificationType {
    |      `- error: Objective-C interoperability is disabled
269 |         guard FeatureFlags.DeliveryTrackingEnabled else {
270 |             return .ShouldProcess
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:51:14: error: type 'PushNotificationsStatic' has no member 'registerForPushNotifications'
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
    |              `- error: type 'PushNotificationsStatic' has no member 'registerForPushNotifications'
 52 |     }
 53 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:51:54: error: reference to member 'alert' cannot be resolved without a contextual type
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
    |                                                      `- error: reference to member 'alert' cannot be resolved without a contextual type
 52 |     }
 53 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:51:62: error: reference to member 'sound' cannot be resolved without a contextual type
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
    |                                                              `- error: reference to member 'sound' cannot be resolved without a contextual type
 52 |     }
 53 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:51:70: error: reference to member 'badge' cannot be resolved without a contextual type
 49 |     /// - Tag: register
 50 |     @objc public static func registerForRemoteNotifications() {
 51 |         self.registerForPushNotifications(options: [.alert, .sound, .badge])
    |                                                                      `- error: reference to member 'badge' cannot be resolved without a contextual type
 52 |     }
 53 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:284:84: error: cannot find 'eventType' in scope
282 |         #endif
283 |
284 |         let serverSyncProcessHandler = ServerSyncProcessHandler.obtain(instanceId: eventType.getInstanceId())
    |                                                                                    `- error: cannot find 'eventType' in scope
285 |         serverSyncProcessHandler?.sendMessage(serverSyncJob: .reportEventJob(eventType: eventType))
286 |
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:285:89: error: cannot find 'eventType' in scope
283 |
284 |         let serverSyncProcessHandler = ServerSyncProcessHandler.obtain(instanceId: eventType.getInstanceId())
285 |         serverSyncProcessHandler?.sendMessage(serverSyncJob: .reportEventJob(eventType: eventType))
    |                                                                                         `- error: cannot find 'eventType' in scope
286 |
287 |         return EventTypeHandler.getRemoteNotificationType(userInfo)
/host/spi-builder-workspace/Sources/PushNotificationsStatic.swift:285:63: error: cannot infer contextual base in reference to member 'reportEventJob'
283 |
284 |         let serverSyncProcessHandler = ServerSyncProcessHandler.obtain(instanceId: eventType.getInstanceId())
285 |         serverSyncProcessHandler?.sendMessage(serverSyncJob: .reportEventJob(eventType: eventType))
    |                                                               `- error: cannot infer contextual base in reference to member 'reportEventJob'
286 |
287 |         return EventTypeHandler.getRemoteNotificationType(userInfo)
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:4:2: error: Objective-C interoperability is disabled
 2 |
 3 | /// Used to generate tokens for users to authenticate against.
 4 | @objc public final class BeamsTokenProvider: NSObject, TokenProvider {
   |  `- error: Objective-C interoperability is disabled
 5 |
 6 |     /// The authentication endpoint URL `String`.
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:16:6: error: Objective-C interoperability is disabled
14 |     ///   - authURL: The authentication endpoint URL `String`.
15 |     ///   - getAuthData: A closure that returns an `AuthData` object.
16 |     @objc public init(authURL: String, getAuthData: @escaping () -> (AuthData)) {
   |      `- error: Objective-C interoperability is disabled
17 |         self.authURL = authURL
18 |         self.getAuthData = getAuthData
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:30:26: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
28 |         let queryParams = authData.queryParams
29 |
30 |         let urlSession = URLSession(configuration: .ephemeral)
   |                          `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
31 |
32 |         guard var components = URLComponents(string: authURL) else {
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:30:53: error: cannot infer contextual base in reference to member 'ephemeral'
28 |         let queryParams = authData.queryParams
29 |
30 |         let urlSession = URLSession(configuration: .ephemeral)
   |                                                     `- error: cannot infer contextual base in reference to member 'ephemeral'
31 |
32 |         guard var components = URLComponents(string: authURL) else {
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:43:26: error: cannot find 'URLRequest' in scope
41 |         }
42 |
43 |         var urlRequest = URLRequest(url: url)
   |                          `- error: cannot find 'URLRequest' in scope
44 |         urlRequest.httpMethod = "GET"
45 |         for header in headers {
/host/spi-builder-workspace/Sources/Services/BeamsTokenProvider.swift:56:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
54 |                 return completion("", TokenProviderError.error("[PushNotifications] - BeamsTokenProvider: Error while casting response object to `HTTPURLResponse`"))
55 |             }
56 |             let statusCode = httpURLResponse.statusCode
   |                                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
57 |             guard statusCode >= 200 && statusCode < 300 else {
58 |                 return completion("", TokenProviderError.error("[PushNotifications] - BeamsTokenProvider: Received HTTP Status Code: \(statusCode)"))
/host/spi-builder-workspace/Sources/Services/DeviceStateStore.swift:206:24: error: value of type 'UserDefaults' has no member 'value'
204 |
205 |     func getServerConfirmedInterestsHash() -> String {
206 |         return service.value(forKey: PersistenceConstants.PersistenceService.hashKey) as? String ?? ""
    |                        `- error: value of type 'UserDefaults' has no member 'value'
207 |     }
208 |
[9/46] Compiling PushNotifications Array+CalculateMD5Hash.swift
[10/46] Compiling PushNotifications Encodable+Encode.swift
[11/46] Compiling PushNotifications String+HexStringToData.swift
[12/46] Compiling PushNotifications URL+NetworkService.swift
[13/46] Compiling PushNotifications DeviceTokenHelper.swift
[14/46] Compiling PushNotifications MD5.swift
[15/46] Compiling PushNotifications EventTypeHandler.swift
/host/spi-builder-workspace/Sources/Services/EventTypeHandler.swift:147:31: error: cannot find 'isForeground' in scope
145 |         let hasCustomerData = data.count > 1 // checks if there's anything other than the `pusher` key
146 |
147 |         if hasCustomerData && isForeground {
    |                               `- error: cannot find 'isForeground' in scope
148 |             return .ShouldProcess
149 |         }
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:4:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  2 |
  3 | class NetworkService: PushNotificationsNetworkable {
  4 |     let session: URLSession
    |                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  5 |
  6 |     init(session: URLSession) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:6:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  4 |     let session: URLSession
  5 |
  6 |     init(session: URLSession) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  7 |         self.session = session
  8 |     }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:225:44: error: cannot find type 'URLRequest' in scope
223 |
224 |     // MARK: Networking Layer
225 |     private func networkRequest(_ request: URLRequest,
    |                                            `- error: cannot find type 'URLRequest' in scope
226 |                                 session: URLSession,
227 |                                 retryStrategy: RetryStrategy) -> Result<Data, PushNotificationsAPIError> {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:226:42: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
224 |     // MARK: Networking Layer
225 |     private func networkRequest(_ request: URLRequest,
226 |                                 session: URLSession,
    |                                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
227 |                                 retryStrategy: RetryStrategy) -> Result<Data, PushNotificationsAPIError> {
228 |         let semaphore = DispatchSemaphore(value: 0)
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:283:85: error: cannot find type 'URLRequest' in scope
281 |     }
282 |
283 |     private func setRequest(url: URL, httpMethod: HTTPMethod, body: Data? = nil) -> URLRequest {
    |                                                                                     `- error: cannot find type 'URLRequest' in scope
284 |         var request = URLRequest(url: url)
285 |         request.addValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:28:66: error: cannot infer contextual base in reference to member 'POST'
 26 |             }
 27 |
 28 |             let request = self.setRequest(url: url, httpMethod: .POST, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
 29 |
 30 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:54:66: error: cannot infer contextual base in reference to member 'POST'
 52 |             }
 53 |
 54 |             let request = self.setRequest(url: url, httpMethod: .POST)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
 55 |
 56 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:79:66: error: cannot infer contextual base in reference to member 'PUT'
 77 |                 return .failure(.genericError(reason: "Error while encoding the interests payload."))
 78 |             }
 79 |             let request = self.setRequest(url: url, httpMethod: .PUT, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
 80 |
 81 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:102:66: error: cannot infer contextual base in reference to member 'DELETE'
100 |             }
101 |
102 |             let request = self.setRequest(url: url, httpMethod: .DELETE)
    |                                                                  `- error: cannot infer contextual base in reference to member 'DELETE'
103 |
104 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:127:66: error: cannot infer contextual base in reference to member 'POST'
125 |             }
126 |
127 |             let request = self.setRequest(url: url, httpMethod: .POST, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
128 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
129 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:151:66: error: cannot infer contextual base in reference to member 'PUT'
149 |                 return .failure(.genericError(reason: "Error while encoding the metadata payload."))
150 |             }
151 |             let request = self.setRequest(url: url, httpMethod: .PUT, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
152 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
153 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:172:66: error: cannot infer contextual base in reference to member 'PUT'
170 |             }
171 |
172 |             var request = self.setRequest(url: url, httpMethod: .PUT)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
173 |             request.addValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
174 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:193:66: error: cannot infer contextual base in reference to member 'DELETE'
191 |             }
192 |
193 |             let request = self.setRequest(url: url, httpMethod: .DELETE)
    |                                                                  `- error: cannot infer contextual base in reference to member 'DELETE'
194 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
195 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:213:66: error: cannot infer contextual base in reference to member 'GET'
211 |             }
212 |
213 |             let request = self.setRequest(url: url, httpMethod: .GET)
    |                                                                  `- error: cannot infer contextual base in reference to member 'GET'
214 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
215 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:231:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
229 |         var result: Result<Data, PushNotificationsAPIError>?
230 |
231 |         session.dataTask(with: request, completionHandler: { data, response, error in
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
232 |             guard
233 |                 let data = data,
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:247:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
245 |             }
246 |
247 |             let statusCode = httpURLResponse.statusCode
    |                                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
248 |             switch statusCode {
249 |             case 200..<300:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:284:23: error: cannot find 'URLRequest' in scope
282 |
283 |     private func setRequest(url: URL, httpMethod: HTTPMethod, body: Data? = nil) -> URLRequest {
284 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
285 |         request.addValue("application/json", forHTTPHeaderField: "Content-Type")
286 |         request.addValue("push-notifications-swift \(SDK.version)", forHTTPHeaderField: "X-Pusher-Library")
/host/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:6:16: warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 4 |
 5 |     static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
 6 |     static var serverSyncEventHandlers = [String: ServerSyncEventHandler]()
   |                |- warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: convert 'serverSyncEventHandlers' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'serverSyncEventHandlers' with '@MainActor' if property should only be accessed from the main actor
   |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 7 |
 8 |     static func obtain(instanceId: String) -> ServerSyncEventHandler {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:5:24: warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  3 | class ServerSyncProcessHandler {
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    |                        |- warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'serverSyncHandlers' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'serverSyncHandlers' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  6 |     static func obtain(instanceId: String, getTokenProvider: @escaping () -> TokenProvider?, handleServerSyncEvent: @escaping (ServerSyncEvent) -> Void) -> ServerSyncProcessHandler {
  7 |         return serverSyncHandlersQueue.sync {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:47:23: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 45 |         self.sendMessageQueue = DispatchQueue(label: "com.pusher.beams.sendMessageQueue")
 46 |         self.handleMessageQueue = DispatchQueue(label: "com.pusher.beams.handleMessageQueue")
 47 |         let session = URLSession(configuration: .ephemeral)
    |                       `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 48 |         self.networkService = NetworkService(session: session)
 49 |         self.jobQueue = ServerSyncJobStore(instanceId: self.instanceId)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:47:50: error: cannot infer contextual base in reference to member 'ephemeral'
 45 |         self.sendMessageQueue = DispatchQueue(label: "com.pusher.beams.sendMessageQueue")
 46 |         self.handleMessageQueue = DispatchQueue(label: "com.pusher.beams.handleMessageQueue")
 47 |         let session = URLSession(configuration: .ephemeral)
    |                                                  `- error: cannot infer contextual base in reference to member 'ephemeral'
 48 |         self.networkService = NetworkService(session: session)
 49 |         self.jobQueue = ServerSyncJobStore(instanceId: self.instanceId)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:21: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 58 |             default:
 59 |                 self.handleMessageQueue.async {
 60 |                     self.handleMessage(serverSyncJob: job)
    |                     `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |                 }
 62 |             }
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:55: warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             default:
 59 |                 self.handleMessageQueue.async {
 60 |                     self.handleMessage(serverSyncJob: job)
    |                                                       `- warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |                 }
 62 |             }
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:13: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 66 |     func sendMessage(serverSyncJob: ServerSyncJob) {
 67 |         self.sendMessageQueue.async {
 68 |             self.jobQueue.append(serverSyncJob)
    |             `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:34: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 66 |     func sendMessage(serverSyncJob: ServerSyncJob) {
 67 |         self.sendMessageQueue.async {
 68 |             self.jobQueue.append(serverSyncJob)
    |                                  `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:17: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 69 |
 70 |             self.handleMessageQueue.async {
 71 |                 self.handleMessage(serverSyncJob: serverSyncJob)
    |                 `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 72 |             }
 73 |         }
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:51: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
 71 |                 self.handleMessage(serverSyncJob: serverSyncJob)
    |                                                   `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 72 |             }
 73 |         }
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
[16/46] Compiling PushNotifications NetworkService.swift
/host/spi-builder-workspace/Sources/Services/EventTypeHandler.swift:147:31: error: cannot find 'isForeground' in scope
145 |         let hasCustomerData = data.count > 1 // checks if there's anything other than the `pusher` key
146 |
147 |         if hasCustomerData && isForeground {
    |                               `- error: cannot find 'isForeground' in scope
148 |             return .ShouldProcess
149 |         }
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:4:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  2 |
  3 | class NetworkService: PushNotificationsNetworkable {
  4 |     let session: URLSession
    |                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  5 |
  6 |     init(session: URLSession) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:6:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  4 |     let session: URLSession
  5 |
  6 |     init(session: URLSession) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  7 |         self.session = session
  8 |     }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:225:44: error: cannot find type 'URLRequest' in scope
223 |
224 |     // MARK: Networking Layer
225 |     private func networkRequest(_ request: URLRequest,
    |                                            `- error: cannot find type 'URLRequest' in scope
226 |                                 session: URLSession,
227 |                                 retryStrategy: RetryStrategy) -> Result<Data, PushNotificationsAPIError> {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:226:42: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
224 |     // MARK: Networking Layer
225 |     private func networkRequest(_ request: URLRequest,
226 |                                 session: URLSession,
    |                                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
227 |                                 retryStrategy: RetryStrategy) -> Result<Data, PushNotificationsAPIError> {
228 |         let semaphore = DispatchSemaphore(value: 0)
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:283:85: error: cannot find type 'URLRequest' in scope
281 |     }
282 |
283 |     private func setRequest(url: URL, httpMethod: HTTPMethod, body: Data? = nil) -> URLRequest {
    |                                                                                     `- error: cannot find type 'URLRequest' in scope
284 |         var request = URLRequest(url: url)
285 |         request.addValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:28:66: error: cannot infer contextual base in reference to member 'POST'
 26 |             }
 27 |
 28 |             let request = self.setRequest(url: url, httpMethod: .POST, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
 29 |
 30 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:54:66: error: cannot infer contextual base in reference to member 'POST'
 52 |             }
 53 |
 54 |             let request = self.setRequest(url: url, httpMethod: .POST)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
 55 |
 56 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:79:66: error: cannot infer contextual base in reference to member 'PUT'
 77 |                 return .failure(.genericError(reason: "Error while encoding the interests payload."))
 78 |             }
 79 |             let request = self.setRequest(url: url, httpMethod: .PUT, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
 80 |
 81 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:102:66: error: cannot infer contextual base in reference to member 'DELETE'
100 |             }
101 |
102 |             let request = self.setRequest(url: url, httpMethod: .DELETE)
    |                                                                  `- error: cannot infer contextual base in reference to member 'DELETE'
103 |
104 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:127:66: error: cannot infer contextual base in reference to member 'POST'
125 |             }
126 |
127 |             let request = self.setRequest(url: url, httpMethod: .POST, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
128 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
129 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:151:66: error: cannot infer contextual base in reference to member 'PUT'
149 |                 return .failure(.genericError(reason: "Error while encoding the metadata payload."))
150 |             }
151 |             let request = self.setRequest(url: url, httpMethod: .PUT, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
152 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
153 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:172:66: error: cannot infer contextual base in reference to member 'PUT'
170 |             }
171 |
172 |             var request = self.setRequest(url: url, httpMethod: .PUT)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
173 |             request.addValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
174 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:193:66: error: cannot infer contextual base in reference to member 'DELETE'
191 |             }
192 |
193 |             let request = self.setRequest(url: url, httpMethod: .DELETE)
    |                                                                  `- error: cannot infer contextual base in reference to member 'DELETE'
194 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
195 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:213:66: error: cannot infer contextual base in reference to member 'GET'
211 |             }
212 |
213 |             let request = self.setRequest(url: url, httpMethod: .GET)
    |                                                                  `- error: cannot infer contextual base in reference to member 'GET'
214 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
215 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:231:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
229 |         var result: Result<Data, PushNotificationsAPIError>?
230 |
231 |         session.dataTask(with: request, completionHandler: { data, response, error in
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
232 |             guard
233 |                 let data = data,
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:247:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
245 |             }
246 |
247 |             let statusCode = httpURLResponse.statusCode
    |                                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
248 |             switch statusCode {
249 |             case 200..<300:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:284:23: error: cannot find 'URLRequest' in scope
282 |
283 |     private func setRequest(url: URL, httpMethod: HTTPMethod, body: Data? = nil) -> URLRequest {
284 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
285 |         request.addValue("application/json", forHTTPHeaderField: "Content-Type")
286 |         request.addValue("push-notifications-swift \(SDK.version)", forHTTPHeaderField: "X-Pusher-Library")
/host/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:6:16: warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 4 |
 5 |     static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
 6 |     static var serverSyncEventHandlers = [String: ServerSyncEventHandler]()
   |                |- warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: convert 'serverSyncEventHandlers' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'serverSyncEventHandlers' with '@MainActor' if property should only be accessed from the main actor
   |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 7 |
 8 |     static func obtain(instanceId: String) -> ServerSyncEventHandler {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:5:24: warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  3 | class ServerSyncProcessHandler {
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    |                        |- warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'serverSyncHandlers' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'serverSyncHandlers' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  6 |     static func obtain(instanceId: String, getTokenProvider: @escaping () -> TokenProvider?, handleServerSyncEvent: @escaping (ServerSyncEvent) -> Void) -> ServerSyncProcessHandler {
  7 |         return serverSyncHandlersQueue.sync {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:47:23: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 45 |         self.sendMessageQueue = DispatchQueue(label: "com.pusher.beams.sendMessageQueue")
 46 |         self.handleMessageQueue = DispatchQueue(label: "com.pusher.beams.handleMessageQueue")
 47 |         let session = URLSession(configuration: .ephemeral)
    |                       `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 48 |         self.networkService = NetworkService(session: session)
 49 |         self.jobQueue = ServerSyncJobStore(instanceId: self.instanceId)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:47:50: error: cannot infer contextual base in reference to member 'ephemeral'
 45 |         self.sendMessageQueue = DispatchQueue(label: "com.pusher.beams.sendMessageQueue")
 46 |         self.handleMessageQueue = DispatchQueue(label: "com.pusher.beams.handleMessageQueue")
 47 |         let session = URLSession(configuration: .ephemeral)
    |                                                  `- error: cannot infer contextual base in reference to member 'ephemeral'
 48 |         self.networkService = NetworkService(session: session)
 49 |         self.jobQueue = ServerSyncJobStore(instanceId: self.instanceId)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:21: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 58 |             default:
 59 |                 self.handleMessageQueue.async {
 60 |                     self.handleMessage(serverSyncJob: job)
    |                     `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |                 }
 62 |             }
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:55: warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             default:
 59 |                 self.handleMessageQueue.async {
 60 |                     self.handleMessage(serverSyncJob: job)
    |                                                       `- warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |                 }
 62 |             }
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:13: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 66 |     func sendMessage(serverSyncJob: ServerSyncJob) {
 67 |         self.sendMessageQueue.async {
 68 |             self.jobQueue.append(serverSyncJob)
    |             `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:34: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 66 |     func sendMessage(serverSyncJob: ServerSyncJob) {
 67 |         self.sendMessageQueue.async {
 68 |             self.jobQueue.append(serverSyncJob)
    |                                  `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:17: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 69 |
 70 |             self.handleMessageQueue.async {
 71 |                 self.handleMessage(serverSyncJob: serverSyncJob)
    |                 `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 72 |             }
 73 |         }
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:51: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
 71 |                 self.handleMessage(serverSyncJob: serverSyncJob)
    |                                                   `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 72 |             }
 73 |         }
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
[17/46] Compiling PushNotifications ServerSyncEventHandler.swift
/host/spi-builder-workspace/Sources/Services/EventTypeHandler.swift:147:31: error: cannot find 'isForeground' in scope
145 |         let hasCustomerData = data.count > 1 // checks if there's anything other than the `pusher` key
146 |
147 |         if hasCustomerData && isForeground {
    |                               `- error: cannot find 'isForeground' in scope
148 |             return .ShouldProcess
149 |         }
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:4:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  2 |
  3 | class NetworkService: PushNotificationsNetworkable {
  4 |     let session: URLSession
    |                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  5 |
  6 |     init(session: URLSession) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:6:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  4 |     let session: URLSession
  5 |
  6 |     init(session: URLSession) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  7 |         self.session = session
  8 |     }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:225:44: error: cannot find type 'URLRequest' in scope
223 |
224 |     // MARK: Networking Layer
225 |     private func networkRequest(_ request: URLRequest,
    |                                            `- error: cannot find type 'URLRequest' in scope
226 |                                 session: URLSession,
227 |                                 retryStrategy: RetryStrategy) -> Result<Data, PushNotificationsAPIError> {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:226:42: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
224 |     // MARK: Networking Layer
225 |     private func networkRequest(_ request: URLRequest,
226 |                                 session: URLSession,
    |                                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
227 |                                 retryStrategy: RetryStrategy) -> Result<Data, PushNotificationsAPIError> {
228 |         let semaphore = DispatchSemaphore(value: 0)
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:283:85: error: cannot find type 'URLRequest' in scope
281 |     }
282 |
283 |     private func setRequest(url: URL, httpMethod: HTTPMethod, body: Data? = nil) -> URLRequest {
    |                                                                                     `- error: cannot find type 'URLRequest' in scope
284 |         var request = URLRequest(url: url)
285 |         request.addValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:28:66: error: cannot infer contextual base in reference to member 'POST'
 26 |             }
 27 |
 28 |             let request = self.setRequest(url: url, httpMethod: .POST, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
 29 |
 30 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:54:66: error: cannot infer contextual base in reference to member 'POST'
 52 |             }
 53 |
 54 |             let request = self.setRequest(url: url, httpMethod: .POST)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
 55 |
 56 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:79:66: error: cannot infer contextual base in reference to member 'PUT'
 77 |                 return .failure(.genericError(reason: "Error while encoding the interests payload."))
 78 |             }
 79 |             let request = self.setRequest(url: url, httpMethod: .PUT, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
 80 |
 81 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:102:66: error: cannot infer contextual base in reference to member 'DELETE'
100 |             }
101 |
102 |             let request = self.setRequest(url: url, httpMethod: .DELETE)
    |                                                                  `- error: cannot infer contextual base in reference to member 'DELETE'
103 |
104 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:127:66: error: cannot infer contextual base in reference to member 'POST'
125 |             }
126 |
127 |             let request = self.setRequest(url: url, httpMethod: .POST, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
128 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
129 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:151:66: error: cannot infer contextual base in reference to member 'PUT'
149 |                 return .failure(.genericError(reason: "Error while encoding the metadata payload."))
150 |             }
151 |             let request = self.setRequest(url: url, httpMethod: .PUT, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
152 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
153 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:172:66: error: cannot infer contextual base in reference to member 'PUT'
170 |             }
171 |
172 |             var request = self.setRequest(url: url, httpMethod: .PUT)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
173 |             request.addValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
174 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:193:66: error: cannot infer contextual base in reference to member 'DELETE'
191 |             }
192 |
193 |             let request = self.setRequest(url: url, httpMethod: .DELETE)
    |                                                                  `- error: cannot infer contextual base in reference to member 'DELETE'
194 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
195 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:213:66: error: cannot infer contextual base in reference to member 'GET'
211 |             }
212 |
213 |             let request = self.setRequest(url: url, httpMethod: .GET)
    |                                                                  `- error: cannot infer contextual base in reference to member 'GET'
214 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
215 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:231:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
229 |         var result: Result<Data, PushNotificationsAPIError>?
230 |
231 |         session.dataTask(with: request, completionHandler: { data, response, error in
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
232 |             guard
233 |                 let data = data,
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:247:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
245 |             }
246 |
247 |             let statusCode = httpURLResponse.statusCode
    |                                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
248 |             switch statusCode {
249 |             case 200..<300:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:284:23: error: cannot find 'URLRequest' in scope
282 |
283 |     private func setRequest(url: URL, httpMethod: HTTPMethod, body: Data? = nil) -> URLRequest {
284 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
285 |         request.addValue("application/json", forHTTPHeaderField: "Content-Type")
286 |         request.addValue("push-notifications-swift \(SDK.version)", forHTTPHeaderField: "X-Pusher-Library")
/host/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:6:16: warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 4 |
 5 |     static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
 6 |     static var serverSyncEventHandlers = [String: ServerSyncEventHandler]()
   |                |- warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: convert 'serverSyncEventHandlers' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'serverSyncEventHandlers' with '@MainActor' if property should only be accessed from the main actor
   |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 7 |
 8 |     static func obtain(instanceId: String) -> ServerSyncEventHandler {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:5:24: warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  3 | class ServerSyncProcessHandler {
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    |                        |- warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'serverSyncHandlers' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'serverSyncHandlers' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  6 |     static func obtain(instanceId: String, getTokenProvider: @escaping () -> TokenProvider?, handleServerSyncEvent: @escaping (ServerSyncEvent) -> Void) -> ServerSyncProcessHandler {
  7 |         return serverSyncHandlersQueue.sync {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:47:23: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 45 |         self.sendMessageQueue = DispatchQueue(label: "com.pusher.beams.sendMessageQueue")
 46 |         self.handleMessageQueue = DispatchQueue(label: "com.pusher.beams.handleMessageQueue")
 47 |         let session = URLSession(configuration: .ephemeral)
    |                       `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 48 |         self.networkService = NetworkService(session: session)
 49 |         self.jobQueue = ServerSyncJobStore(instanceId: self.instanceId)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:47:50: error: cannot infer contextual base in reference to member 'ephemeral'
 45 |         self.sendMessageQueue = DispatchQueue(label: "com.pusher.beams.sendMessageQueue")
 46 |         self.handleMessageQueue = DispatchQueue(label: "com.pusher.beams.handleMessageQueue")
 47 |         let session = URLSession(configuration: .ephemeral)
    |                                                  `- error: cannot infer contextual base in reference to member 'ephemeral'
 48 |         self.networkService = NetworkService(session: session)
 49 |         self.jobQueue = ServerSyncJobStore(instanceId: self.instanceId)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:21: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 58 |             default:
 59 |                 self.handleMessageQueue.async {
 60 |                     self.handleMessage(serverSyncJob: job)
    |                     `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |                 }
 62 |             }
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:55: warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             default:
 59 |                 self.handleMessageQueue.async {
 60 |                     self.handleMessage(serverSyncJob: job)
    |                                                       `- warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |                 }
 62 |             }
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:13: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 66 |     func sendMessage(serverSyncJob: ServerSyncJob) {
 67 |         self.sendMessageQueue.async {
 68 |             self.jobQueue.append(serverSyncJob)
    |             `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:34: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 66 |     func sendMessage(serverSyncJob: ServerSyncJob) {
 67 |         self.sendMessageQueue.async {
 68 |             self.jobQueue.append(serverSyncJob)
    |                                  `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:17: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 69 |
 70 |             self.handleMessageQueue.async {
 71 |                 self.handleMessage(serverSyncJob: serverSyncJob)
    |                 `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 72 |             }
 73 |         }
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:51: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
 71 |                 self.handleMessage(serverSyncJob: serverSyncJob)
    |                                                   `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 72 |             }
 73 |         }
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
[18/46] Compiling PushNotifications ServerSyncJobStore.swift
/host/spi-builder-workspace/Sources/Services/EventTypeHandler.swift:147:31: error: cannot find 'isForeground' in scope
145 |         let hasCustomerData = data.count > 1 // checks if there's anything other than the `pusher` key
146 |
147 |         if hasCustomerData && isForeground {
    |                               `- error: cannot find 'isForeground' in scope
148 |             return .ShouldProcess
149 |         }
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:4:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  2 |
  3 | class NetworkService: PushNotificationsNetworkable {
  4 |     let session: URLSession
    |                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  5 |
  6 |     init(session: URLSession) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:6:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  4 |     let session: URLSession
  5 |
  6 |     init(session: URLSession) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  7 |         self.session = session
  8 |     }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:225:44: error: cannot find type 'URLRequest' in scope
223 |
224 |     // MARK: Networking Layer
225 |     private func networkRequest(_ request: URLRequest,
    |                                            `- error: cannot find type 'URLRequest' in scope
226 |                                 session: URLSession,
227 |                                 retryStrategy: RetryStrategy) -> Result<Data, PushNotificationsAPIError> {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:226:42: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
224 |     // MARK: Networking Layer
225 |     private func networkRequest(_ request: URLRequest,
226 |                                 session: URLSession,
    |                                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
227 |                                 retryStrategy: RetryStrategy) -> Result<Data, PushNotificationsAPIError> {
228 |         let semaphore = DispatchSemaphore(value: 0)
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:283:85: error: cannot find type 'URLRequest' in scope
281 |     }
282 |
283 |     private func setRequest(url: URL, httpMethod: HTTPMethod, body: Data? = nil) -> URLRequest {
    |                                                                                     `- error: cannot find type 'URLRequest' in scope
284 |         var request = URLRequest(url: url)
285 |         request.addValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:28:66: error: cannot infer contextual base in reference to member 'POST'
 26 |             }
 27 |
 28 |             let request = self.setRequest(url: url, httpMethod: .POST, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
 29 |
 30 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:54:66: error: cannot infer contextual base in reference to member 'POST'
 52 |             }
 53 |
 54 |             let request = self.setRequest(url: url, httpMethod: .POST)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
 55 |
 56 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:79:66: error: cannot infer contextual base in reference to member 'PUT'
 77 |                 return .failure(.genericError(reason: "Error while encoding the interests payload."))
 78 |             }
 79 |             let request = self.setRequest(url: url, httpMethod: .PUT, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
 80 |
 81 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:102:66: error: cannot infer contextual base in reference to member 'DELETE'
100 |             }
101 |
102 |             let request = self.setRequest(url: url, httpMethod: .DELETE)
    |                                                                  `- error: cannot infer contextual base in reference to member 'DELETE'
103 |
104 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:127:66: error: cannot infer contextual base in reference to member 'POST'
125 |             }
126 |
127 |             let request = self.setRequest(url: url, httpMethod: .POST, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
128 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
129 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:151:66: error: cannot infer contextual base in reference to member 'PUT'
149 |                 return .failure(.genericError(reason: "Error while encoding the metadata payload."))
150 |             }
151 |             let request = self.setRequest(url: url, httpMethod: .PUT, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
152 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
153 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:172:66: error: cannot infer contextual base in reference to member 'PUT'
170 |             }
171 |
172 |             var request = self.setRequest(url: url, httpMethod: .PUT)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
173 |             request.addValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
174 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:193:66: error: cannot infer contextual base in reference to member 'DELETE'
191 |             }
192 |
193 |             let request = self.setRequest(url: url, httpMethod: .DELETE)
    |                                                                  `- error: cannot infer contextual base in reference to member 'DELETE'
194 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
195 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:213:66: error: cannot infer contextual base in reference to member 'GET'
211 |             }
212 |
213 |             let request = self.setRequest(url: url, httpMethod: .GET)
    |                                                                  `- error: cannot infer contextual base in reference to member 'GET'
214 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
215 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:231:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
229 |         var result: Result<Data, PushNotificationsAPIError>?
230 |
231 |         session.dataTask(with: request, completionHandler: { data, response, error in
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
232 |             guard
233 |                 let data = data,
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:247:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
245 |             }
246 |
247 |             let statusCode = httpURLResponse.statusCode
    |                                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
248 |             switch statusCode {
249 |             case 200..<300:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:284:23: error: cannot find 'URLRequest' in scope
282 |
283 |     private func setRequest(url: URL, httpMethod: HTTPMethod, body: Data? = nil) -> URLRequest {
284 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
285 |         request.addValue("application/json", forHTTPHeaderField: "Content-Type")
286 |         request.addValue("push-notifications-swift \(SDK.version)", forHTTPHeaderField: "X-Pusher-Library")
/host/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:6:16: warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 4 |
 5 |     static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
 6 |     static var serverSyncEventHandlers = [String: ServerSyncEventHandler]()
   |                |- warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: convert 'serverSyncEventHandlers' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'serverSyncEventHandlers' with '@MainActor' if property should only be accessed from the main actor
   |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 7 |
 8 |     static func obtain(instanceId: String) -> ServerSyncEventHandler {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:5:24: warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  3 | class ServerSyncProcessHandler {
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    |                        |- warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'serverSyncHandlers' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'serverSyncHandlers' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  6 |     static func obtain(instanceId: String, getTokenProvider: @escaping () -> TokenProvider?, handleServerSyncEvent: @escaping (ServerSyncEvent) -> Void) -> ServerSyncProcessHandler {
  7 |         return serverSyncHandlersQueue.sync {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:47:23: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 45 |         self.sendMessageQueue = DispatchQueue(label: "com.pusher.beams.sendMessageQueue")
 46 |         self.handleMessageQueue = DispatchQueue(label: "com.pusher.beams.handleMessageQueue")
 47 |         let session = URLSession(configuration: .ephemeral)
    |                       `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 48 |         self.networkService = NetworkService(session: session)
 49 |         self.jobQueue = ServerSyncJobStore(instanceId: self.instanceId)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:47:50: error: cannot infer contextual base in reference to member 'ephemeral'
 45 |         self.sendMessageQueue = DispatchQueue(label: "com.pusher.beams.sendMessageQueue")
 46 |         self.handleMessageQueue = DispatchQueue(label: "com.pusher.beams.handleMessageQueue")
 47 |         let session = URLSession(configuration: .ephemeral)
    |                                                  `- error: cannot infer contextual base in reference to member 'ephemeral'
 48 |         self.networkService = NetworkService(session: session)
 49 |         self.jobQueue = ServerSyncJobStore(instanceId: self.instanceId)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:21: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 58 |             default:
 59 |                 self.handleMessageQueue.async {
 60 |                     self.handleMessage(serverSyncJob: job)
    |                     `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |                 }
 62 |             }
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:55: warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             default:
 59 |                 self.handleMessageQueue.async {
 60 |                     self.handleMessage(serverSyncJob: job)
    |                                                       `- warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |                 }
 62 |             }
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:13: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 66 |     func sendMessage(serverSyncJob: ServerSyncJob) {
 67 |         self.sendMessageQueue.async {
 68 |             self.jobQueue.append(serverSyncJob)
    |             `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:34: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 66 |     func sendMessage(serverSyncJob: ServerSyncJob) {
 67 |         self.sendMessageQueue.async {
 68 |             self.jobQueue.append(serverSyncJob)
    |                                  `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:17: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 69 |
 70 |             self.handleMessageQueue.async {
 71 |                 self.handleMessage(serverSyncJob: serverSyncJob)
    |                 `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 72 |             }
 73 |         }
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:51: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
 71 |                 self.handleMessage(serverSyncJob: serverSyncJob)
    |                                                   `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 72 |             }
 73 |         }
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
[19/46] Compiling PushNotifications ServerSyncProcessHandler.swift
/host/spi-builder-workspace/Sources/Services/EventTypeHandler.swift:147:31: error: cannot find 'isForeground' in scope
145 |         let hasCustomerData = data.count > 1 // checks if there's anything other than the `pusher` key
146 |
147 |         if hasCustomerData && isForeground {
    |                               `- error: cannot find 'isForeground' in scope
148 |             return .ShouldProcess
149 |         }
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:4:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  2 |
  3 | class NetworkService: PushNotificationsNetworkable {
  4 |     let session: URLSession
    |                  `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  5 |
  6 |     init(session: URLSession) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:6:19: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  4 |     let session: URLSession
  5 |
  6 |     init(session: URLSession) {
    |                   `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  7 |         self.session = session
  8 |     }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:225:44: error: cannot find type 'URLRequest' in scope
223 |
224 |     // MARK: Networking Layer
225 |     private func networkRequest(_ request: URLRequest,
    |                                            `- error: cannot find type 'URLRequest' in scope
226 |                                 session: URLSession,
227 |                                 retryStrategy: RetryStrategy) -> Result<Data, PushNotificationsAPIError> {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:226:42: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
224 |     // MARK: Networking Layer
225 |     private func networkRequest(_ request: URLRequest,
226 |                                 session: URLSession,
    |                                          `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
227 |                                 retryStrategy: RetryStrategy) -> Result<Data, PushNotificationsAPIError> {
228 |         let semaphore = DispatchSemaphore(value: 0)
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:283:85: error: cannot find type 'URLRequest' in scope
281 |     }
282 |
283 |     private func setRequest(url: URL, httpMethod: HTTPMethod, body: Data? = nil) -> URLRequest {
    |                                                                                     `- error: cannot find type 'URLRequest' in scope
284 |         var request = URLRequest(url: url)
285 |         request.addValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:28:66: error: cannot infer contextual base in reference to member 'POST'
 26 |             }
 27 |
 28 |             let request = self.setRequest(url: url, httpMethod: .POST, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
 29 |
 30 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:54:66: error: cannot infer contextual base in reference to member 'POST'
 52 |             }
 53 |
 54 |             let request = self.setRequest(url: url, httpMethod: .POST)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
 55 |
 56 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:79:66: error: cannot infer contextual base in reference to member 'PUT'
 77 |                 return .failure(.genericError(reason: "Error while encoding the interests payload."))
 78 |             }
 79 |             let request = self.setRequest(url: url, httpMethod: .PUT, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
 80 |
 81 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:102:66: error: cannot infer contextual base in reference to member 'DELETE'
100 |             }
101 |
102 |             let request = self.setRequest(url: url, httpMethod: .DELETE)
    |                                                                  `- error: cannot infer contextual base in reference to member 'DELETE'
103 |
104 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:127:66: error: cannot infer contextual base in reference to member 'POST'
125 |             }
126 |
127 |             let request = self.setRequest(url: url, httpMethod: .POST, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'POST'
128 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
129 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:151:66: error: cannot infer contextual base in reference to member 'PUT'
149 |                 return .failure(.genericError(reason: "Error while encoding the metadata payload."))
150 |             }
151 |             let request = self.setRequest(url: url, httpMethod: .PUT, body: body)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
152 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
153 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:172:66: error: cannot infer contextual base in reference to member 'PUT'
170 |             }
171 |
172 |             var request = self.setRequest(url: url, httpMethod: .PUT)
    |                                                                  `- error: cannot infer contextual base in reference to member 'PUT'
173 |             request.addValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
174 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:193:66: error: cannot infer contextual base in reference to member 'DELETE'
191 |             }
192 |
193 |             let request = self.setRequest(url: url, httpMethod: .DELETE)
    |                                                                  `- error: cannot infer contextual base in reference to member 'DELETE'
194 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
195 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:213:66: error: cannot infer contextual base in reference to member 'GET'
211 |             }
212 |
213 |             let request = self.setRequest(url: url, httpMethod: .GET)
    |                                                                  `- error: cannot infer contextual base in reference to member 'GET'
214 |             switch self.networkRequest(request, session: self.session, retryStrategy: retryStrategy) {
215 |             case .success:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:231:17: error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
229 |         var result: Result<Data, PushNotificationsAPIError>?
230 |
231 |         session.dataTask(with: request, completionHandler: { data, response, error in
    |                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'dataTask'
232 |             guard
233 |                 let data = data,
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:247:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
245 |             }
246 |
247 |             let statusCode = httpURLResponse.statusCode
    |                                              `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
248 |             switch statusCode {
249 |             case 200..<300:
/host/spi-builder-workspace/Sources/Services/NetworkService.swift:284:23: error: cannot find 'URLRequest' in scope
282 |
283 |     private func setRequest(url: URL, httpMethod: HTTPMethod, body: Data? = nil) -> URLRequest {
284 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
285 |         request.addValue("application/json", forHTTPHeaderField: "Content-Type")
286 |         request.addValue("push-notifications-swift \(SDK.version)", forHTTPHeaderField: "X-Pusher-Library")
/host/spi-builder-workspace/Sources/Services/ServerSyncEventHandler.swift:6:16: warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 4 |
 5 |     static let serverSyncEventHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncEventHandlersQueue")
 6 |     static var serverSyncEventHandlers = [String: ServerSyncEventHandler]()
   |                |- warning: static property 'serverSyncEventHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: convert 'serverSyncEventHandlers' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: annotate 'serverSyncEventHandlers' with '@MainActor' if property should only be accessed from the main actor
   |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 7 |
 8 |     static func obtain(instanceId: String) -> ServerSyncEventHandler {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:5:24: warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  3 | class ServerSyncProcessHandler {
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    |                        |- warning: static property 'serverSyncHandlers' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'serverSyncHandlers' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: annotate 'serverSyncHandlers' with '@MainActor' if property should only be accessed from the main actor
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  6 |     static func obtain(instanceId: String, getTokenProvider: @escaping () -> TokenProvider?, handleServerSyncEvent: @escaping (ServerSyncEvent) -> Void) -> ServerSyncProcessHandler {
  7 |         return serverSyncHandlersQueue.sync {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:47:23: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 45 |         self.sendMessageQueue = DispatchQueue(label: "com.pusher.beams.sendMessageQueue")
 46 |         self.handleMessageQueue = DispatchQueue(label: "com.pusher.beams.handleMessageQueue")
 47 |         let session = URLSession(configuration: .ephemeral)
    |                       `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
 48 |         self.networkService = NetworkService(session: session)
 49 |         self.jobQueue = ServerSyncJobStore(instanceId: self.instanceId)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:47:50: error: cannot infer contextual base in reference to member 'ephemeral'
 45 |         self.sendMessageQueue = DispatchQueue(label: "com.pusher.beams.sendMessageQueue")
 46 |         self.handleMessageQueue = DispatchQueue(label: "com.pusher.beams.handleMessageQueue")
 47 |         let session = URLSession(configuration: .ephemeral)
    |                                                  `- error: cannot infer contextual base in reference to member 'ephemeral'
 48 |         self.networkService = NetworkService(session: session)
 49 |         self.jobQueue = ServerSyncJobStore(instanceId: self.instanceId)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:21: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 58 |             default:
 59 |                 self.handleMessageQueue.async {
 60 |                     self.handleMessage(serverSyncJob: job)
    |                     `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |                 }
 62 |             }
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:60:55: warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 58 |             default:
 59 |                 self.handleMessageQueue.async {
 60 |                     self.handleMessage(serverSyncJob: job)
    |                                                       `- warning: capture of 'job' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 61 |                 }
 62 |             }
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:13: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 66 |     func sendMessage(serverSyncJob: ServerSyncJob) {
 67 |         self.sendMessageQueue.async {
 68 |             self.jobQueue.append(serverSyncJob)
    |             `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:68:34: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 66 |     func sendMessage(serverSyncJob: ServerSyncJob) {
 67 |         self.sendMessageQueue.async {
 68 |             self.jobQueue.append(serverSyncJob)
    |                                  `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:17: warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
  1 | import Foundation
  2 |
  3 | class ServerSyncProcessHandler {
    |       `- note: class 'ServerSyncProcessHandler' does not conform to the 'Sendable' protocol
  4 |     private static let serverSyncHandlersQueue = DispatchQueue(label: "com.pusher.beams.serverSyncHandlersQueue")
  5 |     private static var serverSyncHandlers = [String: ServerSyncProcessHandler]()
    :
 69 |
 70 |             self.handleMessageQueue.async {
 71 |                 self.handleMessage(serverSyncJob: serverSyncJob)
    |                 `- warning: capture of 'self' with non-sendable type 'ServerSyncProcessHandler' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 72 |             }
 73 |         }
/host/spi-builder-workspace/Sources/Services/ServerSyncProcessHandler.swift:71:51: warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 69 |
 70 |             self.handleMessageQueue.async {
 71 |                 self.handleMessage(serverSyncJob: serverSyncJob)
    |                                                   `- warning: capture of 'serverSyncJob' with non-sendable type 'ServerSyncJob' in a `@Sendable` closure; this is an error in the Swift 6 language mode
 72 |             }
 73 |         }
/host/spi-builder-workspace/Sources/Models/ServerSyncJob.swift:3:6: note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  1 | import Foundation
  2 |
  3 | enum ServerSyncJob {
    |      `- note: consider making enum 'ServerSyncJob' conform to the 'Sendable' protocol
  4 |     case startJob(instanceId: String, token: String)
  5 |     case refreshTokenJob(newToken: String)
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
[20/46] Compiling PushNotifications PushNotificationsAPIError.swift
[21/46] Compiling PushNotifications PushNotificationsError.swift
[22/46] Compiling PushNotifications PusherAlreadyRegisteredError.swift
[23/46] Compiling PushNotifications Reason.swift
[24/46] Compiling PushNotifications Register.swift
[25/46] Compiling PushNotifications Token.swift
[26/46] Compiling PushNotifications PropertyListReadable.swift
[27/46] Compiling PushNotifications PushNotificationsNetworkable.swift
[28/46] Compiling PushNotifications ReportEventType.swift
[29/46] Compiling PushNotifications RetryStrategy.swift
[30/46] Compiling PushNotifications InterestValidationError.swift
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
/host/spi-builder-workspace/Sources/Models/Metadata.swift:17:5: error: missing return in closure expected to return 'Metadata'
15 |         return Metadata(sdkVersion: sdkVersion, iosVersion: nil, macosVersion: systemVersion)
16 |         #endif
17 |     }()
   |     `- error: missing return in closure expected to return 'Metadata'
18 | }
19 |
[31/46] Compiling PushNotifications Interests.swift
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
/host/spi-builder-workspace/Sources/Models/Metadata.swift:17:5: error: missing return in closure expected to return 'Metadata'
15 |         return Metadata(sdkVersion: sdkVersion, iosVersion: nil, macosVersion: systemVersion)
16 |         #endif
17 |     }()
   |     `- error: missing return in closure expected to return 'Metadata'
18 | }
19 |
[32/46] Compiling PushNotifications Metadata.swift
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
/host/spi-builder-workspace/Sources/Models/Metadata.swift:17:5: error: missing return in closure expected to return 'Metadata'
15 |         return Metadata(sdkVersion: sdkVersion, iosVersion: nil, macosVersion: systemVersion)
16 |         #endif
17 |     }()
   |     `- error: missing return in closure expected to return 'Metadata'
18 | }
19 |
[33/46] Compiling PushNotifications MultipleInvalidInterestsError.swift
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
/host/spi-builder-workspace/Sources/Models/Metadata.swift:17:5: error: missing return in closure expected to return 'Metadata'
15 |         return Metadata(sdkVersion: sdkVersion, iosVersion: nil, macosVersion: systemVersion)
16 |         #endif
17 |     }()
   |     `- error: missing return in closure expected to return 'Metadata'
18 | }
19 |
[34/46] Compiling PushNotifications PersistenceConstants.swift
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
/host/spi-builder-workspace/Sources/Models/Metadata.swift:17:5: error: missing return in closure expected to return 'Metadata'
15 |         return Metadata(sdkVersion: sdkVersion, iosVersion: nil, macosVersion: systemVersion)
16 |         #endif
17 |     }()
   |     `- error: missing return in closure expected to return 'Metadata'
18 | }
19 |
[35/46] Compiling PushNotifications PublishId.swift
/host/spi-builder-workspace/Sources/Models/Metadata.swift:8:25: warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 6 |     let macosVersion: String?
 7 |
 8 |     internal static var current: Metadata = {
   |                         |- warning: static property 'current' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                         |- note: convert 'current' to a 'let' constant to make 'Sendable' shared state immutable
   |                         |- note: annotate 'current' with '@MainActor' if property should only be accessed from the main actor
   |                         `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 9 |         let sdkVersion = SDK.version
10 |         let systemVersion = SystemVersion.version
/host/spi-builder-workspace/Sources/Models/Metadata.swift:17:5: error: missing return in closure expected to return 'Metadata'
15 |         return Metadata(sdkVersion: sdkVersion, iosVersion: nil, macosVersion: systemVersion)
16 |         #endif
17 |     }()
   |     `- error: missing return in closure expected to return 'Metadata'
18 | }
19 |
[36/46] Compiling PushNotifications RemoteNotificationType.swift
/host/spi-builder-workspace/Sources/Models/SystemVersion.swift:5:38: error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
 3 | struct SystemVersion {
 4 |     static var version: String {
 5 |         let operatingSystemVersion = ProcessInfo().operatingSystemVersion
   |                                      `- error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
 6 |         let majorVersion = operatingSystemVersion.majorVersion
 7 |         let minorVersion = operatingSystemVersion.minorVersion
FoundationEssentials.ProcessInfo (internal):4:14: note: 'init()' declared here
2 |     public static let processInfo: ProcessInfo
3 |     deinit
4 |     internal init()
  |              `- note: 'init()' declared here
5 | }
[37/46] Compiling PushNotifications SDK.swift
/host/spi-builder-workspace/Sources/Models/SystemVersion.swift:5:38: error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
 3 | struct SystemVersion {
 4 |     static var version: String {
 5 |         let operatingSystemVersion = ProcessInfo().operatingSystemVersion
   |                                      `- error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
 6 |         let majorVersion = operatingSystemVersion.majorVersion
 7 |         let minorVersion = operatingSystemVersion.minorVersion
FoundationEssentials.ProcessInfo (internal):4:14: note: 'init()' declared here
2 |     public static let processInfo: ProcessInfo
3 |     deinit
4 |     internal init()
  |              `- note: 'init()' declared here
5 | }
[38/46] Compiling PushNotifications ServerSyncEvent.swift
/host/spi-builder-workspace/Sources/Models/SystemVersion.swift:5:38: error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
 3 | struct SystemVersion {
 4 |     static var version: String {
 5 |         let operatingSystemVersion = ProcessInfo().operatingSystemVersion
   |                                      `- error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
 6 |         let majorVersion = operatingSystemVersion.majorVersion
 7 |         let minorVersion = operatingSystemVersion.minorVersion
FoundationEssentials.ProcessInfo (internal):4:14: note: 'init()' declared here
2 |     public static let processInfo: ProcessInfo
3 |     deinit
4 |     internal init()
  |              `- note: 'init()' declared here
5 | }
[39/46] Compiling PushNotifications ServerSyncJob.swift
/host/spi-builder-workspace/Sources/Models/SystemVersion.swift:5:38: error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
 3 | struct SystemVersion {
 4 |     static var version: String {
 5 |         let operatingSystemVersion = ProcessInfo().operatingSystemVersion
   |                                      `- error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
 6 |         let majorVersion = operatingSystemVersion.majorVersion
 7 |         let minorVersion = operatingSystemVersion.minorVersion
FoundationEssentials.ProcessInfo (internal):4:14: note: 'init()' declared here
2 |     public static let processInfo: ProcessInfo
3 |     deinit
4 |     internal init()
  |              `- note: 'init()' declared here
5 | }
[40/46] Compiling PushNotifications SystemVersion.swift
/host/spi-builder-workspace/Sources/Models/SystemVersion.swift:5:38: error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
 3 | struct SystemVersion {
 4 |     static var version: String {
 5 |         let operatingSystemVersion = ProcessInfo().operatingSystemVersion
   |                                      `- error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
 6 |         let majorVersion = operatingSystemVersion.majorVersion
 7 |         let minorVersion = operatingSystemVersion.minorVersion
FoundationEssentials.ProcessInfo (internal):4:14: note: 'init()' declared here
2 |     public static let processInfo: ProcessInfo
3 |     deinit
4 |     internal init()
  |              `- note: 'init()' declared here
5 | }
[41/46] Compiling PushNotifications AuthData.swift
/host/spi-builder-workspace/Sources/Models/AuthData.swift:4:2: error: Objective-C interoperability is disabled
 2 |
 3 | /// Authentication data that is provided to a `TokenProvider`, such as `BeamsTokenProvider`.
 4 | @objc public class AuthData: NSObject {
   |  `- error: Objective-C interoperability is disabled
 5 |
 6 |     /// The headers to attach to the `URLRequest` triggered by the `TokenProvider` when calling `fetchToken(userId:completion:)`.
/host/spi-builder-workspace/Sources/Models/AuthData.swift:16:6: error: Objective-C interoperability is disabled
14 |     ///   - headers: A `Dictionary` of header key / value pairs.
15 |     ///   - queryParams: A `Dictionary` of query parameters key / value pairs.
16 |     @objc public init(headers: [String: String], queryParams: [String: String]) {
   |      `- error: Objective-C interoperability is disabled
17 |         self.headers = headers
18 |         self.queryParams = queryParams
[42/46] Compiling PushNotifications Constants.swift
/host/spi-builder-workspace/Sources/Models/AuthData.swift:4:2: error: Objective-C interoperability is disabled
 2 |
 3 | /// Authentication data that is provided to a `TokenProvider`, such as `BeamsTokenProvider`.
 4 | @objc public class AuthData: NSObject {
   |  `- error: Objective-C interoperability is disabled
 5 |
 6 |     /// The headers to attach to the `URLRequest` triggered by the `TokenProvider` when calling `fetchToken(userId:completion:)`.
/host/spi-builder-workspace/Sources/Models/AuthData.swift:16:6: error: Objective-C interoperability is disabled
14 |     ///   - headers: A `Dictionary` of header key / value pairs.
15 |     ///   - queryParams: A `Dictionary` of query parameters key / value pairs.
16 |     @objc public init(headers: [String: String], queryParams: [String: String]) {
   |      `- error: Objective-C interoperability is disabled
17 |         self.headers = headers
18 |         self.queryParams = queryParams
[43/46] Compiling PushNotifications Device.swift
/host/spi-builder-workspace/Sources/Models/AuthData.swift:4:2: error: Objective-C interoperability is disabled
 2 |
 3 | /// Authentication data that is provided to a `TokenProvider`, such as `BeamsTokenProvider`.
 4 | @objc public class AuthData: NSObject {
   |  `- error: Objective-C interoperability is disabled
 5 |
 6 |     /// The headers to attach to the `URLRequest` triggered by the `TokenProvider` when calling `fetchToken(userId:completion:)`.
/host/spi-builder-workspace/Sources/Models/AuthData.swift:16:6: error: Objective-C interoperability is disabled
14 |     ///   - headers: A `Dictionary` of header key / value pairs.
15 |     ///   - queryParams: A `Dictionary` of query parameters key / value pairs.
16 |     @objc public init(headers: [String: String], queryParams: [String: String]) {
   |      `- error: Objective-C interoperability is disabled
17 |         self.headers = headers
18 |         self.queryParams = queryParams
[44/46] Compiling PushNotifications FeatureFlags.swift
/host/spi-builder-workspace/Sources/Models/AuthData.swift:4:2: error: Objective-C interoperability is disabled
 2 |
 3 | /// Authentication data that is provided to a `TokenProvider`, such as `BeamsTokenProvider`.
 4 | @objc public class AuthData: NSObject {
   |  `- error: Objective-C interoperability is disabled
 5 |
 6 |     /// The headers to attach to the `URLRequest` triggered by the `TokenProvider` when calling `fetchToken(userId:completion:)`.
/host/spi-builder-workspace/Sources/Models/AuthData.swift:16:6: error: Objective-C interoperability is disabled
14 |     ///   - headers: A `Dictionary` of header key / value pairs.
15 |     ///   - queryParams: A `Dictionary` of query parameters key / value pairs.
16 |     @objc public init(headers: [String: String], queryParams: [String: String]) {
   |      `- error: Objective-C interoperability is disabled
17 |         self.headers = headers
18 |         self.queryParams = queryParams
[45/46] Compiling PushNotifications HTTPMethod.swift
/host/spi-builder-workspace/Sources/Models/AuthData.swift:4:2: error: Objective-C interoperability is disabled
 2 |
 3 | /// Authentication data that is provided to a `TokenProvider`, such as `BeamsTokenProvider`.
 4 | @objc public class AuthData: NSObject {
   |  `- error: Objective-C interoperability is disabled
 5 |
 6 |     /// The headers to attach to the `URLRequest` triggered by the `TokenProvider` when calling `fetchToken(userId:completion:)`.
/host/spi-builder-workspace/Sources/Models/AuthData.swift:16:6: error: Objective-C interoperability is disabled
14 |     ///   - headers: A `Dictionary` of header key / value pairs.
15 |     ///   - queryParams: A `Dictionary` of query parameters key / value pairs.
16 |     @objc public init(headers: [String: String], queryParams: [String: String]) {
   |      `- error: Objective-C interoperability is disabled
17 |         self.headers = headers
18 |         self.queryParams = queryParams
[46/46] Compiling PushNotifications InstanceId.swift
/host/spi-builder-workspace/Sources/Models/AuthData.swift:4:2: error: Objective-C interoperability is disabled
 2 |
 3 | /// Authentication data that is provided to a `TokenProvider`, such as `BeamsTokenProvider`.
 4 | @objc public class AuthData: NSObject {
   |  `- error: Objective-C interoperability is disabled
 5 |
 6 |     /// The headers to attach to the `URLRequest` triggered by the `TokenProvider` when calling `fetchToken(userId:completion:)`.
/host/spi-builder-workspace/Sources/Models/AuthData.swift:16:6: error: Objective-C interoperability is disabled
14 |     ///   - headers: A `Dictionary` of header key / value pairs.
15 |     ///   - queryParams: A `Dictionary` of query parameters key / value pairs.
16 |     @objc public init(headers: [String: String], queryParams: [String: String]) {
   |      `- error: Objective-C interoperability is disabled
17 |         self.headers = headers
18 |         self.queryParams = queryParams
BUILD FAILURE 6.0 linux