File tree Expand file tree Collapse file tree
Sources/iOSUsefulNetworkLayer/NetworkLayer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import PackageDescription
55
66let package = Package (
77 name: " iOSUsefulNetworkLayer " ,
8- platforms: [ . iOS( . v10) ] ,
8+ platforms: [ . iOS( . v10) , . tvOS ( . v10 ) ] ,
99 products: [
1010 // Products define the executables and libraries produced by a package, and make them visible to other packages.
1111 . library(
@@ -14,16 +14,13 @@ let package = Package(
1414 ] ,
1515 dependencies: [
1616 // Dependencies declare other packages that this package depends on.
17- . package ( url: " https://github.com/exozet/iOSCoreUsefulSDK " , from: " 1.0.0 " ) ,
17+ . package ( url: " https://github.com/exozet/iOSCoreUsefulSDK " , from: " 1.0.5 " ) ,
1818 ] ,
1919 targets: [
2020 // Targets are the basic building blocks of a package. A target can define a module or a test suite.
2121 // Targets can depend on other targets in this package, and on products in packages which this package depends on.
2222 . target(
2323 name: " iOSUsefulNetworkLayer " ,
24- dependencies: [ " iOSCoreUsefulSDK " ] ) ,
25- . testTarget(
26- name: " iOSUsefulNetworkLayerTests " ,
27- dependencies: [ " iOSUsefulNetworkLayer " , " iOSCoreUsefulSDK " ] ) ,
24+ dependencies: [ " iOSCoreUsefulSDK " ] )
2825 ]
2926)
Original file line number Diff line number Diff line change 2020// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121// THE SOFTWARE.
2222
23+ import Foundation
24+ #if !os(macOS) && !os(watchOS)
2325import UIKit
26+ #endif
2427
2528extension NetworkLayer {
2629
@@ -46,10 +49,12 @@ extension NetworkLayer {
4649
4750 /// Registers `NotificationCenter` for necessary messages.
4851 private func initialize( ) {
52+ #if !os(macOS) && !os(watchOS)
4953 NotificationCenter . default. addObserver ( self ,
5054 selector: #selector( didReceiveMemoryWarning) ,
5155 name: UIApplication . didReceiveMemoryWarningNotification,
5256 object: nil )
57+ #endif
5358 }
5459
5560 /// Remove observer from the `NotificationCenter`
Original file line number Diff line number Diff line change 2121// THE SOFTWARE.
2222
2323import Foundation
24- import UIKit
2524
2625/**
2726 Base Network Layer that capable to cache and manage the operation queue.
You can’t perform that action at this time.
0 commit comments