aboutsummaryrefslogtreecommitdiffstats
path: root/iPhone/FixMyStreet/Classes
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-03-25 15:57:26 +0000
committerStruan Donald <struan@exo.org.uk>2013-03-25 17:13:56 +0000
commit73e3d5d4077636487f07be1beff3b2714ee2b276 (patch)
tree4b4529f36ab68ec7c2a9e51bcfafbd57d9336cc8 /iPhone/FixMyStreet/Classes
parente5d7b3b62be5025f31c39b50ea3955398bc7cf40 (diff)
upgrade to phonegap 2.5 for ios
Diffstat (limited to 'iPhone/FixMyStreet/Classes')
-rw-r--r--iPhone/FixMyStreet/Classes/AppDelegate.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/iPhone/FixMyStreet/Classes/AppDelegate.m b/iPhone/FixMyStreet/Classes/AppDelegate.m
index 7d6bcd8..77e991d 100644
--- a/iPhone/FixMyStreet/Classes/AppDelegate.m
+++ b/iPhone/FixMyStreet/Classes/AppDelegate.m
@@ -43,6 +43,11 @@
[cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
+ int cacheSizeMemory = 8 * 1024 * 1024; // 8MB
+ int cacheSizeDisk = 32 * 1024 * 1024; // 32MB
+ NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
+ [NSURLCache setSharedURLCache:sharedCache];
+
self = [super init];
return self;
}
@@ -109,4 +114,9 @@
return supportedInterfaceOrientations;
}
+- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application
+{
+ [[NSURLCache sharedURLCache] removeAllCachedResponses];
+}
+
@end