Fixed an app submission issue due to private API naming collision

pull/1047/head
Morgan Pretty 6 months ago
parent ce77a10b16
commit b2ccd24172

@ -7636,7 +7636,7 @@
CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
CURRENT_PROJECT_VERSION = 494;
CURRENT_PROJECT_VERSION = 495;
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@ -7715,7 +7715,7 @@
CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 494;
CURRENT_PROJECT_VERSION = 495;
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;

@ -9,11 +9,10 @@ public class LRUCache<KeyType: Hashable & Equatable, ValueType> {
private var cacheMap: [KeyType: ValueType] = [:]
private var cacheOrder: [KeyType] = []
private let maxSize: Int
private let maxCacheSize: Int
@objc
public init(maxSize: Int) {
self.maxSize = maxSize
public init(maxCacheSize: Int) {
self.maxCacheSize = maxCacheSize
NotificationCenter.default.addObserver(self,
selector: #selector(didReceiveMemoryWarning),
@ -59,7 +58,7 @@ public class LRUCache<KeyType: Hashable & Equatable, ValueType> {
updateCacheOrder(key: key)
while cacheOrder.count > maxSize {
while cacheOrder.count > maxCacheSize {
guard let staleKey = cacheOrder.first else {
return
}
@ -68,7 +67,6 @@ public class LRUCache<KeyType: Hashable & Equatable, ValueType> {
}
}
@objc
public func clear() {
cacheMap.removeAll()
cacheOrder.removeAll()

@ -463,7 +463,7 @@ open class ProxiedContentDownloader: NSObject, URLSessionTaskDelegate, URLSessio
// evacuated from the cache; if a cache consumer (e.g. view) is
// still using the asset, the asset won't be deleted on disk until
// it is no longer in use.
private var assetMap = LRUCache<NSURL, ProxiedContentAsset>(maxSize: 100)
private var assetMap = LRUCache<NSURL, ProxiedContentAsset>(maxCacheSize: 100)
// TODO: We could use a proper queue, e.g. implemented with a linked
// list.
private var assetRequestQueue = [ProxiedContentAssetRequest]()

Loading…
Cancel
Save