aboutsummaryrefslogtreecommitdiffstats
path: root/iPhone/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'iPhone/FixMyStreet')
-rw-r--r--iPhone/FixMyStreet/Classes/AppDelegate.m10
-rw-r--r--iPhone/FixMyStreet/config.xml7
2 files changed, 14 insertions, 3 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
diff --git a/iPhone/FixMyStreet/config.xml b/iPhone/FixMyStreet/config.xml
index 7ea9bb5..9798f07 100644
--- a/iPhone/FixMyStreet/config.xml
+++ b/iPhone/FixMyStreet/config.xml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<cordova>
+<widget>
<preference name="AllowInlineMediaPlayback" value="false"/>
<preference name="AutoHideSplashScreen" value="true"/>
<preference name="EnableLocation" value="false"/>
<preference name="EnableViewportScale" value="false"/>
<preference name="MediaPlaybackRequiresUserAction" value="false"/>
- <preference name="OpenAllWhitelistURLsInWebView" value="false"/>
<preference name="ShowSplashScreenSpinner" value="true"/>
+ <preference name="FadeSplashScreen" value="true" />
+ <preference name="FadeSplashScreenDuration" value="2" />
<preference name="TopActivityIndicator" value="gray"/>
<preference name="UIWebViewBounce" value="true"/>
<content src="index.html" />
@@ -32,4 +33,4 @@
<access origin="*.virtualearth.net"/>
<access origin="mapit.mysociety.org"/>
<access origin="struan.fixmystreet.dev.mysociety.org"/>
-</cordova>
+</widget>