ios - URLCache caches URL on Xcode simulator but not device -


my urlcache caches urls in xcode simulator, not on real device. narrowed code down example:

if let urlcache = sessionmanager().session.configuration.urlcache {      // returns nil, because there's nothing in cache     print(urlcache.cachedresponse(for: urlrequest))      // put url in cache     urlcache.storecachedresponse(cachedurlresponse(response: response, data: responsedata), for: urlrequest)      // url should in cache, it's still nil!     print(urlcache.cachedresponse(for: urlrequest)) } 

i'm confused this. ideas?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -