aboutsummaryrefslogtreecommitdiffstats
path: root/iPhone/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'iPhone/FixMyStreet')
-rw-r--r--iPhone/FixMyStreet/Classes/AppDelegate.m26
-rw-r--r--iPhone/FixMyStreet/config.xml153
2 files changed, 137 insertions, 42 deletions
diff --git a/iPhone/FixMyStreet/Classes/AppDelegate.m b/iPhone/FixMyStreet/Classes/AppDelegate.m
index 77e991d..08c68ef 100644
--- a/iPhone/FixMyStreet/Classes/AppDelegate.m
+++ b/iPhone/FixMyStreet/Classes/AppDelegate.m
@@ -19,7 +19,7 @@
//
// AppDelegate.m
-// tmp_ios
+// sample
//
// Created by ___FULLUSERNAME___ on ___DATE___.
// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
@@ -45,7 +45,11 @@
int cacheSizeMemory = 8 * 1024 * 1024; // 8MB
int cacheSizeDisk = 32 * 1024 * 1024; // 32MB
- NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
+#if __has_feature(objc_arc)
+ NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"];
+#else
+ NSURLCache* sharedCache = [[[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"] autorelease];
+#endif
[NSURLCache setSharedURLCache:sharedCache];
self = [super init];
@@ -61,10 +65,18 @@
{
CGRect screenBounds = [[UIScreen mainScreen] bounds];
- self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
+#if __has_feature(objc_arc)
+ self.window = [[UIWindow alloc] initWithFrame:screenBounds];
+#else
+ self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
+#endif
self.window.autoresizesSubviews = YES;
- self.viewController = [[[MainViewController alloc] init] autorelease];
+#if __has_feature(objc_arc)
+ self.viewController = [[MainViewController alloc] init];
+#else
+ self.viewController = [[[MainViewController alloc] init] autorelease];
+#endif
self.viewController.useSplashScreen = YES;
// Set your app's start page by setting the <content src='foo.html' /> tag in config.xml.
@@ -81,7 +93,7 @@
}
// this happens while we are running ( in the background, or from within our own app )
-// only valid if tmp_ios-Info.plist specifies a protocol to handle
+// only valid if sample-Info.plist specifies a protocol to handle
- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url
{
if (!url) {
@@ -99,8 +111,8 @@
}
// repost the localnotification using the default NSNotificationCenter so multiple plugins may respond
-- (void) application:(UIApplication*)application
- didReceiveLocalNotification:(UILocalNotification*)notification
+- (void) application:(UIApplication*)application
+ didReceiveLocalNotification:(UILocalNotification*)notification
{
// re-post ( broadcast )
[[NSNotificationCenter defaultCenter] postNotificationName:CDVLocalNotification object:notification];
diff --git a/iPhone/FixMyStreet/config.xml b/iPhone/FixMyStreet/config.xml
index 086fb93..fc173e1 100644
--- a/iPhone/FixMyStreet/config.xml
+++ b/iPhone/FixMyStreet/config.xml
@@ -1,37 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
-<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="ShowSplashScreenSpinner" value="true"/>
- <preference name="FadeSplashScreen" value="false" />
- <preference name="FadeSplashScreenDuration" value="0" />
- <preference name="TopActivityIndicator" value="gray"/>
- <preference name="UIWebViewBounce" value="false"/>
- <content src="index.html" />
- <plugins>
- <plugin name="Accelerometer" value="CDVAccelerometer"/>
- <plugin name="Battery" value="CDVBattery"/>
- <plugin name="Camera" value="CDVCamera"/>
- <plugin name="Capture" value="CDVCapture"/>
- <plugin name="Compass" value="CDVLocation"/>
- <plugin name="Contacts" value="CDVContacts"/>
- <plugin name="Debug Console" value="CDVDebugConsole"/>
- <plugin name="Device" value="CDVDevice"/>
- <plugin name="File" value="CDVFile"/>
- <plugin name="FileTransfer" value="CDVFileTransfer"/>
- <plugin name="Geolocation" value="CDVLocation"/>
- <plugin name="InAppBrowser" value="CDVInAppBrowser"/>
- <plugin name="Media" value="CDVSound"/>
- <plugin name="NetworkStatus" value="CDVConnection"/>
- <plugin name="Notification" value="CDVNotification"/>
- <plugin name="SplashScreen" value="CDVSplashScreen"/>
- </plugins>
- <access origin="*.tile.openstreetmap.org"/>
- <access origin="*.tilma.mysociety.org"/>
- <access origin="*.virtualearth.net"/>
- <access origin="mapit.mysociety.org"/>
- <access origin="struan.fixmystreet.dev.mysociety.org"/>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<widget xmlns = "http://www.w3.org/ns/widgets"
+ id = "io.cordova.helloCordova"
+ version = "2.0.0">
+ <name>Hello Cordova</name>
+
+ <description>
+ A sample Apache Cordova application that responds to the deviceready event.
+ </description>
+
+ <author href="http://cordova.io" email="dev@cordova.apache.org">
+ Apache Cordova Team
+ </author>
+
+ <access origin="*.tile.openstreetmap.org"/>
+ <access origin="*.tilma.mysociety.org"/>
+ <access origin="*.virtualearth.net"/>
+ <access origin="mapit.mysociety.org"/>
+ <access origin="struan.fixmystreet.dev.mysociety.org"/>
+
+ <!-- <content src="http://mysite.com/myapp.html" /> for external pages -->
+ <content src="index.html" />
+
+ <!-- Preferences for iOS -->
+ <preference name="AllowInlineMediaPlayback" value="false" />
+ <preference name="AutoHideSplashScreen" value="true" />
+ <preference name="BackupWebStorage" value="cloud" />
+ <preference name="DisallowOverscroll" value="false" />
+ <preference name="EnableLocation" value="false" /><!-- DEPRECATED -->
+ <preference name="EnableViewportScale" value="false" />
+ <preference name="FadeSplashScreen" value="false" />
+ <preference name="FadeSplashScreenDuration" value="0" />
+ <preference name="HideKeyboardFormAccessoryBar" value="false" />
+ <preference name="KeyboardDisplayRequiresUserAction" value="true" />
+ <preference name="KeyboardShrinksView" value="false" />
+ <preference name="MediaPlaybackRequiresUserAction" value="false" />
+ <preference name="ShowSplashScreenSpinner" value="true" />
+ <preference name="SuppressesIncrementalRendering" value="false" />
+ <preference name="TopActivityIndicator" value="gray" />
+
+
+ <feature name="Geolocation">
+ <param name="ios-package" value="CDVLocation"/>
+ </feature>
+ <feature name="Device">
+ <param name="ios-package" value="CDVDevice"/>
+ </feature>
+ <feature name="Accelerometer">
+ <param name="ios-package" value="CDVAccelerometer"/>
+ </feature>
+ <feature name="Compass">
+ <param name="ios-package" value="CDVLocation"/>
+ </feature>
+ <feature name="Media">
+ <param name="ios-package" value="CDVSound"/>
+ </feature>
+ <feature name="Camera">
+ <param name="ios-package" value="CDVCamera"/>
+ </feature>
+ <feature name="Contacts">
+ <param name="ios-package" value="CDVContacts"/>
+ </feature>
+ <feature name="File">
+ <param name="ios-package" value="CDVFile"/>
+ </feature>
+ <feature name="NetworkStatus">
+ <param name="ios-package" value="CDVConnection"/>
+ </feature>
+ <feature name="Notification">
+ <param name="ios-package" value="CDVNotification"/>
+ </feature>
+ <feature name="FileTransfer">
+ <param name="ios-package" value="CDVFileTransfer"/>
+ </feature>
+ <feature name="Capture">
+ <param name="ios-package" value="CDVCapture"/>
+ </feature>
+ <feature name="Battery">
+ <param name="ios-package" value="CDVBattery"/>
+ </feature>
+ <feature name="SplashScreen">
+ <param name="ios-package" value="CDVSplashScreen"/>
+ </feature>
+ <feature name="Echo">
+ <param name="ios-package" value="CDVEcho"/>
+ </feature>
+ <feature name="Globalization">
+ <param name="ios-package" value="CDVGlobalization"/>
+ </feature>
+ <feature name="InAppBrowser">
+ <param name="ios-package" value="CDVInAppBrowser"/>
+ </feature>
+ <feature name="Logger">
+ <param name="ios-package" value="CDVLogger"/>
+ </feature>
+ <feature name="LocalStorage">
+ <param name="ios-package" value="CDVLocalStorage"/>
+ </feature>
+ <!-- Deprecated plugins element. REmove in 3.0 -->
+ <plugins>
+ </plugins>
</widget>