Skip to content

Commit 1c9e074

Browse files
Philipp HomannPhilipp Homann
authored andcommitted
removed special changes for MacCatalyst again
* with coming out xCode 12.3 we also have support for configurable network cache in mac catalyst
1 parent 20f0472 commit 1c9e074

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

Sources/UsefulNetworkLayer/NetworkLayer/NetworkLayer+Cache.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ extension NetworkLayer {
3636
self.initialize()
3737
}
3838

39-
// not for Mac Catalyst
40-
// "The new required URLCache initializer init(memoryCapacity:diskCapacity:diskPath:) is currently unimplemented. (50739637)" from Known Issues in https://developer.apple.com/documentation/macos_release_notes/macos_10_15_beta_release_notes
41-
#if !targetEnvironment(macCatalyst)
4239
/**
4340
Initialize cache with the specified capacity preferences and path.
4441
- parameter memoryCapacity: The RAM demand. Set `0` if you don't want to use temporary memory
@@ -49,7 +46,6 @@ extension NetworkLayer {
4946
super.init(memoryCapacity: memoryCapacity, diskCapacity: diskCapacity, diskPath: path)
5047
self.initialize()
5148
}
52-
#endif
5349

5450
/// Registers `NotificationCenter` for necessary messages.
5551
private func initialize() {

Sources/UsefulNetworkLayer/NetworkLayer/NetworkLayer.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,9 @@ public class NetworkLayer: NSObject, URLSessionDataDelegate {
7676
/// Holds cache of the `NetworkLayer`.
7777
public var _cache: Cache? {
7878
get {
79-
// not for Mac Catalyst
80-
// "The new required URLCache initializer init(memoryCapacity:diskCapacity:diskPath:) is currently unimplemented. (50739637)" from Known Issues in https://developer.apple.com/documentation/macos_release_notes/macos_10_15_beta_release_notes
81-
#if !targetEnvironment(macCatalyst)
8279
return NetworkLayer.Cache(memoryCapacity: 0,
8380
diskCapacity: 150 * 1024 * 1024,
8481
diskPath: nil)
85-
#else
86-
return NetworkLayer.Cache()
87-
#endif
8882
}
8983
}
9084

0 commit comments

Comments
 (0)