Skip to content
Browse files

update ios app to phonegap 2.1.0

  • Loading branch information...
1 parent 9c50482 commit 9631290262065627dc5ed3c822adc4e4df706551 @struan struan committed Oct 16, 2012
View
BIN phonegap/iPhone/Default-568h@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
128 phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ 24065F8D162C7721004574A1 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 24065F8C162C7721004574A1 /* Default-568h@2x.png */; };
+ 249ED5EB162D82AD000076A1 /* cordova in Resources */ = {isa = PBXBuildFile; fileRef = 249ED5EA162D82AD000076A1 /* cordova */; };
+ 249ED5EC162D83BA000076A1 /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 240FE2F1162D6E4D00250E2D /* libCordova.a */; };
24D3BF4C1508D60F005923FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF4B1508D60F005923FE /* Foundation.framework */; };
24D3BF4E1508D60F005923FE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF4D1508D60F005923FE /* UIKit.framework */; };
24D3BF501508D60F005923FE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF4F1508D60F005923FE /* CoreGraphics.framework */; };
@@ -22,7 +25,6 @@
24D3BF641508D60F005923FE /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF631508D60F005923FE /* CoreMedia.framework */; };
24D3BF6A1508D60F005923FE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF681508D60F005923FE /* InfoPlist.strings */; };
24D3BF6C1508D60F005923FE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 24D3BF6B1508D60F005923FE /* main.m */; };
- 24D3BF6F1508D60F005923FE /* Cordova.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF6E1508D60F005923FE /* Cordova.framework */; };
24D3BF741508D60F005923FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF721508D60F005923FE /* Localizable.strings */; };
24D3BF781508D60F005923FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF761508D60F005923FE /* Localizable.strings */; };
24D3BF7C1508D60F005923FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF7A1508D60F005923FE /* Localizable.strings */; };
@@ -37,11 +39,30 @@
24D3BF941508D60F005923FE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 24D3BF931508D60F005923FE /* AppDelegate.m */; };
24D3BF971508D60F005923FE /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24D3BF961508D60F005923FE /* MainViewController.m */; };
24D3BF991508D60F005923FE /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF981508D60F005923FE /* MainViewController.xib */; };
- 24D3BF9D1508D60F005923FE /* verify.sh in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF9C1508D60F005923FE /* verify.sh */; };
24E16541150E0F9600F31308 /* www in Resources */ = {isa = PBXBuildFile; fileRef = 24E16540150E0F9600F31308 /* www */; };
/* End PBXBuildFile section */
+/* Begin PBXContainerItemProxy section */
+ 240FE2F0162D6E4D00250E2D /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 240FE2E9162D6E4D00250E2D /* CordovaLib.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 68A32D7114102E1C006B237C;
+ remoteInfo = CordovaLib;
+ };
+ 249ED5DC162D7057000076A1 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 240FE2E9162D6E4D00250E2D /* CordovaLib.xcodeproj */;
+ proxyType = 1;
+ remoteGlobalIDString = D2AAC07D0554694100DB518D;
+ remoteInfo = CordovaLib;
+ };
+/* End PBXContainerItemProxy section */
+
/* Begin PBXFileReference section */
+ 24065F8C162C7721004574A1 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
+ 240FE2E9162D6E4D00250E2D /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = ../../../../../libs/cordova_2.1/lib/ios/CordovaLib/CordovaLib.xcodeproj; sourceTree = "<group>"; };
+ 249ED5EA162D82AD000076A1 /* cordova */ = {isa = PBXFileReference; lastKnownFileType = folder; path = cordova; sourceTree = "<group>"; };
24D3BF471508D60F005923FE /* FixMyStreet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FixMyStreet.app; sourceTree = BUILT_PRODUCTS_DIR; };
24D3BF4B1508D60F005923FE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
24D3BF4D1508D60F005923FE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
@@ -60,7 +81,6 @@
24D3BF691508D60F005923FE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
24D3BF6B1508D60F005923FE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
24D3BF6D1508D60F005923FE /* FixMyStreet-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FixMyStreet-Prefix.pch"; sourceTree = "<group>"; };
- 24D3BF6E1508D60F005923FE /* Cordova.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cordova.framework; path = /Users/Shared/Cordova/Frameworks/Cordova.framework; sourceTree = "<absolute>"; };
24D3BF731508D60F005923FE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
24D3BF771508D60F005923FE /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
24D3BF7B1508D60F005923FE /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = Resources/de.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -78,7 +98,6 @@
24D3BF961508D60F005923FE /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
24D3BF981508D60F005923FE /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
24D3BF9B1508D60F005923FE /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
- 24D3BF9C1508D60F005923FE /* verify.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = verify.sh; sourceTree = "<group>"; };
24E16540150E0F9600F31308 /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../www; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -87,6 +106,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 249ED5EC162D83BA000076A1 /* libCordova.a in Frameworks */,
24D3BF4C1508D60F005923FE /* Foundation.framework in Frameworks */,
24D3BF4E1508D60F005923FE /* UIKit.framework in Frameworks */,
24D3BF501508D60F005923FE /* CoreGraphics.framework in Frameworks */,
@@ -100,7 +120,6 @@
24D3BF601508D60F005923FE /* SystemConfiguration.framework in Frameworks */,
24D3BF621508D60F005923FE /* MobileCoreServices.framework in Frameworks */,
24D3BF641508D60F005923FE /* CoreMedia.framework in Frameworks */,
- 24D3BF6F1508D60F005923FE /* Cordova.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -114,13 +133,24 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 240FE2EA162D6E4D00250E2D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 240FE2F1162D6E4D00250E2D /* libCordova.a */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
24D3BF391508D60E005923FE = {
isa = PBXGroup;
children = (
+ 249ED5EA162D82AD000076A1 /* cordova */,
+ 24065F8C162C7721004574A1 /* Default-568h@2x.png */,
24E16540150E0F9600F31308 /* www */,
24D3BF651508D60F005923FE /* FixMyStreet */,
24D3BF4A1508D60F005923FE /* Frameworks */,
24D3BF481508D60F005923FE /* Products */,
+ 240FE2E9162D6E4D00250E2D /* CordovaLib.xcodeproj */,
);
sourceTree = "<group>";
};
@@ -155,7 +185,6 @@
24D3BF651508D60F005923FE /* FixMyStreet */ = {
isa = PBXGroup;
children = (
- 24D3BF6E1508D60F005923FE /* Cordova.framework */,
24D3BF701508D60F005923FE /* Resources */,
24D3BF911508D60F005923FE /* Classes */,
24D3BF9A1508D60F005923FE /* Plugins */,
@@ -173,7 +202,6 @@
24D3BF6D1508D60F005923FE /* FixMyStreet-Prefix.pch */,
24D3BF8F1508D60F005923FE /* Cordova.plist */,
24D3BF981508D60F005923FE /* MainViewController.xib */,
- 24D3BF9C1508D60F005923FE /* verify.sh */,
);
name = "Supporting Files";
sourceTree = "<group>";
@@ -274,11 +302,11 @@
24D3BF421508D60F005923FE /* Resources */,
24D3BF431508D60F005923FE /* Sources */,
24D3BF441508D60F005923FE /* Frameworks */,
- 24D3BF451508D60F005923FE /* ShellScript */,
);
buildRules = (
);
dependencies = (
+ 249ED5DD162D7057000076A1 /* PBXTargetDependency */,
);
name = FixMyStreet;
productName = FixMyStreet;
@@ -291,7 +319,7 @@
24D3BF3B1508D60E005923FE /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0420;
+ LastUpgradeCheck = 0450;
};
buildConfigurationList = 24D3BF3E1508D60E005923FE /* Build configuration list for PBXProject "FixMyStreet" */;
compatibilityVersion = "Xcode 3.2";
@@ -306,13 +334,29 @@
mainGroup = 24D3BF391508D60E005923FE;
productRefGroup = 24D3BF481508D60F005923FE /* Products */;
projectDirPath = "";
+ projectReferences = (
+ {
+ ProductGroup = 240FE2EA162D6E4D00250E2D /* Products */;
+ ProjectRef = 240FE2E9162D6E4D00250E2D /* CordovaLib.xcodeproj */;
+ },
+ );
projectRoot = "";
targets = (
24D3BF461508D60F005923FE /* FixMyStreet */,
);
};
/* End PBXProject section */
+/* Begin PBXReferenceProxy section */
+ 240FE2F1162D6E4D00250E2D /* libCordova.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libCordova.a;
+ remoteRef = 240FE2F0162D6E4D00250E2D /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+/* End PBXReferenceProxy section */
+
/* Begin PBXResourcesBuildPhase section */
24D3BF421508D60F005923FE /* Resources */ = {
isa = PBXResourcesBuildPhase;
@@ -331,29 +375,14 @@
24D3BF8E1508D60F005923FE /* Capture.bundle in Resources */,
24D3BF901508D60F005923FE /* Cordova.plist in Resources */,
24D3BF991508D60F005923FE /* MainViewController.xib in Resources */,
- 24D3BF9D1508D60F005923FE /* verify.sh in Resources */,
24E16541150E0F9600F31308 /* www in Resources */,
+ 24065F8D162C7721004574A1 /* Default-568h@2x.png in Resources */,
+ 249ED5EB162D82AD000076A1 /* cordova in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
-/* Begin PBXShellScriptBuildPhase section */
- 24D3BF451508D60F005923FE /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/bash;
- shellScript = "\n\t\t\t\t\t\t\t\tchmod 755 $PROJECT_DIR/$PROJECT_NAME/verify.sh\n\t\t\t\t\t\t\t\t$PROJECT_DIR/$PROJECT_NAME/verify.sh\n\t\t\t\t\t";
- };
-/* End PBXShellScriptBuildPhase section */
-
/* Begin PBXSourcesBuildPhase section */
24D3BF401508D60F005923FE /* Sources */ = {
isa = PBXSourcesBuildPhase;
@@ -374,6 +403,14 @@
};
/* End PBXSourcesBuildPhase section */
+/* Begin PBXTargetDependency section */
+ 249ED5DD162D7057000076A1 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ name = CordovaLib;
+ targetProxy = 249ED5DC162D7057000076A1 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
/* Begin PBXVariantGroup section */
24D3BF681508D60F005923FE /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
@@ -422,10 +459,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = (
- armv6,
- "$(ARCHS_STANDARD_32_BIT)",
- );
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = NO;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
@@ -437,11 +471,13 @@
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_THUMB_SUPPORT = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+ ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
@@ -450,19 +486,18 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = (
- armv6,
- "$(ARCHS_STANDARD_32_BIT)",
- );
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = NO;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_THUMB_SUPPORT = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+ ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
@@ -477,11 +512,15 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "FixMyStreet/FixMyStreet-Prefix.pch";
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1,",
- "CORDOVA_FRAMEWORK=1",
+ GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1,";
+ GCC_THUMB_SUPPORT = NO;
+ "HEADER_SEARCH_PATHS[arch=*]" = (
+ "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
+ "\"$(OBJROOT)/UninstalledProducts/include\"",
+ "\"$(BUILT_PRODUCTS_DIR)\"",
);
INFOPLIST_FILE = "FixMyStreet/FixMyStreet-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
OTHER_LDFLAGS = (
"-weak_framework",
UIKit,
@@ -491,6 +530,10 @@
CoreMedia,
"-weak_library",
/usr/lib/libSystem.B.dylib,
+ "-Obj-C",
+ "-all_load",
+ "-weak_framework",
+ CoreFoundation,
);
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
@@ -512,7 +555,14 @@
"NDEBUG=1,",
"CORDOVA_FRAMEWORK=1",
);
+ GCC_THUMB_SUPPORT = NO;
+ "HEADER_SEARCH_PATHS[arch=*]" = (
+ "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
+ "\"$(OBJROOT)/UninstalledProducts/include\"",
+ "\"$(BUILT_PRODUCTS_DIR)\"",
+ );
INFOPLIST_FILE = "FixMyStreet/FixMyStreet-Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
OTHER_LDFLAGS = (
"-weak_framework",
UIKit,
@@ -522,6 +572,10 @@
CoreMedia,
"-weak_library",
/usr/lib/libSystem.B.dylib,
+ "-Obj-C",
+ "-all_load",
+ "-weak_framework",
+ CoreFoundation,
);
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
View
6 ...iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
+ LastUpgradeVersion = "0450"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -22,7 +23,7 @@
</BuildActionEntries>
</BuildAction>
<TestAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
@@ -39,11 +40,12 @@
</MacroExpansion>
</TestAction>
<LaunchAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
View
19 phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h
@@ -19,32 +19,27 @@
//
// AppDelegate.h
-// cordova1.8.0
+// tmp_cordova
//
-// Created by Struan Donald on 08/06/2012.
-// Copyright __MyCompanyName__ 2012. All rights reserved.
+// Created by ___FULLUSERNAME___ on ___DATE___.
+// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
//
#import <UIKit/UIKit.h>
-#ifdef CORDOVA_FRAMEWORK
- #import <Cordova/CDVViewController.h>
-#else
- #import "CDVViewController.h"
-#endif
-
+#import <Cordova/CDVViewController.h>
@interface AppDelegate : NSObject < UIApplicationDelegate > {
}
// invoke string is passed to your app on launch, this is only valid if you
-// edit cordova1.8.0-Info.plist to add a protocol
+// edit tmp_cordova-Info.plist to add a protocol
// a simple tutorial can be found here :
// http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
-@property (nonatomic, retain) IBOutlet UIWindow* window;
-@property (nonatomic, retain) IBOutlet CDVViewController* viewController;
+@property (nonatomic, strong) IBOutlet UIWindow* window;
+@property (nonatomic, strong) IBOutlet CDVViewController* viewController;
@end
View
64 phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m
@@ -19,22 +19,16 @@ Licensed to the Apache Software Foundation (ASF) under one
//
// AppDelegate.m
-// cordova1.8.0
+// tmp_cordova
//
-// Created by Struan Donald on 08/06/2012.
-// Copyright __MyCompanyName__ 2012. All rights reserved.
+// Created by ___FULLUSERNAME___ on ___DATE___.
+// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
//
#import "AppDelegate.h"
#import "MainViewController.h"
-#ifdef CORDOVA_FRAMEWORK
- #import <Cordova/CDVPlugin.h>
- #import <Cordova/CDVURLProtocol.h>
-#else
- #import "CDVPlugin.h"
- #import "CDVURLProtocol.h"
-#endif
+#import <Cordova/CDVPlugin.h>
@implementation AppDelegate
@@ -49,9 +43,8 @@ - (id) init
NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
[cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
- [CDVURLProtocol registerURLProtocol];
-
- return [super init];
+ self = [super init];
+ return self;
}
#pragma UIApplicationDelegate implementation
@@ -66,21 +59,20 @@ - (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(
if (url && [url isKindOfClass:[NSURL class]]) {
invokeString = [url absoluteString];
- NSLog(@"cordova1.8.0 launchOptions = %@", url);
+ NSLog(@"tmp_cordova launchOptions = %@", url);
}
CGRect screenBounds = [[UIScreen mainScreen] bounds];
- self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
+ self.window = [[UIWindow alloc] initWithFrame:screenBounds];
self.window.autoresizesSubviews = YES;
- CGRect viewBounds = [[UIScreen mainScreen] applicationFrame];
-
- self.viewController = [[[MainViewController alloc] init] autorelease];
+ self.viewController = [[MainViewController alloc] init];
self.viewController.useSplashScreen = YES;
self.viewController.wwwFolderName = @"www";
self.viewController.startPage = @"index.html";
self.viewController.invokeString = invokeString;
- self.viewController.view.frame = viewBounds;
+
+ // NOTE: To control the view's frame size, override [self.viewController viewWillAppear:] in your view controller.
// check whether the current orientation is supported: if it is, keep it, rather than forcing a rotation
BOOL forceStartupRotation = YES;
@@ -92,30 +84,34 @@ - (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(
}
if (UIDeviceOrientationIsValidInterfaceOrientation(curDevOrientation)) {
- for (NSNumber *orient in self.viewController.supportedOrientations) {
- if ([orient intValue] == curDevOrientation) {
- forceStartupRotation = NO;
- break;
- }
- }
+ if ([self.viewController supportsOrientation:curDevOrientation]) {
+ forceStartupRotation = NO;
+ }
}
if (forceStartupRotation) {
- NSLog(@"supportedOrientations: %@", self.viewController.supportedOrientations);
- // The first item in the supportedOrientations array is the start orientation (guaranteed to be at least Portrait)
- UIInterfaceOrientation newOrient = [[self.viewController.supportedOrientations objectAtIndex:0] intValue];
+ UIInterfaceOrientation newOrient;
+ if ([self.viewController supportsOrientation:UIInterfaceOrientationPortrait])
+ newOrient = UIInterfaceOrientationPortrait;
+ else if ([self.viewController supportsOrientation:UIInterfaceOrientationLandscapeLeft])
+ newOrient = UIInterfaceOrientationLandscapeLeft;
+ else if ([self.viewController supportsOrientation:UIInterfaceOrientationLandscapeRight])
+ newOrient = UIInterfaceOrientationLandscapeRight;
+ else
+ newOrient = UIInterfaceOrientationPortraitUpsideDown;
+
NSLog(@"AppDelegate forcing status bar to: %d from: %d", newOrient, curDevOrientation);
[[UIApplication sharedApplication] setStatusBarOrientation:newOrient];
}
- [self.window addSubview:self.viewController.view];
+ self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
// this happens while we are running ( in the background, or from within our own app )
-// only valid if cordova1.8.0-Info.plist specifies a protocol to handle
+// only valid if tmp_cordova-Info.plist specifies a protocol to handle
- (BOOL) application:(UIApplication*)application handleOpenURL:(NSURL*)url
{
if (!url) {
@@ -132,9 +128,11 @@ - (BOOL) application:(UIApplication*)application handleOpenURL:(NSURL*)url
return YES;
}
-- (void) dealloc
-{
- [super dealloc];
+- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
+{
+ // IPhone doesn't support upside down by default, while the IPad does. Override to allow all orientations always, and let the root view controller decide whats allowed (the supported orientations mask gets intersected).
+ NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationPortraitUpsideDown);
+ return supportedInterfaceOrientations;
}
@end
View
6 phonegap/iPhone/FixMyStreet/Classes/MainViewController.h
@@ -25,11 +25,7 @@
// Copyright __MyCompanyName__ 2012. All rights reserved.
//
-#ifdef CORDOVA_FRAMEWORK
- #import <Cordova/CDVViewController.h>
-#else
- #import "CDVViewController.h"
-#endif
+#import <Cordova/CDVViewController.h>
@interface MainViewController : CDVViewController
View
4 phonegap/iPhone/FixMyStreet/Cordova.plist
@@ -26,10 +26,12 @@
<string>mapit.mysociety.org</string>
<string>*.tile.openstreetmap.org</string>
<string>*.virtualearth.net</string>
- <string>struan.fixmystreet.com</string>
+ <string>struan.fixmystreet.dev.mysociety.org</string>
</array>
<key>Plugins</key>
<dict>
+ <key>Device</key>
+ <string>CDVDevice</string>
<key>Compass</key>
<string>CDVLocation</string>
<key>Accelerometer</key>
View
12 phonegap/iPhone/FixMyStreet/verify.sh
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-
-if [ ! -d "$PROJECT_DIR/www" ] ; then
- cp -R /Users/Shared/Cordova/Frameworks/Cordova.framework/www "$PROJECT_DIR"
-fi
-# detect www folder reference in project, if missing, print warning
-grep "{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \"<group>\"; };" "$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj"
-rc=$?
-if [ $rc != 0 ] ; then
-echo -e "warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)" 1>&2
-fi
View
1,557 phonegap/www/cordova-2.1.0.js 100644 → 100755
524 additions, 1,033 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit 9631290

Please sign in to comment.
Something went wrong with that request. Please try again.