Skip to content

Commit

Permalink
Fixed issue whereby UIKit unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
rwbutler committed May 14, 2022
1 parent 76a1627 commit 5910c02
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Connectivity/Classes/Connectivity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -393,15 +393,17 @@ private extension Connectivity {

/// Applies the settings specified by the `ConnectivityConfiguration` object.
private func configure(with configuration: ConnectivityConfiguration) {
self.checkWhenApplicationDidBecomeActive = configuration.checkWhenApplicationDidBecomeActive
self.connectivityURLs = configuration.connectivityURLs
self.externalQueue = configuration.callbackQueue
self.internalQueue = configuration.connectivityQueue
self.pollingInterval = configuration.pollingInterval
self.isPollingEnabled = configuration.pollingIsEnabled
self.pollWhileOfflineOnly = configuration.pollWhileOfflineOnly
self.responseValidator = configuration.responseValidator
self.successThreshold = configuration.successThreshold
#if canImport(UIKit)
checkWhenApplicationDidBecomeActive = configuration.checkWhenApplicationDidBecomeActive
#endif
connectivityURLs = configuration.connectivityURLs
externalQueue = configuration.callbackQueue
internalQueue = configuration.connectivityQueue
pollingInterval = configuration.pollingInterval
isPollingEnabled = configuration.pollingIsEnabled
pollWhileOfflineOnly = configuration.pollWhileOfflineOnly
responseValidator = configuration.responseValidator
successThreshold = configuration.successThreshold
Self.urlSessionConfiguration = configuration.urlSessionConfiguration
}

Expand Down

0 comments on commit 5910c02

Please sign in to comment.