diff --git a/Parse/Parse/Internal/Commands/CommandRunner/URLSession/PFURLSessionCommandRunner.m b/Parse/Parse/Internal/Commands/CommandRunner/URLSession/PFURLSessionCommandRunner.m index b2e3e1b5d..9ce009216 100644 --- a/Parse/Parse/Internal/Commands/CommandRunner/URLSession/PFURLSessionCommandRunner.m +++ b/Parse/Parse/Internal/Commands/CommandRunner/URLSession/PFURLSessionCommandRunner.m @@ -268,10 +268,17 @@ + (NSURLSessionConfiguration *)_urlSessionConfigurationForApplicationId:(NSStrin configuration.HTTPCookieAcceptPolicy = NSHTTPCookieAcceptPolicyNever; configuration.HTTPShouldSetCookies = NO; +#if TARGET_OS_MACCATALYST + // Completely disable caching of responses for security reasons. + configuration.URLCache = [[NSURLCache alloc] initWithMemoryCapacity:[NSURLCache sharedURLCache].memoryCapacity + diskCapacity:0 + directoryURL:nil]; +#else // Completely disable caching of responses for security reasons. configuration.URLCache = [[NSURLCache alloc] initWithMemoryCapacity:[NSURLCache sharedURLCache].memoryCapacity diskCapacity:0 diskPath:nil]; +#endif NSBundle *bundle = [NSBundle mainBundle]; NSDictionary *headers = [PFCommandURLRequestConstructor defaultURLRequestHeadersForApplicationId:applicationId