aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phonegap/iPhone/Default-568h@2x.pngbin0 -> 18594 bytes
-rw-r--r--phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj128
-rw-r--r--phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme6
-rw-r--r--phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h19
-rw-r--r--phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m64
-rw-r--r--phonegap/iPhone/FixMyStreet/Classes/MainViewController.h6
-rw-r--r--phonegap/iPhone/FixMyStreet/Cordova.plist4
-rwxr-xr-xphonegap/iPhone/FixMyStreet/verify.sh12
-rwxr-xr-x[-rw-r--r--]phonegap/www/cordova-2.1.0.js1389
9 files changed, 577 insertions, 1051 deletions
diff --git a/phonegap/iPhone/Default-568h@2x.png b/phonegap/iPhone/Default-568h@2x.png
new file mode 100644
index 000000000..0891b7aab
--- /dev/null
+++ b/phonegap/iPhone/Default-568h@2x.png
Binary files differ
diff --git a/phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj b/phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj
index 9dea27891..9ab180b40 100644
--- a/phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj
+++ b/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,6 +334,12 @@
mainGroup = 24D3BF391508D60E005923FE;
productRefGroup = 24D3BF481508D60F005923FE /* Products */;
projectDirPath = "";
+ projectReferences = (
+ {
+ ProductGroup = 240FE2EA162D6E4D00250E2D /* Products */;
+ ProjectRef = 240FE2E9162D6E4D00250E2D /* CordovaLib.xcodeproj */;
+ },
+ );
projectRoot = "";
targets = (
24D3BF461508D60F005923FE /* FixMyStreet */,
@@ -313,6 +347,16 @@
};
/* 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;
diff --git a/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme b/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme
index 1bd90c562..4d631ea26 100644
--- a/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme
+++ b/phonegap/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>
diff --git a/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h b/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h
index cee4240b1..5c258f148 100644
--- a/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h
+++ b/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
diff --git a/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m b/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m
index ad518dc80..b1c862eee 100644
--- a/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m
+++ b/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m
@@ -19,22 +19,16 @@
//
// 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 @@
NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
[cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
- [CDVURLProtocol registerURLProtocol];
-
- return [super init];
+ self = [super init];
+ return self;
}
#pragma UIApplicationDelegate implementation
@@ -66,21 +59,20 @@
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 @@
}
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 @@
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
diff --git a/phonegap/iPhone/FixMyStreet/Classes/MainViewController.h b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.h
index 3f48936da..c2b68deb8 100644
--- a/phonegap/iPhone/FixMyStreet/Classes/MainViewController.h
+++ b/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
diff --git a/phonegap/iPhone/FixMyStreet/Cordova.plist b/phonegap/iPhone/FixMyStreet/Cordova.plist
index 66c06689d..cc71225d2 100644
--- a/phonegap/iPhone/FixMyStreet/Cordova.plist
+++ b/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>
diff --git a/phonegap/iPhone/FixMyStreet/verify.sh b/phonegap/iPhone/FixMyStreet/verify.sh
deleted file mode 100755
index 0f6f0373c..000000000
--- a/phonegap/iPhone/FixMyStreet/verify.sh
+++ /dev/null
@@ -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 \ No newline at end of file
diff --git a/phonegap/www/cordova-2.1.0.js b/phonegap/www/cordova-2.1.0.js
index 9e7fa8ec2..db81edf6c 100644..100755
--- a/phonegap/www/cordova-2.1.0.js
+++ b/phonegap/www/cordova-2.1.0.js
@@ -1,6 +1,6 @@
// commit 143f5221a6251c9cbccdedc57005c61551b97f12
-// File generated at :: Wed Sep 12 2012 12:51:58 GMT-0700 (PDT)
+// File generated at :: Wed Sep 12 2012 15:26:58 GMT-0700 (PDT)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -870,309 +870,191 @@ module.exports = {
});
-// file: lib/android/exec.js
+// file: lib/ios/exec.js
define("cordova/exec", function(require, exports, module) {
-/**
- * Execute a cordova command. It is up to the native side whether this action
- * is synchronous or asynchronous. The native side can return:
- * Synchronous: PluginResult object as a JSON string
- * Asynchrounous: Empty string ""
- * If async, the native side will cordova.callbackSuccess or cordova.callbackError,
- * depending upon the result of the action.
- *
- * @param {Function} success The success callback
- * @param {Function} fail The fail callback
- * @param {String} service The name of the service to use
- * @param {String} action Action to be run in cordova
- * @param {String[]} [args] Zero or more arguments to pass to the method
- */
+ /**
+ * Creates a gap bridge iframe used to notify the native code about queued
+ * commands.
+ *
+ * @private
+ */
var cordova = require('cordova'),
- callback = require('cordova/plugin/android/callback'),
- polling = require('cordova/plugin/android/polling'),
- jsToNativeBridgeMode,
- nativeToJsBridgeMode,
+ channel = require('cordova/channel'),
+ nativecomm = require('cordova/plugin/ios/nativecomm'),
+ utils = require('cordova/utils'),
jsToNativeModes = {
- PROMPT: 0,
- JS_OBJECT: 1,
- // This mode is currently for benchmarking purposes only. It must be enabled
- // on the native side through the ENABLE_LOCATION_CHANGE_EXEC_MODE
- // constant within CordovaWebViewClient.java before it will work.
- LOCATION_CHANGE: 2
+ IFRAME_NAV: 0,
+ XHR_NO_PAYLOAD: 1,
+ XHR_WITH_PAYLOAD: 2,
+ XHR_OPTIONAL_PAYLOAD: 3
},
- nativeToJsModes = {
- // Polls for messages using the prompt() bridge.
- POLLING: 0,
- // Does an XHR to a local server, which will send back messages. This is
- // broken on ICS when a proxy server is configured.
- HANGING_GET: 1,
- // For LOAD_URL to be viable, it would need to have a work-around for
- // the bug where the soft-keyboard gets dismissed when a message is sent.
- LOAD_URL: 2,
- // For the ONLINE_EVENT to be viable, it would need to intercept all event
- // listeners (both through addEventListener and window.ononline) as well
- // as set the navigator property itself.
- ONLINE_EVENT: 3,
- // Uses reflection to access private APIs of the WebView that can send JS
- // to be executed.
- // Requires Android 3.2.4 or above.
- PRIVATE_API: 4
- };
+ // XHR mode does not work on iOS 4.2, so default to IFRAME_NAV for such devices.
+ // XHR mode's main advantage is working around a bug in -webkit-scroll, which
+ // doesn't exist in 4.X devices anyways.
+ bridgeMode = navigator.userAgent.indexOf(' 4_') == -1 ? jsToNativeModes.XHR_NO_PAYLOAD : jsToNativeModes.IFRAME_NAV,
+ execIframe,
+ execXhr;
+
+function createExecIframe() {
+ var iframe = document.createElement("iframe");
+ iframe.style.display = 'none';
+ document.body.appendChild(iframe);
+ return iframe;
+}
-function androidExec(success, fail, service, action, args) {
- // Set default bridge modes if they have not already been set.
- if (jsToNativeBridgeMode === undefined) {
- androidExec.setJsToNativeBridgeMode(jsToNativeModes.PROMPT);
+function shouldBundleCommandJson() {
+ if (bridgeMode == 2) {
+ return true;
}
- if (nativeToJsBridgeMode === undefined) {
- if (callback.isAvailable()) {
- androidExec.setNativeToJsBridgeMode(nativeToJsModes.HANGING_GET);
- } else {
- androidExec.setNativeToJsBridgeMode(nativeToJsModes.POLLING);
+ if (bridgeMode == 3) {
+ var payloadLength = 0;
+ for (var i = 0; i < cordova.commandQueue.length; ++i) {
+ payloadLength += cordova.commandQueue[i].length;
}
+ // The value here was determined using the benchmark within CordovaLibApp on an iPad 3.
+ return payloadLength < 4500;
}
- try {
- var callbackId = service + cordova.callbackId++,
- argsJson = JSON.stringify(args),
- result;
- if (success || fail) {
- cordova.callbacks[callbackId] = {success:success, fail:fail};
- }
-
- if (jsToNativeBridgeMode == jsToNativeModes.LOCATION_CHANGE) {
- window.location = 'http://cdv_exec/' + service + '#' + action + '#' + callbackId + '#' + argsJson;
- } else if (jsToNativeBridgeMode == jsToNativeModes.JS_OBJECT) {
- // Explicit cast to string is required on Android 2.1 to convert from
- // a Java string to a JS string.
- result = '' + _cordovaExec.exec(service, action, callbackId, argsJson);
- } else {
- result = prompt(argsJson, "gap:"+JSON.stringify([service, action, callbackId, true]));
- }
-
- // If a result was returned
- if (result) {
- var v = JSON.parse(result);
-
- // If status is OK, then return value back to caller
- if (v.status === cordova.callbackStatus.OK) {
-
- // If there is a success callback, then call it now with
- // returned value
- if (success) {
- try {
- success(v.message);
- } catch (e) {
- console.log("Error in success callback: " + callbackId + " = " + e);
- }
-
- // Clear callback if not expecting any more results
- if (!v.keepCallback) {
- delete cordova.callbacks[callbackId];
- }
- }
- return v.message;
- }
-
- // If no result
- else if (v.status === cordova.callbackStatus.NO_RESULT) {
- // Clear callback if not expecting any more results
- if (!v.keepCallback) {
- delete cordova.callbacks[callbackId];
- }
- }
-
- // If error, then display error
- else {
- console.log("Error: Status="+v.status+" Message="+v.message);
-
- // If there is a fail callback, then call it now with returned value
- if (fail) {
- try {
- fail(v.message);
- }
- catch (e1) {
- console.log("Error in error callback: "+callbackId+" = "+e1);
- }
-
- // Clear callback if not expecting any more results
- if (!v.keepCallback) {
- delete cordova.callbacks[callbackId];
- }
- }
- return null;
- }
- }
- } catch (e2) {
- console.log("Error: "+e2);
- }
-}
-
-function onOnLineEvent(e) {
- while (polling.pollOnce());
+ return false;
}
-androidExec.jsToNativeModes = jsToNativeModes;
-androidExec.nativeToJsModes = nativeToJsModes;
-
-androidExec.setJsToNativeBridgeMode = function(mode) {
- if (mode == jsToNativeModes.JS_OBJECT && !window._cordovaExec) {
- console.log('Falling back on PROMPT mode since _cordovaExec is missing.');
- mode = jsToNativeModes.PROMPT;
- }
- jsToNativeBridgeMode = mode;
-};
-
-androidExec.setNativeToJsBridgeMode = function(mode) {
- if (mode == nativeToJsBridgeMode) {
+function iOSExec() {
+ if (!channel.onCordovaReady.fired) {
+ utils.alert("ERROR: Attempting to call cordova.exec()" +
+ " before 'deviceready'. Ignoring.");
return;
}
- if (nativeToJsBridgeMode == nativeToJsModes.POLLING) {
- polling.stop();
- } else if (nativeToJsBridgeMode == nativeToJsModes.HANGING_GET) {
- callback.stop();
- } else if (nativeToJsBridgeMode == nativeToJsModes.ONLINE_EVENT) {
- window.removeEventListener('online', onOnLineEvent, false);
- window.removeEventListener('offline', onOnLineEvent, false);
+
+ var successCallback, failCallback, service, action, actionArgs, splitCommand;
+ var callbackId = null;
+ if (typeof arguments[0] !== "string") {
+ // FORMAT ONE
+ successCallback = arguments[0];
+ failCallback = arguments[1];
+ service = arguments[2];
+ action = arguments[3];
+ actionArgs = arguments[4];
+
+ // Since we need to maintain backwards compatibility, we have to pass
+ // an invalid callbackId even if no callback was provided since plugins
+ // will be expecting it. The Cordova.exec() implementation allocates
+ // an invalid callbackId and passes it even if no callbacks were given.
+ callbackId = 'INVALID';
+ } else {
+ // FORMAT TWO
+ splitCommand = arguments[0].split(".");
+ action = splitCommand.pop();
+ service = splitCommand.join(".");
+ actionArgs = Array.prototype.splice.call(arguments, 1);
+ }
+
+ // Register the callbacks and add the callbackId to the positional
+ // arguments if given.
+ if (successCallback || failCallback) {
+ callbackId = service + cordova.callbackId++;
+ cordova.callbacks[callbackId] =
+ {success:successCallback, fail:failCallback};
+ }
+
+ var command = [callbackId, service, action, actionArgs];
+
+ // Stringify and queue the command. We stringify to command now to
+ // effectively clone the command arguments in case they are mutated before
+ // the command is executed.
+ cordova.commandQueue.push(JSON.stringify(command));
+
+ // If the queue length is 1, then that means it was empty before we queued
+ // the given command, so let the native side know that we have some
+ // commands to execute, unless the queue is currently being flushed, in
+ // which case the command will be picked up without notification.
+ if (cordova.commandQueue.length == 1 && !cordova.commandQueueFlushing) {
+ if (bridgeMode) {
+ execXhr = execXhr || new XMLHttpRequest();
+ // Changeing this to a GET will make the XHR reach the URIProtocol on 4.2.
+ // For some reason it still doesn't work though...
+ execXhr.open('HEAD', "file:///!gap_exec", true);
+ execXhr.setRequestHeader('vc', cordova.iOSVCAddr);
+ if (shouldBundleCommandJson()) {
+ execXhr.setRequestHeader('cmds', nativecomm());
+ }
+ execXhr.send(null);
+ } else {
+ execIframe = execIframe || createExecIframe();
+ execIframe.src = "gap://ready";
+ }
}
+}
- nativeToJsBridgeMode = mode;
- // Tell the native side to switch modes.
- prompt(mode, "gap_bridge_mode:");
+iOSExec.jsToNativeModes = jsToNativeModes;
- if (mode == nativeToJsModes.POLLING) {
- polling.start();
- } else if (mode == nativeToJsModes.HANGING_GET) {
- callback.start();
- } else if (mode == nativeToJsModes.ONLINE_EVENT) {
- window.addEventListener('online', onOnLineEvent, false);
- window.addEventListener('offline', onOnLineEvent, false);
+iOSExec.setJsToNativeBridgeMode = function(mode) {
+ // Remove the iFrame since it may be no longer required, and its existence
+ // can trigger browser bugs.
+ // https://issues.apache.org/jira/browse/CB-593
+ if (execIframe) {
+ execIframe.parentNode.removeChild(execIframe);
+ execIframe = null;
}
+ bridgeMode = mode;
};
-module.exports = androidExec;
+module.exports = iOSExec;
});
-// file: lib/android/platform.js
+// file: lib/ios/platform.js
define("cordova/platform", function(require, exports, module) {
module.exports = {
- id: "android",
+ id: "ios",
initialize:function() {
- var channel = require("cordova/channel"),
- cordova = require('cordova'),
- exec = require('cordova/exec');
-
- // Inject a listener for the backbutton on the document.
- var backButtonChannel = cordova.addDocumentEventHandler('backbutton', {
- onSubscribe:function() {
- // If we just attached the first handler, let native know we need to override the back button.
- if (this.numHandlers === 1) {
- exec(null, null, "App", "overrideBackbutton", [true]);
- }
- },
- onUnsubscribe:function() {
- // If we just detached the last handler, let native know we no longer override the back button.
- if (this.numHandlers === 0) {
- exec(null, null, "App", "overrideBackbutton", [false]);
- }
- }
- });
-
- // Add hardware MENU and SEARCH button handlers
- cordova.addDocumentEventHandler('menubutton');
- cordova.addDocumentEventHandler('searchbutton');
-
- // Figure out if we need to shim-in localStorage and WebSQL
- // support from the native side.
- var storage = require('cordova/plugin/android/storage');
-
- // First patch WebSQL if necessary
- if (typeof window.openDatabase == 'undefined') {
- // Not defined, create an openDatabase function for all to use!
- window.openDatabase = storage.openDatabase;
- } else {
- // Defined, but some Android devices will throw a SECURITY_ERR -
- // so we wrap the whole thing in a try-catch and shim in our own
- // if the device has Android bug 16175.
- var originalOpenDatabase = window.openDatabase;
- window.openDatabase = function(name, version, desc, size) {
- var db = null;
- try {
- db = originalOpenDatabase(name, version, desc, size);
- }
- catch (ex) {
- if (ex.code === 18) {
- db = null;
- } else {
- throw ex;
- }
- }
-
- if (db === null) {
- return storage.openDatabase(name, version, desc, size);
- }
- else {
- return db;
- }
+ // iOS doesn't allow reassigning / overriding navigator.geolocation object.
+ // So clobber its methods here instead :)
+ var geo = require('cordova/plugin/geolocation');
- };
- }
-
- // Patch localStorage if necessary
- if (typeof window.localStorage == 'undefined' || window.localStorage === null) {
- window.localStorage = new storage.CupcakeLocalStorage();
- }
-
- // Let native code know we are all done on the JS side.
- // Native code will then un-hide the WebView.
- channel.join(function() {
- exec(null, null, "App", "show", []);
- }, [channel.onCordovaReady]);
+ navigator.geolocation.getCurrentPosition = geo.getCurrentPosition;
+ navigator.geolocation.watchPosition = geo.watchPosition;
+ navigator.geolocation.clearWatch = geo.clearWatch;
},
objects: {
- cordova: {
- children: {
- JSCallback:{
- path:"cordova/plugin/android/callback"
- },
- JSCallbackPolling:{
- path:"cordova/plugin/android/polling"
- }
- }
- },
- navigator: {
- children: {
- app:{
- path: "cordova/plugin/android/app"
- }
- }
- },
- File: { // exists natively on Android WebView, override
+ File: { // exists natively, override
path: "cordova/plugin/File"
},
- FileReader: { // exists natively on Android WebView, override
+ FileReader: { // exists natively, override
path: "cordova/plugin/FileReader"
},
- FileError: { //exists natively on Android WebView on Android 4.x
- path: "cordova/plugin/FileError"
- },
- MediaError: { // exists natively on Android WebView on Android 4.x
+ MediaError: { // exists natively, override
path: "cordova/plugin/MediaError"
+ },
+ console: {
+ path: 'cordova/plugin/ios/console'
}
},
- merges: {
- device: {
- path: 'cordova/plugin/android/device'
+ merges:{
+ Contact:{
+ path: "cordova/plugin/ios/Contact"
},
- navigator: {
- children: {
- notification: {
- path: 'cordova/plugin/android/notification'
+ Entry:{
+ path: "cordova/plugin/ios/Entry"
+ },
+ FileReader:{
+ path: "cordova/plugin/ios/FileReader"
+ },
+ navigator:{
+ children:{
+ notification:{
+ path:"cordova/plugin/ios/notification"
+ },
+ contacts:{
+ path:"cordova/plugin/ios/contacts"
}
}
}
}
};
+// use the native logger
+var logger = require("cordova/plugin/logger");
+logger.useConsole(false);
+
});
// file: lib/common/plugin/Acceleration.js
@@ -3620,692 +3502,6 @@ module.exports = accelerometer;
});
-// file: lib/android/plugin/android/app.js
-define("cordova/plugin/android/app", function(require, exports, module) {
-var exec = require('cordova/exec');
-
-module.exports = {
- /**
- * Clear the resource cache.
- */
- clearCache:function() {
- exec(null, null, "App", "clearCache", []);
- },
-
- /**
- * Load the url into the webview or into new browser instance.
- *
- * @param url The URL to load
- * @param props Properties that can be passed in to the activity:
- * wait: int => wait msec before loading URL
- * loadingDialog: "Title,Message" => display a native loading dialog
- * loadUrlTimeoutValue: int => time in msec to wait before triggering a timeout error
- * clearHistory: boolean => clear webview history (default=false)
- * openExternal: boolean => open in a new browser (default=false)
- *
- * Example:
- * navigator.app.loadUrl("http://server/myapp/index.html", {wait:2000, loadingDialog:"Wait,Loading App", loadUrlTimeoutValue: 60000});
- */
- loadUrl:function(url, props) {
- exec(null, null, "App", "loadUrl", [url, props]);
- },
-
- /**
- * Cancel loadUrl that is waiting to be loaded.
- */
- cancelLoadUrl:function() {
- exec(null, null, "App", "cancelLoadUrl", []);
- },
-
- /**
- * Clear web history in this web view.
- * Instead of BACK button loading the previous web page, it will exit the app.
- */
- clearHistory:function() {
- exec(null, null, "App", "clearHistory", []);
- },
-
- /**
- * Go to previous page displayed.
- * This is the same as pressing the backbutton on Android device.
- */
- backHistory:function() {
- exec(null, null, "App", "backHistory", []);
- },
-
- /**
- * Override the default behavior of the Android back button.
- * If overridden, when the back button is pressed, the "backKeyDown" JavaScript event will be fired.
- *
- * Note: The user should not have to call this method. Instead, when the user
- * registers for the "backbutton" event, this is automatically done.
- *
- * @param override T=override, F=cancel override
- */
- overrideBackbutton:function(override) {
- exec(null, null, "App", "overrideBackbutton", [override]);
- },
-
- /**
- * Exit and terminate the application.
- */
- exitApp:function() {
- return exec(null, null, "App", "exitApp", []);
- }
-};
-});
-
-// file: lib/android/plugin/android/callback.js
-define("cordova/plugin/android/callback", function(require, exports, module) {
-var port = null,
- token = null,
- xmlhttp;
-
-function startXhr() {
- // cordova/exec depends on this module, so we can't require cordova/exec on the module level.
- var exec = require('cordova/exec'),
- xmlhttp = new XMLHttpRequest();
-
- // Callback function when XMLHttpRequest is ready
- xmlhttp.onreadystatechange=function(){
- if (!xmlhttp) {
- return;
- }
- if (xmlhttp.readyState === 4){
- // If callback has JavaScript statement to execute
- if (xmlhttp.status === 200) {
-
- // Need to url decode the response
- var msg = decodeURIComponent(xmlhttp.responseText);
- setTimeout(function() {
- try {
- var t = eval(msg);
- }
- catch (e) {
- // If we're getting an error here, seeing the message will help in debugging
- console.log("JSCallback: Message from Server: " + msg);
- console.log("JSCallback Error: "+e);
- }
- }, 1);
- setTimeout(startXhr, 1);
- }
-
- // If callback ping (used to keep XHR request from timing out)
- else if (xmlhttp.status === 404) {
- setTimeout(startXhr, 10);
- }
-
- // 0 == Page is unloading.
- // 400 == Bad request.
- // 403 == invalid token.
- // 503 == server stopped.
- else {
- console.log("JSCallback Error: Request failed with status " + xmlhttp.status);
- exec.setNativeToJsBridgeMode(exec.nativeToJsModes.POLLING);
- }
- }
- };
-
- if (port === null) {
- port = prompt("getPort", "gap_callbackServer:");
- }
- if (token === null) {
- token = prompt("getToken", "gap_callbackServer:");
- }
- xmlhttp.open("GET", "http://127.0.0.1:"+port+"/"+token , true);
- xmlhttp.send();
-}
-
-module.exports = {
- start: function() {
- startXhr();
- },
-
- stop: function() {
- if (xmlhttp) {
- var tmp = xmlhttp;
- xmlhttp = null;
- tmp.abort();
- }
- },
-
- isAvailable: function() {
- return ("true" != prompt("usePolling", "gap_callbackServer:"));
- }
-};
-
-
-});
-
-// file: lib/android/plugin/android/device.js
-define("cordova/plugin/android/device", function(require, exports, module) {
-var channel = require('cordova/channel'),
- utils = require('cordova/utils'),
- exec = require('cordova/exec'),
- app = require('cordova/plugin/android/app');
-
-module.exports = {
- /*
- * DEPRECATED
- * This is only for Android.
- *
- * You must explicitly override the back button.
- */
- overrideBackButton:function() {
- console.log("Device.overrideBackButton() is deprecated. Use App.overrideBackbutton(true).");
- app.overrideBackbutton(true);
- },
-
- /*
- * DEPRECATED
- * This is only for Android.
- *
- * This resets the back button to the default behaviour
- */
- resetBackButton:function() {
- console.log("Device.resetBackButton() is deprecated. Use App.overrideBackbutton(false).");
- app.overrideBackbutton(false);
- },
-
- /*
- * DEPRECATED
- * This is only for Android.
- *
- * This terminates the activity!
- */
- exitApp:function() {
- console.log("Device.exitApp() is deprecated. Use App.exitApp().");
- app.exitApp();
- }
-};
-
-});
-
-// file: lib/android/plugin/android/notification.js
-define("cordova/plugin/android/notification", function(require, exports, module) {
-var exec = require('cordova/exec');
-
-/**
- * Provides Android enhanced notification API.
- */
-module.exports = {
- activityStart : function(title, message) {
- // If title and message not specified then mimic Android behavior of
- // using default strings.
- if (typeof title === "undefined" && typeof message == "undefined") {
- title = "Busy";
- message = 'Please wait...';
- }
-
- exec(null, null, 'Notification', 'activityStart', [ title, message ]);
- },
-
- /**
- * Close an activity dialog
- */
- activityStop : function() {
- exec(null, null, 'Notification', 'activityStop', []);
- },
-
- /**
- * Display a progress dialog with progress bar that goes from 0 to 100.
- *
- * @param {String}
- * title Title of the progress dialog.
- * @param {String}
- * message Message to display in the dialog.
- */
- progressStart : function(title, message) {
- exec(null, null, 'Notification', 'progressStart', [ title, message ]);
- },
-
- /**
- * Close the progress dialog.
- */
- progressStop : function() {
- exec(null, null, 'Notification', 'progressStop', []);
- },
-
- /**
- * Set the progress dialog value.
- *
- * @param {Number}
- * value 0-100
- */
- progressValue : function(value) {
- exec(null, null, 'Notification', 'progressValue', [ value ]);
- }
-};
-});
-
-// file: lib/android/plugin/android/polling.js
-define("cordova/plugin/android/polling", function(require, exports, module) {
-var cordova = require('cordova'),
- POLL_INTERVAL = 50,
- enabled = false;
-
-function pollOnce() {
- var msg = prompt("", "gap_poll:");
- if (msg) {
- try {
- eval(""+msg);
- }
- catch (e) {
- console.log("JSCallbackPolling: Message from Server: " + msg);
- console.log("JSCallbackPolling Error: "+e);
- }
- return true;
- }
- return false;
-}
-
-function doPoll() {
- if (!enabled) {
- return;
- }
- var nextDelay = POLL_INTERVAL;
- if (pollOnce()) {
- nextDelay = 0;
- }
- setTimeout(doPoll, nextDelay);
-}
-
-module.exports = {
- start: function() {
- enabled = true;
- setTimeout(doPoll, 1);
- },
- stop: function() {
- enabled = false;
- },
- pollOnce: pollOnce
-};
-
-
-});
-
-// file: lib/android/plugin/android/storage.js
-define("cordova/plugin/android/storage", function(require, exports, module) {
-var utils = require('cordova/utils'),
- exec = require('cordova/exec'),
- channel = require('cordova/channel');
-
-var queryQueue = {};
-
-/**
- * SQL result set object
- * PRIVATE METHOD
- * @constructor
- */
-var DroidDB_Rows = function() {
- this.resultSet = []; // results array
- this.length = 0; // number of rows
-};
-
-/**
- * Get item from SQL result set
- *
- * @param row The row number to return
- * @return The row object
- */
-DroidDB_Rows.prototype.item = function(row) {
- return this.resultSet[row];
-};
-
-/**
- * SQL result set that is returned to user.
- * PRIVATE METHOD
- * @constructor
- */
-var DroidDB_Result = function() {
- this.rows = new DroidDB_Rows();
-};
-
-/**
- * Callback from native code when query is complete.
- * PRIVATE METHOD
- *
- * @param id Query id
- */
-function completeQuery(id, data) {
- var query = queryQueue[id];
- if (query) {
- try {
- delete queryQueue[id];
-
- // Get transaction
- var tx = query.tx;
-
- // If transaction hasn't failed
- // Note: We ignore all query results if previous query
- // in the same transaction failed.
- if (tx && tx.queryList[id]) {
-
- // Save query results
- var r = new DroidDB_Result();
- r.rows.resultSet = data;
- r.rows.length = data.length;
- try {
- if (typeof query.successCallback === 'function') {
- query.successCallback(query.tx, r);
- }
- } catch (ex) {
- console.log("executeSql error calling user success callback: "+ex);
- }
-
- tx.queryComplete(id);
- }
- } catch (e) {
- console.log("executeSql error: "+e);
- }
- }
-}
-
-/**
- * Callback from native code when query fails
- * PRIVATE METHOD
- *
- * @param reason Error message
- * @param id Query id
- */
-function failQuery(reason, id) {
- var query = queryQueue[id];
- if (query) {
- try {
- delete queryQueue[id];
-
- // Get transaction
- var tx = query.tx;
-
- // If transaction hasn't failed
- // Note: We ignore all query results if previous query
- // in the same transaction failed.
- if (tx && tx.queryList[id]) {
- tx.queryList = {};
-
- try {
- if (typeof query.errorCallback === 'function') {
- query.errorCallback(query.tx, reason);
- }
- } catch (ex) {
- console.log("executeSql error calling user error callback: "+ex);
- }
-
- tx.queryFailed(id, reason);
- }
-
- } catch (e) {
- console.log("executeSql error: "+e);
- }
- }
-}
-
-/**
- * SQL query object
- * PRIVATE METHOD
- *
- * @constructor
- * @param tx The transaction object that this query belongs to
- */
-var DroidDB_Query = function(tx) {
-
- // Set the id of the query
- this.id = utils.createUUID();
-
- // Add this query to the queue
- queryQueue[this.id] = this;
-
- // Init result
- this.resultSet = [];
-
- // Set transaction that this query belongs to
- this.tx = tx;
-
- // Add this query to transaction list
- this.tx.queryList[this.id] = this;
-
- // Callbacks
- this.successCallback = null;
- this.errorCallback = null;
-
-};
-
-/**
- * Transaction object
- * PRIVATE METHOD
- * @constructor
- */
-var DroidDB_Tx = function() {
-
- // Set the id of the transaction
- this.id = utils.createUUID();
-
- // Callbacks
- this.successCallback = null;
- this.errorCallback = null;
-
- // Query list
- this.queryList = {};
-};
-
-/**
- * Mark query in transaction as complete.
- * If all queries are complete, call the user's transaction success callback.
- *
- * @param id Query id
- */
-DroidDB_Tx.prototype.queryComplete = function(id) {
- delete this.queryList[id];
-
- // If no more outstanding queries, then fire transaction success
- if (this.successCallback) {
- var count = 0;
- var i;
- for (i in this.queryList) {
- if (this.queryList.hasOwnProperty(i)) {
- count++;
- }
- }
- if (count === 0) {
- try {
- this.successCallback();
- } catch(e) {
- console.log("Transaction error calling user success callback: " + e);
- }
- }
- }
-};
-
-/**
- * Mark query in transaction as failed.
- *
- * @param id Query id
- * @param reason Error message
- */
-DroidDB_Tx.prototype.queryFailed = function(id, reason) {
-
- // The sql queries in this transaction have already been run, since
- // we really don't have a real transaction implemented in native code.
- // However, the user callbacks for the remaining sql queries in transaction
- // will not be called.
- this.queryList = {};
-
- if (this.errorCallback) {
- try {
- this.errorCallback(reason);
- } catch(e) {
- console.log("Transaction error calling user error callback: " + e);
- }
- }
-};
-
-/**
- * Execute SQL statement
- *
- * @param sql SQL statement to execute
- * @param params Statement parameters
- * @param successCallback Success callback
- * @param errorCallback Error callback
- */
-DroidDB_Tx.prototype.executeSql = function(sql, params, successCallback, errorCallback) {
-
- // Init params array
- if (typeof params === 'undefined') {
- params = [];
- }
-
- // Create query and add to queue
- var query = new DroidDB_Query(this);
- queryQueue[query.id] = query;
-
- // Save callbacks
- query.successCallback = successCallback;
- query.errorCallback = errorCallback;
-
- // Call native code
- exec(null, null, "Storage", "executeSql", [sql, params, query.id]);
-};
-
-var DatabaseShell = function() {
-};
-
-/**
- * Start a transaction.
- * Does not support rollback in event of failure.
- *
- * @param process {Function} The transaction function
- * @param successCallback {Function}
- * @param errorCallback {Function}
- */
-DatabaseShell.prototype.transaction = function(process, errorCallback, successCallback) {
- var tx = new DroidDB_Tx();
- tx.successCallback = successCallback;
- tx.errorCallback = errorCallback;
- try {
- process(tx);
- } catch (e) {
- console.log("Transaction error: "+e);
- if (tx.errorCallback) {
- try {
- tx.errorCallback(e);
- } catch (ex) {
- console.log("Transaction error calling user error callback: "+e);
- }
- }
- }
-};
-
-/**
- * Open database
- *
- * @param name Database name
- * @param version Database version
- * @param display_name Database display name
- * @param size Database size in bytes
- * @return Database object
- */
-var DroidDB_openDatabase = function(name, version, display_name, size) {
- exec(null, null, "Storage", "openDatabase", [name, version, display_name, size]);
- var db = new DatabaseShell();
- return db;
-};
-
-/**
- * For browsers with no localStorage we emulate it with SQLite. Follows the w3c api.
- * TODO: Do similar for sessionStorage.
- * @constructor
- */
-var CupcakeLocalStorage = function() {
- channel.waitForInitialization("cupcakeStorage");
-
- try {
-
- this.db = openDatabase('localStorage', '1.0', 'localStorage', 2621440);
- var storage = {};
- this.length = 0;
- function setLength (length) {
- this.length = length;
- localStorage.length = length;
- }
- this.db.transaction(
- function (transaction) {
- var i;
- transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
- transaction.executeSql('SELECT * FROM storage', [], function(tx, result) {
- for(var i = 0; i < result.rows.length; i++) {
- storage[result.rows.item(i).id] = result.rows.item(i).body;
- }
- setLength(result.rows.length);
- channel.initializationComplete("cupcakeStorage");
- });
-
- },
- function (err) {
- utils.alert(err.message);
- }
- );
- this.setItem = function(key, val) {
- if (typeof(storage[key])=='undefined') {
- this.length++;
- }
- storage[key] = val;
- this.db.transaction(
- function (transaction) {
- transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
- transaction.executeSql('REPLACE INTO storage (id, body) values(?,?)', [key,val]);
- }
- );
- };
- this.getItem = function(key) {
- return storage[key];
- };
- this.removeItem = function(key) {
- delete storage[key];
- this.length--;
- this.db.transaction(
- function (transaction) {
- transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
- transaction.executeSql('DELETE FROM storage where id=?', [key]);
- }
- );
- };
- this.clear = function() {
- storage = {};
- this.length = 0;
- this.db.transaction(
- function (transaction) {
- transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
- transaction.executeSql('DELETE FROM storage', []);
- }
- );
- };
- this.key = function(index) {
- var i = 0;
- for (var j in storage) {
- if (i==index) {
- return j;
- } else {
- i++;
- }
- }
- return null;
- };
-
- } catch(e) {
- utils.alert("Database error "+e+".");
- return;
- }
-};
-
-module.exports = {
- openDatabase:DroidDB_openDatabase,
- CupcakeLocalStorage:CupcakeLocalStorage,
- failQuery:failQuery,
- completeQuery:completeQuery
-};
-
-});
-
// file: lib/common/plugin/battery.js
define("cordova/plugin/battery", function(require, exports, module) {
/**
@@ -5098,6 +4294,301 @@ module.exports = geolocation;
});
+// file: lib/ios/plugin/ios/Contact.js
+define("cordova/plugin/ios/Contact", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ ContactError = require('cordova/plugin/ContactError');
+
+/**
+ * Provides iOS Contact.display API.
+ */
+module.exports = {
+ display : function(errorCB, options) {
+ /*
+ * Display a contact using the iOS Contact Picker UI
+ * NOT part of W3C spec so no official documentation
+ *
+ * @param errorCB error callback
+ * @param options object
+ * allowsEditing: boolean AS STRING
+ * "true" to allow editing the contact
+ * "false" (default) display contact
+ */
+
+ if (this.id === null) {
+ if (typeof errorCB === "function") {
+ var errorObj = new ContactError(ContactError.UNKNOWN_ERROR);
+ errorCB(errorObj);
+ }
+ }
+ else {
+ exec(null, errorCB, "Contacts","displayContact", [this.id, options]);
+ }
+ }
+};
+});
+
+// file: lib/ios/plugin/ios/Entry.js
+define("cordova/plugin/ios/Entry", function(require, exports, module) {
+module.exports = {
+ toURL:function() {
+ // TODO: refactor path in a cross-platform way so we can eliminate
+ // these kinds of platform-specific hacks.
+ return "file://localhost" + this.fullPath;
+ },
+ toURI: function() {
+ console.log("DEPRECATED: Update your code to use 'toURL'");
+ return "file://localhost" + this.fullPath;
+ }
+};
+});
+
+// file: lib/ios/plugin/ios/FileReader.js
+define("cordova/plugin/ios/FileReader", function(require, exports, module) {
+var exec = require('cordova/exec'),
+ FileError = require('cordova/plugin/FileError'),
+ FileReader = require('cordova/plugin/FileReader'),
+ ProgressEvent = require('cordova/plugin/ProgressEvent');
+
+module.exports = {
+ readAsText:function(file, encoding) {
+ // Figure out pathing
+ this.fileName = '';
+ if (typeof file.fullPath === 'undefined') {
+ this.fileName = file;
+ } else {
+ this.fileName = file.fullPath;
+ }
+
+ // Already loading something
+ if (this.readyState == FileReader.LOADING) {
+ throw new FileError(FileError.INVALID_STATE_ERR);
+ }
+
+ // LOADING state
+ this.readyState = FileReader.LOADING;
+
+ // If loadstart callback
+ if (typeof this.onloadstart === "function") {
+ this.onloadstart(new ProgressEvent("loadstart", {target:this}));
+ }
+
+ // Default encoding is UTF-8
+ var enc = encoding ? encoding : "UTF-8";
+
+ var me = this;
+
+ // Read file
+ exec(
+ // Success callback
+ function(r) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // Save result
+ me.result = decodeURIComponent(r);
+
+ // If onload callback
+ if (typeof me.onload === "function") {
+ me.onload(new ProgressEvent("load", {target:me}));
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ },
+ // Error callback
+ function(e) {
+ // If DONE (cancelled), then don't do anything
+ if (me.readyState === FileReader.DONE) {
+ return;
+ }
+
+ // DONE state
+ me.readyState = FileReader.DONE;
+
+ // null result
+ me.result = null;
+
+ // Save error
+ me.error = new FileError(e);
+
+ // If onerror callback
+ if (typeof me.onerror === "function") {
+ me.onerror(new ProgressEvent("error", {target:me}));
+ }
+
+ // If onloadend callback
+ if (typeof me.onloadend === "function") {
+ me.onloadend(new ProgressEvent("loadend", {target:me}));
+ }
+ },
+ "File", "readAsText", [this.fileName, enc]);
+ }
+};
+});
+
+// file: lib/ios/plugin/ios/console.js
+define("cordova/plugin/ios/console", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * This class provides access to the debugging console.
+ * @constructor
+ */
+var DebugConsole = function() {
+ this.winConsole = window.console;
+ this.logLevel = DebugConsole.INFO_LEVEL;
+};
+
+// from most verbose, to least verbose
+DebugConsole.ALL_LEVEL = 1; // same as first level
+DebugConsole.INFO_LEVEL = 1;
+DebugConsole.WARN_LEVEL = 2;
+DebugConsole.ERROR_LEVEL = 4;
+DebugConsole.NONE_LEVEL = 8;
+
+DebugConsole.prototype.setLevel = function(level) {
+ this.logLevel = level;
+};
+
+var stringify = function(message) {
+ try {
+ if (typeof message === "object" && JSON && JSON.stringify) {
+ try {
+ return JSON.stringify(message);
+ }
+ catch (e) {
+ return "error JSON.stringify()ing argument: " + e;
+ }
+ } else {
+ return message.toString();
+ }
+ } catch (e) {
+ return e.toString();
+ }
+};
+
+/**
+ * Print a normal log message to the console
+ * @param {Object|String} message Message or object to print to the console
+ */
+DebugConsole.prototype.log = function(message) {
+ if (this.logLevel <= DebugConsole.INFO_LEVEL) {
+ exec(null, null, 'Debug Console', 'log', [ stringify(message), { logLevel: 'INFO' } ]);
+ }
+ else if (this.winConsole && this.winConsole.log) {
+ this.winConsole.log(message);
+ }
+};
+
+/**
+ * Print a warning message to the console
+ * @param {Object|String} message Message or object to print to the console
+ */
+DebugConsole.prototype.warn = function(message) {
+ if (this.logLevel <= DebugConsole.WARN_LEVEL) {
+ exec(null, null, 'Debug Console', 'log', [ stringify(message), { logLevel: 'WARN' } ]);
+ }
+ else if (this.winConsole && this.winConsole.warn) {
+ this.winConsole.warn(message);
+ }
+};
+
+/**
+ * Print an error message to the console
+ * @param {Object|String} message Message or object to print to the console
+ */
+DebugConsole.prototype.error = function(message) {
+ if (this.logLevel <= DebugConsole.ERROR_LEVEL) {
+ exec(null, null, 'Debug Console', 'log', [ stringify(message), { logLevel: 'ERROR' } ]);
+ }
+ else if (this.winConsole && this.winConsole.error){
+ this.winConsole.error(message);
+ }
+};
+
+module.exports = new DebugConsole();
+});
+
+// file: lib/ios/plugin/ios/contacts.js
+define("cordova/plugin/ios/contacts", function(require, exports, module) {
+var exec = require('cordova/exec');
+
+/**
+ * Provides iOS enhanced contacts API.
+ */
+module.exports = {
+ newContactUI : function(successCallback) {
+ /*
+ * Create a contact using the iOS Contact Picker UI
+ * NOT part of W3C spec so no official documentation
+ *
+ * returns: the id of the created contact as param to successCallback
+ */
+ exec(successCallback, null, "Contacts","newContact", []);
+ },
+ chooseContact : function(successCallback, options) {
+ /*
+ * Select a contact using the iOS Contact Picker UI
+ * NOT part of W3C spec so no official documentation
+ *
+ * @param errorCB error callback
+ * @param options object
+ * allowsEditing: boolean AS STRING
+ * "true" to allow editing the contact
+ * "false" (default) display contact
+ * fields: array of fields to return in contact object (see ContactOptions.fields)
+ *
+ * @returns
+ * id of contact selected
+ * ContactObject
+ * if no fields provided contact contains just id information
+ * if fields provided contact object contains information for the specified fields
+ *
+ */
+ var win = function(result) {
+ var fullContact = require('cordova/plugin/contacts').create(result);
+ successCallback(fullContact.id, fullContact);
+ };
+ exec(win, null, "Contacts","chooseContact", [options]);
+ }
+};
+});
+
+// file: lib/ios/plugin/ios/nativecomm.js
+define("cordova/plugin/ios/nativecomm", function(require, exports, module) {
+var cordova = require('cordova');
+
+/**
+ * Called by native code to retrieve all queued commands and clear the queue.
+ */
+module.exports = function() {
+ // Each entry in commandQueue is a JSON string already.
+ var json = '[' + cordova.commandQueue.join(',') + ']';
+ cordova.commandQueue.length = 0;
+ return json;
+};
+
+});
+
+// file: lib/ios/plugin/ios/notification.js
+define("cordova/plugin/ios/notification", function(require, exports, module) {
+var Media = require('cordova/plugin/Media');
+
+module.exports = {
+ beep:function(count) {
+ (new Media('beep.wav')).play();
+ }
+};
+});
+
// file: lib/common/plugin/logger.js
define("cordova/plugin/logger", function(require, exports, module) {
//------------------------------------------------------------------------------