You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2014/04/22 23:44:55 UTC

[01/14] Update to modern layout

Repository: cordova-osx
Updated Branches:
  refs/heads/master 339bbeb51 -> 3222f135f


http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/www/spec/index.js
----------------------------------------------------------------------
diff --git a/templates/project/www/spec/index.js b/templates/project/www/spec/index.js
new file mode 100644
index 0000000..20f8be5
--- /dev/null
+++ b/templates/project/www/spec/index.js
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+describe('app', function() {
+    describe('initialize', function() {
+        it('should bind deviceready', function() {
+            runs(function() {
+                spyOn(app, 'onDeviceReady');
+                app.initialize();
+                helper.trigger(window.document, 'deviceready');
+            });
+
+            waitsFor(function() {
+                return (app.onDeviceReady.calls.length > 0);
+            }, 'onDeviceReady should be called once', 500);
+
+            runs(function() {
+                expect(app.onDeviceReady).toHaveBeenCalled();
+            });
+        });
+    });
+
+    describe('onDeviceReady', function() {
+        it('should report that it fired', function() {
+            spyOn(app, 'receivedEvent');
+            app.onDeviceReady();
+            expect(app.receivedEvent).toHaveBeenCalledWith('deviceready');
+        });
+    });
+
+    describe('receivedEvent', function() {
+        beforeEach(function() {
+            var el = document.getElementById('stage');
+            el.innerHTML = ['<div id="deviceready">',
+                            '    <p class="event listening">Listening</p>',
+                            '    <p class="event received">Received</p>',
+                            '</div>'].join('\n');
+        });
+
+        it('should hide the listening element', function() {
+            app.receivedEvent('deviceready');
+            var displayStyle = helper.getComputedStyle('#deviceready .listening', 'display');
+            expect(displayStyle).toEqual('none');
+        });
+
+        it('should show the received element', function() {
+            app.receivedEvent('deviceready');
+            var displayStyle = helper.getComputedStyle('#deviceready .received', 'display');
+            expect(displayStyle).toEqual('block');
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/scripts/cordova/build.xcconfig
----------------------------------------------------------------------
diff --git a/templates/scripts/cordova/build.xcconfig b/templates/scripts/cordova/build.xcconfig
new file mode 100644
index 0000000..c544a83
--- /dev/null
+++ b/templates/scripts/cordova/build.xcconfig
@@ -0,0 +1,12 @@
+// to list all installed iOS identities, run:
+// security find-identity |  sed -n 's/.*\("[^"]*"\).*/\1/p' | grep 'iPhone'
+
+// generic 'OSX Developer' (no quotes) will match the right Identity with the right Provisioning Profile plus Certificate,
+// based on the app bundle id
+// CODE_SIGN_IDENTITY = OSX Developer
+
+// use local output
+CONFIGURATION_BUILD_DIR=build/
+
+// somehow xcodebuild does not find the cordova headers
+HEADER_SEARCH_PATHS = CordovaLib/build/include
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/scripts/cordova/clean
----------------------------------------------------------------------
diff --git a/templates/scripts/cordova/clean b/templates/scripts/cordova/clean
new file mode 100755
index 0000000..b7c2e27
--- /dev/null
+++ b/templates/scripts/cordova/clean
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+#
+# 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.
+#
+
+#
+# Clean a Cordova/iOS project
+#
+
+set -e
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
+PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
+XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj  )
+PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
+
+source "$CORDOVA_PATH/check_reqs"
+
+cd "$PROJECT_PATH"
+
+xcodebuild -project "$PROJECT_NAME.xcodeproj" -configuration Debug -alltargets clean
+xcodebuild -project "$PROJECT_NAME.xcodeproj" -configuration Release -alltargets clean
+
+rm -rf "build"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/scripts/cordova/defaults.xml
----------------------------------------------------------------------
diff --git a/templates/scripts/cordova/defaults.xml b/templates/scripts/cordova/defaults.xml
new file mode 100644
index 0000000..18cf8a8
--- /dev/null
+++ b/templates/scripts/cordova/defaults.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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">
+
+    <!-- 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="EnableViewportScale" value="false" />
+    <preference name="FadeSplashScreen" value="true" />
+    <preference name="FadeSplashScreenDuration" value=".25" />
+    <preference name="KeyboardDisplayRequiresUserAction" value="true" />
+    <preference name="MediaPlaybackRequiresUserAction" value="false" />
+    <preference name="ShowSplashScreenSpinner" value="true" />
+    <preference name="SuppressesIncrementalRendering" value="false" />
+    <preference name="TopActivityIndicator" value="gray" />
+    <preference name="GapBetweenPages" value="0" />
+    <preference name="PageLength" value="0" />
+    <preference name="PaginationBreakingMode" value="page" /> <!-- page, column -->
+    <preference name="PaginationMode" value="unpaginated" /> <!-- unpaginated, leftToRight, topToBottom, bottomToTop, rightToLeft -->
+
+    <feature name="LocalStorage">
+        <param name="ios-package" value="CDVLocalStorage"/>
+    </feature>
+</widget>

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/scripts/cordova/log
----------------------------------------------------------------------
diff --git a/templates/scripts/cordova/log b/templates/scripts/cordova/log
new file mode 100755
index 0000000..5ca02cc
--- /dev/null
+++ b/templates/scripts/cordova/log
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+#
+# 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.
+#
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
+
+tail -f "$CORDOVA_PATH/console.log"

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/scripts/cordova/run
----------------------------------------------------------------------
diff --git a/templates/scripts/cordova/run b/templates/scripts/cordova/run
new file mode 100755
index 0000000..611d98c
--- /dev/null
+++ b/templates/scripts/cordova/run
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+#
+# 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.
+#
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
+"$CORDOVA_PATH/build" --device || exit $?
+

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/scripts/cordova/version
----------------------------------------------------------------------
diff --git a/templates/scripts/cordova/version b/templates/scripts/cordova/version
new file mode 100755
index 0000000..6a9261c
--- /dev/null
+++ b/templates/scripts/cordova/version
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+#
+# 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.
+#
+
+#
+# Returns the VERSION of CordovaLib used. 
+# Note: it does not work if the --shared option was used to create the project.
+#
+
+set -e
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
+PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
+
+VERSION_FILE_PATH="$PROJECT_PATH/CordovaLib/VERSION"
+VERSION=$(<"$VERSION_FILE_PATH")
+
+if [ -f "$VERSION_FILE_PATH" ]; then
+  echo $VERSION 
+else
+  echo "The file \"$VERSION_FILE_PATH\" does not exist."
+  exit 1
+fi
\ No newline at end of file


[10/14] Update to modern layout

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandDelegateImpl.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandDelegateImpl.m b/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandDelegateImpl.m
deleted file mode 100644
index ed082aa..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandDelegateImpl.m
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVCommandDelegateImpl.h"
-#import "CDVJSON.h"
-#import "CDVCommandQueue.h"
-#import "CDVPluginResult.h"
-#import "CDVViewController.h"
-
-@implementation CDVCommandDelegateImpl
-
-- (id)initWithViewController:(CDVViewController*)viewController
-{
-    self = [super init];
-    if (self != nil) {
-        _viewController = viewController;
-        // TODO:
-        //_commandQueue = _viewController.commandQueue;
-    }
-    return self;
-}
-
-- (NSString*)pathForResource:(NSString*)resourcepath
-{
-    NSBundle* mainBundle = [NSBundle mainBundle];
-    NSMutableArray* directoryParts = [NSMutableArray arrayWithArray:[resourcepath componentsSeparatedByString:@"/"]];
-    NSString* filename = [directoryParts lastObject];
-
-    [directoryParts removeLastObject];
-
-    NSString* directoryPartsJoined = [directoryParts componentsJoinedByString:@"/"];
-    NSString* directoryStr = _viewController.wwwFolderName;
-
-    if ([directoryPartsJoined length] > 0) {
-        directoryStr = [NSString stringWithFormat:@"%@/%@", _viewController.wwwFolderName, [directoryParts componentsJoinedByString:@"/"]];
-    }
-
-    return [mainBundle pathForResource:filename ofType:@"" inDirectory:directoryStr];
-}
-
-- (void)evalJsHelper2:(NSString*)js
-{
-    CDV_EXEC_LOG(@"Exec: evalling: %@", [js substringToIndex:MIN([js length], 160)]);
-    NSString* commandsJSON = [_viewController.webView stringByEvaluatingJavaScriptFromString:js];
-    if ([commandsJSON length] > 0) {
-        CDV_EXEC_LOG(@"Exec: Retrieved new exec messages by chaining.");
-    }
-    
-    // TODO:
-//    [_commandQueue enqueCommandBatch:commandsJSON];
-}
-
-- (void)evalJsHelper:(NSString*)js
-{
-    // Cycle the run-loop before executing the JS.
-    // This works around a bug where sometimes alerts() within callbacks can cause
-    // dead-lock.
-    // If the commandQueue is currently executing, then we know that it is safe to
-    // execute the callback immediately.
-    // Using    (dispatch_get_main_queue()) does *not* fix deadlocks for some reaon,
-    // but performSelectorOnMainThread: does.
-
-    if (![NSThread isMainThread] || !_commandQueue.currentlyExecuting) {
-        [self performSelectorOnMainThread:@selector(evalJsHelper2:) withObject:js waitUntilDone:NO];
-    } else {
-        [self evalJsHelper2:js];
-    }
-}
-
-- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId
-{
-    CDV_EXEC_LOG(@"Exec(%@): Sending result. Status=%@", callbackId, result.status);
-    // This occurs when there is are no win/fail callbacks for the call.
-    if ([@"INVALID" isEqualToString:callbackId]) {
-        return;
-    }
-    int status = [result.status intValue];
-    BOOL keepCallback = [result.keepCallback boolValue];
-    NSString* argumentsAsJSON = [result argumentsAsJSON];
-
-    NSString* js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeCallback('%@',%d,%@,%d)", callbackId, status, argumentsAsJSON, keepCallback];
-
-    [self evalJsHelper:js];
-}
-
-- (void)evalJs:(NSString*)js
-{
-    [self evalJs:js scheduledOnRunLoop:YES];
-}
-
-- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop
-{
-    js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeEvalAndFetch(function(){%@})", js];
-    if (scheduledOnRunLoop) {
-        [self evalJsHelper:js];
-    } else {
-        [self evalJsHelper2:js];
-    }
-}
-
-- (BOOL)execute:(CDVInvokedUrlCommand*)command
-{
-    return [_commandQueue execute:command];
-}
-
-- (id)getCommandInstance:(NSString*)pluginName
-{
-    return [_viewController getCommandInstance:pluginName];
-}
-
-- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className
-{
-    [_viewController registerPlugin:plugin withClassName:className];
-}
-
-- (void)runInBackground:(void (^)())block
-{
-    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block);
-}
-
-- (NSString*)userAgent
-{
-    //return [_viewController userAgent];
-    return nil;
-}
-
-- (BOOL)URLIsWhitelisted:(NSURL*)url
-{
-// TODO:
-//    return ![_viewController.whitelist schemeIsAllowed:[url scheme]] ||
-//           [_viewController.whitelist URLIsAllowed:url];
-    return NO;
-}
-
-- (NSDictionary*)settings
-{
-    return _viewController.settings;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandQueue.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandQueue.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandQueue.h
deleted file mode 100644
index 27c47b5..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandQueue.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- 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.
- */
-
-#import <Foundation/Foundation.h>
-
-@class CDVInvokedUrlCommand;
-@class CDVViewController;
-
-@interface CDVCommandQueue : NSObject
-
-@property (nonatomic, readonly) BOOL currentlyExecuting;
-
-- (id)initWithViewController:(CDVViewController*)viewController;
-- (void)dispose;
-
-- (void)resetRequestId;
-- (void)enqueCommandBatch:(NSString*)batchJSON;
-
-- (void)maybeFetchCommandsFromJs:(NSNumber*)requestId;
-- (void)fetchCommandsFromJs;
-- (void)executePending;
-- (BOOL)execute:(CDVInvokedUrlCommand*)command;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandQueue.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandQueue.m b/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandQueue.m
deleted file mode 100644
index 2ff947b..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandQueue.m
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- 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.
- */
-
-#include <objc/message.h>
-#import "CDV.h"
-#import "CDVCommandQueue.h"
-#import "CDVCommandDelegateImpl.h"
-
-@interface CDVCommandQueue () {
-    NSInteger _lastCommandQueueFlushRequestId;
-#ifdef __MAC_10_8
-    __weak
-#endif
-    NSViewController* _viewController;
-    NSMutableArray* _queue;
-    BOOL _currentlyExecuting;
-}
-@end
-
-@implementation CDVCommandQueue
-
-@synthesize currentlyExecuting = _currentlyExecuting;
-
-- (id)initWithViewController:(NSViewController*)viewController
-{
-    self = [super init];
-    if (self != nil) {
-        _viewController = viewController;
-        _queue = [[NSMutableArray alloc] init];
-    }
-    return self;
-}
-
-- (void)dispose
-{
-    // TODO(agrieve): Make this a zeroing weak ref once we drop support for 4.3.
-    _viewController = nil;
-}
-
-- (void)resetRequestId
-{
-    _lastCommandQueueFlushRequestId = 0;
-}
-
-- (void)enqueCommandBatch:(NSString*)batchJSON
-{
-    if ([batchJSON length] > 0) {
-        [_queue addObject:batchJSON];
-        [self executePending];
-    }
-}
-
-- (void)maybeFetchCommandsFromJs:(NSNumber*)requestId
-{
-    // Use the request ID to determine if we've already flushed for this request.
-    // This is required only because the NSURLProtocol enqueues the same request
-    // multiple times.
-    if ([requestId integerValue] > _lastCommandQueueFlushRequestId) {
-        _lastCommandQueueFlushRequestId = [requestId integerValue];
-        [self fetchCommandsFromJs];
-    }
-}
-
-- (void)fetchCommandsFromJs
-{
-    // TODO:
-//    // Grab all the queued commands from the JS side.
-//    NSString* queuedCommandsJSON = [_viewController.webView stringByEvaluatingJavaScriptFromString:
-//        @"cordova.require('cordova/exec').nativeFetchMessages()"];
-//
-//    [self enqueCommandBatch:queuedCommandsJSON];
-//    if ([queuedCommandsJSON length] > 0) {
-//        CDV_EXEC_LOG(@"Exec: Retrieved new exec messages by request.");
-//    }
-}
-
-- (void)executePending
-{
-    // Make us re-entrant-safe.
-    if (_currentlyExecuting) {
-        return;
-    }
-    @try {
-        _currentlyExecuting = YES;
-
-        for (NSUInteger i = 0; i < [_queue count]; ++i) {
-            // Parse the returned JSON array.
-            NSArray* commandBatch = [[_queue objectAtIndex:i] JSONObject];
-
-            // Iterate over and execute all of the commands.
-            for (NSArray* jsonEntry in commandBatch) {
-                CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonEntry];
-                CDV_EXEC_LOG(@"Exec(%@): Calling %@.%@", command.callbackId, command.className, command.methodName);
-
-                if (![self execute:command]) {
-#ifdef DEBUG
-                        NSString* commandJson = [jsonEntry JSONString];
-                        static NSUInteger maxLogLength = 1024;
-                        NSString* commandString = ([commandJson length] > maxLogLength) ?
-                        [NSString stringWithFormat:@"%@[...]", [commandJson substringToIndex:maxLogLength]] :
-                        commandJson;
-
-                        DLog(@"FAILED pluginJSON = %@", commandString);
-#endif
-                }
-            }
-        }
-
-        [_queue removeAllObjects];
-    } @finally
-    {
-        _currentlyExecuting = NO;
-    }
-}
-
-- (BOOL)execute:(CDVInvokedUrlCommand*)command
-{
-    if ((command.className == nil) || (command.methodName == nil)) {
-        NSLog(@"ERROR: Classname and/or methodName not found for command.");
-        return NO;
-    }
-
-    // Fetch an instance of this class
-    //TODO:
-//    CDVPlugin* obj = [_viewController.commandDelegate getCommandInstance:command.className];
-//
-    CDVPlugin* obj = nil;
-    
-    if (!([obj isKindOfClass:[CDVPlugin class]])) {
-        NSLog(@"ERROR: Plugin '%@' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.", command.className);
-        return NO;
-    }
-    BOOL retVal = YES;
-
-    // Find the proper selector to call.
-    NSString* methodName = [NSString stringWithFormat:@"%@:", command.methodName];
-    SEL normalSelector = NSSelectorFromString(methodName);
-    // Test for the legacy selector first in case they both exist.
-    if ([obj respondsToSelector:normalSelector]) {
-        // [obj performSelector:normalSelector withObject:command];
-        objc_msgSend(obj, normalSelector, command);
-    } else {
-        // There's no method to call, so throw an error.
-        NSLog(@"ERROR: Method '%@' not defined in Plugin '%@'", methodName, command.className);
-        retVal = NO;
-    }
-
-    return retVal;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVConfigParser.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVConfigParser.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVConfigParser.h
deleted file mode 100644
index 2e06c88..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVConfigParser.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- 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.
- */
-
-@interface CDVConfigParser : NSObject <NSXMLParserDelegate>
-{
-    NSString* featureName;
-}
-
-@property (nonatomic, readonly, strong) NSMutableDictionary* pluginsDict;
-@property (nonatomic, readonly, strong) NSMutableDictionary* settings;
-@property (nonatomic, readonly, strong) NSMutableArray* whitelistHosts;
-@property (nonatomic, readonly, strong) NSMutableArray* startupPluginNames;
-@property (nonatomic, readonly, strong) NSString* startPage;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVConfigParser.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVConfigParser.m b/CordovaFramework/CordovaFramework/Classes/Commands/CDVConfigParser.m
deleted file mode 100644
index ba71066..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVConfigParser.m
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVConfigParser.h"
-
-// The block below is to support NSArray/NSDictionary subscripting in 10.7
-#ifdef __MAC_10_7
-
-@interface NSArray(Subscripting)
-- (id)objectAtIndexedSubscript:(NSUInteger)index;
-@end
-
-@interface NSMutableArray(Subscripting)
-- (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)index;
-@end
-
-@interface NSDictionary(Subscripting)
-- (id)objectForKeyedSubscript:(id)key;
-@end
-
-@interface NSMutableDictionary(Subscripting)
-- (void)setObject:(id)obj forKeyedSubscript:(id <NSCopying>)key;
-@end
-
-#endif
-
-@interface CDVConfigParser ()
-
-@property (nonatomic, readwrite, strong) NSMutableDictionary* pluginsDict;
-@property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
-@property (nonatomic, readwrite, strong) NSMutableArray* whitelistHosts;
-@property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames;
-@property (nonatomic, readwrite, strong) NSString* startPage;
-
-@end
-
-@implementation CDVConfigParser
-
-@synthesize pluginsDict, settings, whitelistHosts, startPage, startupPluginNames;
-
-- (id)init
-{
-    self = [super init];
-    if (self != nil) {
-        self.pluginsDict = [[NSMutableDictionary alloc] initWithCapacity:30];
-        self.settings = [[NSMutableDictionary alloc] initWithCapacity:30];
-        self.whitelistHosts = [[NSMutableArray alloc] initWithCapacity:30];
-        self.startupPluginNames = [[NSMutableArray alloc] initWithCapacity:8];
-        featureName = nil;
-    }
-    return self;
-}
-
-- (void)parser:(NSXMLParser*)parser didStartElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName attributes:(NSDictionary*)attributeDict
-{
-    if ([elementName isEqualToString:@"preference"]) {
-        settings[attributeDict[@"name"]] = attributeDict[@"value"];
-    } else if ([elementName isEqualToString:@"feature"]) { // store feature name to use with correct parameter set
-        featureName = [attributeDict[@"name"] lowercaseString];
-    } else if ((featureName != nil) && [elementName isEqualToString:@"param"]) {
-        NSString* paramName = [attributeDict[@"name"] lowercaseString];
-        id value = attributeDict[@"value"];
-        if ([paramName isEqualToString:@"ios-package"]) {
-            pluginsDict[featureName] = value;
-        }
-        BOOL paramIsOnload = ([paramName isEqualToString:@"onload"] && [@"true" isEqualToString : value]);
-        BOOL attribIsOnload = [@"true" isEqualToString : [attributeDict[@"onload"] lowercaseString]];
-        if (paramIsOnload || attribIsOnload) {
-            [self.startupPluginNames addObject:featureName];
-        }
-    } else if ([elementName isEqualToString:@"access"]) {
-        [whitelistHosts addObject:attributeDict[@"origin"]];
-    } else if ([elementName isEqualToString:@"content"]) {
-        self.startPage = attributeDict[@"src"];
-    }
-}
-
-- (void)parser:(NSXMLParser*)parser didEndElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName
-{
-    if ([elementName isEqualToString:@"feature"]) { // no longer handling a feature so release
-        featureName = nil;
-    }
-}
-
-- (void)parser:(NSXMLParser*)parser parseErrorOccurred:(NSError*)parseError
-{
-    NSAssert(NO, @"config.xml parse error line %d col %d", [parser lineNumber], [parser columnNumber]);
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVConnection.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVConnection.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVConnection.h
deleted file mode 100644
index d3e8c5d..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVConnection.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- 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.
- */
-
-#import <Foundation/Foundation.h>
-#import "CDVPlugin.h"
-#import "CDVReachability.h"
-
-@interface CDVConnection : CDVPlugin {
-    NSString* type;
-    NSString* _callbackId;
-
-    CDVReachability* internetReach;
-}
-
-@property (copy) NSString* connectionType;
-@property (strong) CDVReachability* internetReach;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVConnection.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVConnection.m b/CordovaFramework/CordovaFramework/Classes/Commands/CDVConnection.m
deleted file mode 100644
index 61030d3..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVConnection.m
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVConnection.h"
-#import "CDVReachability.h"
-
-@interface CDVConnection (PrivateMethods)
-- (void)updateOnlineStatus;
-- (void)sendPluginResult;
-@end
-
-@implementation CDVConnection
-
-@synthesize connectionType, internetReach;
-
-- (void)getConnectionInfo:(CDVInvokedUrlCommand*)command
-{
-    _callbackId = command.callbackId;
-    [self sendPluginResult];
-}
-
-- (void)sendPluginResult
-{
-    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:self.connectionType];
-
-    [result setKeepCallbackAsBool:YES];
-    [self.commandDelegate sendPluginResult:result callbackId:_callbackId];
-}
-
-- (NSString*)w3cConnectionTypeFor:(CDVReachability*)reachability
-{
-    NetworkStatus networkStatus = [reachability currentReachabilityStatus];
-
-    switch (networkStatus) {
-        case NotReachable:
-            return @"none";
-
-        case ReachableViaWWAN:
-            return @"2g"; // no generic default, so we use the lowest common denominator
-
-        case ReachableViaWiFi:
-            return @"wifi";
-
-        default:
-            return @"unknown";
-    }
-}
-
-- (BOOL)isCellularConnection:(NSString*)theConnectionType
-{
-    return [theConnectionType isEqualToString:@"2g"] ||
-           [theConnectionType isEqualToString:@"3g"] ||
-           [theConnectionType isEqualToString:@"4g"];
-}
-
-- (void)updateReachability:(CDVReachability*)reachability
-{
-    if (reachability) {
-        // check whether the connection type has changed
-        NSString* newConnectionType = [self w3cConnectionTypeFor:reachability];
-        if ([newConnectionType isEqualToString:self.connectionType]) { // the same as before, remove dupes
-            return;
-        } else {
-            self.connectionType = [self w3cConnectionTypeFor:reachability];
-        }
-    }
-    [self sendPluginResult];
-}
-
-- (void)updateConnectionType:(NSNotification*)note
-{
-    CDVReachability* curReach = [note object];
-
-    if ((curReach != nil) && [curReach isKindOfClass:[CDVReachability class]]) {
-        [self updateReachability:curReach];
-    }
-}
-
-- (void)onPause
-{
-    [self.internetReach stopNotifier];
-}
-
-- (void)onResume
-{
-    [self.internetReach startNotifier];
-    [self updateReachability:self.internetReach];
-}
-
-- (CDVPlugin*)initWithWebView:(WebView*)theWebView
-{
-    self = [super initWithWebView:theWebView];
-    if (self) {
-        self.connectionType = @"none";
-        self.internetReach = [CDVReachability reachabilityForInternetConnection];
-        self.connectionType = [self w3cConnectionTypeFor:self.internetReach];
-        [self.internetReach startNotifier];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateConnectionType:)
-                                                     name:kReachabilityChangedNotification object:nil];
-// TODO:
-//        if (&UIApplicationDidEnterBackgroundNotification && &UIApplicationWillEnterForegroundNotification) {
-//            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPause) name:UIApplicationDidEnterBackgroundNotification object:nil];
-//            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume) name:UIApplicationWillEnterForegroundNotification object:nil];
-//        }
-    }
-    return self;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVConsole.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVConsole.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVConsole.h
deleted file mode 100644
index bb44368..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVConsole.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- 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.
- */
-
-#import <Cocoa/Cocoa.h>
-
-
-@interface CDVConsole : NSObject {
-	
-}
-
-- (void) log:(NSString*)message;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVConsole.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVConsole.m b/CordovaFramework/CordovaFramework/Classes/Commands/CDVConsole.m
deleted file mode 100644
index fc4b879..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVConsole.m
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVConsole.h"
-
-
-@implementation CDVConsole
-
-
-- (void) log:(NSString*)message
-{
-    NSLog(@"%@", message);
-}
-
-#pragma mark WebScripting Protocol
-
-/* checks whether a selector is acceptable to be called from JavaScript */
-+ (BOOL) isSelectorExcludedFromWebScript:(SEL)selector
-{
-	BOOL	result = YES;
-	
-	int			i = 0;
-	static SEL	* acceptableList = NULL;
-	SEL			currentSelector;
-	
-	if (acceptableList == NULL && (acceptableList = calloc(256, sizeof(SEL))))	// up to 256 selectors
-	{
-		acceptableList[i++] = @selector(log:);
-	}
-	
-	i = 0;
-	while (result == YES && (currentSelector = acceptableList[i++]))
-	{
-		//checking for exclusions
-		result = !(selector == currentSelector);
-	}
-	
-	return result;
-}
-
-/* helper function so we don't have to have underscores and stuff in js to refer to the right method */
-+ (NSString*) webScriptNameForSelector:(SEL)aSelector
-{
-	id	result = nil;
-	
-	if (aSelector == @selector(log:)) {
-		result = @"log";
-	}
-	
-	return result;
-}
-
-// right now exclude all properties (eg keys)
-+ (BOOL) isKeyExcludedFromWebScript:(const char*)name
-{
-	return YES;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVDebug.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVDebug.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVDebug.h
deleted file mode 100644
index 4a0d9f9..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVDebug.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- 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.
- */
-
-#ifdef DEBUG
-    #define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
-#else
-    #define DLog(...)
-#endif
-#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVDevice.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVDevice.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVDevice.h
deleted file mode 100644
index 81cffb7..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVDevice.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVPlugin.h"
-
-@interface CDVDevice : CDVPlugin
-{}
-
-+ (NSString*)cordovaVersion;
-
-- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVDevice.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVDevice.m b/CordovaFramework/CordovaFramework/Classes/Commands/CDVDevice.m
deleted file mode 100644
index 0636d95..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVDevice.m
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- 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.
- */
-
-#include <sys/types.h>
-#include <sys/sysctl.h>
-
-#import "CDVDevice.h"
-#import "CDVAvailability.h"
-
-#define SYSTEM_VERSION_PLIST    @"/System/Library/CoreServices/SystemVersion.plist"
-
-@implementation CDVDevice
-
-- (NSString*)modelVersion
-{
-    size_t size;
-
-    sysctlbyname("hw.machine", NULL, &size, NULL, 0);
-    char* machine = malloc(size);
-    sysctlbyname("hw.machine", machine, &size, NULL, 0);
-    NSString* modelVersion = [NSString stringWithUTF8String:machine];
-    free(machine);
-
-    return modelVersion;
-}
-
-- (NSString*)uniqueAppInstanceIdentifier
-{
-    NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
-    static NSString* UUID_KEY = @"CDVUUID";
-    
-    NSString* app_uuid = [userDefaults stringForKey:UUID_KEY];
-    
-    if (app_uuid == nil) {
-        CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault);
-        CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef);
-        
-        app_uuid = [NSString stringWithString:(__bridge NSString*)uuidString];
-        [userDefaults setObject:app_uuid forKey:UUID_KEY];
-        [userDefaults synchronize];
-        
-        CFRelease(uuidString);
-        CFRelease(uuidRef);
-    }
-    
-    return app_uuid;
-}
-
-- (NSString*) platform
-{
-    return [[NSDictionary dictionaryWithContentsOfFile:SYSTEM_VERSION_PLIST] objectForKey:@"ProductName"];
-}
-
-- (NSString*)systemVersion
-{
-    return [[NSDictionary dictionaryWithContentsOfFile:SYSTEM_VERSION_PLIST] objectForKey:@"ProductVersion"];
-}
-
-- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command
-{
-    NSDictionary* deviceProperties = [self deviceProperties];
-    CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties];
-
-    [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-- (NSDictionary*)deviceProperties
-{
-    NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4];
-
-    [devProps setObject:[self modelVersion] forKey:@"model"];
-    [devProps setObject:[self platform] forKey:@"platform"];
-    [devProps setObject:[self systemVersion] forKey:@"version"];
-    [devProps setObject:[self uniqueAppInstanceIdentifier] forKey:@"uuid"];
-    [devProps setObject:[[self class] cordovaVersion] forKey:@"cordova"];
-
-    NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps];
-    return devReturn;
-}
-
-+ (NSString*)cordovaVersion
-{
-    return CDV_VERSION;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVInvokedUrlCommand.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVInvokedUrlCommand.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVInvokedUrlCommand.h
deleted file mode 100644
index 5f7e204..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVInvokedUrlCommand.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- 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.
- */
-
-#import <Foundation/Foundation.h>
-
-@interface CDVInvokedUrlCommand : NSObject {
-    NSString* __weak _callbackId;
-    NSString* __weak _className;
-    NSString* __weak _methodName;
-    NSArray* __weak _arguments;
-}
-
-@property (weak, nonatomic, readonly) NSArray* arguments;
-@property (weak, nonatomic, readonly) NSString* callbackId;
-@property (weak, nonatomic, readonly) NSString* className;
-@property (weak, nonatomic, readonly) NSString* methodName;
-
-+ (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry;
-
-- (id)initWithArguments:(NSArray*)arguments
-   callbackId          :(NSString*)callbackId
-    className           :(NSString*)className
-   methodName          :(NSString*)methodName;
-
-- (id)initFromJson:(NSArray*)jsonEntry;
-
-// Returns the argument at the given index.
-// If index >= the number of arguments, returns nil.
-// If the argument at the given index is NSNull, returns nil.
-- (id)argumentAtIndex:(NSUInteger)index;
-// Same as above, but returns defaultValue instead of nil.
-- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue;
-// Same as above, but returns defaultValue instead of nil, and if the argument is not of the expected class, returns defaultValue
-- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVInvokedUrlCommand.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVInvokedUrlCommand.m b/CordovaFramework/CordovaFramework/Classes/Commands/CDVInvokedUrlCommand.m
deleted file mode 100644
index 6c7a856..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVInvokedUrlCommand.m
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVInvokedUrlCommand.h"
-#import "CDVJSON.h"
-#import "NSData+Base64.h"
-
-@implementation CDVInvokedUrlCommand
-
-@synthesize arguments = _arguments;
-@synthesize callbackId = _callbackId;
-@synthesize className = _className;
-@synthesize methodName = _methodName;
-
-+ (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry
-{
-    return [[CDVInvokedUrlCommand alloc] initFromJson:jsonEntry];
-}
-
-- (id)initFromJson:(NSArray*)jsonEntry
-{
-    id tmp = [jsonEntry objectAtIndex:0];
-    NSString* callbackId = tmp == [NSNull null] ? nil : tmp;
-    NSString* className = [jsonEntry objectAtIndex:1];
-    NSString* methodName = [jsonEntry objectAtIndex:2];
-    NSMutableArray* arguments = [jsonEntry objectAtIndex:3];
-
-    return [self initWithArguments:arguments
-                        callbackId:callbackId
-                         className:className
-                        methodName:methodName];
-}
-
-- (id)initWithArguments:(NSArray*)arguments
-             callbackId:(NSString*)callbackId
-              className:(NSString*)className
-             methodName:(NSString*)methodName
-{
-    self = [super init];
-    if (self != nil) {
-        _arguments = arguments;
-        _callbackId = callbackId;
-        _className = className;
-        _methodName = methodName;
-    }
-    [self massageArguments];
-    return self;
-}
-
-- (void)massageArguments
-{
-    NSMutableArray* newArgs = nil;
-
-    for (NSUInteger i = 0, count = [_arguments count]; i < count; ++i) {
-        id arg = [_arguments objectAtIndex:i];
-        if (![arg isKindOfClass:[NSDictionary class]]) {
-            continue;
-        }
-        NSDictionary* dict = arg;
-        NSString* type = [dict objectForKey:@"CDVType"];
-        if (!type || ![type isEqualToString:@"ArrayBuffer"]) {
-            continue;
-        }
-        NSString* data = [dict objectForKey:@"data"];
-        if (!data) {
-            continue;
-        }
-        if (newArgs == nil) {
-            newArgs = [NSMutableArray arrayWithArray:_arguments];
-            _arguments = newArgs;
-        }
-        [newArgs replaceObjectAtIndex:i withObject:[NSData dataFromBase64String:data]];
-    }
-}
-
-- (void)legacyArguments:(NSMutableArray**)legacyArguments andDict:(NSMutableDictionary**)legacyDict
-{
-    NSMutableArray* newArguments = [NSMutableArray arrayWithArray:_arguments];
-
-    for (NSUInteger i = 0; i < [newArguments count]; ++i) {
-        if ([[newArguments objectAtIndex:i] isKindOfClass:[NSDictionary class]]) {
-            if (legacyDict != NULL) {
-                *legacyDict = [newArguments objectAtIndex:i];
-            }
-            [newArguments removeObjectAtIndex:i];
-            break;
-        }
-    }
-
-    // Legacy (two versions back) has no callbackId.
-    if (_callbackId != nil) {
-        [newArguments insertObject:_callbackId atIndex:0];
-    }
-    if (legacyArguments != NULL) {
-        *legacyArguments = newArguments;
-    }
-}
-
-- (id)argumentAtIndex:(NSUInteger)index
-{
-    return [self argumentAtIndex:index withDefault:nil];
-}
-
-- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue
-{
-    return [self argumentAtIndex:index withDefault:defaultValue andClass:nil];
-}
-
-- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass
-{
-    if (index >= [_arguments count]) {
-        return defaultValue;
-    }
-    id ret = [_arguments objectAtIndex:index];
-    if (ret == [NSNull null]) {
-        ret = defaultValue;
-    }
-    if ((aClass != nil) && ![ret isKindOfClass:aClass]) {
-        ret = defaultValue;
-    }
-    return ret;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVJSON.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVJSON.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVJSON.h
deleted file mode 100644
index eaa895e..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVJSON.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- 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.
- */
-
-@interface NSArray (CDVJSONSerializing)
-- (NSString*)JSONString;
-@end
-
-@interface NSDictionary (CDVJSONSerializing)
-- (NSString*)JSONString;
-@end
-
-@interface NSString (CDVJSONSerializing)
-- (id)JSONObject;
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVJSON.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVJSON.m b/CordovaFramework/CordovaFramework/Classes/Commands/CDVJSON.m
deleted file mode 100644
index 78267e5..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVJSON.m
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVJSON.h"
-#import <Foundation/NSJSONSerialization.h>
-
-@implementation NSArray (CDVJSONSerializing)
-
-- (NSString*)JSONString
-{
-    NSError* error = nil;
-    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
-                                                       options:NSJSONWritingPrettyPrinted
-                                                         error:&error];
-
-    if (error != nil) {
-        NSLog(@"NSArray JSONString error: %@", [error localizedDescription]);
-        return nil;
-    } else {
-        return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-    }
-}
-
-@end
-
-@implementation NSDictionary (CDVJSONSerializing)
-
-- (NSString*)JSONString
-{
-    NSError* error = nil;
-    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
-                                                       options:NSJSONWritingPrettyPrinted
-                                                         error:&error];
-
-    if (error != nil) {
-        NSLog(@"NSDictionary JSONString error: %@", [error localizedDescription]);
-        return nil;
-    } else {
-        return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-    }
-}
-
-@end
-
-@implementation NSString (CDVJSONSerializing)
-
-- (id)JSONObject
-{
-    NSError* error = nil;
-    id object = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding]
-                                                options:kNilOptions
-                                                  error:&error];
-
-    if (error != nil) {
-        NSLog(@"NSString JSONObject error: %@", [error localizedDescription]);
-    }
-
-    return object;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVPlugin.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVPlugin.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVPlugin.h
deleted file mode 100644
index f9debe5..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVPlugin.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- 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.
- */
-
-#import <Foundation/Foundation.h>
-#import <WebKit/WebKit.h>
-#import "CDVPluginResult.h"
-#import "CDVCommandDelegate.h"
-#import "CDVViewController.h"
-
-NSString* const CDVPageDidLoadNotification;
-NSString* const CDVPluginHandleOpenURLNotification;
-NSString* const CDVPluginResetNotification;
-NSString* const CDVLocalNotification;
-
-@interface CDVPlugin : NSObject {}
-
-@property (nonatomic, weak) WebView* webView;
-@property (nonatomic, unsafe_unretained) CDVViewController* viewController;
-@property (nonatomic, unsafe_unretained) id <CDVCommandDelegate> commandDelegate;
-
-@property (readonly, assign) BOOL hasPendingOperation;
-
-- (CDVPlugin*)initWithWebView:(WebView*)theWebView;
-- (void)pluginInitialize;
-
-- (void)handleOpenURL:(NSNotification*)notification;
-- (void)onAppTerminate;
-- (void)onMemoryWarning;
-- (void)onReset;
-- (void)dispose;
-
-/*
- // see initWithWebView implementation
- - (void) onPause {}
- - (void) onResume {}
- - (void) onOrientationWillChange {}
- - (void) onOrientationDidChange {}
- - (void)didReceiveLocalNotification:(NSNotification *)notification;
- */
-
-- (id)appDelegate;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVPlugin.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVPlugin.m b/CordovaFramework/CordovaFramework/Classes/Commands/CDVPlugin.m
deleted file mode 100644
index a7d98ed..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVPlugin.m
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVPlugin.h"
-
-NSString* const CDVPageDidLoadNotification = @"CDVPageDidLoadNotification";
-NSString* const CDVPluginHandleOpenURLNotification = @"CDVPluginHandleOpenURLNotification";
-NSString* const CDVPluginResetNotification = @"CDVPluginResetNotification";
-NSString* const CDVLocalNotification = @"CDVLocalNotification";
-
-@interface CDVPlugin ()
-
-@property (readwrite, assign) BOOL hasPendingOperation;
-
-@end
-
-@implementation CDVPlugin
-@synthesize webView, viewController, commandDelegate, hasPendingOperation;
-
-- (CDVPlugin*)initWithWebView:(WebView*)theWebView
-{
-    self = [super init];
-    if (self) {
-//        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppTerminate) name:UIApplicationWillTerminateNotification object:nil];
-//        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onMemoryWarning) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleOpenURL:) name:CDVPluginHandleOpenURLNotification object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onReset) name:CDVPluginResetNotification object:theWebView];
-
-        self.webView = theWebView;
-    }
-    return self;
-}
-
-- (void)pluginInitialize
-{
-    // You can listen to more app notifications, see:
-    // http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006728-CH3-DontLinkElementID_4
-
-    // NOTE: if you want to use these, make sure you uncomment the corresponding notification handler
-
-    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPause) name:UIApplicationDidEnterBackgroundNotification object:nil];
-    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume) name:UIApplicationWillEnterForegroundNotification object:nil];
-    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onOrientationWillChange) name:UIApplicationWillChangeStatusBarOrientationNotification object:nil];
-    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onOrientationDidChange) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
-
-    // Added in 2.3.0
-    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveLocalNotification:) name:CDVLocalNotification object:nil];
-
-    // Added in 2.5.0
-    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad:) name:CDVPageDidLoadNotification object:self.webView];
-}
-
-- (void)dispose
-{
-    viewController = nil;
-    commandDelegate = nil;
-    webView = nil;
-}
-
-/*
-// NOTE: for onPause and onResume, calls into JavaScript must not call or trigger any blocking UI, like alerts
-- (void) onPause {}
-- (void) onResume {}
-- (void) onOrientationWillChange {}
-- (void) onOrientationDidChange {}
-*/
-
-/* NOTE: calls into JavaScript must not call or trigger any blocking UI, like alerts */
-- (void)handleOpenURL:(NSNotification*)notification
-{
-    // override to handle urls sent to your app
-    // register your url schemes in your App-Info.plist
-
-    NSURL* url = [notification object];
-
-    if ([url isKindOfClass:[NSURL class]]) {
-        /* Do your thing! */
-    }
-}
-
-/* NOTE: calls into JavaScript must not call or trigger any blocking UI, like alerts */
-- (void)onAppTerminate
-{
-    // override this if you need to do any cleanup on app exit
-}
-
-- (void)onMemoryWarning
-{
-    // override to remove caches, etc
-}
-
-- (void)onReset
-{
-    // Override to cancel any long-running requests when the WebView navigates or refreshes.
-}
-
-- (void)dealloc
-{
-    [[NSNotificationCenter defaultCenter] removeObserver:self];   // this will remove all notification unless added using addObserverForName:object:queue:usingBlock:
-}
-
-- (id)appDelegate
-{
-    return [[NSApplication sharedApplication] delegate];
-}
-
-// default implementation does nothing, ideally, we are not registered for notification if we aren't going to do anything.
-// - (void)didReceiveLocalNotification:(NSNotification *)notification
-// {
-//    // UILocalNotification* localNotification = [notification object]; // get the payload as a LocalNotification
-// }
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVPluginResult.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVPluginResult.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVPluginResult.h
deleted file mode 100644
index 8393df2..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVPluginResult.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- 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.
- */
-
-#import <Foundation/Foundation.h>
-
-typedef enum {
-    CDVCommandStatus_NO_RESULT = 0,
-    CDVCommandStatus_OK,
-    CDVCommandStatus_CLASS_NOT_FOUND_EXCEPTION,
-    CDVCommandStatus_ILLEGAL_ACCESS_EXCEPTION,
-    CDVCommandStatus_INSTANTIATION_EXCEPTION,
-    CDVCommandStatus_MALFORMED_URL_EXCEPTION,
-    CDVCommandStatus_IO_EXCEPTION,
-    CDVCommandStatus_INVALID_ACTION,
-    CDVCommandStatus_JSON_EXCEPTION,
-    CDVCommandStatus_ERROR
-} CDVCommandStatus;
-
-@interface CDVPluginResult : NSObject {}
-
-@property (nonatomic, strong, readonly) NSNumber* status;
-@property (nonatomic, strong, readonly) id message;
-@property (nonatomic, strong)           NSNumber* keepCallback;
-
-- (CDVPluginResult*)init;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsString:(NSString*)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArray:(NSArray*)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsInt:(int)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDouble:(double)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages;
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode;
-
-+ (void)setVerbose:(BOOL)verbose;
-+ (BOOL)isVerbose;
-
-- (void)setKeepCallbackAsBool:(BOOL)bKeepCallback;
-
-- (NSString*)argumentsAsJSON;
-
-// These methods are used by the legacy plugin return result method
-- (NSString*)toJSONString;
-- (NSString*)toSuccessCallbackString:(NSString*)callbackId;
-- (NSString*)toErrorCallbackString:(NSString*)callbackId;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVPluginResult.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVPluginResult.m b/CordovaFramework/CordovaFramework/Classes/Commands/CDVPluginResult.m
deleted file mode 100644
index a03e005..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVPluginResult.m
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVPluginResult.h"
-#import "CDVJSON.h"
-#import "CDVDebug.h"
-#import "NSData+Base64.h"
-
-@interface CDVPluginResult ()
-
-- (CDVPluginResult*)initWithStatus:(CDVCommandStatus)statusOrdinal message:(id)theMessage;
-
-@end
-
-@implementation CDVPluginResult
-@synthesize status, message, keepCallback;
-
-static NSArray* org_apache_cordova_CommandStatusMsgs;
-
-id messageFromArrayBuffer(NSData* data)
-{
-    return @{
-        @"CDVType" : @"ArrayBuffer",
-        @"data" :[data base64EncodedString]
-    };
-}
-
-id massageMessage(id message)
-{
-    if ([message isKindOfClass:[NSData class]]) {
-        return messageFromArrayBuffer(message);
-    }
-    return message;
-}
-
-id messageFromMultipart(NSArray* theMessages)
-{
-    NSMutableArray* messages = [NSMutableArray arrayWithArray:theMessages];
-
-    for (NSUInteger i = 0; i < messages.count; ++i) {
-        [messages replaceObjectAtIndex:i withObject:massageMessage([messages objectAtIndex:i])];
-    }
-
-    return @{
-        @"CDVType" : @"MultiPart",
-        @"messages" : messages
-    };
-}
-
-+ (void)initialize
-{
-    org_apache_cordova_CommandStatusMsgs = [[NSArray alloc] initWithObjects:@"No result",
-        @"OK",
-        @"Class not found",
-        @"Illegal access",
-        @"Instantiation error",
-        @"Malformed url",
-        @"IO error",
-        @"Invalid action",
-        @"JSON error",
-        @"Error",
-        nil];
-}
-
-- (CDVPluginResult*)init
-{
-    return [self initWithStatus:CDVCommandStatus_NO_RESULT message:nil];
-}
-
-- (CDVPluginResult*)initWithStatus:(CDVCommandStatus)statusOrdinal message:(id)theMessage
-{
-    self = [super init];
-    if (self) {
-        status = [NSNumber numberWithInt:statusOrdinal];
-        message = theMessage;
-        keepCallback = [NSNumber numberWithBool:NO];
-    }
-    return self;
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:[org_apache_cordova_CommandStatusMsgs objectAtIndex:statusOrdinal]];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsString:(NSString*)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:theMessage];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArray:(NSArray*)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:theMessage];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsInt:(int)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithInt:theMessage]];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDouble:(double)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithDouble:theMessage]];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithBool:theMessage]];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:theMessage];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:messageFromArrayBuffer(theMessage)];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages
-{
-    return [[self alloc] initWithStatus:statusOrdinal message:messageFromMultipart(theMessages)];
-}
-
-+ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode
-{
-    NSDictionary* errDict = @{@"code": [NSNumber numberWithInt:errorCode]};
-
-    return [[self alloc] initWithStatus:statusOrdinal message:errDict];
-}
-
-- (void)setKeepCallbackAsBool:(BOOL)bKeepCallback
-{
-    [self setKeepCallback:[NSNumber numberWithBool:bKeepCallback]];
-}
-
-- (NSString*)argumentsAsJSON
-{
-    id arguments = (self.message == nil ? [NSNull null] : self.message);
-    NSArray* argumentsWrappedInArray = [NSArray arrayWithObject:arguments];
-
-    NSString* argumentsJSON = [argumentsWrappedInArray JSONString];
-
-    argumentsJSON = [argumentsJSON substringWithRange:NSMakeRange(1, [argumentsJSON length] - 2)];
-
-    return argumentsJSON;
-}
-
-// These methods are used by the legacy plugin return result method
-- (NSString*)toJSONString
-{
-    NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
-        self.status, @"status",
-        self.message ? self.                                message:[NSNull null], @"message",
-        self.keepCallback, @"keepCallback",
-        nil];
-
-    NSError* error = nil;
-    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:dict
-                                                       options:NSJSONWritingPrettyPrinted
-                                                         error:&error];
-    NSString* resultString = nil;
-
-    if (error != nil) {
-        NSLog(@"toJSONString error: %@", [error localizedDescription]);
-    } else {
-        resultString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
-    }
-
-    if ([[self class] isVerbose]) {
-        NSLog(@"PluginResult:toJSONString - %@", resultString);
-    }
-    return resultString;
-}
-
-- (NSString*)toSuccessCallbackString:(NSString*)callbackId
-{
-    NSString* successCB = [NSString stringWithFormat:@"cordova.callbackSuccess('%@',%@);", callbackId, [self toJSONString]];
-
-    if ([[self class] isVerbose]) {
-        NSLog(@"PluginResult toSuccessCallbackString: %@", successCB);
-    }
-    return successCB;
-}
-
-- (NSString*)toErrorCallbackString:(NSString*)callbackId
-{
-    NSString* errorCB = [NSString stringWithFormat:@"cordova.callbackError('%@',%@);", callbackId, [self toJSONString]];
-
-    if ([[self class] isVerbose]) {
-        NSLog(@"PluginResult toErrorCallbackString: %@", errorCB);
-    }
-    return errorCB;
-}
-
-static BOOL gIsVerbose = NO;
-+ (void)setVerbose:(BOOL)verbose
-{
-    gIsVerbose = verbose;
-}
-
-+ (BOOL)isVerbose
-{
-    return gIsVerbose;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVReachability.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVReachability.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVReachability.h
deleted file mode 100644
index 01a95c3..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVReachability.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-
- File: Reachability.h
- Abstract: Basic demonstration of how to use the SystemConfiguration Reachability APIs.
- Version: 2.2
-
- Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple Inc.
- ("Apple") in consideration of your agreement to the following terms, and your
- use, installation, modification or redistribution of this Apple software
- constitutes acceptance of these terms.  If you do not agree with these terms,
- please do not use, install, modify or redistribute this Apple software.
-
- In consideration of your agreement to abide by the following terms, and subject
- to these terms, Apple grants you a personal, non-exclusive license, under
- Apple's copyrights in this original Apple software (the "Apple Software"), to
- use, reproduce, modify and redistribute the Apple Software, with or without
- modifications, in source and/or binary forms; provided that if you redistribute
- the Apple Software in its entirety and without modifications, you must retain
- this notice and the following text and disclaimers in all such redistributions
- of the Apple Software.
- Neither the name, trademarks, service marks or logos of Apple Inc. may be used
- to endorse or promote products derived from the Apple Software without specific
- prior written permission from Apple.  Except as expressly stated in this notice,
- no other rights or licenses, express or implied, are granted by Apple herein,
- including but not limited to any patent rights that may be infringed by your
- derivative works or by other works in which the Apple Software may be
- incorporated.
-
- The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO
- WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
- WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
- COMBINATION WITH YOUR PRODUCTS.
-
- IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR
- DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF
- CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
- APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Copyright (C) 2010 Apple Inc. All Rights Reserved.
-
-*/
-
-#import <Foundation/Foundation.h>
-#import <SystemConfiguration/SystemConfiguration.h>
-#import <netinet/in.h>
-
-typedef enum {
-    NotReachable = 0,
-    ReachableViaWWAN, // this value has been swapped with ReachableViaWiFi for Cordova backwards compat. reasons
-    ReachableViaWiFi  // this value has been swapped with ReachableViaWWAN for Cordova backwards compat. reasons
-} NetworkStatus;
-#define kReachabilityChangedNotification @"kNetworkReachabilityChangedNotification"
-
-@interface CDVReachability : NSObject
-{
-    BOOL localWiFiRef;
-    SCNetworkReachabilityRef reachabilityRef;
-}
-
-// reachabilityWithHostName- Use to check the reachability of a particular host name.
-+ (CDVReachability*)reachabilityWithHostName:(NSString*)hostName;
-
-// reachabilityWithAddress- Use to check the reachability of a particular IP address.
-+ (CDVReachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress;
-
-// reachabilityForInternetConnection- checks whether the default route is available.
-//  Should be used by applications that do not connect to a particular host
-+ (CDVReachability*)reachabilityForInternetConnection;
-
-// reachabilityForLocalWiFi- checks whether a local wifi connection is available.
-+ (CDVReachability*)reachabilityForLocalWiFi;
-
-// Start listening for reachability notifications on the current run loop
-- (BOOL)startNotifier;
-- (void)stopNotifier;
-
-- (NetworkStatus)currentReachabilityStatus;
-// WWAN may be available, but not active until a connection has been established.
-// WiFi may require a connection for VPN on Demand.
-- (BOOL)connectionRequired;
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVReachability.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVReachability.m b/CordovaFramework/CordovaFramework/Classes/Commands/CDVReachability.m
deleted file mode 100644
index ed1afe7..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVReachability.m
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
-
- File: Reachability.m
- Abstract: Basic demonstration of how to use the SystemConfiguration Reachability APIs.
- Version: 2.2
-
- Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple Inc.
- ("Apple") in consideration of your agreement to the following terms, and your
- use, installation, modification or redistribution of this Apple software
- constitutes acceptance of these terms.  If you do not agree with these terms,
- please do not use, install, modify or redistribute this Apple software.
-
- In consideration of your agreement to abide by the following terms, and subject
- to these terms, Apple grants you a personal, non-exclusive license, under
- Apple's copyrights in this original Apple software (the "Apple Software"), to
- use, reproduce, modify and redistribute the Apple Software, with or without
- modifications, in source and/or binary forms; provided that if you redistribute
- the Apple Software in its entirety and without modifications, you must retain
- this notice and the following text and disclaimers in all such redistributions
- of the Apple Software.
- Neither the name, trademarks, service marks or logos of Apple Inc. may be used
- to endorse or promote products derived from the Apple Software without specific
- prior written permission from Apple.  Except as expressly stated in this notice,
- no other rights or licenses, express or implied, are granted by Apple herein,
- including but not limited to any patent rights that may be infringed by your
- derivative works or by other works in which the Apple Software may be
- incorporated.
-
- The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO
- WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
- WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
- COMBINATION WITH YOUR PRODUCTS.
-
- IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR
- DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF
- CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
- APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Copyright (C) 2010 Apple Inc. All Rights Reserved.
-
-*/
-
-#import <sys/socket.h>
-#import <netinet/in.h>
-#import <netinet6/in6.h>
-#import <arpa/inet.h>
-#import <ifaddrs.h>
-#import <netdb.h>
-
-#import <CoreFoundation/CoreFoundation.h>
-
-#import "CDVReachability.h"
-
-#define kShouldPrintReachabilityFlags 0
-
-static void CDVPrintReachabilityFlags(SCNetworkReachabilityFlags flags, const char* comment)
-{
-#if kShouldPrintReachabilityFlags
-        NSLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n",
-        (flags & kSCNetworkReachabilityFlagsIsWWAN)               ? 'W' : '-',
-        (flags & kSCNetworkReachabilityFlagsReachable)            ? 'R' : '-',
-
-        (flags & kSCNetworkReachabilityFlagsTransientConnection)  ? 't' : '-',
-        (flags & kSCNetworkReachabilityFlagsConnectionRequired)   ? 'c' : '-',
-        (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic)  ? 'C' : '-',
-        (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-',
-        (flags & kSCNetworkReachabilityFlagsConnectionOnDemand)   ? 'D' : '-',
-        (flags & kSCNetworkReachabilityFlagsIsLocalAddress)       ? 'l' : '-',
-        (flags & kSCNetworkReachabilityFlagsIsDirect)             ? 'd' : '-',
-        comment
-        );
-#endif
-}
-
-@implementation CDVReachability
-
-static void CDVReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info)
-{
-#pragma unused (target, flags)
-    //	NSCAssert(info != NULL, @"info was NULL in ReachabilityCallback");
-    //	NSCAssert([(NSObject*) info isKindOfClass: [Reachability class]], @"info was wrong class in ReachabilityCallback");
-
-    // Converted the asserts above to conditionals, with safe return from the function
-    if (info == NULL) {
-        NSLog(@"info was NULL in ReachabilityCallback");
-        return;
-    }
-
-    if (![(__bridge  NSObject*) info isKindOfClass:[CDVReachability class]]) {
-        NSLog(@"info was wrong class in ReachabilityCallback");
-        return;
-    }
-
-    // We're on the main RunLoop, so an NSAutoreleasePool is not necessary, but is added defensively
-    // in case someon uses the Reachability object in a different thread.
-    @autoreleasepool {
-        CDVReachability* noteObject = (__bridge CDVReachability*)info;
-        // Post a notification to notify the client that the network reachability changed.
-        [[NSNotificationCenter defaultCenter] postNotificationName:kReachabilityChangedNotification object:noteObject];
-    }
-}
-
-- (BOOL)startNotifier
-{
-    BOOL retVal = NO;
-    SCNetworkReachabilityContext context = {0, (__bridge void*)(self), NULL, NULL, NULL};
-
-    if (SCNetworkReachabilitySetCallback(reachabilityRef, CDVReachabilityCallback, &context)) {
-        if (SCNetworkReachabilityScheduleWithRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)) {
-            retVal = YES;
-        }
-    }
-    return retVal;
-}
-
-- (void)stopNotifier
-{
-    if (reachabilityRef != NULL) {
-        SCNetworkReachabilityUnscheduleFromRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
-    }
-}
-
-- (void)dealloc
-{
-    [self stopNotifier];
-    if (reachabilityRef != NULL) {
-        CFRelease(reachabilityRef);
-    }
-    
-}
-
-+ (CDVReachability*)reachabilityWithHostName:(NSString*)hostName;
-{
-    CDVReachability* retVal = NULL;
-    SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, [hostName UTF8String]);
-    if (reachability != NULL) {
-        retVal = [[self alloc] init];
-        if (retVal != NULL) {
-            retVal->reachabilityRef = reachability;
-            retVal->localWiFiRef = NO;
-        }
-    }
-    return retVal;
-}
-
-+ (CDVReachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress;
-{
-    SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr*)hostAddress);
-    CDVReachability* retVal = NULL;
-    if (reachability != NULL) {
-        retVal = [[self alloc] init];
-        if (retVal != NULL) {
-            retVal->reachabilityRef = reachability;
-            retVal->localWiFiRef = NO;
-        }
-    }
-    return retVal;
-}
-
-+ (CDVReachability*)reachabilityForInternetConnection;
-{
-    struct sockaddr_in zeroAddress;
-    bzero(&zeroAddress, sizeof(zeroAddress));
-    zeroAddress.sin_len = sizeof(zeroAddress);
-    zeroAddress.sin_family = AF_INET;
-    return [self reachabilityWithAddress:&zeroAddress];
-}
-
-+ (CDVReachability*)reachabilityForLocalWiFi;
-{
-    struct sockaddr_in localWifiAddress;
-    bzero(&localWifiAddress, sizeof(localWifiAddress));
-    localWifiAddress.sin_len = sizeof(localWifiAddress);
-    localWifiAddress.sin_family = AF_INET;
-    // IN_LINKLOCALNETNUM is defined in <netinet/in.h> as 169.254.0.0
-    localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM);
-    CDVReachability* retVal = [self reachabilityWithAddress:&localWifiAddress];
-    if (retVal != NULL) {
-        retVal->localWiFiRef = YES;
-    }
-    return retVal;
-}
-
-#pragma mark Network Flag Handling
-
-- (NetworkStatus)localWiFiStatusForFlags:(SCNetworkReachabilityFlags)flags
-{
-    CDVPrintReachabilityFlags(flags, "localWiFiStatusForFlags");
-
-    BOOL retVal = NotReachable;
-    if ((flags & kSCNetworkReachabilityFlagsReachable) && (flags & kSCNetworkReachabilityFlagsIsDirect)) {
-        retVal = ReachableViaWiFi;
-    }
-    return retVal;
-}
-
-- (NetworkStatus)networkStatusForFlags:(SCNetworkReachabilityFlags)flags
-{
-    CDVPrintReachabilityFlags(flags, "networkStatusForFlags");
-    if ((flags & kSCNetworkReachabilityFlagsReachable) == 0) {
-        // if target host is not reachable
-        return NotReachable;
-    }
-
-    BOOL retVal = NotReachable;
-
-    if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0) {
-        // if target host is reachable and no connection is required
-        //  then we'll assume (for now) that your on Wi-Fi
-        retVal = ReachableViaWiFi;
-    }
-
-    if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand) != 0) ||
-            ((flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0))) {
-        // ... and the connection is on-demand (or on-traffic) if the
-        //     calling application is using the CFSocketStream or higher APIs
-
-        if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0) {
-            // ... and no [user] intervention is needed
-            retVal = ReachableViaWiFi;
-        }
-    }
-
-    if ((flags & kSCNetworkReachabilityFlagsIsDirect) == kSCNetworkReachabilityFlagsIsDirect) {
-        // ... but WWAN connections are OK if the calling application
-        //     is using the CFNetwork (CFSocketStream?) APIs.
-        retVal = ReachableViaWWAN;
-    }
-    return retVal;
-}
-
-- (BOOL)connectionRequired;
-{
-    NSAssert(reachabilityRef != NULL, @"connectionRequired called with NULL reachabilityRef");
-    SCNetworkReachabilityFlags flags;
-    if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) {
-        return flags & kSCNetworkReachabilityFlagsConnectionRequired;
-    }
-    return NO;
-}
-
-- (NetworkStatus)currentReachabilityStatus
-{
-    NSAssert(reachabilityRef != NULL, @"currentNetworkStatus called with NULL reachabilityRef");
-    NetworkStatus retVal = NotReachable;
-    SCNetworkReachabilityFlags flags;
-    if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) {
-        if (localWiFiRef) {
-            retVal = [self localWiFiStatusForFlags:flags];
-        } else {
-            retVal = [self networkStatusForFlags:flags];
-        }
-    }
-    return retVal;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Utils/NSData+Base64.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Utils/NSData+Base64.h b/CordovaFramework/CordovaFramework/Classes/Utils/NSData+Base64.h
deleted file mode 100644
index ffe9c83..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Utils/NSData+Base64.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-//  NSData+Base64.h
-//  base64
-//
-//  Created by Matt Gallagher on 2009/06/03.
-//  Copyright 2009 Matt Gallagher. All rights reserved.
-//
-//  Permission is given to use this source code file, free of charge, in any
-//  project, commercial or otherwise, entirely at your risk, with the condition
-//  that any redistribution (in part or whole) of source code must retain
-//  this copyright and permission notice. Attribution in compiled projects is
-//  appreciated but not required.
-//
-
-#import <Foundation/Foundation.h>
-
-void *CDVNewBase64Decode(
-    const char* inputBuffer,
-    size_t    length,
-    size_t    * outputLength);
-
-char *CDVNewBase64Encode(
-    const void* inputBuffer,
-    size_t    length,
-    bool      separateLines,
-    size_t    * outputLength);
-
-@interface NSData (CDVBase64)
-
-+ (NSData*)dataFromBase64String:(NSString*)aString;
-- (NSString*)base64EncodedString;
-
-@end


[09/14] Update to modern layout

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Utils/NSData+Base64.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Utils/NSData+Base64.m b/CordovaFramework/CordovaFramework/Classes/Utils/NSData+Base64.m
deleted file mode 100644
index 08c801b..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Utils/NSData+Base64.m
+++ /dev/null
@@ -1,286 +0,0 @@
-//
-//  NSData+Base64.m
-//  base64
-//
-//  Created by Matt Gallagher on 2009/06/03.
-//  Copyright 2009 Matt Gallagher. All rights reserved.
-//
-//  Permission is given to use this source code file, free of charge, in any
-//  project, commercial or otherwise, entirely at your risk, with the condition
-//  that any redistribution (in part or whole) of source code must retain
-//  this copyright and permission notice. Attribution in compiled projects is
-//  appreciated but not required.
-//
-
-#import "NSData+Base64.h"
-
-//
-// Mapping from 6 bit pattern to ASCII character.
-//
-static unsigned char cdvbase64EncodeLookup[65] =
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-//
-// Definition for "masked-out" areas of the base64DecodeLookup mapping
-//
-#define xx 65
-
-//
-// Mapping from ASCII character to 6 bit pattern.
-//
-static unsigned char cdvbase64DecodeLookup[256] =
-{
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 62, xx, xx, xx, 63,
-    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, xx, xx, xx, xx, xx, xx,
-    xx, 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  10, 11, 12, 13, 14,
-    15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, xx, xx, xx, xx, xx,
-    xx, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-};
-
-//
-// Fundamental sizes of the binary and base64 encode/decode units in bytes
-//
-#define CDV_BINARY_UNIT_SIZE 3
-#define CDV_BASE64_UNIT_SIZE 4
-
-//
-// NewBase64Decode
-//
-// Decodes the base64 ASCII string in the inputBuffer to a newly malloced
-// output buffer.
-//
-//  inputBuffer - the source ASCII string for the decode
-//	length - the length of the string or -1 (to specify strlen should be used)
-//	outputLength - if not-NULL, on output will contain the decoded length
-//
-// returns the decoded buffer. Must be freed by caller. Length is given by
-//	outputLength.
-//
-void *CDVNewBase64Decode(
-    const char* inputBuffer,
-    size_t    length,
-    size_t    * outputLength)
-{
-    if (length == -1) {
-        length = strlen(inputBuffer);
-    }
-
-    size_t outputBufferSize = (length / CDV_BASE64_UNIT_SIZE) * CDV_BINARY_UNIT_SIZE;
-    unsigned char* outputBuffer = (unsigned char*)malloc(outputBufferSize);
-
-    size_t i = 0;
-    size_t j = 0;
-
-    while (i < length) {
-        //
-        // Accumulate 4 valid characters (ignore everything else)
-        //
-        unsigned char accumulated[CDV_BASE64_UNIT_SIZE];
-        bzero(accumulated, sizeof(unsigned char) * CDV_BASE64_UNIT_SIZE);
-        size_t accumulateIndex = 0;
-
-        while (i < length) {
-            unsigned char decode = cdvbase64DecodeLookup[inputBuffer[i++]];
-            if (decode != xx) {
-                accumulated[accumulateIndex] = decode;
-                accumulateIndex++;
-
-                if (accumulateIndex == CDV_BASE64_UNIT_SIZE) {
-                    break;
-                }
-            }
-        }
-
-        //
-        // Store the 6 bits from each of the 4 characters as 3 bytes
-        //
-        outputBuffer[j] = (accumulated[0] << 2) | (accumulated[1] >> 4);
-        outputBuffer[j + 1] = (accumulated[1] << 4) | (accumulated[2] >> 2);
-        outputBuffer[j + 2] = (accumulated[2] << 6) | accumulated[3];
-        j += accumulateIndex - 1;
-    }
-
-    if (outputLength) {
-        *outputLength = j;
-    }
-    return outputBuffer;
-}
-
-//
-// NewBase64Decode
-//
-// Encodes the arbitrary data in the inputBuffer as base64 into a newly malloced
-// output buffer.
-//
-//  inputBuffer - the source data for the encode
-//	length - the length of the input in bytes
-//  separateLines - if zero, no CR/LF characters will be added. Otherwise
-//		a CR/LF pair will be added every 64 encoded chars.
-//	outputLength - if not-NULL, on output will contain the encoded length
-//		(not including terminating 0 char)
-//
-// returns the encoded buffer. Must be freed by caller. Length is given by
-//	outputLength.
-//
-char *CDVNewBase64Encode(
-    const void* buffer,
-    size_t    length,
-    bool      separateLines,
-    size_t    * outputLength)
-{
-    const unsigned char* inputBuffer = (const unsigned char*)buffer;
-
-#define MAX_NUM_PADDING_CHARS 2
-#define OUTPUT_LINE_LENGTH 64
-#define INPUT_LINE_LENGTH ((OUTPUT_LINE_LENGTH / CDV_BASE64_UNIT_SIZE) * CDV_BINARY_UNIT_SIZE)
-#define CR_LF_SIZE 0
-
-    //
-    // Byte accurate calculation of final buffer size
-    //
-    size_t outputBufferSize =
-        ((length / CDV_BINARY_UNIT_SIZE)
-        + ((length % CDV_BINARY_UNIT_SIZE) ? 1 : 0))
-        * CDV_BASE64_UNIT_SIZE;
-    if (separateLines) {
-        outputBufferSize +=
-            (outputBufferSize / OUTPUT_LINE_LENGTH) * CR_LF_SIZE;
-    }
-
-    //
-    // Include space for a terminating zero
-    //
-    outputBufferSize += 1;
-
-    //
-    // Allocate the output buffer
-    //
-    char* outputBuffer = (char*)malloc(outputBufferSize);
-    if (!outputBuffer) {
-        return NULL;
-    }
-
-    size_t i = 0;
-    size_t j = 0;
-    const size_t lineLength = separateLines ? INPUT_LINE_LENGTH : length;
-    size_t lineEnd = lineLength;
-
-    while (true) {
-        if (lineEnd > length) {
-            lineEnd = length;
-        }
-
-        for (; i + CDV_BINARY_UNIT_SIZE - 1 < lineEnd; i += CDV_BINARY_UNIT_SIZE) {
-            //
-            // Inner loop: turn 48 bytes into 64 base64 characters
-            //
-            outputBuffer[j++] = cdvbase64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
-            outputBuffer[j++] = cdvbase64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
-                | ((inputBuffer[i + 1] & 0xF0) >> 4)];
-            outputBuffer[j++] = cdvbase64EncodeLookup[((inputBuffer[i + 1] & 0x0F) << 2)
-                | ((inputBuffer[i + 2] & 0xC0) >> 6)];
-            outputBuffer[j++] = cdvbase64EncodeLookup[inputBuffer[i + 2] & 0x3F];
-        }
-
-        if (lineEnd == length) {
-            break;
-        }
-
-        //
-        // Add the newline
-        //
-        // outputBuffer[j++] = '\r';
-        // outputBuffer[j++] = '\n';
-        lineEnd += lineLength;
-    }
-
-    if (i + 1 < length) {
-        //
-        // Handle the single '=' case
-        //
-        outputBuffer[j++] = cdvbase64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
-        outputBuffer[j++] = cdvbase64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
-            | ((inputBuffer[i + 1] & 0xF0) >> 4)];
-        outputBuffer[j++] = cdvbase64EncodeLookup[(inputBuffer[i + 1] & 0x0F) << 2];
-        outputBuffer[j++] = '=';
-    } else if (i < length) {
-        //
-        // Handle the double '=' case
-        //
-        outputBuffer[j++] = cdvbase64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
-        outputBuffer[j++] = cdvbase64EncodeLookup[(inputBuffer[i] & 0x03) << 4];
-        outputBuffer[j++] = '=';
-        outputBuffer[j++] = '=';
-    }
-    outputBuffer[j] = 0;
-
-    //
-    // Set the output length and return the buffer
-    //
-    if (outputLength) {
-        *outputLength = j;
-    }
-    return outputBuffer;
-}
-
-@implementation NSData (CDVBase64)
-
-//
-// dataFromBase64String:
-//
-// Creates an NSData object containing the base64 decoded representation of
-// the base64 string 'aString'
-//
-// Parameters:
-//    aString - the base64 string to decode
-//
-// returns the autoreleased NSData representation of the base64 string
-//
-+ (NSData*)dataFromBase64String:(NSString*)aString
-{
-    NSData* data = [aString dataUsingEncoding:NSASCIIStringEncoding];
-    size_t outputLength;
-    void* outputBuffer = CDVNewBase64Decode([data bytes], [data length], &outputLength);
-    NSData* result = [NSData dataWithBytes:outputBuffer length:outputLength];
-
-    free(outputBuffer);
-    return result;
-}
-
-//
-// base64EncodedString
-//
-// Creates an NSString object that contains the base 64 encoding of the
-// receiver's data. Lines are broken at 64 characters long.
-//
-// returns an autoreleased NSString being the base 64 representation of the
-//	receiver.
-//
-- (NSString*)base64EncodedString
-{
-    size_t outputLength = 0;
-    char* outputBuffer =
-        CDVNewBase64Encode([self bytes], [self length], true, &outputLength);
-
-    NSString* result =
-        [[NSString alloc]
-        initWithBytes:outputBuffer
-               length:outputLength
-             encoding:NSASCIIStringEncoding];
-
-    free(outputBuffer);
-    return result;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Utils/NSWindow+Utils.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Utils/NSWindow+Utils.h b/CordovaFramework/CordovaFramework/Classes/Utils/NSWindow+Utils.h
deleted file mode 100644
index 03e4253..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Utils/NSWindow+Utils.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- 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.
- */
-
-
-#import <Cocoa/Cocoa.h>
-
-@interface NSWindow (Utils)
-
-- (float) titleBarHeight;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Utils/NSWindow+Utils.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Utils/NSWindow+Utils.m b/CordovaFramework/CordovaFramework/Classes/Utils/NSWindow+Utils.m
deleted file mode 100644
index a4b5f8c..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Utils/NSWindow+Utils.m
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- 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.
- */
-
-
-#import "NSWindow+Utils.h"
-
-@implementation NSWindow (Utils)
-
-- (float) titleBarHeight
-{
-    NSRect frame = [self frame];
-    NSRect contentRect = [NSWindow contentRectForFrameRect: frame
-												 styleMask: NSTitledWindowMask];
-	
-    return (frame.size.height - contentRect.size.height);
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Utils/ShellUtils.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Utils/ShellUtils.h b/CordovaFramework/CordovaFramework/Classes/Utils/ShellUtils.h
deleted file mode 100644
index ca711c0..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Utils/ShellUtils.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- 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.
- */
-
-
-#import <Foundation/Foundation.h>
-
-@class CDVPlugin;
-@interface ShellUtils : NSObject
-
-+ (BOOL) restartComputer;
-+ (void) quitApp;
-
-+ (NSTask*) shellTask:(NSString*)command;
-+ (NSTask*) executeShellTaskAsync:(NSString*)command usingBlock:(void (^)(NSNotification *))block;
-+ (void) executeShellTaskAsync:(NSString*)command withCallbackId:(NSString*)aCallbackId forPlugin:(CDVPlugin*)plugin;
-+ (NSString*) executeShellTask:(NSString*)command;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Utils/ShellUtils.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Utils/ShellUtils.m b/CordovaFramework/CordovaFramework/Classes/Utils/ShellUtils.m
deleted file mode 100644
index 9dcd55c..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Utils/ShellUtils.m
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- 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.
- */
-
-
-#import "ShellUtils.h"
-#import <Cocoa/Cocoa.h>
-#import <Security/Authorization.h>
-#import "CDVPlugin.h"
-
-@implementation ShellUtils
-
-+ (BOOL) restartComputer
-{
-	NSAppleScript* script = [[NSAppleScript alloc] initWithSource:@"tell application \"System Events\" to restart"];
-	NSDictionary* errorInfo;
-	NSAppleEventDescriptor* descriptor = [script executeAndReturnError:&errorInfo];
-    
-	return (descriptor != nil);
-}
-
-+ (void) quitApp
-{
-    [[NSApplication sharedApplication] terminate:nil];    
-}
-
-+ (NSTask*) shellTask:(NSString*)command
-{
-	NSTask* task = [[NSTask alloc] init];
-    [task setLaunchPath: @"/bin/sh"];
-	[task setStandardInput:[NSFileHandle fileHandleWithNullDevice]];
-    [task setArguments: @[@"-c", command]];
-    
-    return task;
-}
-
-+ (NSString*) executeShellTask:(NSString*)command
-{
-    NSPipe* pipe = [NSPipe pipe];
-    NSFileHandle* fileHandle = [pipe fileHandleForReading];
-    
-	NSTask* task = [[self class] shellTask:command];
-    [task setStandardOutput:pipe];
-	[task setStandardError:pipe];
-    [task launch];
-    
-    NSData* outputData = [fileHandle readDataToEndOfFile];
-    
-	return [[NSString alloc] initWithData:outputData encoding:NSUTF8StringEncoding];
-}
-
-+ (NSTask*) executeShellTaskAsync:(NSString*)command usingBlock:(void (^)(NSNotification *))block
-{
-    NSPipe* pipe = [NSPipe pipe];
-    NSFileHandle* fileHandle = [pipe fileHandleForReading];
-    
-	NSTask* task = [[self class] shellTask:command];
-    [task setStandardOutput:pipe];
-	[task setStandardError:pipe];
-
-    NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
-    NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
-    
-    [center addObserverForName:NSFileHandleReadCompletionNotification object:fileHandle queue:mainQueue usingBlock:block];
-    [center addObserverForName:NSTaskDidTerminateNotification object:task queue:mainQueue usingBlock:block];
-
-    [task launch];
-    [fileHandle readInBackgroundAndNotify];
-    
-    return task;
-}
-
-+ (void) executeShellTaskAsync:(NSString*)command withCallbackId:(NSString*)aCallbackId forPlugin:(CDVPlugin*)plugin
-{
-    __block NSString* callbackId = aCallbackId;
-    __block NSTask* task = nil;
-    
-    task = [[self class] executeShellTaskAsync:command usingBlock:^(NSNotification* notif){
-        if ([notif.object isKindOfClass:[NSFileHandle class]]) {
-            NSFileHandle* fileHandle = (NSFileHandle*)notif.object;
-            NSData* data = [[notif userInfo] valueForKey:NSFileHandleNotificationDataItem];
-            NSString* output = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
-            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:@{ @"data": output }];
-            result.keepCallback = [NSNumber numberWithBool:YES];
-            [plugin.commandDelegate sendPluginResult:result callbackId:callbackId];
-            
-            if (task && [task isRunning]) {
-                [fileHandle readInBackgroundAndNotify];
-            }
-            
-        } else if ([notif.object isKindOfClass:[NSTask class]]) {
-            int status = [task terminationStatus];
-            task = nil;
-            
-            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
-                                       messageAsDictionary:@{ @"resultcode" :[NSNumber numberWithInt:status] }];
-            result.keepCallback = [NSNumber numberWithBool:NO];
-            [plugin.commandDelegate sendPluginResult:result callbackId:callbackId];
-        }
-    }];
-}
-
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/CordovaFramework-Info.plist
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/CordovaFramework-Info.plist b/CordovaFramework/CordovaFramework/CordovaFramework-Info.plist
deleted file mode 100644
index 384517e..0000000
--- a/CordovaFramework/CordovaFramework/CordovaFramework-Info.plist
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string>org.apache.${PRODUCT_NAME:rfc1034identifier}</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundlePackageType</key>
-	<string>FMWK</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1</string>
-	<key>NSHumanReadableCopyright</key>
-	<string>Copyright © 2013 Apache Foundation. All rights reserved.</string>
-	<key>NSPrincipalClass</key>
-	<string></string>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/CordovaFramework-Prefix.pch
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/CordovaFramework-Prefix.pch b/CordovaFramework/CordovaFramework/CordovaFramework-Prefix.pch
deleted file mode 100644
index 6037546..0000000
--- a/CordovaFramework/CordovaFramework/CordovaFramework-Prefix.pch
+++ /dev/null
@@ -1,7 +0,0 @@
-//
-// Prefix header for all source files of the 'CordovaFramework' target in the 'CordovaFramework' project
-//
-
-#ifdef __OBJC__
-    #import <Cocoa/Cocoa.h>
-#endif

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/en.lproj/InfoPlist.strings
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/en.lproj/InfoPlist.strings b/CordovaFramework/CordovaFramework/en.lproj/InfoPlist.strings
deleted file mode 100644
index 477b28f..0000000
--- a/CordovaFramework/CordovaFramework/en.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Localized versions of Info.plist keys */
-

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFrameworkTests/CordovaFrameworkTests-Info.plist
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFrameworkTests/CordovaFrameworkTests-Info.plist b/CordovaFramework/CordovaFrameworkTests/CordovaFrameworkTests-Info.plist
deleted file mode 100644
index b96525e..0000000
--- a/CordovaFramework/CordovaFrameworkTests/CordovaFrameworkTests-Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>en</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.apache.${PRODUCT_NAME:rfc1034identifier}</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>BNDL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1</string>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFrameworkTests/CordovaFrameworkTests.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFrameworkTests/CordovaFrameworkTests.h b/CordovaFramework/CordovaFrameworkTests/CordovaFrameworkTests.h
deleted file mode 100644
index ab92f08..0000000
--- a/CordovaFramework/CordovaFrameworkTests/CordovaFrameworkTests.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- 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.
- */
-
-#import <SenTestingKit/SenTestingKit.h>
-
-@interface CordovaFrameworkTests : SenTestCase
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFrameworkTests/CordovaFrameworkTests.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFrameworkTests/CordovaFrameworkTests.m b/CordovaFramework/CordovaFrameworkTests/CordovaFrameworkTests.m
deleted file mode 100644
index 7de6f25..0000000
--- a/CordovaFramework/CordovaFrameworkTests/CordovaFrameworkTests.m
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- 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.
- */
-
-#import "CordovaFrameworkTests.h"
-
-@implementation CordovaFrameworkTests
-
-- (void)setUp
-{
-    [super setUp];
-    
-    // Set-up code here.
-}
-
-- (void)tearDown
-{
-    // Tear-down code here.
-    
-    [super tearDown];
-}
-
-- (void)testExample
-{
-    STFail(@"Unit tests are not implemented yet in CordovaFrameworkTests");
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFrameworkTests/en.lproj/InfoPlist.strings
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFrameworkTests/en.lproj/InfoPlist.strings b/CordovaFramework/CordovaFrameworkTests/en.lproj/InfoPlist.strings
deleted file mode 100644
index 0d6a4be..0000000
--- a/CordovaFramework/CordovaFrameworkTests/en.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,19 +0,0 @@
- /*
- 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.
- */
-

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/VERSION
----------------------------------------------------------------------
diff --git a/CordovaFramework/VERSION b/CordovaFramework/VERSION
deleted file mode 100644
index 38f8e88..0000000
--- a/CordovaFramework/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-dev

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/cordova.js
----------------------------------------------------------------------
diff --git a/CordovaFramework/cordova.js b/CordovaFramework/cordova.js
deleted file mode 100644
index b323018..0000000
--- a/CordovaFramework/cordova.js
+++ /dev/null
@@ -1,1501 +0,0 @@
-// Platform: osx
-// 3.0.0rc1-0-g525e76b
-/*
- 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.
-*/
-;(function() {
-var CORDOVA_JS_BUILD_LABEL = '3.0.0rc1-0-g525e76b';
-// file: lib/scripts/require.js
-
-var require,
-    define;
-
-(function () {
-    var modules = {},
-    // Stack of moduleIds currently being built.
-        requireStack = [],
-    // Map of module ID -> index into requireStack of modules currently being built.
-        inProgressModules = {},
-        SEPERATOR = ".";
-
-
-
-    function build(module) {
-        var factory = module.factory,
-            localRequire = function (id) {
-                var resultantId = id;
-                //Its a relative path, so lop off the last portion and add the id (minus "./")
-                if (id.charAt(0) === ".") {
-                    resultantId = module.id.slice(0, module.id.lastIndexOf(SEPERATOR)) + SEPERATOR + id.slice(2);
-                }
-                return require(resultantId);
-            };
-        module.exports = {};
-        delete module.factory;
-        factory(localRequire, module.exports, module);
-        return module.exports;
-    }
-
-    require = function (id) {
-        if (!modules[id]) {
-            throw "module " + id + " not found";
-        } else if (id in inProgressModules) {
-            var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;
-            throw "Cycle in require graph: " + cycle;
-        }
-        if (modules[id].factory) {
-            try {
-                inProgressModules[id] = requireStack.length;
-                requireStack.push(id);
-                return build(modules[id]);
-            } finally {
-                delete inProgressModules[id];
-                requireStack.pop();
-            }
-        }
-        return modules[id].exports;
-    };
-
-    define = function (id, factory) {
-        if (modules[id]) {
-            throw "module " + id + " already defined";
-        }
-
-        modules[id] = {
-            id: id,
-            factory: factory
-        };
-    };
-
-    define.remove = function (id) {
-        delete modules[id];
-    };
-
-    define.moduleMap = modules;
-})();
-
-//Export for use in node
-if (typeof module === "object" && typeof require === "function") {
-    module.exports.require = require;
-    module.exports.define = define;
-}
-
-// file: lib/cordova.js
-define("cordova", function(require, exports, module) {
-
-
-var channel = require('cordova/channel');
-
-/**
- * Listen for DOMContentLoaded and notify our channel subscribers.
- */
-document.addEventListener('DOMContentLoaded', function() {
-    channel.onDOMContentLoaded.fire();
-}, false);
-if (document.readyState == 'complete' || document.readyState == 'interactive') {
-    channel.onDOMContentLoaded.fire();
-}
-
-/**
- * Intercept calls to addEventListener + removeEventListener and handle deviceready,
- * resume, and pause events.
- */
-var m_document_addEventListener = document.addEventListener;
-var m_document_removeEventListener = document.removeEventListener;
-var m_window_addEventListener = window.addEventListener;
-var m_window_removeEventListener = window.removeEventListener;
-
-/**
- * Houses custom event handlers to intercept on document + window event listeners.
- */
-var documentEventHandlers = {},
-    windowEventHandlers = {};
-
-document.addEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    if (typeof documentEventHandlers[e] != 'undefined') {
-        documentEventHandlers[e].subscribe(handler);
-    } else {
-        m_document_addEventListener.call(document, evt, handler, capture);
-    }
-};
-
-window.addEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    if (typeof windowEventHandlers[e] != 'undefined') {
-        windowEventHandlers[e].subscribe(handler);
-    } else {
-        m_window_addEventListener.call(window, evt, handler, capture);
-    }
-};
-
-document.removeEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    // If unsubscribing from an event that is handled by a plugin
-    if (typeof documentEventHandlers[e] != "undefined") {
-        documentEventHandlers[e].unsubscribe(handler);
-    } else {
-        m_document_removeEventListener.call(document, evt, handler, capture);
-    }
-};
-
-window.removeEventListener = function(evt, handler, capture) {
-    var e = evt.toLowerCase();
-    // If unsubscribing from an event that is handled by a plugin
-    if (typeof windowEventHandlers[e] != "undefined") {
-        windowEventHandlers[e].unsubscribe(handler);
-    } else {
-        m_window_removeEventListener.call(window, evt, handler, capture);
-    }
-};
-
-function createEvent(type, data) {
-    var event = document.createEvent('Events');
-    event.initEvent(type, false, false);
-    if (data) {
-        for (var i in data) {
-            if (data.hasOwnProperty(i)) {
-                event[i] = data[i];
-            }
-        }
-    }
-    return event;
-}
-
-if(typeof window.console === "undefined") {
-    window.console = {
-        log:function(){}
-    };
-}
-// there are places in the framework where we call `warn` also, so we should make sure it exists
-if(typeof window.console.warn === "undefined") {
-    window.console.warn = function(msg) {
-        this.log("warn: " + msg);
-    }
-}
-
-var cordova = {
-    define:define,
-    require:require,
-    /**
-     * Methods to add/remove your own addEventListener hijacking on document + window.
-     */
-    addWindowEventHandler:function(event) {
-        return (windowEventHandlers[event] = channel.create(event));
-    },
-    addStickyDocumentEventHandler:function(event) {
-        return (documentEventHandlers[event] = channel.createSticky(event));
-    },
-    addDocumentEventHandler:function(event) {
-        return (documentEventHandlers[event] = channel.create(event));
-    },
-    removeWindowEventHandler:function(event) {
-        delete windowEventHandlers[event];
-    },
-    removeDocumentEventHandler:function(event) {
-        delete documentEventHandlers[event];
-    },
-    /**
-     * Retrieve original event handlers that were replaced by Cordova
-     *
-     * @return object
-     */
-    getOriginalHandlers: function() {
-        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
-        'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
-    },
-    /**
-     * Method to fire event from native code
-     * bNoDetach is required for events which cause an exception which needs to be caught in native code
-     */
-    fireDocumentEvent: function(type, data, bNoDetach) {
-        var evt = createEvent(type, data);
-        if (typeof documentEventHandlers[type] != 'undefined') {
-            if( bNoDetach ) {
-              documentEventHandlers[type].fire(evt);
-            }
-            else {
-              setTimeout(function() {
-                  // Fire deviceready on listeners that were registered before cordova.js was loaded.
-                  if (type == 'deviceready') {
-                      document.dispatchEvent(evt);
-                  }
-                  documentEventHandlers[type].fire(evt);
-              }, 0);
-            }
-        } else {
-            document.dispatchEvent(evt);
-        }
-    },
-    fireWindowEvent: function(type, data) {
-        var evt = createEvent(type,data);
-        if (typeof windowEventHandlers[type] != 'undefined') {
-            setTimeout(function() {
-                windowEventHandlers[type].fire(evt);
-            }, 0);
-        } else {
-            window.dispatchEvent(evt);
-        }
-    },
-
-    /**
-     * Plugin callback mechanism.
-     */
-    // Randomize the starting callbackId to avoid collisions after refreshing or navigating.
-    // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.
-    callbackId: Math.floor(Math.random() * 2000000000),
-    callbacks:  {},
-    callbackStatus: {
-        NO_RESULT: 0,
-        OK: 1,
-        CLASS_NOT_FOUND_EXCEPTION: 2,
-        ILLEGAL_ACCESS_EXCEPTION: 3,
-        INSTANTIATION_EXCEPTION: 4,
-        MALFORMED_URL_EXCEPTION: 5,
-        IO_EXCEPTION: 6,
-        INVALID_ACTION: 7,
-        JSON_EXCEPTION: 8,
-        ERROR: 9
-    },
-
-    /**
-     * Called by native code when returning successful result from an action.
-     */
-    callbackSuccess: function(callbackId, args) {
-        try {
-            cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
-        } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
-        }
-    },
-
-    /**
-     * Called by native code when returning error result from an action.
-     */
-    callbackError: function(callbackId, args) {
-        // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
-        // Derive success from status.
-        try {
-            cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
-        } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
-        }
-    },
-
-    /**
-     * Called by native code when returning the result from an action.
-     */
-    callbackFromNative: function(callbackId, success, status, args, keepCallback) {
-        var callback = cordova.callbacks[callbackId];
-        if (callback) {
-            if (success && status == cordova.callbackStatus.OK) {
-                callback.success && callback.success.apply(null, args);
-            } else if (!success) {
-                callback.fail && callback.fail.apply(null, args);
-            }
-
-            // Clear callback if not expecting any more results
-            if (!keepCallback) {
-                delete cordova.callbacks[callbackId];
-            }
-        }
-    },
-    addConstructor: function(func) {
-        channel.onCordovaReady.subscribe(function() {
-            try {
-                func();
-            } catch(e) {
-                console.log("Failed to run constructor: " + e);
-            }
-        });
-    }
-};
-
-// Register pause, resume and deviceready channels as events on document.
-channel.onPause = cordova.addDocumentEventHandler('pause');
-channel.onResume = cordova.addDocumentEventHandler('resume');
-channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
-
-module.exports = cordova;
-
-});
-
-// file: lib/common/argscheck.js
-define("cordova/argscheck", function(require, exports, module) {
-
-var exec = require('cordova/exec');
-var utils = require('cordova/utils');
-
-var moduleExports = module.exports;
-
-var typeMap = {
-    'A': 'Array',
-    'D': 'Date',
-    'N': 'Number',
-    'S': 'String',
-    'F': 'Function',
-    'O': 'Object'
-};
-
-function extractParamName(callee, argIndex) {
-  return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex];
-}
-
-function checkArgs(spec, functionName, args, opt_callee) {
-    if (!moduleExports.enableChecks) {
-        return;
-    }
-    var errMsg = null;
-    var typeName;
-    for (var i = 0; i < spec.length; ++i) {
-        var c = spec.charAt(i),
-            cUpper = c.toUpperCase(),
-            arg = args[i];
-        // Asterix means allow anything.
-        if (c == '*') {
-            continue;
-        }
-        typeName = utils.typeName(arg);
-        if ((arg === null || arg === undefined) && c == cUpper) {
-            continue;
-        }
-        if (typeName != typeMap[cUpper]) {
-            errMsg = 'Expected ' + typeMap[cUpper];
-            break;
-        }
-    }
-    if (errMsg) {
-        errMsg += ', but got ' + typeName + '.';
-        errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg;
-        // Don't log when running unit tests.
-        if (typeof jasmine == 'undefined') {
-            console.error(errMsg);
-        }
-        throw TypeError(errMsg);
-    }
-}
-
-function getValue(value, defaultValue) {
-    return value === undefined ? defaultValue : value;
-}
-
-moduleExports.checkArgs = checkArgs;
-moduleExports.getValue = getValue;
-moduleExports.enableChecks = true;
-
-
-});
-
-// file: lib/common/base64.js
-define("cordova/base64", function(require, exports, module) {
-
-var base64 = exports;
-
-base64.fromArrayBuffer = function(arrayBuffer) {
-  var array = new Uint8Array(arrayBuffer);
-  return uint8ToBase64(array);
-};
-
-//------------------------------------------------------------------------------
-
-/* This code is based on the performance tests at http://jsperf.com/b64tests
- * This 12-bit-at-a-time algorithm was the best performing version on all
- * platforms tested.
- */
-
-var b64_6bit = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-var b64_12bit;
-
-var b64_12bitTable = function() {
-    b64_12bit = [];
-    for (var i=0; i<64; i++) {
-        for (var j=0; j<64; j++) {
-            b64_12bit[i*64+j] = b64_6bit[i] + b64_6bit[j];
-        }
-    }
-    b64_12bitTable = function() { return b64_12bit; };
-    return b64_12bit;
-}
-
-function uint8ToBase64(rawData) {
-    var numBytes = rawData.byteLength;
-    var output="";
-    var segment;
-    var table = b64_12bitTable();
-    for (var i=0;i<numBytes-2;i+=3) {
-        segment = (rawData[i] << 16) + (rawData[i+1] << 8) + rawData[i+2];
-        output += table[segment >> 12];
-        output += table[segment & 0xfff];
-    }
-    if (numBytes - i == 2) {
-        segment = (rawData[i] << 16) + (rawData[i+1] << 8);
-        output += table[segment >> 12];
-        output += b64_6bit[(segment & 0xfff) >> 6];
-        output += '=';
-    } else if (numBytes - i == 1) {
-        segment = (rawData[i] << 16);
-        output += table[segment >> 12];
-        output += '==';
-    }
-    return output;
-}
-
-});
-
-// file: lib/common/builder.js
-define("cordova/builder", function(require, exports, module) {
-
-var utils = require('cordova/utils');
-
-function each(objects, func, context) {
-    for (var prop in objects) {
-        if (objects.hasOwnProperty(prop)) {
-            func.apply(context, [objects[prop], prop]);
-        }
-    }
-}
-
-function clobber(obj, key, value) {
-    exports.replaceHookForTesting(obj, key);
-    obj[key] = value;
-    // Getters can only be overridden by getters.
-    if (obj[key] !== value) {
-        utils.defineGetter(obj, key, function() {
-            return value;
-        });
-    }
-}
-
-function assignOrWrapInDeprecateGetter(obj, key, value, message) {
-    if (message) {
-        utils.defineGetter(obj, key, function() {
-            console.log(message);
-            delete obj[key];
-            clobber(obj, key, value);
-            return value;
-        });
-    } else {
-        clobber(obj, key, value);
-    }
-}
-
-function include(parent, objects, clobber, merge) {
-    each(objects, function (obj, key) {
-        try {
-          var result = obj.path ? require(obj.path) : {};
-
-          if (clobber) {
-              // Clobber if it doesn't exist.
-              if (typeof parent[key] === 'undefined') {
-                  assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-              } else if (typeof obj.path !== 'undefined') {
-                  // If merging, merge properties onto parent, otherwise, clobber.
-                  if (merge) {
-                      recursiveMerge(parent[key], result);
-                  } else {
-                      assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-                  }
-              }
-              result = parent[key];
-          } else {
-            // Overwrite if not currently defined.
-            if (typeof parent[key] == 'undefined') {
-              assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
-            } else {
-              // Set result to what already exists, so we can build children into it if they exist.
-              result = parent[key];
-            }
-          }
-
-          if (obj.children) {
-            include(result, obj.children, clobber, merge);
-          }
-        } catch(e) {
-          utils.alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
-        }
-    });
-}
-
-/**
- * Merge properties from one object onto another recursively.  Properties from
- * the src object will overwrite existing target property.
- *
- * @param target Object to merge properties into.
- * @param src Object to merge properties from.
- */
-function recursiveMerge(target, src) {
-    for (var prop in src) {
-        if (src.hasOwnProperty(prop)) {
-            if (target.prototype && target.prototype.constructor === target) {
-                // If the target object is a constructor override off prototype.
-                clobber(target.prototype, prop, src[prop]);
-            } else {
-                if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {
-                    recursiveMerge(target[prop], src[prop]);
-                } else {
-                    clobber(target, prop, src[prop]);
-                }
-            }
-        }
-    }
-}
-
-exports.buildIntoButDoNotClobber = function(objects, target) {
-    include(target, objects, false, false);
-};
-exports.buildIntoAndClobber = function(objects, target) {
-    include(target, objects, true, false);
-};
-exports.buildIntoAndMerge = function(objects, target) {
-    include(target, objects, true, true);
-};
-exports.recursiveMerge = recursiveMerge;
-exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;
-exports.replaceHookForTesting = function() {};
-
-});
-
-// file: lib/common/channel.js
-define("cordova/channel", function(require, exports, module) {
-
-var utils = require('cordova/utils'),
-    nextGuid = 1;
-
-/**
- * Custom pub-sub "channel" that can have functions subscribed to it
- * This object is used to define and control firing of events for
- * cordova initialization, as well as for custom events thereafter.
- *
- * The order of events during page load and Cordova startup is as follows:
- *
- * onDOMContentLoaded*         Internal event that is received when the web page is loaded and parsed.
- * onNativeReady*              Internal event that indicates the Cordova native side is ready.
- * onCordovaReady*             Internal event fired when all Cordova JavaScript objects have been created.
- * onDeviceReady*              User event fired to indicate that Cordova is ready
- * onResume                    User event fired to indicate a start/resume lifecycle event
- * onPause                     User event fired to indicate a pause lifecycle event
- * onDestroy*                  Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
- *
- * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
- * All listeners that subscribe after the event is fired will be executed right away.
- *
- * The only Cordova events that user code should register for are:
- *      deviceready           Cordova native code is initialized and Cordova APIs can be called from JavaScript
- *      pause                 App has moved to background
- *      resume                App has returned to foreground
- *
- * Listeners can be registered as:
- *      document.addEventListener("deviceready", myDeviceReadyListener, false);
- *      document.addEventListener("resume", myResumeListener, false);
- *      document.addEventListener("pause", myPauseListener, false);
- *
- * The DOM lifecycle events should be used for saving and restoring state
- *      window.onload
- *      window.onunload
- *
- */
-
-/**
- * Channel
- * @constructor
- * @param type  String the channel name
- */
-var Channel = function(type, sticky) {
-    this.type = type;
-    // Map of guid -> function.
-    this.handlers = {};
-    // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.
-    this.state = sticky ? 1 : 0;
-    // Used in sticky mode to remember args passed to fire().
-    this.fireArgs = null;
-    // Used by onHasSubscribersChange to know if there are any listeners.
-    this.numHandlers = 0;
-    // Function that is called when the first listener is subscribed, or when
-    // the last listener is unsubscribed.
-    this.onHasSubscribersChange = null;
-},
-    channel = {
-        /**
-         * Calls the provided function only after all of the channels specified
-         * have been fired. All channels must be sticky channels.
-         */
-        join: function(h, c) {
-            var len = c.length,
-                i = len,
-                f = function() {
-                    if (!(--i)) h();
-                };
-            for (var j=0; j<len; j++) {
-                if (c[j].state === 0) {
-                    throw Error('Can only use join with sticky channels.');
-                }
-                c[j].subscribe(f);
-            }
-            if (!len) h();
-        },
-        create: function(type) {
-            return channel[type] = new Channel(type, false);
-        },
-        createSticky: function(type) {
-            return channel[type] = new Channel(type, true);
-        },
-
-        /**
-         * cordova Channels that must fire before "deviceready" is fired.
-         */
-        deviceReadyChannelsArray: [],
-        deviceReadyChannelsMap: {},
-
-        /**
-         * Indicate that a feature needs to be initialized before it is ready to be used.
-         * This holds up Cordova's "deviceready" event until the feature has been initialized
-         * and Cordova.initComplete(feature) is called.
-         *
-         * @param feature {String}     The unique feature name
-         */
-        waitForInitialization: function(feature) {
-            if (feature) {
-                var c = channel[feature] || this.createSticky(feature);
-                this.deviceReadyChannelsMap[feature] = c;
-                this.deviceReadyChannelsArray.push(c);
-            }
-        },
-
-        /**
-         * Indicate that initialization code has completed and the feature is ready to be used.
-         *
-         * @param feature {String}     The unique feature name
-         */
-        initializationComplete: function(feature) {
-            var c = this.deviceReadyChannelsMap[feature];
-            if (c) {
-                c.fire();
-            }
-        }
-    };
-
-function forceFunction(f) {
-    if (typeof f != 'function') throw "Function required as first argument!";
-}
-
-/**
- * Subscribes the given function to the channel. Any time that
- * Channel.fire is called so too will the function.
- * Optionally specify an execution context for the function
- * and a guid that can be used to stop subscribing to the channel.
- * Returns the guid.
- */
-Channel.prototype.subscribe = function(f, c) {
-    // need a function to call
-    forceFunction(f);
-    if (this.state == 2) {
-        f.apply(c || this, this.fireArgs);
-        return;
-    }
-
-    var func = f,
-        guid = f.observer_guid;
-    if (typeof c == "object") { func = utils.close(c, f); }
-
-    if (!guid) {
-        // first time any channel has seen this subscriber
-        guid = '' + nextGuid++;
-    }
-    func.observer_guid = guid;
-    f.observer_guid = guid;
-
-    // Don't add the same handler more than once.
-    if (!this.handlers[guid]) {
-        this.handlers[guid] = func;
-        this.numHandlers++;
-        if (this.numHandlers == 1) {
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-/**
- * Unsubscribes the function with the given guid from the channel.
- */
-Channel.prototype.unsubscribe = function(f) {
-    // need a function to unsubscribe
-    forceFunction(f);
-
-    var guid = f.observer_guid,
-        handler = this.handlers[guid];
-    if (handler) {
-        delete this.handlers[guid];
-        this.numHandlers--;
-        if (this.numHandlers === 0) {
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-/**
- * Calls all functions subscribed to this channel.
- */
-Channel.prototype.fire = function(e) {
-    var fail = false,
-        fireArgs = Array.prototype.slice.call(arguments);
-    // Apply stickiness.
-    if (this.state == 1) {
-        this.state = 2;
-        this.fireArgs = fireArgs;
-    }
-    if (this.numHandlers) {
-        // Copy the values first so that it is safe to modify it from within
-        // callbacks.
-        var toCall = [];
-        for (var item in this.handlers) {
-            toCall.push(this.handlers[item]);
-        }
-        for (var i = 0; i < toCall.length; ++i) {
-            toCall[i].apply(this, fireArgs);
-        }
-        if (this.state == 2 && this.numHandlers) {
-            this.numHandlers = 0;
-            this.handlers = {};
-            this.onHasSubscribersChange && this.onHasSubscribersChange();
-        }
-    }
-};
-
-
-// defining them here so they are ready super fast!
-// DOM event that is received when the web page is loaded and parsed.
-channel.createSticky('onDOMContentLoaded');
-
-// Event to indicate the Cordova native side is ready.
-channel.createSticky('onNativeReady');
-
-// Event to indicate that all Cordova JavaScript objects have been created
-// and it's time to run plugin constructors.
-channel.createSticky('onCordovaReady');
-
-// Event to indicate that all automatically loaded JS plugins are loaded and ready.
-channel.createSticky('onPluginsReady');
-
-// Event to indicate that Cordova is ready
-channel.createSticky('onDeviceReady');
-
-// Event to indicate a resume lifecycle event
-channel.create('onResume');
-
-// Event to indicate a pause lifecycle event
-channel.create('onPause');
-
-// Event to indicate a destroy lifecycle event
-channel.createSticky('onDestroy');
-
-// Channels that must fire before "deviceready" is fired.
-channel.waitForInitialization('onCordovaReady');
-channel.waitForInitialization('onDOMContentLoaded');
-
-module.exports = channel;
-
-});
-
-// file: lib/common/commandProxy.js
-define("cordova/commandProxy", function(require, exports, module) {
-
-
-// internal map of proxy function
-var CommandProxyMap = {};
-
-module.exports = {
-
-    // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
-    add:function(id,proxyObj) {
-        console.log("adding proxy for " + id);
-        CommandProxyMap[id] = proxyObj;
-        return proxyObj;
-    },
-
-    // cordova.commandProxy.remove("Accelerometer");
-    remove:function(id) {
-        var proxy = CommandProxyMap[id];
-        delete CommandProxyMap[id];
-        CommandProxyMap[id] = null;
-        return proxy;
-    },
-
-    get:function(service,action) {
-        return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
-    }
-};
-});
-
-// file: lib/osx/exec.js
-define("cordova/exec", function(require, exports, module) {
-
-/**
- * Creates a gap bridge used to notify the native code about commands.
-
- * @private
- */
-var cordova = require('cordova'),
-    channel = require('cordova/channel'),
-    utils = require('cordova/utils'),
-    base64 = require('cordova/base64');
-
-
-function massageMessageNativeToJs(message) {
-    if (message.CDVType == 'ArrayBuffer') {
-        var stringToArrayBuffer = function(str) {
-            var ret = new Uint8Array(str.length);
-            for (var i = 0; i < str.length; i++) {
-                ret[i] = str.charCodeAt(i);
-            }
-            return ret.buffer;
-        };
-        var base64ToArrayBuffer = function(b64) {
-            return stringToArrayBuffer(atob(b64));
-        };
-        message = base64ToArrayBuffer(message.data);
-    }
-    return message;
-}
-
-function convertMessageToArgsNativeToJs(message) {
-    var args = [];
-    if (!message || !message.hasOwnProperty('CDVType')) {
-        args.push(message);
-    } else if (message.CDVType == 'MultiPart') {
-        message.messages.forEach(function(e) {
-            args.push(massageMessageNativeToJs(e));
-        });
-    } else {
-        args.push(massageMessageNativeToJs(message));
-    }
-    return args;
-}
-
-function massageArgsJsToNative(args) {
-    if (!args || utils.typeName(args) != 'Array') {
-       return args;
-    }
-    var ret = [];
-    args.forEach(function(arg, i) {
-        if (utils.typeName(arg) == 'ArrayBuffer') {
-            ret.push({
-                'CDVType': 'ArrayBuffer',
-                'data': base64.fromArrayBuffer(arg)
-            });
-        } else {
-            ret.push(arg);
-        }
-    });
-    return ret;
-}
-
-function OSXExec() {
-
-    var successCallback, failCallback, service, action, actionArgs, splitCommand;
-    var callbackId = 'INVALID';
-
-    successCallback = arguments[0];
-    failCallback = arguments[1];
-    service = arguments[2];
-    action = arguments[3];
-    actionArgs = arguments[4];
-
-    // 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};
-    }
-
-     actionArgs = massageArgsJsToNative(actionArgs);
-
-    if (window.cordovabridge && window.cordovabridge.exec) {
-        window.cordovabridge.exec(callbackId, service, action, actionArgs);
-    } else {
-        alert('window.cordovabridge binding is missing.');
-    }
-}
-
-
-OSXExec.nativeCallback = function(callbackId, status, message, keepCallback) {
-    var success = status === 0 || status === 1;
-    var args = convertMessageToArgsNativeToJs(message);
-    cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
-};
-
-module.exports = OSXExec;
-
-});
-
-// file: lib/common/modulemapper.js
-define("cordova/modulemapper", function(require, exports, module) {
-
-var builder = require('cordova/builder'),
-    moduleMap = define.moduleMap,
-    symbolList,
-    deprecationMap;
-
-exports.reset = function() {
-    symbolList = [];
-    deprecationMap = {};
-};
-
-function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
-    if (!(moduleName in moduleMap)) {
-        throw new Error('Module ' + moduleName + ' does not exist.');
-    }
-    symbolList.push(strategy, moduleName, symbolPath);
-    if (opt_deprecationMessage) {
-        deprecationMap[symbolPath] = opt_deprecationMessage;
-    }
-}
-
-// Note: Android 2.3 does have Function.bind().
-exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
-    addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
-};
-
-exports.runs = function(moduleName) {
-    addEntry('r', moduleName, null);
-};
-
-function prepareNamespace(symbolPath, context) {
-    if (!symbolPath) {
-        return context;
-    }
-    var parts = symbolPath.split('.');
-    var cur = context;
-    for (var i = 0, part; part = parts[i]; ++i) {
-        cur = cur[part] = cur[part] || {};
-    }
-    return cur;
-}
-
-exports.mapModules = function(context) {
-    var origSymbols = {};
-    context.CDV_origSymbols = origSymbols;
-    for (var i = 0, len = symbolList.length; i < len; i += 3) {
-        var strategy = symbolList[i];
-        var moduleName = symbolList[i + 1];
-        var module = require(moduleName);
-        // <runs/>
-        if (strategy == 'r') {
-            continue;
-        }
-        var symbolPath = symbolList[i + 2];
-        var lastDot = symbolPath.lastIndexOf('.');
-        var namespace = symbolPath.substr(0, lastDot);
-        var lastName = symbolPath.substr(lastDot + 1);
-
-        var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
-        var parentObj = prepareNamespace(namespace, context);
-        var target = parentObj[lastName];
-
-        if (strategy == 'm' && target) {
-            builder.recursiveMerge(target, module);
-        } else if ((strategy == 'd' && !target) || (strategy != 'd')) {
-            if (!(symbolPath in origSymbols)) {
-                origSymbols[symbolPath] = target;
-            }
-            builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
-        }
-    }
-};
-
-exports.getOriginalSymbol = function(context, symbolPath) {
-    var origSymbols = context.CDV_origSymbols;
-    if (origSymbols && (symbolPath in origSymbols)) {
-        return origSymbols[symbolPath];
-    }
-    var parts = symbolPath.split('.');
-    var obj = context;
-    for (var i = 0; i < parts.length; ++i) {
-        obj = obj && obj[parts[i]];
-    }
-    return obj;
-};
-
-exports.loadMatchingModules = function(matchingRegExp) {
-    for (var k in moduleMap) {
-        if (matchingRegExp.exec(k)) {
-            require(k);
-        }
-    }
-};
-
-exports.reset();
-
-
-});
-
-// file: lib/osx/platform.js
-define("cordova/platform", function(require, exports, module) {
-
-module.exports = {
-    id: "osx",
-    initialize:function() {
-        var modulemapper = require('cordova/modulemapper');
-
-        modulemapper.loadMatchingModules(/cordova.*\/plugininit$/);
-
-        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
-        modulemapper.mapModules(window);
-    }
-};
-
-
-});
-
-// file: lib/common/plugin/echo.js
-define("cordova/plugin/echo", function(require, exports, module) {
-
-var exec = require('cordova/exec'),
-    utils = require('cordova/utils');
-
-/**
- * Sends the given message through exec() to the Echo plugin, which sends it back to the successCallback.
- * @param successCallback  invoked with a FileSystem object
- * @param errorCallback  invoked if error occurs retrieving file system
- * @param message  The string to be echoed.
- * @param forceAsync  Whether to force an async return value (for testing native->js bridge).
- */
-module.exports = function(successCallback, errorCallback, message, forceAsync) {
-    var action = 'echo';
-    var messageIsMultipart = (utils.typeName(message) == "Array");
-    var args = messageIsMultipart ? message : [message];
-
-    if (utils.typeName(message) == 'ArrayBuffer') {
-        if (forceAsync) {
-            console.warn('Cannot echo ArrayBuffer with forced async, falling back to sync.');
-        }
-        action += 'ArrayBuffer';
-    } else if (messageIsMultipart) {
-        if (forceAsync) {
-            console.warn('Cannot echo MultiPart Array with forced async, falling back to sync.');
-        }
-        action += 'MultiPart';
-    } else if (forceAsync) {
-        action += 'Async';
-    }
-
-    exec(successCallback, errorCallback, "Echo", action, args);
-};
-
-
-});
-
-// file: lib/common/pluginloader.js
-define("cordova/pluginloader", function(require, exports, module) {
-
-var channel = require('cordova/channel');
-var modulemapper = require('cordova/modulemapper');
-
-// Helper function to inject a <script> tag.
-function injectScript(url, onload, onerror) {
-    var script = document.createElement("script");
-    // onload fires even when script fails loads with an error.
-    script.onload = onload;
-    script.onerror = onerror || onload;
-    script.src = url;
-    document.head.appendChild(script);
-}
-
-function onScriptLoadingComplete(moduleList) {
-    // Loop through all the plugins and then through their clobbers and merges.
-    for (var i = 0, module; module = moduleList[i]; i++) {
-        if (module) {
-            try {
-                if (module.clobbers && module.clobbers.length) {
-                    for (var j = 0; j < module.clobbers.length; j++) {
-                        modulemapper.clobbers(module.id, module.clobbers[j]);
-                    }
-                }
-
-                if (module.merges && module.merges.length) {
-                    for (var k = 0; k < module.merges.length; k++) {
-                        modulemapper.merges(module.id, module.merges[k]);
-                    }
-                }
-
-                // Finally, if runs is truthy we want to simply require() the module.
-                // This can be skipped if it had any merges or clobbers, though,
-                // since the mapper will already have required the module.
-                if (module.runs && !(module.clobbers && module.clobbers.length) && !(module.merges && module.merges.length)) {
-                    modulemapper.runs(module.id);
-                }
-            }
-            catch(err) {
-                // error with module, most likely clobbers, should we continue?
-            }
-        }
-    }
-
-    finishPluginLoading();
-}
-
-// Called when:
-// * There are plugins defined and all plugins are finished loading.
-// * There are no plugins to load.
-function finishPluginLoading() {
-    channel.onPluginsReady.fire();
-}
-
-// Handler for the cordova_plugins.js content.
-// See plugman's plugin_loader.js for the details of this object.
-// This function is only called if the really is a plugins array that isn't empty.
-// Otherwise the onerror response handler will just call finishPluginLoading().
-function handlePluginsObject(path, moduleList) {
-    // Now inject the scripts.
-    var scriptCounter = moduleList.length;
-
-    if (!scriptCounter) {
-        onScriptLoadingComplete();
-        return;
-    }
-    function scriptLoadedCallback() {
-        if (!--scriptCounter) {
-            onScriptLoadingComplete(moduleList);
-        }
-    }
-
-    for (var i = 0; i < moduleList.length; i++) {
-        injectScript(path + moduleList[i].file, scriptLoadedCallback);
-    }
-}
-
-function injectPluginScript(pathPrefix) {
-    injectScript(pathPrefix + 'cordova_plugins.js', function(){
-        try {
-            var moduleList = require("cordova/plugin_list");
-            handlePluginsObject(pathPrefix, moduleList);
-        } catch (e) {
-            // Error loading cordova_plugins.js, file not found or something
-            // this is an acceptable error, pre-3.0.0, so we just move on.
-            finishPluginLoading();
-        }
-    },finishPluginLoading); // also, add script load error handler for file not found
-}
-
-function findCordovaPath() {
-    var path = null;
-    var scripts = document.getElementsByTagName('script');
-    var term = 'cordova.js';
-    for (var n = scripts.length-1; n>-1; n--) {
-        var src = scripts[n].src;
-        if (src.indexOf(term) == (src.length - term.length)) {
-            path = src.substring(0, src.length - term.length);
-            break;
-        }
-    }
-    return path;
-}
-
-// Tries to load all plugins' js-modules.
-// This is an async process, but onDeviceReady is blocked on onPluginsReady.
-// onPluginsReady is fired when there are no plugins to load, or they are all done.
-exports.load = function() {
-    var pathPrefix = findCordovaPath();
-    if (pathPrefix === null) {
-        console.log('Could not find cordova.js script tag. Plugin loading may fail.');
-        pathPrefix = '';
-    }
-    injectPluginScript(pathPrefix);
-};
-
-
-});
-
-// file: lib/common/symbols.js
-define("cordova/symbols", function(require, exports, module) {
-
-var modulemapper = require('cordova/modulemapper');
-
-// Use merges here in case others symbols files depend on this running first,
-// but fail to declare the dependency with a require().
-modulemapper.merges('cordova', 'cordova');
-modulemapper.clobbers('cordova/exec', 'cordova.exec');
-modulemapper.clobbers('cordova/exec', 'Cordova.exec');
-
-});
-
-// file: lib/common/utils.js
-define("cordova/utils", function(require, exports, module) {
-
-var utils = exports;
-
-/**
- * Defines a property getter / setter for obj[key].
- */
-utils.defineGetterSetter = function(obj, key, getFunc, opt_setFunc) {
-    if (Object.defineProperty) {
-        var desc = {
-            get: getFunc,
-            configurable: true
-        };
-        if (opt_setFunc) {
-            desc.set = opt_setFunc;
-        }
-        Object.defineProperty(obj, key, desc);
-    } else {
-        obj.__defineGetter__(key, getFunc);
-        if (opt_setFunc) {
-            obj.__defineSetter__(key, opt_setFunc);
-        }
-    }
-};
-
-/**
- * Defines a property getter for obj[key].
- */
-utils.defineGetter = utils.defineGetterSetter;
-
-utils.arrayIndexOf = function(a, item) {
-    if (a.indexOf) {
-        return a.indexOf(item);
-    }
-    var len = a.length;
-    for (var i = 0; i < len; ++i) {
-        if (a[i] == item) {
-            return i;
-        }
-    }
-    return -1;
-};
-
-/**
- * Returns whether the item was found in the array.
- */
-utils.arrayRemove = function(a, item) {
-    var index = utils.arrayIndexOf(a, item);
-    if (index != -1) {
-        a.splice(index, 1);
-    }
-    return index != -1;
-};
-
-utils.typeName = function(val) {
-    return Object.prototype.toString.call(val).slice(8, -1);
-};
-
-/**
- * Returns an indication of whether the argument is an array or not
- */
-utils.isArray = function(a) {
-    return utils.typeName(a) == 'Array';
-};
-
-/**
- * Returns an indication of whether the argument is a Date or not
- */
-utils.isDate = function(d) {
-    return utils.typeName(d) == 'Date';
-};
-
-/**
- * Does a deep clone of the object.
- */
-utils.clone = function(obj) {
-    if(!obj || typeof obj == 'function' || utils.isDate(obj) || typeof obj != 'object') {
-        return obj;
-    }
-
-    var retVal, i;
-
-    if(utils.isArray(obj)){
-        retVal = [];
-        for(i = 0; i < obj.length; ++i){
-            retVal.push(utils.clone(obj[i]));
-        }
-        return retVal;
-    }
-
-    retVal = {};
-    for(i in obj){
-        if(!(i in retVal) || retVal[i] != obj[i]) {
-            retVal[i] = utils.clone(obj[i]);
-        }
-    }
-    return retVal;
-};
-
-/**
- * Returns a wrapped version of the function
- */
-utils.close = function(context, func, params) {
-    if (typeof params == 'undefined') {
-        return function() {
-            return func.apply(context, arguments);
-        };
-    } else {
-        return function() {
-            return func.apply(context, params);
-        };
-    }
-};
-
-/**
- * Create a UUID
- */
-utils.createUUID = function() {
-    return UUIDcreatePart(4) + '-' +
-        UUIDcreatePart(2) + '-' +
-        UUIDcreatePart(2) + '-' +
-        UUIDcreatePart(2) + '-' +
-        UUIDcreatePart(6);
-};
-
-/**
- * Extends a child object from a parent object using classical inheritance
- * pattern.
- */
-utils.extend = (function() {
-    // proxy used to establish prototype chain
-    var F = function() {};
-    // extend Child from Parent
-    return function(Child, Parent) {
-        F.prototype = Parent.prototype;
-        Child.prototype = new F();
-        Child.__super__ = Parent.prototype;
-        Child.prototype.constructor = Child;
-    };
-}());
-
-/**
- * Alerts a message in any available way: alert or console.log.
- */
-utils.alert = function(msg) {
-    if (window.alert) {
-        window.alert(msg);
-    } else if (console && console.log) {
-        console.log(msg);
-    }
-};
-
-
-//------------------------------------------------------------------------------
-function UUIDcreatePart(length) {
-    var uuidpart = "";
-    for (var i=0; i<length; i++) {
-        var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
-        if (uuidchar.length == 1) {
-            uuidchar = "0" + uuidchar;
-        }
-        uuidpart += uuidchar;
-    }
-    return uuidpart;
-}
-
-
-});
-
-window.cordova = require('cordova');
-// file: lib/scripts/bootstrap.js
-
-(function (context) {
-    if (context._cordovaJsLoaded) {
-        throw new Error('cordova.js included multiple times.');
-    }
-    context._cordovaJsLoaded = true;
-
-    var channel = require('cordova/channel');
-    var pluginloader = require('cordova/pluginloader');
-
-    var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady];
-
-    function logUnfiredChannels(arr) {
-        for (var i = 0; i < arr.length; ++i) {
-            if (arr[i].state != 2) {
-                console.log('Channel not fired: ' + arr[i].type);
-            }
-        }
-    }
-
-    window.setTimeout(function() {
-        if (channel.onDeviceReady.state != 2) {
-            console.log('deviceready has not fired after 5 seconds.');
-            logUnfiredChannels(platformInitChannelsArray);
-            logUnfiredChannels(channel.deviceReadyChannelsArray);
-        }
-    }, 5000);
-
-    // Replace navigator before any modules are required(), to ensure it happens as soon as possible.
-    // We replace it so that properties that can't be clobbered can instead be overridden.
-    function replaceNavigator(origNavigator) {
-        var CordovaNavigator = function() {};
-        CordovaNavigator.prototype = origNavigator;
-        var newNavigator = new CordovaNavigator();
-        // This work-around really only applies to new APIs that are newer than Function.bind.
-        // Without it, APIs such as getGamepads() break.
-        if (CordovaNavigator.bind) {
-            for (var key in origNavigator) {
-                if (typeof origNavigator[key] == 'function') {
-                    newNavigator[key] = origNavigator[key].bind(origNavigator);
-                }
-            }
-        }
-        return newNavigator;
-    }
-    if (context.navigator) {
-        context.navigator = replaceNavigator(context.navigator);
-    }
-
-    // _nativeReady is global variable that the native side can set
-    // to signify that the native code is ready. It is a global since
-    // it may be called before any cordova JS is ready.
-    if (window._nativeReady) {
-        channel.onNativeReady.fire();
-    }
-
-    /**
-     * Create all cordova objects once native side is ready.
-     */
-    channel.join(function() {
-        // Call the platform-specific initialization
-        require('cordova/platform').initialize();
-
-        // Fire event to notify that all objects are created
-        channel.onCordovaReady.fire();
-
-        // Fire onDeviceReady event once page has fully loaded, all
-        // constructors have run and cordova info has been received from native
-        // side.
-        // This join call is deliberately made after platform.initialize() in
-        // order that plugins may manipulate channel.deviceReadyChannelsArray
-        // if necessary.
-        channel.join(function() {
-            require('cordova').fireDocumentEvent('deviceready');
-        }, channel.deviceReadyChannelsArray);
-
-    }, platformInitChannelsArray);
-
-    // Don't attempt to load when running unit tests.
-    if (typeof XMLHttpRequest != 'undefined') {
-        pluginloader.load();
-    }
-}(window));
-
-})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/.gitignore
----------------------------------------------------------------------
diff --git a/CordovaLib/.gitignore b/CordovaLib/.gitignore
new file mode 100644
index 0000000..78a5a5e
--- /dev/null
+++ b/CordovaLib/.gitignore
@@ -0,0 +1,5 @@
+build/*
+*.pbxuser
+*.perspectivev3
+*.mode1v3
+javascripts/cordova-*.js

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib-Info.plist
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib-Info.plist b/CordovaLib/CordovaLib-Info.plist
new file mode 100644
index 0000000..384517e
--- /dev/null
+++ b/CordovaLib/CordovaLib-Info.plist
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIconFile</key>
+	<string></string>
+	<key>CFBundleIdentifier</key>
+	<string>org.apache.${PRODUCT_NAME:rfc1034identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright © 2013 Apache Foundation. All rights reserved.</string>
+	<key>NSPrincipalClass</key>
+	<string></string>
+</dict>
+</plist>


[08/14] Update to modern layout

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..49624d6
--- /dev/null
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -0,0 +1,604 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		70BD673E18FF9DAE00A1EFCF /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70BD673D18FF9DAE00A1EFCF /* Cocoa.framework */; };
+		70BD674F18FF9DAE00A1EFCF /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70BD674E18FF9DAE00A1EFCF /* XCTest.framework */; };
+		70BD675018FF9DAE00A1EFCF /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70BD673D18FF9DAE00A1EFCF /* Cocoa.framework */; };
+		70BD675318FF9DAE00A1EFCF /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 70BD673A18FF9DAE00A1EFCF /* libCordova.a */; };
+		70BD675918FF9DAE00A1EFCF /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 70BD675718FF9DAE00A1EFCF /* InfoPlist.strings */; };
+		70BD675B18FF9DAE00A1EFCF /* CordovaLibTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD675A18FF9DAE00A1EFCF /* CordovaLibTests.m */; };
+		70BD679718FFA12D00A1EFCF /* CDVBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD676F18FFA12D00A1EFCF /* CDVBridge.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD679818FFA12D00A1EFCF /* CDVBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD677018FFA12D00A1EFCF /* CDVBridge.m */; };
+		70BD679918FFA12D00A1EFCF /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD677118FFA12D00A1EFCF /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD679A18FFA12D00A1EFCF /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD677218FFA12D00A1EFCF /* CDVViewController.m */; };
+		70BD679B18FFA12D00A1EFCF /* CDVWebViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD677318FFA12D00A1EFCF /* CDVWebViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD679C18FFA12D00A1EFCF /* CDVWebViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD677418FFA12D00A1EFCF /* CDVWebViewDelegate.m */; };
+		70BD679D18FFA12D00A1EFCF /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD677618FFA12D00A1EFCF /* CDV.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		70BD679E18FFA12D00A1EFCF /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD677718FFA12D00A1EFCF /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD679F18FFA12D00A1EFCF /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD677818FFA12D00A1EFCF /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67A018FFA12D00A1EFCF /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD677918FFA12D00A1EFCF /* CDVCommandDelegateImpl.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67A118FFA12D00A1EFCF /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD677A18FFA12D00A1EFCF /* CDVCommandDelegateImpl.m */; };
+		70BD67A218FFA12D00A1EFCF /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD677B18FFA12D00A1EFCF /* CDVCommandQueue.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67A318FFA12D00A1EFCF /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD677C18FFA12D00A1EFCF /* CDVCommandQueue.m */; };
+		70BD67A418FFA12D00A1EFCF /* CDVConfigParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD677D18FFA12D00A1EFCF /* CDVConfigParser.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67A518FFA12D00A1EFCF /* CDVConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD677E18FFA12D00A1EFCF /* CDVConfigParser.m */; };
+		70BD67A618FFA12D00A1EFCF /* CDVConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD677F18FFA12D00A1EFCF /* CDVConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67A718FFA12D00A1EFCF /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD678018FFA12D00A1EFCF /* CDVConnection.m */; };
+		70BD67A818FFA12D00A1EFCF /* CDVConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD678118FFA12D00A1EFCF /* CDVConsole.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67A918FFA12D00A1EFCF /* CDVConsole.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD678218FFA12D00A1EFCF /* CDVConsole.m */; };
+		70BD67AA18FFA12D00A1EFCF /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD678318FFA12D00A1EFCF /* CDVDebug.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67AB18FFA12D00A1EFCF /* CDVDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD678418FFA12D00A1EFCF /* CDVDevice.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67AC18FFA12D00A1EFCF /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD678518FFA12D00A1EFCF /* CDVDevice.m */; };
+		70BD67AD18FFA12D00A1EFCF /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD678618FFA12D00A1EFCF /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67AE18FFA12D00A1EFCF /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD678718FFA12D00A1EFCF /* CDVInvokedUrlCommand.m */; };
+		70BD67AF18FFA12D00A1EFCF /* CDVJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD678818FFA12D00A1EFCF /* CDVJSON.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67B018FFA12D00A1EFCF /* CDVJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD678918FFA12D00A1EFCF /* CDVJSON.m */; };
+		70BD67B118FFA12D00A1EFCF /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD678A18FFA12D00A1EFCF /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67B218FFA12D00A1EFCF /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD678B18FFA12D00A1EFCF /* CDVPlugin.m */; };
+		70BD67B318FFA12D00A1EFCF /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD678C18FFA12D00A1EFCF /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67B418FFA12D00A1EFCF /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD678D18FFA12D00A1EFCF /* CDVPluginResult.m */; };
+		70BD67B518FFA12D00A1EFCF /* CDVReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD678E18FFA12D00A1EFCF /* CDVReachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		70BD67B618FFA12D00A1EFCF /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD678F18FFA12D00A1EFCF /* CDVReachability.m */; };
+		70BD67B718FFA12D00A1EFCF /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD679118FFA12D00A1EFCF /* NSData+Base64.h */; };
+		70BD67B818FFA12D00A1EFCF /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD679218FFA12D00A1EFCF /* NSData+Base64.m */; };
+		70BD67B918FFA12D00A1EFCF /* NSWindow+Utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD679318FFA12D00A1EFCF /* NSWindow+Utils.h */; };
+		70BD67BA18FFA12D00A1EFCF /* NSWindow+Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD679418FFA12D00A1EFCF /* NSWindow+Utils.m */; };
+		70BD67BB18FFA12D00A1EFCF /* ShellUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 70BD679518FFA12D00A1EFCF /* ShellUtils.h */; };
+		70BD67BC18FFA12D00A1EFCF /* ShellUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD679618FFA12D00A1EFCF /* ShellUtils.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		70BD675118FF9DAE00A1EFCF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 70BD673218FF9DAE00A1EFCF /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 70BD673918FF9DAE00A1EFCF;
+			remoteInfo = CordovaLib;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		70BD673A18FF9DAE00A1EFCF /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		70BD673D18FF9DAE00A1EFCF /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+		70BD674018FF9DAE00A1EFCF /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		70BD674118FF9DAE00A1EFCF /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
+		70BD674218FF9DAE00A1EFCF /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+		70BD674518FF9DAE00A1EFCF /* CordovaLib-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CordovaLib-Prefix.pch"; sourceTree = "<group>"; };
+		70BD674D18FF9DAE00A1EFCF /* CordovaLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CordovaLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+		70BD674E18FF9DAE00A1EFCF /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
+		70BD675618FF9DAE00A1EFCF /* CordovaLibTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CordovaLibTests-Info.plist"; sourceTree = "<group>"; };
+		70BD675818FF9DAE00A1EFCF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		70BD675A18FF9DAE00A1EFCF /* CordovaLibTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CordovaLibTests.m; sourceTree = "<group>"; };
+		70BD676F18FFA12D00A1EFCF /* CDVBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVBridge.h; sourceTree = "<group>"; };
+		70BD677018FFA12D00A1EFCF /* CDVBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVBridge.m; sourceTree = "<group>"; };
+		70BD677118FFA12D00A1EFCF /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVViewController.h; sourceTree = "<group>"; };
+		70BD677218FFA12D00A1EFCF /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVViewController.m; sourceTree = "<group>"; };
+		70BD677318FFA12D00A1EFCF /* CDVWebViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewDelegate.h; sourceTree = "<group>"; };
+		70BD677418FFA12D00A1EFCF /* CDVWebViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewDelegate.m; sourceTree = "<group>"; };
+		70BD677618FFA12D00A1EFCF /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDV.h; sourceTree = "<group>"; };
+		70BD677718FFA12D00A1EFCF /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVAvailability.h; sourceTree = "<group>"; };
+		70BD677818FFA12D00A1EFCF /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVCommandDelegate.h; sourceTree = "<group>"; };
+		70BD677918FFA12D00A1EFCF /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVCommandDelegateImpl.h; sourceTree = "<group>"; };
+		70BD677A18FFA12D00A1EFCF /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVCommandDelegateImpl.m; sourceTree = "<group>"; };
+		70BD677B18FFA12D00A1EFCF /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVCommandQueue.h; sourceTree = "<group>"; };
+		70BD677C18FFA12D00A1EFCF /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVCommandQueue.m; sourceTree = "<group>"; };
+		70BD677D18FFA12D00A1EFCF /* CDVConfigParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVConfigParser.h; sourceTree = "<group>"; };
+		70BD677E18FFA12D00A1EFCF /* CDVConfigParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVConfigParser.m; sourceTree = "<group>"; };
+		70BD677F18FFA12D00A1EFCF /* CDVConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVConnection.h; sourceTree = "<group>"; };
+		70BD678018FFA12D00A1EFCF /* CDVConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVConnection.m; sourceTree = "<group>"; };
+		70BD678118FFA12D00A1EFCF /* CDVConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVConsole.h; sourceTree = "<group>"; };
+		70BD678218FFA12D00A1EFCF /* CDVConsole.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVConsole.m; sourceTree = "<group>"; };
+		70BD678318FFA12D00A1EFCF /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVDebug.h; sourceTree = "<group>"; };
+		70BD678418FFA12D00A1EFCF /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVDevice.h; sourceTree = "<group>"; };
+		70BD678518FFA12D00A1EFCF /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVDevice.m; sourceTree = "<group>"; };
+		70BD678618FFA12D00A1EFCF /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
+		70BD678718FFA12D00A1EFCF /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVInvokedUrlCommand.m; sourceTree = "<group>"; };
+		70BD678818FFA12D00A1EFCF /* CDVJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVJSON.h; sourceTree = "<group>"; };
+		70BD678918FFA12D00A1EFCF /* CDVJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVJSON.m; sourceTree = "<group>"; };
+		70BD678A18FFA12D00A1EFCF /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVPlugin.h; sourceTree = "<group>"; };
+		70BD678B18FFA12D00A1EFCF /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVPlugin.m; sourceTree = "<group>"; };
+		70BD678C18FFA12D00A1EFCF /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVPluginResult.h; sourceTree = "<group>"; };
+		70BD678D18FFA12D00A1EFCF /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVPluginResult.m; sourceTree = "<group>"; };
+		70BD678E18FFA12D00A1EFCF /* CDVReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVReachability.h; sourceTree = "<group>"; };
+		70BD678F18FFA12D00A1EFCF /* CDVReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVReachability.m; sourceTree = "<group>"; };
+		70BD679118FFA12D00A1EFCF /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Base64.h"; sourceTree = "<group>"; };
+		70BD679218FFA12D00A1EFCF /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Base64.m"; sourceTree = "<group>"; };
+		70BD679318FFA12D00A1EFCF /* NSWindow+Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSWindow+Utils.h"; sourceTree = "<group>"; };
+		70BD679418FFA12D00A1EFCF /* NSWindow+Utils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSWindow+Utils.m"; sourceTree = "<group>"; };
+		70BD679518FFA12D00A1EFCF /* ShellUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShellUtils.h; sourceTree = "<group>"; };
+		70BD679618FFA12D00A1EFCF /* ShellUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShellUtils.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		70BD673718FF9DAE00A1EFCF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				70BD673E18FF9DAE00A1EFCF /* Cocoa.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		70BD674A18FF9DAE00A1EFCF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				70BD675318FF9DAE00A1EFCF /* libCordova.a in Frameworks */,
+				70BD675018FF9DAE00A1EFCF /* Cocoa.framework in Frameworks */,
+				70BD674F18FF9DAE00A1EFCF /* XCTest.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		70BD673118FF9DAE00A1EFCF = {
+			isa = PBXGroup;
+			children = (
+				70BD674318FF9DAE00A1EFCF /* CordovaLib */,
+				70BD675418FF9DAE00A1EFCF /* CordovaLibTests */,
+				70BD673C18FF9DAE00A1EFCF /* Frameworks */,
+				70BD673B18FF9DAE00A1EFCF /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		70BD673B18FF9DAE00A1EFCF /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				70BD673A18FF9DAE00A1EFCF /* libCordova.a */,
+				70BD674D18FF9DAE00A1EFCF /* CordovaLibTests.xctest */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		70BD673C18FF9DAE00A1EFCF /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				70BD673D18FF9DAE00A1EFCF /* Cocoa.framework */,
+				70BD674E18FF9DAE00A1EFCF /* XCTest.framework */,
+				70BD673F18FF9DAE00A1EFCF /* Other Frameworks */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		70BD673F18FF9DAE00A1EFCF /* Other Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				70BD674018FF9DAE00A1EFCF /* Foundation.framework */,
+				70BD674118FF9DAE00A1EFCF /* CoreData.framework */,
+				70BD674218FF9DAE00A1EFCF /* AppKit.framework */,
+			);
+			name = "Other Frameworks";
+			sourceTree = "<group>";
+		};
+		70BD674318FF9DAE00A1EFCF /* CordovaLib */ = {
+			isa = PBXGroup;
+			children = (
+				70BD676E18FFA12D00A1EFCF /* Classes */,
+				70BD674418FF9DAE00A1EFCF /* Supporting Files */,
+			);
+			path = CordovaLib;
+			sourceTree = "<group>";
+		};
+		70BD674418FF9DAE00A1EFCF /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				70BD674518FF9DAE00A1EFCF /* CordovaLib-Prefix.pch */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		70BD675418FF9DAE00A1EFCF /* CordovaLibTests */ = {
+			isa = PBXGroup;
+			children = (
+				70BD675A18FF9DAE00A1EFCF /* CordovaLibTests.m */,
+				70BD675518FF9DAE00A1EFCF /* Supporting Files */,
+			);
+			path = CordovaLibTests;
+			sourceTree = "<group>";
+		};
+		70BD675518FF9DAE00A1EFCF /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				70BD675618FF9DAE00A1EFCF /* CordovaLibTests-Info.plist */,
+				70BD675718FF9DAE00A1EFCF /* InfoPlist.strings */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		70BD676E18FFA12D00A1EFCF /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				70BD676F18FFA12D00A1EFCF /* CDVBridge.h */,
+				70BD677018FFA12D00A1EFCF /* CDVBridge.m */,
+				70BD677118FFA12D00A1EFCF /* CDVViewController.h */,
+				70BD677218FFA12D00A1EFCF /* CDVViewController.m */,
+				70BD677318FFA12D00A1EFCF /* CDVWebViewDelegate.h */,
+				70BD677418FFA12D00A1EFCF /* CDVWebViewDelegate.m */,
+				70BD677518FFA12D00A1EFCF /* Commands */,
+				70BD679018FFA12D00A1EFCF /* Utils */,
+			);
+			path = Classes;
+			sourceTree = "<group>";
+		};
+		70BD677518FFA12D00A1EFCF /* Commands */ = {
+			isa = PBXGroup;
+			children = (
+				70BD677618FFA12D00A1EFCF /* CDV.h */,
+				70BD677718FFA12D00A1EFCF /* CDVAvailability.h */,
+				70BD677818FFA12D00A1EFCF /* CDVCommandDelegate.h */,
+				70BD677918FFA12D00A1EFCF /* CDVCommandDelegateImpl.h */,
+				70BD677A18FFA12D00A1EFCF /* CDVCommandDelegateImpl.m */,
+				70BD677B18FFA12D00A1EFCF /* CDVCommandQueue.h */,
+				70BD677C18FFA12D00A1EFCF /* CDVCommandQueue.m */,
+				70BD677D18FFA12D00A1EFCF /* CDVConfigParser.h */,
+				70BD677E18FFA12D00A1EFCF /* CDVConfigParser.m */,
+				70BD677F18FFA12D00A1EFCF /* CDVConnection.h */,
+				70BD678018FFA12D00A1EFCF /* CDVConnection.m */,
+				70BD678118FFA12D00A1EFCF /* CDVConsole.h */,
+				70BD678218FFA12D00A1EFCF /* CDVConsole.m */,
+				70BD678318FFA12D00A1EFCF /* CDVDebug.h */,
+				70BD678418FFA12D00A1EFCF /* CDVDevice.h */,
+				70BD678518FFA12D00A1EFCF /* CDVDevice.m */,
+				70BD678618FFA12D00A1EFCF /* CDVInvokedUrlCommand.h */,
+				70BD678718FFA12D00A1EFCF /* CDVInvokedUrlCommand.m */,
+				70BD678818FFA12D00A1EFCF /* CDVJSON.h */,
+				70BD678918FFA12D00A1EFCF /* CDVJSON.m */,
+				70BD678A18FFA12D00A1EFCF /* CDVPlugin.h */,
+				70BD678B18FFA12D00A1EFCF /* CDVPlugin.m */,
+				70BD678C18FFA12D00A1EFCF /* CDVPluginResult.h */,
+				70BD678D18FFA12D00A1EFCF /* CDVPluginResult.m */,
+				70BD678E18FFA12D00A1EFCF /* CDVReachability.h */,
+				70BD678F18FFA12D00A1EFCF /* CDVReachability.m */,
+			);
+			path = Commands;
+			sourceTree = "<group>";
+		};
+		70BD679018FFA12D00A1EFCF /* Utils */ = {
+			isa = PBXGroup;
+			children = (
+				70BD679118FFA12D00A1EFCF /* NSData+Base64.h */,
+				70BD679218FFA12D00A1EFCF /* NSData+Base64.m */,
+				70BD679318FFA12D00A1EFCF /* NSWindow+Utils.h */,
+				70BD679418FFA12D00A1EFCF /* NSWindow+Utils.m */,
+				70BD679518FFA12D00A1EFCF /* ShellUtils.h */,
+				70BD679618FFA12D00A1EFCF /* ShellUtils.m */,
+			);
+			path = Utils;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		70BD673818FF9DAE00A1EFCF /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				70BD67A218FFA12D00A1EFCF /* CDVCommandQueue.h in Headers */,
+				70BD67A418FFA12D00A1EFCF /* CDVConfigParser.h in Headers */,
+				70BD679D18FFA12D00A1EFCF /* CDV.h in Headers */,
+				70BD67B518FFA12D00A1EFCF /* CDVReachability.h in Headers */,
+				70BD67AD18FFA12D00A1EFCF /* CDVInvokedUrlCommand.h in Headers */,
+				70BD679718FFA12D00A1EFCF /* CDVBridge.h in Headers */,
+				70BD67AB18FFA12D00A1EFCF /* CDVDevice.h in Headers */,
+				70BD67AF18FFA12D00A1EFCF /* CDVJSON.h in Headers */,
+				70BD67AA18FFA12D00A1EFCF /* CDVDebug.h in Headers */,
+				70BD679B18FFA12D00A1EFCF /* CDVWebViewDelegate.h in Headers */,
+				70BD67A818FFA12D00A1EFCF /* CDVConsole.h in Headers */,
+				70BD67B718FFA12D00A1EFCF /* NSData+Base64.h in Headers */,
+				70BD679F18FFA12D00A1EFCF /* CDVCommandDelegate.h in Headers */,
+				70BD679E18FFA12D00A1EFCF /* CDVAvailability.h in Headers */,
+				70BD679918FFA12D00A1EFCF /* CDVViewController.h in Headers */,
+				70BD67BB18FFA12D00A1EFCF /* ShellUtils.h in Headers */,
+				70BD67B118FFA12D00A1EFCF /* CDVPlugin.h in Headers */,
+				70BD67B318FFA12D00A1EFCF /* CDVPluginResult.h in Headers */,
+				70BD67A618FFA12D00A1EFCF /* CDVConnection.h in Headers */,
+				70BD67A018FFA12D00A1EFCF /* CDVCommandDelegateImpl.h in Headers */,
+				70BD67B918FFA12D00A1EFCF /* NSWindow+Utils.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		70BD673918FF9DAE00A1EFCF /* Cordova */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 70BD675E18FF9DAE00A1EFCF /* Build configuration list for PBXNativeTarget "Cordova" */;
+			buildPhases = (
+				70BD673618FF9DAE00A1EFCF /* Sources */,
+				70BD673718FF9DAE00A1EFCF /* Frameworks */,
+				70BD673818FF9DAE00A1EFCF /* Headers */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = Cordova;
+			productName = CordovaLib;
+			productReference = 70BD673A18FF9DAE00A1EFCF /* libCordova.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+		70BD674C18FF9DAE00A1EFCF /* CordovaLibTests */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 70BD676118FF9DAE00A1EFCF /* Build configuration list for PBXNativeTarget "CordovaLibTests" */;
+			buildPhases = (
+				70BD674918FF9DAE00A1EFCF /* Sources */,
+				70BD674A18FF9DAE00A1EFCF /* Frameworks */,
+				70BD674B18FF9DAE00A1EFCF /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				70BD675218FF9DAE00A1EFCF /* PBXTargetDependency */,
+			);
+			name = CordovaLibTests;
+			productName = CordovaLibTests;
+			productReference = 70BD674D18FF9DAE00A1EFCF /* CordovaLibTests.xctest */;
+			productType = "com.apple.product-type.bundle.unit-test";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		70BD673218FF9DAE00A1EFCF /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0510;
+				ORGANIZATIONNAME = "Apache Software Foundation";
+			};
+			buildConfigurationList = 70BD673518FF9DAE00A1EFCF /* Build configuration list for PBXProject "CordovaLib" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+			);
+			mainGroup = 70BD673118FF9DAE00A1EFCF;
+			productRefGroup = 70BD673B18FF9DAE00A1EFCF /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				70BD673918FF9DAE00A1EFCF /* Cordova */,
+				70BD674C18FF9DAE00A1EFCF /* CordovaLibTests */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		70BD674B18FF9DAE00A1EFCF /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				70BD675918FF9DAE00A1EFCF /* InfoPlist.strings in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		70BD673618FF9DAE00A1EFCF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				70BD67A918FFA12D00A1EFCF /* CDVConsole.m in Sources */,
+				70BD67A118FFA12D00A1EFCF /* CDVCommandDelegateImpl.m in Sources */,
+				70BD67AE18FFA12D00A1EFCF /* CDVInvokedUrlCommand.m in Sources */,
+				70BD67B018FFA12D00A1EFCF /* CDVJSON.m in Sources */,
+				70BD67A318FFA12D00A1EFCF /* CDVCommandQueue.m in Sources */,
+				70BD67B818FFA12D00A1EFCF /* NSData+Base64.m in Sources */,
+				70BD67AC18FFA12D00A1EFCF /* CDVDevice.m in Sources */,
+				70BD67B618FFA12D00A1EFCF /* CDVReachability.m in Sources */,
+				70BD679C18FFA12D00A1EFCF /* CDVWebViewDelegate.m in Sources */,
+				70BD679818FFA12D00A1EFCF /* CDVBridge.m in Sources */,
+				70BD67BC18FFA12D00A1EFCF /* ShellUtils.m in Sources */,
+				70BD67A518FFA12D00A1EFCF /* CDVConfigParser.m in Sources */,
+				70BD679A18FFA12D00A1EFCF /* CDVViewController.m in Sources */,
+				70BD67B218FFA12D00A1EFCF /* CDVPlugin.m in Sources */,
+				70BD67BA18FFA12D00A1EFCF /* NSWindow+Utils.m in Sources */,
+				70BD67B418FFA12D00A1EFCF /* CDVPluginResult.m in Sources */,
+				70BD67A718FFA12D00A1EFCF /* CDVConnection.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		70BD674918FF9DAE00A1EFCF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				70BD675B18FF9DAE00A1EFCF /* CordovaLibTests.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		70BD675218FF9DAE00A1EFCF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 70BD673918FF9DAE00A1EFCF /* Cordova */;
+			targetProxy = 70BD675118FF9DAE00A1EFCF /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+		70BD675718FF9DAE00A1EFCF /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				70BD675818FF9DAE00A1EFCF /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		70BD675C18FF9DAE00A1EFCF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				MACOSX_DEPLOYMENT_TARGET = 10.9;
+				ONLY_ACTIVE_ARCH = YES;
+				PRODUCT_NAME = Cordova;
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SDKROOT = macosx;
+			};
+			name = Debug;
+		};
+		70BD675D18FF9DAE00A1EFCF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				MACOSX_DEPLOYMENT_TARGET = 10.9;
+				PRODUCT_NAME = Cordova;
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SDKROOT = macosx;
+			};
+			name = Release;
+		};
+		70BD675F18FF9DAE00A1EFCF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "CordovaLib/CordovaLib-Prefix.pch";
+				PRIVATE_HEADERS_FOLDER_PATH = "$(PUBLIC_HEADERS_FOLDER_PATH)/Private";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				PUBLIC_HEADERS_FOLDER_PATH = "include/$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+			};
+			name = Debug;
+		};
+		70BD676018FF9DAE00A1EFCF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "CordovaLib/CordovaLib-Prefix.pch";
+				PRIVATE_HEADERS_FOLDER_PATH = "$(PUBLIC_HEADERS_FOLDER_PATH)/Private";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				PUBLIC_HEADERS_FOLDER_PATH = "include/$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+			};
+			name = Release;
+		};
+		70BD676218FF9DAE00A1EFCF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COMBINE_HIDPI_IMAGES = YES;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(DEVELOPER_FRAMEWORKS_DIR)",
+					"$(inherited)",
+				);
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "CordovaLib/CordovaLib-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				INFOPLIST_FILE = "CordovaLibTests/CordovaLibTests-Info.plist";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = xctest;
+			};
+			name = Debug;
+		};
+		70BD676318FF9DAE00A1EFCF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COMBINE_HIDPI_IMAGES = YES;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(DEVELOPER_FRAMEWORKS_DIR)",
+					"$(inherited)",
+				);
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "CordovaLib/CordovaLib-Prefix.pch";
+				INFOPLIST_FILE = "CordovaLibTests/CordovaLibTests-Info.plist";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = xctest;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		70BD673518FF9DAE00A1EFCF /* Build configuration list for PBXProject "CordovaLib" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				70BD675C18FF9DAE00A1EFCF /* Debug */,
+				70BD675D18FF9DAE00A1EFCF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		70BD675E18FF9DAE00A1EFCF /* Build configuration list for PBXNativeTarget "Cordova" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				70BD675F18FF9DAE00A1EFCF /* Debug */,
+				70BD676018FF9DAE00A1EFCF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		70BD676118FF9DAE00A1EFCF /* Build configuration list for PBXNativeTarget "CordovaLibTests" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				70BD676218FF9DAE00A1EFCF /* Debug */,
+				70BD676318FF9DAE00A1EFCF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 70BD673218FF9DAE00A1EFCF /* Project object */;
+}

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/CDVBridge.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/CDVBridge.h b/CordovaLib/CordovaLib/Classes/CDVBridge.h
new file mode 100644
index 0000000..5d15064
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/CDVBridge.h
@@ -0,0 +1,42 @@
+/*
+ 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.
+ */
+
+#import <Cocoa/Cocoa.h>
+@class WebView;
+@class CDVViewController;
+
+@interface CDVBridge : NSObject {
+	
+}
+
+@property (nonatomic, weak) WebView* webView;
+@property (nonatomic,
+#ifdef __MAC_10_8
+           weak
+#else
+           assign
+#endif
+           ) CDVViewController* viewController;
+
+
+- (id) initWithWebView:(WebView*)webView andViewController:(CDVViewController*)viewController;
+- (void) exec:(NSString*)callbackId withService:(NSString*)service andAction:(NSString*)action andArguments:(NSArray*)arguments;
+
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/CDVBridge.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/CDVBridge.m b/CordovaLib/CordovaLib/Classes/CDVBridge.m
new file mode 100644
index 0000000..e34f8ed
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/CDVBridge.m
@@ -0,0 +1,206 @@
+/*
+ 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.
+ */
+
+#import <WebKit/WebKit.h>
+#import <AppKit/AppKit.h>
+#import <Foundation/NSJSONSerialization.h>
+#include <objc/message.h>
+
+#import "CDVBridge.h"
+#import "CDVViewController.h"
+
+@implementation CDVBridge
+
+- (BOOL) isArray:(id)item
+{
+    id win = [self.webView windowScriptObject];
+    WebScriptObject* bridgeUtil = [win evaluateWebScript:@"CordovaBridgeUtil"];
+    NSNumber* result = [bridgeUtil callWebScriptMethod:@"isArray" withArguments:[NSArray arrayWithObject:item]];
+
+    return [result boolValue];
+}
+
+- (BOOL) isDictionary:(id)item
+{
+    id win = [self.webView windowScriptObject];
+    WebScriptObject* bridgeUtil = [win evaluateWebScript:@"CordovaBridgeUtil"];
+    NSNumber* result = [bridgeUtil callWebScriptMethod:@"isObject" withArguments:[NSArray arrayWithObject:item]];
+    return [result boolValue];
+}
+
+- (NSDictionary*) convertWebScriptObjectToNSDictionary:(WebScriptObject*)webScriptObject
+{
+    // Assumption: webScriptObject has already been tested using isDictionary:
+
+    id win = [self.webView windowScriptObject];
+
+    WebScriptObject* keysObject = [win callWebScriptMethod:@"CordovaBridgeUtil.getDictionaryKeys" withArguments:[NSArray arrayWithObject:webScriptObject]];
+    NSArray* keys = [self convertWebScriptObjectToNSArray:keysObject];
+    NSMutableDictionary* dict = [NSMutableDictionary dictionaryWithCapacity:[keys count]];
+
+    NSEnumerator* enumerator = [keys objectEnumerator];
+    id key;
+    while (key = [enumerator nextObject]) {
+        [dict setObject:[webScriptObject valueForKey:key] forKey:key];
+    }
+    
+    return dict;
+}
+
+- (NSArray*) convertWebScriptObjectToNSArray:(WebScriptObject*)webScriptObject
+{
+    // Assumption: webScriptObject has already been tested using isArray:
+    
+    NSUInteger count = [[webScriptObject valueForKey:@"length"] integerValue];
+    NSMutableArray *a = [NSMutableArray array];
+    for (unsigned i = 0; i < count; i++) {
+        id item = [webScriptObject webScriptValueAtIndex:i];
+        if ([item isKindOfClass:[WebScriptObject class]]) {
+            if ([self isArray:item]) {
+                [a addObject:[self convertWebScriptObjectToNSArray:item]];
+            } else if ([self isDictionary:item]) {
+                [a addObject:[self convertWebScriptObjectToNSDictionary:item]];
+            };
+        } else {
+            [a addObject:item];
+        }
+    }
+    
+    return a;
+}
+
+- (void) registerJavaScriptHelpers
+{
+    NSString* cordovaBridgeUtil = @"CordovaBridgeUtil = {};";
+    NSString* isArray = [NSString stringWithFormat:@"CordovaBridgeUtil.isArray = function(obj) { return obj.constructor == Array; };"];
+    NSString* isObject = [NSString stringWithFormat:@"CordovaBridgeUtil.isObject = function(obj) { return obj.constructor == Object; };"];
+    NSString* dictionaryKeys = [NSString stringWithFormat:
+                                @" \
+                                CordovaBridgeUtil.getDictionaryKeys = function(obj) { \
+                                    var a = []; \
+                                    for (var key in obj) { \
+                                        if (!obj.hasOwnProperty(key)) { \
+                                            continue; \
+                                        } \
+                                        a.push(key); \
+                                    } \
+                                    return a; \
+                                }"
+                                ];
+    
+    id win = [self.webView windowScriptObject];
+    [win evaluateWebScript:cordovaBridgeUtil];
+    [win evaluateWebScript:isArray];
+    [win evaluateWebScript:isObject];
+    [win evaluateWebScript:dictionaryKeys];
+}
+
+- (id) initWithWebView:(WebView *)webView andViewController:(CDVViewController*)viewController
+{
+    if ((self = [super init]) != nil) {
+        self.webView = webView;
+        self.viewController = viewController;
+        [self registerJavaScriptHelpers];
+    }
+    
+    return self;
+}
+
+- (void) exec:(NSString*)callbackId withService:(NSString*)service andAction:(NSString*)action andArguments:(WebScriptObject*)webScriptObject
+{
+    // We are going with the iOS method of passing in a callbackId.
+    // Note that we can use the JavaScriptCore C API to pass in the JavaScript function references
+    // and context and call them directly, but this is done this way for possible plugin sharing
+    // between iOS and OS X. Also we are going async as well.
+    
+    // we're just going to assume the webScriptObject passed in is an NSArray
+    NSArray* arguments = [self convertWebScriptObjectToNSArray:webScriptObject];
+    
+    CDVInvokedUrlCommand* command = [[CDVInvokedUrlCommand alloc] initWithArguments:arguments callbackId:callbackId className:service methodName:action];
+    
+    if ((command.className == nil) || (command.methodName == nil)) {
+        NSLog(@"ERROR: Classname and/or methodName not found for command.");
+        return;
+    }
+    
+    // Fetch an instance of this class
+    CDVPlugin* obj = [_viewController.commandDelegate getCommandInstance:command.className];
+    
+    if (!([obj isKindOfClass:[CDVPlugin class]])) {
+        NSLog(@"ERROR: Plugin '%@' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.", command.className);
+        return;
+    }
+
+    // Find the proper selector to call.
+    NSString* methodName = [NSString stringWithFormat:@"%@:", command.methodName];
+    SEL normalSelector = NSSelectorFromString(methodName);
+    if ([obj respondsToSelector:normalSelector]) {
+        // [obj performSelector:normalSelector withObject:command];
+        objc_msgSend(obj, normalSelector, command);
+    } else {
+        // There's no method to call, so throw an error.
+        NSLog(@"ERROR: Method '%@' not defined in Plugin '%@'", methodName, command.className);
+    }
+}
+
+#pragma mark WebScripting Protocol
+
+/* checks whether a selector is acceptable to be called from JavaScript */
++ (BOOL) isSelectorExcludedFromWebScript:(SEL)selector
+{
+	BOOL	result = YES;
+	
+	int			i = 0;
+	static SEL	* acceptableList = NULL;
+	SEL			currentSelector;
+	
+	if (acceptableList == NULL && (acceptableList = calloc(256, sizeof(SEL))))	// up to 256 selectors
+	{
+		acceptableList[i++] = @selector(exec:withService:andAction:andArguments:);
+	}
+	
+	i = 0;
+	while (result == YES && (currentSelector = acceptableList[i++]))
+	{
+		//checking for exclusions
+		result = !(selector == currentSelector);
+	}
+	
+	return result;
+}
+
+/* helper function so we don't have to have underscores and stuff in js to refer to the right method */
++ (NSString*) webScriptNameForSelector:(SEL)aSelector
+{
+	id	result = nil;
+	
+	if (aSelector == @selector(exec:withService:andAction:andArguments:)) {
+		result = @"exec";
+	}
+	
+	return result;
+}
+
+// right now exclude all properties (eg keys)
++ (BOOL) isKeyExcludedFromWebScript:(const char*)name
+{
+	return YES;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/CDVViewController.h b/CordovaLib/CordovaLib/Classes/CDVViewController.h
new file mode 100644
index 0000000..cdd3bfd
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/CDVViewController.h
@@ -0,0 +1,58 @@
+/*
+ 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.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <WebKit/WebKit.h>
+#import <Foundation/NSJSONSerialization.h>
+#import "CDVAvailability.h"
+#import "CDVInvokedUrlCommand.h"
+#import "CDVCommandDelegate.h"
+#import "CDVCommandQueue.h"
+#import "CDVPlugin.h"
+#import "CDVWebViewDelegate.h"
+
+@interface CDVViewController : NSWindowController
+{
+    @protected
+    id <CDVCommandDelegate> _commandDelegate;
+    @protected
+    CDVCommandQueue* _commandQueue;
+    NSString* _userAgent;
+}
+
+@property (nonatomic, strong) IBOutlet NSView* contentView;
+@property (nonatomic, strong) IBOutlet WebView* webView;
+@property (nonatomic, strong) IBOutlet CDVWebViewDelegate* webViewDelegate;
+
+@property (nonatomic, readonly, strong) NSMutableDictionary* pluginObjects;
+@property (nonatomic, readonly, strong) NSDictionary* pluginsMap;
+@property (nonatomic, readonly, strong) NSMutableDictionary* settings;
+@property (nonatomic, readonly, strong) NSXMLParser* configParser;
+@property (nonatomic, readonly, assign) BOOL loadFromString;
+
+@property (nonatomic, readwrite, copy) NSString* wwwFolderName;
+@property (nonatomic, readwrite, copy) NSString* startPage;
+@property (nonatomic, readonly, strong) CDVCommandQueue* commandQueue;
+@property (nonatomic, readonly, strong) id <CDVCommandDelegate> commandDelegate;
+
+- (id)getCommandInstance:(NSString*)pluginName;
+- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className;
+- (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/CDVViewController.m b/CordovaLib/CordovaLib/Classes/CDVViewController.m
new file mode 100644
index 0000000..f9fdaa7
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/CDVViewController.m
@@ -0,0 +1,222 @@
+/*
+ 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.
+ */
+
+#import "CDVViewController.h"
+#import "CDVConfigParser.h"
+#import "CDVCommandDelegateImpl.h"
+
+@interface CDVViewController ()
+
+@property (nonatomic, readwrite, strong) NSXMLParser* configParser;
+@property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
+@property (nonatomic, readwrite, strong) NSMutableDictionary* pluginObjects;
+@property (nonatomic, readwrite, strong) NSArray* startupPluginNames;
+@property (nonatomic, readwrite, strong) NSDictionary* pluginsMap;
+@property (nonatomic, readwrite, assign) BOOL loadFromString;
+
+@end
+
+@implementation CDVViewController
+
+@synthesize webView;
+@synthesize pluginObjects, pluginsMap, startupPluginNames;
+@synthesize configParser, settings, loadFromString;
+@synthesize wwwFolderName, startPage;
+@synthesize commandDelegate = _commandDelegate;
+@synthesize commandQueue = _commandQueue;
+
+- (void) awakeFromNib
+{
+    _commandDelegate = [[CDVCommandDelegateImpl alloc] initWithViewController:self];
+
+    // make the linker happy since CDVWebViewDelegate is not referenced anywhere and would be stripped out
+    // see http://stackoverflow.com/questions/1725881/unknown-class-myclass-in-interface-builder-file-error-at-runtime
+    [CDVWebViewDelegate class];
+    //self.webViewDelegate.viewController = self;
+    
+    NSURL* appURL = nil;
+    NSString* loadErr = nil;
+    
+    if ([self.startPage rangeOfString:@"://"].location != NSNotFound) {
+        appURL = [NSURL URLWithString:self.startPage];
+    } else if ([self.wwwFolderName rangeOfString:@"://"].location != NSNotFound) {
+        appURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", self.wwwFolderName, self.startPage]];
+    } else {
+        NSString* startFilePath = [self.commandDelegate pathForResource:self.startPage];
+        if (startFilePath == nil) {
+            loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.wwwFolderName, self.startPage];
+            NSLog(@"%@", loadErr);
+            self.loadFromString = YES;
+            appURL = nil;
+        } else {
+            appURL = [NSURL fileURLWithPath:startFilePath];
+        }
+    }
+    
+    if (!loadErr) {
+        NSURLRequest* appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
+        [[self.webView mainFrame] loadRequest:appReq];
+        
+    } else {
+        NSString* html = [NSString stringWithFormat:@"<html><body> %@ </body></html>", loadErr];
+        [[self.webView mainFrame] loadHTMLString:html baseURL:nil];
+    }
+    
+    for (NSString* pluginName in self.startupPluginNames) {
+        [self getCommandInstance:pluginName];
+    }
+    
+    // initialize items based on settings
+    
+    BOOL enableWebGL = [[self.settings objectForKey:@"EnableWebGL"] boolValue];
+    WebPreferences* prefs = [self.webView preferences];
+    
+    // Note that this preference may not be Mac App Store safe
+    if (enableWebGL && [prefs respondsToSelector:@selector(setWebGLEnabled:)]) {
+        [prefs performSelector:@selector(setWebGLEnabled:) withObject:[NSNumber numberWithBool:enableWebGL]];
+    }
+}
+
+- (void) __init
+{
+    [self loadSettings];
+}
+
+- (id) init
+{
+    self = [super init];
+    if (self) {
+        // Initialization code here.
+        [self __init];
+    }
+    return self;
+}
+
+- (id)initWithWindowNibName:(NSString*)nibNameOrNil
+{
+    self = [super initWithWindowNibName:nibNameOrNil];
+    if (self) {
+        // Initialization code here.
+        [self __init];
+    }
+    return self;
+}
+
+- (void)loadSettings
+{
+    CDVConfigParser* delegate = [[CDVConfigParser alloc] init];
+    
+    // read from config.xml in the app bundle
+    NSString* path = [[NSBundle mainBundle] pathForResource:@"config" ofType:@"xml"];
+    
+    if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
+        NSAssert(NO, @"ERROR: config.xml does not exist.");
+        return;
+    }
+    
+    NSURL* url = [NSURL fileURLWithPath:path];
+    
+    configParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
+    if (configParser == nil) {
+        NSLog(@"Failed to initialize XML parser.");
+        return;
+    }
+    [configParser setDelegate:((id < NSXMLParserDelegate >)delegate)];
+    [configParser parse];
+    
+    // Get the plugin dictionary, whitelist and settings from the delegate.
+    self.pluginsMap = delegate.pluginsDict;
+    self.startupPluginNames = delegate.startupPluginNames;
+    self.settings = delegate.settings;
+    
+    // And the start folder/page.
+    self.wwwFolderName = @"www";
+    self.startPage = delegate.startPage;
+    if (self.startPage == nil) {
+        self.startPage = @"index.html";
+    }
+    
+    // Initialize the plugin objects dict.
+    self.pluginObjects = [[NSMutableDictionary alloc] initWithCapacity:20];
+}
+
+- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className
+{
+    if ([plugin respondsToSelector:@selector(setViewController:)]) {
+        [plugin setViewController:self];
+    }
+    
+    if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) {
+        [plugin setCommandDelegate:_commandDelegate];
+    }
+    
+    [self.pluginObjects setObject:plugin forKey:className];
+    [plugin pluginInitialize];
+}
+
+- (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName
+{
+    if ([plugin respondsToSelector:@selector(setViewController:)]) {
+        [plugin setViewController:self];
+    }
+    
+    if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) {
+        [plugin setCommandDelegate:_commandDelegate];
+    }
+    
+    NSString* className = NSStringFromClass([plugin class]);
+    [self.pluginObjects setObject:plugin forKey:className];
+    [self.pluginsMap setValue:className forKey:[pluginName lowercaseString]];
+    [plugin pluginInitialize];
+}
+
+/**
+ Returns an instance of a CordovaCommand object, based on its name.  If one exists already, it is returned.
+ */
+- (id)getCommandInstance:(NSString*)pluginName
+{
+    // first, we try to find the pluginName in the pluginsMap
+    // (acts as a whitelist as well) if it does not exist, we return nil
+    // NOTE: plugin names are matched as lowercase to avoid problems - however, a
+    // possible issue is there can be duplicates possible if you had:
+    // "org.apache.cordova.Foo" and "org.apache.cordova.foo" - only the lower-cased entry will match
+    NSString* className = [self.pluginsMap objectForKey:[pluginName lowercaseString]];
+    
+    if (className == nil) {
+        return nil;
+    }
+    
+    id obj = [self.pluginObjects objectForKey:className];
+    if (!obj) {
+        obj = [[NSClassFromString (className)alloc] initWithWebView:webView];
+        
+        if (obj != nil) {
+            [self registerPlugin:obj withClassName:className];
+        } else {
+            NSLog(@"CDVPlugin class %@ (pluginName: %@) does not exist.", className, pluginName);
+        }
+    }
+    return obj;
+}
+
+- (void) windowResized:(NSNotification*)notification;
+{
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.h b/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.h
new file mode 100644
index 0000000..348ad54
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.h
@@ -0,0 +1,40 @@
+/*
+ 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.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <WebKit/WebKit.h>
+
+@class CDVConsole;
+@class CDVBridge;
+@class CDVViewController;
+
+@interface CDVWebViewDelegate : NSObject {
+}
+
+@property (nonatomic, strong) CDVConsole* console;
+@property (nonatomic, strong) CDVBridge* bridge;
+@property (nonatomic,
+#ifdef __MAC_10_8
+    weak
+#else
+    strong
+#endif
+    ) IBOutlet CDVViewController* viewController;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.m b/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.m
new file mode 100644
index 0000000..04fbd86
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.m
@@ -0,0 +1,151 @@
+/*
+ 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.
+ */
+
+
+#import "CDVWebViewDelegate.h"
+#import "CDVConsole.h"
+#import "CDVBridge.h"
+
+@implementation CDVWebViewDelegate
+
+@synthesize console;
+
+- (void)webView:(WebView*)webView didClearWindowObject:(WebScriptObject*)windowScriptObject forFrame:(WebFrame*)frame
+{
+	if (self.console == nil) {
+        self.console = [CDVConsole new];
+    }
+	[windowScriptObject setValue:self.console forKey:@"console"];
+	
+	if (self.bridge == nil) {
+        self.bridge = [[CDVBridge alloc] initWithWebView:webView andViewController:self.viewController];
+    }
+    [windowScriptObject setValue:self.bridge forKey:@"cordovabridge"];
+}
+
+- (void)webView:(WebView*)sender didFinishLoadForFrame:(WebFrame*)frame
+{
+    id win = [sender windowScriptObject];
+    NSString* nativeReady = @"try{cordova.require('cordova/channel').onNativeReady.fire();}catch(e){window._nativeReady = true;}";
+    [win evaluateWebScript:nativeReady];
+}
+
+- (void) webView:(WebView*)webView addMessageToConsole:(NSDictionary*)message
+{
+	if (![message isKindOfClass:[NSDictionary class]]) { 
+		return;
+	}
+	
+	NSLog(@"JavaScript error: %@:%@: %@", 
+		  [[message objectForKey:@"sourceURL"] lastPathComponent],	// could be nil
+		  [message objectForKey:@"lineNumber"],
+		  [message objectForKey:@"message"]);
+}
+
+#pragma mark WebScripting protocol
+
+/* checks whether a selector is acceptable to be called from JavaScript */
++ (BOOL) isSelectorExcludedFromWebScript:(SEL)selector
+{
+	return YES;
+}
+
+// right now exclude all properties (eg keys)
++ (BOOL) isKeyExcludedFromWebScript:(const char*)name
+{
+	return YES;
+}
+
+#pragma mark WebPolicyDelegate
+
+- (void)webView:(WebView *)sender decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener
+{	
+    NSString* url = [[request URL] description];
+    NSLog(@"navigating to %@", url);
+
+    [listener use];
+}
+
+
+#pragma mark WebUIDelegate
+
+- (BOOL)webView:(WebView*)sender runBeforeUnloadConfirmPanelWithMessage:(NSString*)message initiatedByFrame:(WebFrame*)frame
+{
+    return [self webView:sender runJavaScriptConfirmPanelWithMessage:message initiatedByFrame:frame];
+}
+
+- (void)webView:(WebView *)sender runOpenPanelForFileButtonWithResultListener:(id < WebOpenPanelResultListener >)resultListener allowMultipleFiles:(BOOL)allowMultipleFiles
+{
+    NSOpenPanel* dialog = [NSOpenPanel openPanel];
+    
+    [dialog setCanChooseFiles:YES];
+    [dialog setAllowsMultipleSelection:allowMultipleFiles];
+    [dialog setCanChooseDirectories:YES];
+    
+    if ([dialog runModal] == NSOKButton) {
+        [resultListener chooseFilenames:[[dialog URLs] valueForKey:@"relativePath"]];
+    }
+}
+
+- (void)webView:(WebView*)sender runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener
+{
+    [self webView:sender runOpenPanelForFileButtonWithResultListener:resultListener allowMultipleFiles:NO];
+}
+
+- (void)webView:(WebView*)sender runJavaScriptAlertPanelWithMessage:(NSString*)message initiatedByFrame:(WebFrame*)frame
+{
+    NSAlert* alert = [[NSAlert alloc] init];
+    [alert addButtonWithTitle:NSLocalizedString(@"OK", @"")];
+    [alert setMessageText:message];
+    
+    [alert runModal];
+}
+
+- (BOOL)webView:(WebView*)sender runJavaScriptConfirmPanelWithMessage:(NSString*)message initiatedByFrame:(WebFrame*)frame
+{
+    NSAlert* alert = [[NSAlert alloc] init];
+    [alert addButtonWithTitle:NSLocalizedString(@"OK", @"")];
+    [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"")];
+    [alert setMessageText:message];
+    
+    return ([alert runModal] == NSAlertFirstButtonReturn);
+}
+
+- (NSString*)webView:(WebView*)sender runJavaScriptTextInputPanelWithPrompt:(NSString*)prompt defaultText:(NSString*)defaultText initiatedByFrame:(WebFrame*)frame
+{
+    NSAlert* alert = [NSAlert alertWithMessageText:prompt
+                                     defaultButton:NSLocalizedString(@"OK", @"")
+                                   alternateButton:NSLocalizedString(@"Cancel", @"")
+                                       otherButton:nil
+                         informativeTextWithFormat:@""];
+    
+    NSTextField* input = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)];
+    [input setStringValue:defaultText];
+    [alert setAccessoryView:input];
+    
+    NSInteger button = [alert runModal];
+    if (button == NSAlertDefaultReturn) {
+        [input validateEditing];
+        return [input stringValue];
+    }
+    
+    return nil;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDV.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDV.h b/CordovaLib/CordovaLib/Classes/Commands/CDV.h
new file mode 100644
index 0000000..2442121
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDV.h
@@ -0,0 +1,29 @@
+/*
+ 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.
+ */
+
+#import "CDVAvailability.h"
+
+#import "CDVJSON.h"
+#import "CDVDebug.h"
+#import "CDVPluginResult.h"
+#import "CDVInvokedUrlCommand.h"
+#import "CDVPlugin.h"
+#import "CDVDevice.h"
+
+#import "ShellUtils.h"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVAvailability.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVAvailability.h b/CordovaLib/CordovaLib/Classes/Commands/CDVAvailability.h
new file mode 100644
index 0000000..fb16806
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVAvailability.h
@@ -0,0 +1,59 @@
+/*
+ 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.
+ */
+
+#define __CORDOVA_OSX__
+
+#define __CORDOVA_2_6_0 20600
+#define __CORDOVA_2_7_0 20700
+#define __CORDOVA_2_8_0 20800
+#define __CORDOVA_2_9_0 20900
+#define __CORDOVA_3_0_0 30000
+#define __CORDOVA_NA 99999      /* not available */
+
+/*
+ #if CORDOVA_VERSION_MIN_REQUIRED >= __CORDOVA_1_7_0
+    // do something when its at least 1.7.0
+ #else
+    // do something else (non 1.7.0)
+ #endif
+ */
+#ifndef CORDOVA_VERSION_MIN_REQUIRED
+    #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_3_0_0
+#endif
+
+
+/* Return the string version of the decimal version */
+#define CDV_VERSION [NSString stringWithFormat:@"%d.%d.%d", \
+        (CORDOVA_VERSION_MIN_REQUIRED / 10000),             \
+        (CORDOVA_VERSION_MIN_REQUIRED % 10000) / 100,       \
+        (CORDOVA_VERSION_MIN_REQUIRED % 10000) % 100]
+
+#ifdef __clang__
+    #define CDV_DEPRECATED(version, msg) __attribute__((deprecated("Deprecated in Cordova " #version ". " msg)))
+#else
+    #define CDV_DEPRECATED(version, msg) __attribute__((deprecated()))
+#endif
+
+// Enable this to log all exec() calls.
+#define CDV_ENABLE_EXEC_LOGGING 0
+#if CDV_ENABLE_EXEC_LOGGING
+    #define CDV_EXEC_LOG NSLog
+#else
+    #define CDV_EXEC_LOG(...) do {} while (NO)
+#endif

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVCommandDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVCommandDelegate.h b/CordovaLib/CordovaLib/Classes/Commands/CDVCommandDelegate.h
new file mode 100644
index 0000000..e177c63
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVCommandDelegate.h
@@ -0,0 +1,55 @@
+/*
+ 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.
+ */
+
+#import "CDVAvailability.h"
+#import "CDVInvokedUrlCommand.h"
+
+@class CDVPlugin;
+@class CDVPluginResult;
+@class CDVWhitelist;
+
+@protocol CDVCommandDelegate <NSObject>
+
+@property (nonatomic, readonly) NSDictionary* settings;
+
+- (NSString*)pathForResource:(NSString*)resourcepath;
+- (id)getCommandInstance:(NSString*)pluginName;
+- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className CDV_DEPRECATED(2.2, "Use CDVViewController to register plugins, or use config.xml.");
+
+// Plugins should not be using this interface to call other plugins since it
+// will result in bogus callbacks being made.
+- (BOOL)execute:(CDVInvokedUrlCommand*)command CDV_DEPRECATED(2.2, "Use direct method calls instead.");
+
+// Sends a plugin result to the JS. This is thread-safe.
+- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId;
+// Evaluates the given JS. This is thread-safe.
+- (void)evalJs:(NSString*)js;
+// Can be used to evaluate JS right away instead of scheduling it on the run-loop.
+// This is required for dispatch resign and pause events, but should not be used
+// without reason. Without the run-loop delay, alerts used in JS callbacks may result
+// in dead-lock. This method must be called from the UI thread.
+- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop;
+// Runs the given block on a background thread using a shared thread-pool.
+- (void)runInBackground:(void (^)())block;
+// Returns the User-Agent of the associated UIWebView.
+- (NSString*)userAgent;
+// Returns whether the given URL passes the white-list.
+- (BOOL)URLIsWhitelisted:(NSURL*)url;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVCommandDelegateImpl.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVCommandDelegateImpl.h b/CordovaLib/CordovaLib/Classes/Commands/CDVCommandDelegateImpl.h
new file mode 100644
index 0000000..acbb236
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVCommandDelegateImpl.h
@@ -0,0 +1,35 @@
+/*
+ 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.
+ */
+
+#import "CDVCommandDelegate.h"
+
+@class CDVViewController;
+@class CDVCommandQueue;
+
+@interface CDVCommandDelegateImpl : NSObject <CDVCommandDelegate>{
+//    @private
+#ifdef __MAC_10_8
+    __weak
+#endif
+    CDVViewController* _viewController;
+    @protected
+    __weak CDVCommandQueue* _commandQueue;
+}
+- (id)initWithViewController:(CDVViewController*)viewController;
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVCommandDelegateImpl.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVCommandDelegateImpl.m b/CordovaLib/CordovaLib/Classes/Commands/CDVCommandDelegateImpl.m
new file mode 100644
index 0000000..ed082aa
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVCommandDelegateImpl.m
@@ -0,0 +1,156 @@
+/*
+ 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.
+ */
+
+#import "CDVCommandDelegateImpl.h"
+#import "CDVJSON.h"
+#import "CDVCommandQueue.h"
+#import "CDVPluginResult.h"
+#import "CDVViewController.h"
+
+@implementation CDVCommandDelegateImpl
+
+- (id)initWithViewController:(CDVViewController*)viewController
+{
+    self = [super init];
+    if (self != nil) {
+        _viewController = viewController;
+        // TODO:
+        //_commandQueue = _viewController.commandQueue;
+    }
+    return self;
+}
+
+- (NSString*)pathForResource:(NSString*)resourcepath
+{
+    NSBundle* mainBundle = [NSBundle mainBundle];
+    NSMutableArray* directoryParts = [NSMutableArray arrayWithArray:[resourcepath componentsSeparatedByString:@"/"]];
+    NSString* filename = [directoryParts lastObject];
+
+    [directoryParts removeLastObject];
+
+    NSString* directoryPartsJoined = [directoryParts componentsJoinedByString:@"/"];
+    NSString* directoryStr = _viewController.wwwFolderName;
+
+    if ([directoryPartsJoined length] > 0) {
+        directoryStr = [NSString stringWithFormat:@"%@/%@", _viewController.wwwFolderName, [directoryParts componentsJoinedByString:@"/"]];
+    }
+
+    return [mainBundle pathForResource:filename ofType:@"" inDirectory:directoryStr];
+}
+
+- (void)evalJsHelper2:(NSString*)js
+{
+    CDV_EXEC_LOG(@"Exec: evalling: %@", [js substringToIndex:MIN([js length], 160)]);
+    NSString* commandsJSON = [_viewController.webView stringByEvaluatingJavaScriptFromString:js];
+    if ([commandsJSON length] > 0) {
+        CDV_EXEC_LOG(@"Exec: Retrieved new exec messages by chaining.");
+    }
+    
+    // TODO:
+//    [_commandQueue enqueCommandBatch:commandsJSON];
+}
+
+- (void)evalJsHelper:(NSString*)js
+{
+    // Cycle the run-loop before executing the JS.
+    // This works around a bug where sometimes alerts() within callbacks can cause
+    // dead-lock.
+    // If the commandQueue is currently executing, then we know that it is safe to
+    // execute the callback immediately.
+    // Using    (dispatch_get_main_queue()) does *not* fix deadlocks for some reaon,
+    // but performSelectorOnMainThread: does.
+
+    if (![NSThread isMainThread] || !_commandQueue.currentlyExecuting) {
+        [self performSelectorOnMainThread:@selector(evalJsHelper2:) withObject:js waitUntilDone:NO];
+    } else {
+        [self evalJsHelper2:js];
+    }
+}
+
+- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId
+{
+    CDV_EXEC_LOG(@"Exec(%@): Sending result. Status=%@", callbackId, result.status);
+    // This occurs when there is are no win/fail callbacks for the call.
+    if ([@"INVALID" isEqualToString:callbackId]) {
+        return;
+    }
+    int status = [result.status intValue];
+    BOOL keepCallback = [result.keepCallback boolValue];
+    NSString* argumentsAsJSON = [result argumentsAsJSON];
+
+    NSString* js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeCallback('%@',%d,%@,%d)", callbackId, status, argumentsAsJSON, keepCallback];
+
+    [self evalJsHelper:js];
+}
+
+- (void)evalJs:(NSString*)js
+{
+    [self evalJs:js scheduledOnRunLoop:YES];
+}
+
+- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop
+{
+    js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeEvalAndFetch(function(){%@})", js];
+    if (scheduledOnRunLoop) {
+        [self evalJsHelper:js];
+    } else {
+        [self evalJsHelper2:js];
+    }
+}
+
+- (BOOL)execute:(CDVInvokedUrlCommand*)command
+{
+    return [_commandQueue execute:command];
+}
+
+- (id)getCommandInstance:(NSString*)pluginName
+{
+    return [_viewController getCommandInstance:pluginName];
+}
+
+- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className
+{
+    [_viewController registerPlugin:plugin withClassName:className];
+}
+
+- (void)runInBackground:(void (^)())block
+{
+    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block);
+}
+
+- (NSString*)userAgent
+{
+    //return [_viewController userAgent];
+    return nil;
+}
+
+- (BOOL)URLIsWhitelisted:(NSURL*)url
+{
+// TODO:
+//    return ![_viewController.whitelist schemeIsAllowed:[url scheme]] ||
+//           [_viewController.whitelist URLIsAllowed:url];
+    return NO;
+}
+
+- (NSDictionary*)settings
+{
+    return _viewController.settings;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVCommandQueue.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVCommandQueue.h b/CordovaLib/CordovaLib/Classes/Commands/CDVCommandQueue.h
new file mode 100644
index 0000000..27c47b5
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVCommandQueue.h
@@ -0,0 +1,40 @@
+/*
+ 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.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class CDVInvokedUrlCommand;
+@class CDVViewController;
+
+@interface CDVCommandQueue : NSObject
+
+@property (nonatomic, readonly) BOOL currentlyExecuting;
+
+- (id)initWithViewController:(CDVViewController*)viewController;
+- (void)dispose;
+
+- (void)resetRequestId;
+- (void)enqueCommandBatch:(NSString*)batchJSON;
+
+- (void)maybeFetchCommandsFromJs:(NSNumber*)requestId;
+- (void)fetchCommandsFromJs;
+- (void)executePending;
+- (BOOL)execute:(CDVInvokedUrlCommand*)command;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVCommandQueue.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVCommandQueue.m b/CordovaLib/CordovaLib/Classes/Commands/CDVCommandQueue.m
new file mode 100644
index 0000000..2ff947b
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVCommandQueue.m
@@ -0,0 +1,167 @@
+/*
+ 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.
+ */
+
+#include <objc/message.h>
+#import "CDV.h"
+#import "CDVCommandQueue.h"
+#import "CDVCommandDelegateImpl.h"
+
+@interface CDVCommandQueue () {
+    NSInteger _lastCommandQueueFlushRequestId;
+#ifdef __MAC_10_8
+    __weak
+#endif
+    NSViewController* _viewController;
+    NSMutableArray* _queue;
+    BOOL _currentlyExecuting;
+}
+@end
+
+@implementation CDVCommandQueue
+
+@synthesize currentlyExecuting = _currentlyExecuting;
+
+- (id)initWithViewController:(NSViewController*)viewController
+{
+    self = [super init];
+    if (self != nil) {
+        _viewController = viewController;
+        _queue = [[NSMutableArray alloc] init];
+    }
+    return self;
+}
+
+- (void)dispose
+{
+    // TODO(agrieve): Make this a zeroing weak ref once we drop support for 4.3.
+    _viewController = nil;
+}
+
+- (void)resetRequestId
+{
+    _lastCommandQueueFlushRequestId = 0;
+}
+
+- (void)enqueCommandBatch:(NSString*)batchJSON
+{
+    if ([batchJSON length] > 0) {
+        [_queue addObject:batchJSON];
+        [self executePending];
+    }
+}
+
+- (void)maybeFetchCommandsFromJs:(NSNumber*)requestId
+{
+    // Use the request ID to determine if we've already flushed for this request.
+    // This is required only because the NSURLProtocol enqueues the same request
+    // multiple times.
+    if ([requestId integerValue] > _lastCommandQueueFlushRequestId) {
+        _lastCommandQueueFlushRequestId = [requestId integerValue];
+        [self fetchCommandsFromJs];
+    }
+}
+
+- (void)fetchCommandsFromJs
+{
+    // TODO:
+//    // Grab all the queued commands from the JS side.
+//    NSString* queuedCommandsJSON = [_viewController.webView stringByEvaluatingJavaScriptFromString:
+//        @"cordova.require('cordova/exec').nativeFetchMessages()"];
+//
+//    [self enqueCommandBatch:queuedCommandsJSON];
+//    if ([queuedCommandsJSON length] > 0) {
+//        CDV_EXEC_LOG(@"Exec: Retrieved new exec messages by request.");
+//    }
+}
+
+- (void)executePending
+{
+    // Make us re-entrant-safe.
+    if (_currentlyExecuting) {
+        return;
+    }
+    @try {
+        _currentlyExecuting = YES;
+
+        for (NSUInteger i = 0; i < [_queue count]; ++i) {
+            // Parse the returned JSON array.
+            NSArray* commandBatch = [[_queue objectAtIndex:i] JSONObject];
+
+            // Iterate over and execute all of the commands.
+            for (NSArray* jsonEntry in commandBatch) {
+                CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonEntry];
+                CDV_EXEC_LOG(@"Exec(%@): Calling %@.%@", command.callbackId, command.className, command.methodName);
+
+                if (![self execute:command]) {
+#ifdef DEBUG
+                        NSString* commandJson = [jsonEntry JSONString];
+                        static NSUInteger maxLogLength = 1024;
+                        NSString* commandString = ([commandJson length] > maxLogLength) ?
+                        [NSString stringWithFormat:@"%@[...]", [commandJson substringToIndex:maxLogLength]] :
+                        commandJson;
+
+                        DLog(@"FAILED pluginJSON = %@", commandString);
+#endif
+                }
+            }
+        }
+
+        [_queue removeAllObjects];
+    } @finally
+    {
+        _currentlyExecuting = NO;
+    }
+}
+
+- (BOOL)execute:(CDVInvokedUrlCommand*)command
+{
+    if ((command.className == nil) || (command.methodName == nil)) {
+        NSLog(@"ERROR: Classname and/or methodName not found for command.");
+        return NO;
+    }
+
+    // Fetch an instance of this class
+    //TODO:
+//    CDVPlugin* obj = [_viewController.commandDelegate getCommandInstance:command.className];
+//
+    CDVPlugin* obj = nil;
+    
+    if (!([obj isKindOfClass:[CDVPlugin class]])) {
+        NSLog(@"ERROR: Plugin '%@' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.", command.className);
+        return NO;
+    }
+    BOOL retVal = YES;
+
+    // Find the proper selector to call.
+    NSString* methodName = [NSString stringWithFormat:@"%@:", command.methodName];
+    SEL normalSelector = NSSelectorFromString(methodName);
+    // Test for the legacy selector first in case they both exist.
+    if ([obj respondsToSelector:normalSelector]) {
+        // [obj performSelector:normalSelector withObject:command];
+        objc_msgSend(obj, normalSelector, command);
+    } else {
+        // There's no method to call, so throw an error.
+        NSLog(@"ERROR: Method '%@' not defined in Plugin '%@'", methodName, command.className);
+        retVal = NO;
+    }
+
+    return retVal;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVConfigParser.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVConfigParser.h b/CordovaLib/CordovaLib/Classes/Commands/CDVConfigParser.h
new file mode 100644
index 0000000..2e06c88
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVConfigParser.h
@@ -0,0 +1,31 @@
+/*
+ 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.
+ */
+
+@interface CDVConfigParser : NSObject <NSXMLParserDelegate>
+{
+    NSString* featureName;
+}
+
+@property (nonatomic, readonly, strong) NSMutableDictionary* pluginsDict;
+@property (nonatomic, readonly, strong) NSMutableDictionary* settings;
+@property (nonatomic, readonly, strong) NSMutableArray* whitelistHosts;
+@property (nonatomic, readonly, strong) NSMutableArray* startupPluginNames;
+@property (nonatomic, readonly, strong) NSString* startPage;
+
+@end


[07/14] Update to modern layout

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVConfigParser.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVConfigParser.m b/CordovaLib/CordovaLib/Classes/Commands/CDVConfigParser.m
new file mode 100644
index 0000000..ba71066
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVConfigParser.m
@@ -0,0 +1,106 @@
+/*
+ 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.
+ */
+
+#import "CDVConfigParser.h"
+
+// The block below is to support NSArray/NSDictionary subscripting in 10.7
+#ifdef __MAC_10_7
+
+@interface NSArray(Subscripting)
+- (id)objectAtIndexedSubscript:(NSUInteger)index;
+@end
+
+@interface NSMutableArray(Subscripting)
+- (void)setObject:(id)obj atIndexedSubscript:(NSUInteger)index;
+@end
+
+@interface NSDictionary(Subscripting)
+- (id)objectForKeyedSubscript:(id)key;
+@end
+
+@interface NSMutableDictionary(Subscripting)
+- (void)setObject:(id)obj forKeyedSubscript:(id <NSCopying>)key;
+@end
+
+#endif
+
+@interface CDVConfigParser ()
+
+@property (nonatomic, readwrite, strong) NSMutableDictionary* pluginsDict;
+@property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
+@property (nonatomic, readwrite, strong) NSMutableArray* whitelistHosts;
+@property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames;
+@property (nonatomic, readwrite, strong) NSString* startPage;
+
+@end
+
+@implementation CDVConfigParser
+
+@synthesize pluginsDict, settings, whitelistHosts, startPage, startupPluginNames;
+
+- (id)init
+{
+    self = [super init];
+    if (self != nil) {
+        self.pluginsDict = [[NSMutableDictionary alloc] initWithCapacity:30];
+        self.settings = [[NSMutableDictionary alloc] initWithCapacity:30];
+        self.whitelistHosts = [[NSMutableArray alloc] initWithCapacity:30];
+        self.startupPluginNames = [[NSMutableArray alloc] initWithCapacity:8];
+        featureName = nil;
+    }
+    return self;
+}
+
+- (void)parser:(NSXMLParser*)parser didStartElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName attributes:(NSDictionary*)attributeDict
+{
+    if ([elementName isEqualToString:@"preference"]) {
+        settings[attributeDict[@"name"]] = attributeDict[@"value"];
+    } else if ([elementName isEqualToString:@"feature"]) { // store feature name to use with correct parameter set
+        featureName = [attributeDict[@"name"] lowercaseString];
+    } else if ((featureName != nil) && [elementName isEqualToString:@"param"]) {
+        NSString* paramName = [attributeDict[@"name"] lowercaseString];
+        id value = attributeDict[@"value"];
+        if ([paramName isEqualToString:@"ios-package"]) {
+            pluginsDict[featureName] = value;
+        }
+        BOOL paramIsOnload = ([paramName isEqualToString:@"onload"] && [@"true" isEqualToString : value]);
+        BOOL attribIsOnload = [@"true" isEqualToString : [attributeDict[@"onload"] lowercaseString]];
+        if (paramIsOnload || attribIsOnload) {
+            [self.startupPluginNames addObject:featureName];
+        }
+    } else if ([elementName isEqualToString:@"access"]) {
+        [whitelistHosts addObject:attributeDict[@"origin"]];
+    } else if ([elementName isEqualToString:@"content"]) {
+        self.startPage = attributeDict[@"src"];
+    }
+}
+
+- (void)parser:(NSXMLParser*)parser didEndElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName
+{
+    if ([elementName isEqualToString:@"feature"]) { // no longer handling a feature so release
+        featureName = nil;
+    }
+}
+
+- (void)parser:(NSXMLParser*)parser parseErrorOccurred:(NSError*)parseError
+{
+    NSAssert(NO, @"config.xml parse error line %d col %d", [parser lineNumber], [parser columnNumber]);
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVConnection.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVConnection.h b/CordovaLib/CordovaLib/Classes/Commands/CDVConnection.h
new file mode 100644
index 0000000..d3e8c5d
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVConnection.h
@@ -0,0 +1,34 @@
+/*
+ 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.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CDVPlugin.h"
+#import "CDVReachability.h"
+
+@interface CDVConnection : CDVPlugin {
+    NSString* type;
+    NSString* _callbackId;
+
+    CDVReachability* internetReach;
+}
+
+@property (copy) NSString* connectionType;
+@property (strong) CDVReachability* internetReach;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVConnection.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVConnection.m b/CordovaLib/CordovaLib/Classes/Commands/CDVConnection.m
new file mode 100644
index 0000000..61030d3
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVConnection.m
@@ -0,0 +1,125 @@
+/*
+ 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.
+ */
+
+#import "CDVConnection.h"
+#import "CDVReachability.h"
+
+@interface CDVConnection (PrivateMethods)
+- (void)updateOnlineStatus;
+- (void)sendPluginResult;
+@end
+
+@implementation CDVConnection
+
+@synthesize connectionType, internetReach;
+
+- (void)getConnectionInfo:(CDVInvokedUrlCommand*)command
+{
+    _callbackId = command.callbackId;
+    [self sendPluginResult];
+}
+
+- (void)sendPluginResult
+{
+    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:self.connectionType];
+
+    [result setKeepCallbackAsBool:YES];
+    [self.commandDelegate sendPluginResult:result callbackId:_callbackId];
+}
+
+- (NSString*)w3cConnectionTypeFor:(CDVReachability*)reachability
+{
+    NetworkStatus networkStatus = [reachability currentReachabilityStatus];
+
+    switch (networkStatus) {
+        case NotReachable:
+            return @"none";
+
+        case ReachableViaWWAN:
+            return @"2g"; // no generic default, so we use the lowest common denominator
+
+        case ReachableViaWiFi:
+            return @"wifi";
+
+        default:
+            return @"unknown";
+    }
+}
+
+- (BOOL)isCellularConnection:(NSString*)theConnectionType
+{
+    return [theConnectionType isEqualToString:@"2g"] ||
+           [theConnectionType isEqualToString:@"3g"] ||
+           [theConnectionType isEqualToString:@"4g"];
+}
+
+- (void)updateReachability:(CDVReachability*)reachability
+{
+    if (reachability) {
+        // check whether the connection type has changed
+        NSString* newConnectionType = [self w3cConnectionTypeFor:reachability];
+        if ([newConnectionType isEqualToString:self.connectionType]) { // the same as before, remove dupes
+            return;
+        } else {
+            self.connectionType = [self w3cConnectionTypeFor:reachability];
+        }
+    }
+    [self sendPluginResult];
+}
+
+- (void)updateConnectionType:(NSNotification*)note
+{
+    CDVReachability* curReach = [note object];
+
+    if ((curReach != nil) && [curReach isKindOfClass:[CDVReachability class]]) {
+        [self updateReachability:curReach];
+    }
+}
+
+- (void)onPause
+{
+    [self.internetReach stopNotifier];
+}
+
+- (void)onResume
+{
+    [self.internetReach startNotifier];
+    [self updateReachability:self.internetReach];
+}
+
+- (CDVPlugin*)initWithWebView:(WebView*)theWebView
+{
+    self = [super initWithWebView:theWebView];
+    if (self) {
+        self.connectionType = @"none";
+        self.internetReach = [CDVReachability reachabilityForInternetConnection];
+        self.connectionType = [self w3cConnectionTypeFor:self.internetReach];
+        [self.internetReach startNotifier];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateConnectionType:)
+                                                     name:kReachabilityChangedNotification object:nil];
+// TODO:
+//        if (&UIApplicationDidEnterBackgroundNotification && &UIApplicationWillEnterForegroundNotification) {
+//            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPause) name:UIApplicationDidEnterBackgroundNotification object:nil];
+//            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume) name:UIApplicationWillEnterForegroundNotification object:nil];
+//        }
+    }
+    return self;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVConsole.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVConsole.h b/CordovaLib/CordovaLib/Classes/Commands/CDVConsole.h
new file mode 100644
index 0000000..bb44368
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVConsole.h
@@ -0,0 +1,29 @@
+/*
+ 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.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface CDVConsole : NSObject {
+	
+}
+
+- (void) log:(NSString*)message;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVConsole.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVConsole.m b/CordovaLib/CordovaLib/Classes/Commands/CDVConsole.m
new file mode 100644
index 0000000..fc4b879
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVConsole.m
@@ -0,0 +1,75 @@
+/*
+ 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.
+ */
+
+#import "CDVConsole.h"
+
+
+@implementation CDVConsole
+
+
+- (void) log:(NSString*)message
+{
+    NSLog(@"%@", message);
+}
+
+#pragma mark WebScripting Protocol
+
+/* checks whether a selector is acceptable to be called from JavaScript */
++ (BOOL) isSelectorExcludedFromWebScript:(SEL)selector
+{
+	BOOL	result = YES;
+	
+	int			i = 0;
+	static SEL	* acceptableList = NULL;
+	SEL			currentSelector;
+	
+	if (acceptableList == NULL && (acceptableList = calloc(256, sizeof(SEL))))	// up to 256 selectors
+	{
+		acceptableList[i++] = @selector(log:);
+	}
+	
+	i = 0;
+	while (result == YES && (currentSelector = acceptableList[i++]))
+	{
+		//checking for exclusions
+		result = !(selector == currentSelector);
+	}
+	
+	return result;
+}
+
+/* helper function so we don't have to have underscores and stuff in js to refer to the right method */
++ (NSString*) webScriptNameForSelector:(SEL)aSelector
+{
+	id	result = nil;
+	
+	if (aSelector == @selector(log:)) {
+		result = @"log";
+	}
+	
+	return result;
+}
+
+// right now exclude all properties (eg keys)
++ (BOOL) isKeyExcludedFromWebScript:(const char*)name
+{
+	return YES;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVDebug.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVDebug.h b/CordovaLib/CordovaLib/Classes/Commands/CDVDebug.h
new file mode 100644
index 0000000..4a0d9f9
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVDebug.h
@@ -0,0 +1,25 @@
+/*
+ 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.
+ */
+
+#ifdef DEBUG
+    #define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
+#else
+    #define DLog(...)
+#endif
+#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVDevice.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVDevice.h b/CordovaLib/CordovaLib/Classes/Commands/CDVDevice.h
new file mode 100644
index 0000000..81cffb7
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVDevice.h
@@ -0,0 +1,29 @@
+/*
+ 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.
+ */
+
+#import "CDVPlugin.h"
+
+@interface CDVDevice : CDVPlugin
+{}
+
++ (NSString*)cordovaVersion;
+
+- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVDevice.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVDevice.m b/CordovaLib/CordovaLib/Classes/Commands/CDVDevice.m
new file mode 100644
index 0000000..0636d95
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVDevice.m
@@ -0,0 +1,102 @@
+/*
+ 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.
+ */
+
+#include <sys/types.h>
+#include <sys/sysctl.h>
+
+#import "CDVDevice.h"
+#import "CDVAvailability.h"
+
+#define SYSTEM_VERSION_PLIST    @"/System/Library/CoreServices/SystemVersion.plist"
+
+@implementation CDVDevice
+
+- (NSString*)modelVersion
+{
+    size_t size;
+
+    sysctlbyname("hw.machine", NULL, &size, NULL, 0);
+    char* machine = malloc(size);
+    sysctlbyname("hw.machine", machine, &size, NULL, 0);
+    NSString* modelVersion = [NSString stringWithUTF8String:machine];
+    free(machine);
+
+    return modelVersion;
+}
+
+- (NSString*)uniqueAppInstanceIdentifier
+{
+    NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
+    static NSString* UUID_KEY = @"CDVUUID";
+    
+    NSString* app_uuid = [userDefaults stringForKey:UUID_KEY];
+    
+    if (app_uuid == nil) {
+        CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault);
+        CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef);
+        
+        app_uuid = [NSString stringWithString:(__bridge NSString*)uuidString];
+        [userDefaults setObject:app_uuid forKey:UUID_KEY];
+        [userDefaults synchronize];
+        
+        CFRelease(uuidString);
+        CFRelease(uuidRef);
+    }
+    
+    return app_uuid;
+}
+
+- (NSString*) platform
+{
+    return [[NSDictionary dictionaryWithContentsOfFile:SYSTEM_VERSION_PLIST] objectForKey:@"ProductName"];
+}
+
+- (NSString*)systemVersion
+{
+    return [[NSDictionary dictionaryWithContentsOfFile:SYSTEM_VERSION_PLIST] objectForKey:@"ProductVersion"];
+}
+
+- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command
+{
+    NSDictionary* deviceProperties = [self deviceProperties];
+    CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties];
+
+    [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+}
+
+- (NSDictionary*)deviceProperties
+{
+    NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4];
+
+    [devProps setObject:[self modelVersion] forKey:@"model"];
+    [devProps setObject:[self platform] forKey:@"platform"];
+    [devProps setObject:[self systemVersion] forKey:@"version"];
+    [devProps setObject:[self uniqueAppInstanceIdentifier] forKey:@"uuid"];
+    [devProps setObject:[[self class] cordovaVersion] forKey:@"cordova"];
+
+    NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps];
+    return devReturn;
+}
+
++ (NSString*)cordovaVersion
+{
+    return CDV_VERSION;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVInvokedUrlCommand.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVInvokedUrlCommand.h b/CordovaLib/CordovaLib/Classes/Commands/CDVInvokedUrlCommand.h
new file mode 100644
index 0000000..5f7e204
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVInvokedUrlCommand.h
@@ -0,0 +1,52 @@
+/*
+ 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.
+ */
+
+#import <Foundation/Foundation.h>
+
+@interface CDVInvokedUrlCommand : NSObject {
+    NSString* __weak _callbackId;
+    NSString* __weak _className;
+    NSString* __weak _methodName;
+    NSArray* __weak _arguments;
+}
+
+@property (weak, nonatomic, readonly) NSArray* arguments;
+@property (weak, nonatomic, readonly) NSString* callbackId;
+@property (weak, nonatomic, readonly) NSString* className;
+@property (weak, nonatomic, readonly) NSString* methodName;
+
++ (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry;
+
+- (id)initWithArguments:(NSArray*)arguments
+   callbackId          :(NSString*)callbackId
+    className           :(NSString*)className
+   methodName          :(NSString*)methodName;
+
+- (id)initFromJson:(NSArray*)jsonEntry;
+
+// Returns the argument at the given index.
+// If index >= the number of arguments, returns nil.
+// If the argument at the given index is NSNull, returns nil.
+- (id)argumentAtIndex:(NSUInteger)index;
+// Same as above, but returns defaultValue instead of nil.
+- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue;
+// Same as above, but returns defaultValue instead of nil, and if the argument is not of the expected class, returns defaultValue
+- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVInvokedUrlCommand.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVInvokedUrlCommand.m b/CordovaLib/CordovaLib/Classes/Commands/CDVInvokedUrlCommand.m
new file mode 100644
index 0000000..6c7a856
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVInvokedUrlCommand.m
@@ -0,0 +1,140 @@
+/*
+ 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.
+ */
+
+#import "CDVInvokedUrlCommand.h"
+#import "CDVJSON.h"
+#import "NSData+Base64.h"
+
+@implementation CDVInvokedUrlCommand
+
+@synthesize arguments = _arguments;
+@synthesize callbackId = _callbackId;
+@synthesize className = _className;
+@synthesize methodName = _methodName;
+
++ (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry
+{
+    return [[CDVInvokedUrlCommand alloc] initFromJson:jsonEntry];
+}
+
+- (id)initFromJson:(NSArray*)jsonEntry
+{
+    id tmp = [jsonEntry objectAtIndex:0];
+    NSString* callbackId = tmp == [NSNull null] ? nil : tmp;
+    NSString* className = [jsonEntry objectAtIndex:1];
+    NSString* methodName = [jsonEntry objectAtIndex:2];
+    NSMutableArray* arguments = [jsonEntry objectAtIndex:3];
+
+    return [self initWithArguments:arguments
+                        callbackId:callbackId
+                         className:className
+                        methodName:methodName];
+}
+
+- (id)initWithArguments:(NSArray*)arguments
+             callbackId:(NSString*)callbackId
+              className:(NSString*)className
+             methodName:(NSString*)methodName
+{
+    self = [super init];
+    if (self != nil) {
+        _arguments = arguments;
+        _callbackId = callbackId;
+        _className = className;
+        _methodName = methodName;
+    }
+    [self massageArguments];
+    return self;
+}
+
+- (void)massageArguments
+{
+    NSMutableArray* newArgs = nil;
+
+    for (NSUInteger i = 0, count = [_arguments count]; i < count; ++i) {
+        id arg = [_arguments objectAtIndex:i];
+        if (![arg isKindOfClass:[NSDictionary class]]) {
+            continue;
+        }
+        NSDictionary* dict = arg;
+        NSString* type = [dict objectForKey:@"CDVType"];
+        if (!type || ![type isEqualToString:@"ArrayBuffer"]) {
+            continue;
+        }
+        NSString* data = [dict objectForKey:@"data"];
+        if (!data) {
+            continue;
+        }
+        if (newArgs == nil) {
+            newArgs = [NSMutableArray arrayWithArray:_arguments];
+            _arguments = newArgs;
+        }
+        [newArgs replaceObjectAtIndex:i withObject:[NSData dataFromBase64String:data]];
+    }
+}
+
+- (void)legacyArguments:(NSMutableArray**)legacyArguments andDict:(NSMutableDictionary**)legacyDict
+{
+    NSMutableArray* newArguments = [NSMutableArray arrayWithArray:_arguments];
+
+    for (NSUInteger i = 0; i < [newArguments count]; ++i) {
+        if ([[newArguments objectAtIndex:i] isKindOfClass:[NSDictionary class]]) {
+            if (legacyDict != NULL) {
+                *legacyDict = [newArguments objectAtIndex:i];
+            }
+            [newArguments removeObjectAtIndex:i];
+            break;
+        }
+    }
+
+    // Legacy (two versions back) has no callbackId.
+    if (_callbackId != nil) {
+        [newArguments insertObject:_callbackId atIndex:0];
+    }
+    if (legacyArguments != NULL) {
+        *legacyArguments = newArguments;
+    }
+}
+
+- (id)argumentAtIndex:(NSUInteger)index
+{
+    return [self argumentAtIndex:index withDefault:nil];
+}
+
+- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue
+{
+    return [self argumentAtIndex:index withDefault:defaultValue andClass:nil];
+}
+
+- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass
+{
+    if (index >= [_arguments count]) {
+        return defaultValue;
+    }
+    id ret = [_arguments objectAtIndex:index];
+    if (ret == [NSNull null]) {
+        ret = defaultValue;
+    }
+    if ((aClass != nil) && ![ret isKindOfClass:aClass]) {
+        ret = defaultValue;
+    }
+    return ret;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVJSON.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVJSON.h b/CordovaLib/CordovaLib/Classes/Commands/CDVJSON.h
new file mode 100644
index 0000000..eaa895e
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVJSON.h
@@ -0,0 +1,30 @@
+/*
+ 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.
+ */
+
+@interface NSArray (CDVJSONSerializing)
+- (NSString*)JSONString;
+@end
+
+@interface NSDictionary (CDVJSONSerializing)
+- (NSString*)JSONString;
+@end
+
+@interface NSString (CDVJSONSerializing)
+- (id)JSONObject;
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVJSON.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVJSON.m b/CordovaLib/CordovaLib/Classes/Commands/CDVJSON.m
new file mode 100644
index 0000000..78267e5
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVJSON.m
@@ -0,0 +1,77 @@
+/*
+ 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.
+ */
+
+#import "CDVJSON.h"
+#import <Foundation/NSJSONSerialization.h>
+
+@implementation NSArray (CDVJSONSerializing)
+
+- (NSString*)JSONString
+{
+    NSError* error = nil;
+    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
+                                                       options:NSJSONWritingPrettyPrinted
+                                                         error:&error];
+
+    if (error != nil) {
+        NSLog(@"NSArray JSONString error: %@", [error localizedDescription]);
+        return nil;
+    } else {
+        return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
+    }
+}
+
+@end
+
+@implementation NSDictionary (CDVJSONSerializing)
+
+- (NSString*)JSONString
+{
+    NSError* error = nil;
+    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
+                                                       options:NSJSONWritingPrettyPrinted
+                                                         error:&error];
+
+    if (error != nil) {
+        NSLog(@"NSDictionary JSONString error: %@", [error localizedDescription]);
+        return nil;
+    } else {
+        return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
+    }
+}
+
+@end
+
+@implementation NSString (CDVJSONSerializing)
+
+- (id)JSONObject
+{
+    NSError* error = nil;
+    id object = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding]
+                                                options:kNilOptions
+                                                  error:&error];
+
+    if (error != nil) {
+        NSLog(@"NSString JSONObject error: %@", [error localizedDescription]);
+    }
+
+    return object;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVPlugin.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVPlugin.h b/CordovaLib/CordovaLib/Classes/Commands/CDVPlugin.h
new file mode 100644
index 0000000..f9debe5
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVPlugin.h
@@ -0,0 +1,59 @@
+/*
+ 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.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WebKit.h>
+#import "CDVPluginResult.h"
+#import "CDVCommandDelegate.h"
+#import "CDVViewController.h"
+
+NSString* const CDVPageDidLoadNotification;
+NSString* const CDVPluginHandleOpenURLNotification;
+NSString* const CDVPluginResetNotification;
+NSString* const CDVLocalNotification;
+
+@interface CDVPlugin : NSObject {}
+
+@property (nonatomic, weak) WebView* webView;
+@property (nonatomic, unsafe_unretained) CDVViewController* viewController;
+@property (nonatomic, unsafe_unretained) id <CDVCommandDelegate> commandDelegate;
+
+@property (readonly, assign) BOOL hasPendingOperation;
+
+- (CDVPlugin*)initWithWebView:(WebView*)theWebView;
+- (void)pluginInitialize;
+
+- (void)handleOpenURL:(NSNotification*)notification;
+- (void)onAppTerminate;
+- (void)onMemoryWarning;
+- (void)onReset;
+- (void)dispose;
+
+/*
+ // see initWithWebView implementation
+ - (void) onPause {}
+ - (void) onResume {}
+ - (void) onOrientationWillChange {}
+ - (void) onOrientationDidChange {}
+ - (void)didReceiveLocalNotification:(NSNotification *)notification;
+ */
+
+- (id)appDelegate;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVPlugin.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVPlugin.m b/CordovaLib/CordovaLib/Classes/Commands/CDVPlugin.m
new file mode 100644
index 0000000..a7d98ed
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVPlugin.m
@@ -0,0 +1,129 @@
+/*
+ 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.
+ */
+
+#import "CDVPlugin.h"
+
+NSString* const CDVPageDidLoadNotification = @"CDVPageDidLoadNotification";
+NSString* const CDVPluginHandleOpenURLNotification = @"CDVPluginHandleOpenURLNotification";
+NSString* const CDVPluginResetNotification = @"CDVPluginResetNotification";
+NSString* const CDVLocalNotification = @"CDVLocalNotification";
+
+@interface CDVPlugin ()
+
+@property (readwrite, assign) BOOL hasPendingOperation;
+
+@end
+
+@implementation CDVPlugin
+@synthesize webView, viewController, commandDelegate, hasPendingOperation;
+
+- (CDVPlugin*)initWithWebView:(WebView*)theWebView
+{
+    self = [super init];
+    if (self) {
+//        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppTerminate) name:UIApplicationWillTerminateNotification object:nil];
+//        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onMemoryWarning) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleOpenURL:) name:CDVPluginHandleOpenURLNotification object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onReset) name:CDVPluginResetNotification object:theWebView];
+
+        self.webView = theWebView;
+    }
+    return self;
+}
+
+- (void)pluginInitialize
+{
+    // You can listen to more app notifications, see:
+    // http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006728-CH3-DontLinkElementID_4
+
+    // NOTE: if you want to use these, make sure you uncomment the corresponding notification handler
+
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPause) name:UIApplicationDidEnterBackgroundNotification object:nil];
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume) name:UIApplicationWillEnterForegroundNotification object:nil];
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onOrientationWillChange) name:UIApplicationWillChangeStatusBarOrientationNotification object:nil];
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onOrientationDidChange) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
+
+    // Added in 2.3.0
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveLocalNotification:) name:CDVLocalNotification object:nil];
+
+    // Added in 2.5.0
+    // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad:) name:CDVPageDidLoadNotification object:self.webView];
+}
+
+- (void)dispose
+{
+    viewController = nil;
+    commandDelegate = nil;
+    webView = nil;
+}
+
+/*
+// NOTE: for onPause and onResume, calls into JavaScript must not call or trigger any blocking UI, like alerts
+- (void) onPause {}
+- (void) onResume {}
+- (void) onOrientationWillChange {}
+- (void) onOrientationDidChange {}
+*/
+
+/* NOTE: calls into JavaScript must not call or trigger any blocking UI, like alerts */
+- (void)handleOpenURL:(NSNotification*)notification
+{
+    // override to handle urls sent to your app
+    // register your url schemes in your App-Info.plist
+
+    NSURL* url = [notification object];
+
+    if ([url isKindOfClass:[NSURL class]]) {
+        /* Do your thing! */
+    }
+}
+
+/* NOTE: calls into JavaScript must not call or trigger any blocking UI, like alerts */
+- (void)onAppTerminate
+{
+    // override this if you need to do any cleanup on app exit
+}
+
+- (void)onMemoryWarning
+{
+    // override to remove caches, etc
+}
+
+- (void)onReset
+{
+    // Override to cancel any long-running requests when the WebView navigates or refreshes.
+}
+
+- (void)dealloc
+{
+    [[NSNotificationCenter defaultCenter] removeObserver:self];   // this will remove all notification unless added using addObserverForName:object:queue:usingBlock:
+}
+
+- (id)appDelegate
+{
+    return [[NSApplication sharedApplication] delegate];
+}
+
+// default implementation does nothing, ideally, we are not registered for notification if we aren't going to do anything.
+// - (void)didReceiveLocalNotification:(NSNotification *)notification
+// {
+//    // UILocalNotification* localNotification = [notification object]; // get the payload as a LocalNotification
+// }
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVPluginResult.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVPluginResult.h b/CordovaLib/CordovaLib/Classes/Commands/CDVPluginResult.h
new file mode 100644
index 0000000..8393df2
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVPluginResult.h
@@ -0,0 +1,65 @@
+/*
+ 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.
+ */
+
+#import <Foundation/Foundation.h>
+
+typedef enum {
+    CDVCommandStatus_NO_RESULT = 0,
+    CDVCommandStatus_OK,
+    CDVCommandStatus_CLASS_NOT_FOUND_EXCEPTION,
+    CDVCommandStatus_ILLEGAL_ACCESS_EXCEPTION,
+    CDVCommandStatus_INSTANTIATION_EXCEPTION,
+    CDVCommandStatus_MALFORMED_URL_EXCEPTION,
+    CDVCommandStatus_IO_EXCEPTION,
+    CDVCommandStatus_INVALID_ACTION,
+    CDVCommandStatus_JSON_EXCEPTION,
+    CDVCommandStatus_ERROR
+} CDVCommandStatus;
+
+@interface CDVPluginResult : NSObject {}
+
+@property (nonatomic, strong, readonly) NSNumber* status;
+@property (nonatomic, strong, readonly) id message;
+@property (nonatomic, strong)           NSNumber* keepCallback;
+
+- (CDVPluginResult*)init;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsString:(NSString*)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArray:(NSArray*)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsInt:(int)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDouble:(double)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages;
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode;
+
++ (void)setVerbose:(BOOL)verbose;
++ (BOOL)isVerbose;
+
+- (void)setKeepCallbackAsBool:(BOOL)bKeepCallback;
+
+- (NSString*)argumentsAsJSON;
+
+// These methods are used by the legacy plugin return result method
+- (NSString*)toJSONString;
+- (NSString*)toSuccessCallbackString:(NSString*)callbackId;
+- (NSString*)toErrorCallbackString:(NSString*)callbackId;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVPluginResult.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVPluginResult.m b/CordovaLib/CordovaLib/Classes/Commands/CDVPluginResult.m
new file mode 100644
index 0000000..a03e005
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVPluginResult.m
@@ -0,0 +1,224 @@
+/*
+ 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.
+ */
+
+#import "CDVPluginResult.h"
+#import "CDVJSON.h"
+#import "CDVDebug.h"
+#import "NSData+Base64.h"
+
+@interface CDVPluginResult ()
+
+- (CDVPluginResult*)initWithStatus:(CDVCommandStatus)statusOrdinal message:(id)theMessage;
+
+@end
+
+@implementation CDVPluginResult
+@synthesize status, message, keepCallback;
+
+static NSArray* org_apache_cordova_CommandStatusMsgs;
+
+id messageFromArrayBuffer(NSData* data)
+{
+    return @{
+        @"CDVType" : @"ArrayBuffer",
+        @"data" :[data base64EncodedString]
+    };
+}
+
+id massageMessage(id message)
+{
+    if ([message isKindOfClass:[NSData class]]) {
+        return messageFromArrayBuffer(message);
+    }
+    return message;
+}
+
+id messageFromMultipart(NSArray* theMessages)
+{
+    NSMutableArray* messages = [NSMutableArray arrayWithArray:theMessages];
+
+    for (NSUInteger i = 0; i < messages.count; ++i) {
+        [messages replaceObjectAtIndex:i withObject:massageMessage([messages objectAtIndex:i])];
+    }
+
+    return @{
+        @"CDVType" : @"MultiPart",
+        @"messages" : messages
+    };
+}
+
++ (void)initialize
+{
+    org_apache_cordova_CommandStatusMsgs = [[NSArray alloc] initWithObjects:@"No result",
+        @"OK",
+        @"Class not found",
+        @"Illegal access",
+        @"Instantiation error",
+        @"Malformed url",
+        @"IO error",
+        @"Invalid action",
+        @"JSON error",
+        @"Error",
+        nil];
+}
+
+- (CDVPluginResult*)init
+{
+    return [self initWithStatus:CDVCommandStatus_NO_RESULT message:nil];
+}
+
+- (CDVPluginResult*)initWithStatus:(CDVCommandStatus)statusOrdinal message:(id)theMessage
+{
+    self = [super init];
+    if (self) {
+        status = [NSNumber numberWithInt:statusOrdinal];
+        message = theMessage;
+        keepCallback = [NSNumber numberWithBool:NO];
+    }
+    return self;
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:[org_apache_cordova_CommandStatusMsgs objectAtIndex:statusOrdinal]];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsString:(NSString*)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:theMessage];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArray:(NSArray*)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:theMessage];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsInt:(int)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithInt:theMessage]];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDouble:(double)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithDouble:theMessage]];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:[NSNumber numberWithBool:theMessage]];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:theMessage];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:messageFromArrayBuffer(theMessage)];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages
+{
+    return [[self alloc] initWithStatus:statusOrdinal message:messageFromMultipart(theMessages)];
+}
+
++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode
+{
+    NSDictionary* errDict = @{@"code": [NSNumber numberWithInt:errorCode]};
+
+    return [[self alloc] initWithStatus:statusOrdinal message:errDict];
+}
+
+- (void)setKeepCallbackAsBool:(BOOL)bKeepCallback
+{
+    [self setKeepCallback:[NSNumber numberWithBool:bKeepCallback]];
+}
+
+- (NSString*)argumentsAsJSON
+{
+    id arguments = (self.message == nil ? [NSNull null] : self.message);
+    NSArray* argumentsWrappedInArray = [NSArray arrayWithObject:arguments];
+
+    NSString* argumentsJSON = [argumentsWrappedInArray JSONString];
+
+    argumentsJSON = [argumentsJSON substringWithRange:NSMakeRange(1, [argumentsJSON length] - 2)];
+
+    return argumentsJSON;
+}
+
+// These methods are used by the legacy plugin return result method
+- (NSString*)toJSONString
+{
+    NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
+        self.status, @"status",
+        self.message ? self.                                message:[NSNull null], @"message",
+        self.keepCallback, @"keepCallback",
+        nil];
+
+    NSError* error = nil;
+    NSData* jsonData = [NSJSONSerialization dataWithJSONObject:dict
+                                                       options:NSJSONWritingPrettyPrinted
+                                                         error:&error];
+    NSString* resultString = nil;
+
+    if (error != nil) {
+        NSLog(@"toJSONString error: %@", [error localizedDescription]);
+    } else {
+        resultString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
+    }
+
+    if ([[self class] isVerbose]) {
+        NSLog(@"PluginResult:toJSONString - %@", resultString);
+    }
+    return resultString;
+}
+
+- (NSString*)toSuccessCallbackString:(NSString*)callbackId
+{
+    NSString* successCB = [NSString stringWithFormat:@"cordova.callbackSuccess('%@',%@);", callbackId, [self toJSONString]];
+
+    if ([[self class] isVerbose]) {
+        NSLog(@"PluginResult toSuccessCallbackString: %@", successCB);
+    }
+    return successCB;
+}
+
+- (NSString*)toErrorCallbackString:(NSString*)callbackId
+{
+    NSString* errorCB = [NSString stringWithFormat:@"cordova.callbackError('%@',%@);", callbackId, [self toJSONString]];
+
+    if ([[self class] isVerbose]) {
+        NSLog(@"PluginResult toErrorCallbackString: %@", errorCB);
+    }
+    return errorCB;
+}
+
+static BOOL gIsVerbose = NO;
++ (void)setVerbose:(BOOL)verbose
+{
+    gIsVerbose = verbose;
+}
+
++ (BOOL)isVerbose
+{
+    return gIsVerbose;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVReachability.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVReachability.h b/CordovaLib/CordovaLib/Classes/Commands/CDVReachability.h
new file mode 100644
index 0000000..01a95c3
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVReachability.h
@@ -0,0 +1,85 @@
+/*
+
+ File: Reachability.h
+ Abstract: Basic demonstration of how to use the SystemConfiguration Reachability APIs.
+ Version: 2.2
+
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple Inc.
+ ("Apple") in consideration of your agreement to the following terms, and your
+ use, installation, modification or redistribution of this Apple software
+ constitutes acceptance of these terms.  If you do not agree with these terms,
+ please do not use, install, modify or redistribute this Apple software.
+
+ In consideration of your agreement to abide by the following terms, and subject
+ to these terms, Apple grants you a personal, non-exclusive license, under
+ Apple's copyrights in this original Apple software (the "Apple Software"), to
+ use, reproduce, modify and redistribute the Apple Software, with or without
+ modifications, in source and/or binary forms; provided that if you redistribute
+ the Apple Software in its entirety and without modifications, you must retain
+ this notice and the following text and disclaimers in all such redistributions
+ of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may be used
+ to endorse or promote products derived from the Apple Software without specific
+ prior written permission from Apple.  Except as expressly stated in this notice,
+ no other rights or licenses, express or implied, are granted by Apple herein,
+ including but not limited to any patent rights that may be infringed by your
+ derivative works or by other works in which the Apple Software may be
+ incorporated.
+
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO
+ WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+ WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+ COMBINATION WITH YOUR PRODUCTS.
+
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR
+ DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF
+ CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
+ APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ Copyright (C) 2010 Apple Inc. All Rights Reserved.
+
+*/
+
+#import <Foundation/Foundation.h>
+#import <SystemConfiguration/SystemConfiguration.h>
+#import <netinet/in.h>
+
+typedef enum {
+    NotReachable = 0,
+    ReachableViaWWAN, // this value has been swapped with ReachableViaWiFi for Cordova backwards compat. reasons
+    ReachableViaWiFi  // this value has been swapped with ReachableViaWWAN for Cordova backwards compat. reasons
+} NetworkStatus;
+#define kReachabilityChangedNotification @"kNetworkReachabilityChangedNotification"
+
+@interface CDVReachability : NSObject
+{
+    BOOL localWiFiRef;
+    SCNetworkReachabilityRef reachabilityRef;
+}
+
+// reachabilityWithHostName- Use to check the reachability of a particular host name.
++ (CDVReachability*)reachabilityWithHostName:(NSString*)hostName;
+
+// reachabilityWithAddress- Use to check the reachability of a particular IP address.
++ (CDVReachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress;
+
+// reachabilityForInternetConnection- checks whether the default route is available.
+//  Should be used by applications that do not connect to a particular host
++ (CDVReachability*)reachabilityForInternetConnection;
+
+// reachabilityForLocalWiFi- checks whether a local wifi connection is available.
++ (CDVReachability*)reachabilityForLocalWiFi;
+
+// Start listening for reachability notifications on the current run loop
+- (BOOL)startNotifier;
+- (void)stopNotifier;
+
+- (NetworkStatus)currentReachabilityStatus;
+// WWAN may be available, but not active until a connection has been established.
+// WiFi may require a connection for VPN on Demand.
+- (BOOL)connectionRequired;
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Commands/CDVReachability.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Commands/CDVReachability.m b/CordovaLib/CordovaLib/Classes/Commands/CDVReachability.m
new file mode 100644
index 0000000..ed1afe7
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Commands/CDVReachability.m
@@ -0,0 +1,261 @@
+/*
+
+ File: Reachability.m
+ Abstract: Basic demonstration of how to use the SystemConfiguration Reachability APIs.
+ Version: 2.2
+
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple Inc.
+ ("Apple") in consideration of your agreement to the following terms, and your
+ use, installation, modification or redistribution of this Apple software
+ constitutes acceptance of these terms.  If you do not agree with these terms,
+ please do not use, install, modify or redistribute this Apple software.
+
+ In consideration of your agreement to abide by the following terms, and subject
+ to these terms, Apple grants you a personal, non-exclusive license, under
+ Apple's copyrights in this original Apple software (the "Apple Software"), to
+ use, reproduce, modify and redistribute the Apple Software, with or without
+ modifications, in source and/or binary forms; provided that if you redistribute
+ the Apple Software in its entirety and without modifications, you must retain
+ this notice and the following text and disclaimers in all such redistributions
+ of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may be used
+ to endorse or promote products derived from the Apple Software without specific
+ prior written permission from Apple.  Except as expressly stated in this notice,
+ no other rights or licenses, express or implied, are granted by Apple herein,
+ including but not limited to any patent rights that may be infringed by your
+ derivative works or by other works in which the Apple Software may be
+ incorporated.
+
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO
+ WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+ WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
+ COMBINATION WITH YOUR PRODUCTS.
+
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR
+ DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF
+ CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
+ APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ Copyright (C) 2010 Apple Inc. All Rights Reserved.
+
+*/
+
+#import <sys/socket.h>
+#import <netinet/in.h>
+#import <netinet6/in6.h>
+#import <arpa/inet.h>
+#import <ifaddrs.h>
+#import <netdb.h>
+
+#import <CoreFoundation/CoreFoundation.h>
+
+#import "CDVReachability.h"
+
+#define kShouldPrintReachabilityFlags 0
+
+static void CDVPrintReachabilityFlags(SCNetworkReachabilityFlags flags, const char* comment)
+{
+#if kShouldPrintReachabilityFlags
+        NSLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n",
+        (flags & kSCNetworkReachabilityFlagsIsWWAN)               ? 'W' : '-',
+        (flags & kSCNetworkReachabilityFlagsReachable)            ? 'R' : '-',
+
+        (flags & kSCNetworkReachabilityFlagsTransientConnection)  ? 't' : '-',
+        (flags & kSCNetworkReachabilityFlagsConnectionRequired)   ? 'c' : '-',
+        (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic)  ? 'C' : '-',
+        (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-',
+        (flags & kSCNetworkReachabilityFlagsConnectionOnDemand)   ? 'D' : '-',
+        (flags & kSCNetworkReachabilityFlagsIsLocalAddress)       ? 'l' : '-',
+        (flags & kSCNetworkReachabilityFlagsIsDirect)             ? 'd' : '-',
+        comment
+        );
+#endif
+}
+
+@implementation CDVReachability
+
+static void CDVReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info)
+{
+#pragma unused (target, flags)
+    //	NSCAssert(info != NULL, @"info was NULL in ReachabilityCallback");
+    //	NSCAssert([(NSObject*) info isKindOfClass: [Reachability class]], @"info was wrong class in ReachabilityCallback");
+
+    // Converted the asserts above to conditionals, with safe return from the function
+    if (info == NULL) {
+        NSLog(@"info was NULL in ReachabilityCallback");
+        return;
+    }
+
+    if (![(__bridge  NSObject*) info isKindOfClass:[CDVReachability class]]) {
+        NSLog(@"info was wrong class in ReachabilityCallback");
+        return;
+    }
+
+    // We're on the main RunLoop, so an NSAutoreleasePool is not necessary, but is added defensively
+    // in case someon uses the Reachability object in a different thread.
+    @autoreleasepool {
+        CDVReachability* noteObject = (__bridge CDVReachability*)info;
+        // Post a notification to notify the client that the network reachability changed.
+        [[NSNotificationCenter defaultCenter] postNotificationName:kReachabilityChangedNotification object:noteObject];
+    }
+}
+
+- (BOOL)startNotifier
+{
+    BOOL retVal = NO;
+    SCNetworkReachabilityContext context = {0, (__bridge void*)(self), NULL, NULL, NULL};
+
+    if (SCNetworkReachabilitySetCallback(reachabilityRef, CDVReachabilityCallback, &context)) {
+        if (SCNetworkReachabilityScheduleWithRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)) {
+            retVal = YES;
+        }
+    }
+    return retVal;
+}
+
+- (void)stopNotifier
+{
+    if (reachabilityRef != NULL) {
+        SCNetworkReachabilityUnscheduleFromRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
+    }
+}
+
+- (void)dealloc
+{
+    [self stopNotifier];
+    if (reachabilityRef != NULL) {
+        CFRelease(reachabilityRef);
+    }
+    
+}
+
++ (CDVReachability*)reachabilityWithHostName:(NSString*)hostName;
+{
+    CDVReachability* retVal = NULL;
+    SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, [hostName UTF8String]);
+    if (reachability != NULL) {
+        retVal = [[self alloc] init];
+        if (retVal != NULL) {
+            retVal->reachabilityRef = reachability;
+            retVal->localWiFiRef = NO;
+        }
+    }
+    return retVal;
+}
+
++ (CDVReachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress;
+{
+    SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr*)hostAddress);
+    CDVReachability* retVal = NULL;
+    if (reachability != NULL) {
+        retVal = [[self alloc] init];
+        if (retVal != NULL) {
+            retVal->reachabilityRef = reachability;
+            retVal->localWiFiRef = NO;
+        }
+    }
+    return retVal;
+}
+
++ (CDVReachability*)reachabilityForInternetConnection;
+{
+    struct sockaddr_in zeroAddress;
+    bzero(&zeroAddress, sizeof(zeroAddress));
+    zeroAddress.sin_len = sizeof(zeroAddress);
+    zeroAddress.sin_family = AF_INET;
+    return [self reachabilityWithAddress:&zeroAddress];
+}
+
++ (CDVReachability*)reachabilityForLocalWiFi;
+{
+    struct sockaddr_in localWifiAddress;
+    bzero(&localWifiAddress, sizeof(localWifiAddress));
+    localWifiAddress.sin_len = sizeof(localWifiAddress);
+    localWifiAddress.sin_family = AF_INET;
+    // IN_LINKLOCALNETNUM is defined in <netinet/in.h> as 169.254.0.0
+    localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM);
+    CDVReachability* retVal = [self reachabilityWithAddress:&localWifiAddress];
+    if (retVal != NULL) {
+        retVal->localWiFiRef = YES;
+    }
+    return retVal;
+}
+
+#pragma mark Network Flag Handling
+
+- (NetworkStatus)localWiFiStatusForFlags:(SCNetworkReachabilityFlags)flags
+{
+    CDVPrintReachabilityFlags(flags, "localWiFiStatusForFlags");
+
+    BOOL retVal = NotReachable;
+    if ((flags & kSCNetworkReachabilityFlagsReachable) && (flags & kSCNetworkReachabilityFlagsIsDirect)) {
+        retVal = ReachableViaWiFi;
+    }
+    return retVal;
+}
+
+- (NetworkStatus)networkStatusForFlags:(SCNetworkReachabilityFlags)flags
+{
+    CDVPrintReachabilityFlags(flags, "networkStatusForFlags");
+    if ((flags & kSCNetworkReachabilityFlagsReachable) == 0) {
+        // if target host is not reachable
+        return NotReachable;
+    }
+
+    BOOL retVal = NotReachable;
+
+    if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0) {
+        // if target host is reachable and no connection is required
+        //  then we'll assume (for now) that your on Wi-Fi
+        retVal = ReachableViaWiFi;
+    }
+
+    if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand) != 0) ||
+            ((flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0))) {
+        // ... and the connection is on-demand (or on-traffic) if the
+        //     calling application is using the CFSocketStream or higher APIs
+
+        if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0) {
+            // ... and no [user] intervention is needed
+            retVal = ReachableViaWiFi;
+        }
+    }
+
+    if ((flags & kSCNetworkReachabilityFlagsIsDirect) == kSCNetworkReachabilityFlagsIsDirect) {
+        // ... but WWAN connections are OK if the calling application
+        //     is using the CFNetwork (CFSocketStream?) APIs.
+        retVal = ReachableViaWWAN;
+    }
+    return retVal;
+}
+
+- (BOOL)connectionRequired;
+{
+    NSAssert(reachabilityRef != NULL, @"connectionRequired called with NULL reachabilityRef");
+    SCNetworkReachabilityFlags flags;
+    if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) {
+        return flags & kSCNetworkReachabilityFlagsConnectionRequired;
+    }
+    return NO;
+}
+
+- (NetworkStatus)currentReachabilityStatus
+{
+    NSAssert(reachabilityRef != NULL, @"currentNetworkStatus called with NULL reachabilityRef");
+    NetworkStatus retVal = NotReachable;
+    SCNetworkReachabilityFlags flags;
+    if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) {
+        if (localWiFiRef) {
+            retVal = [self localWiFiStatusForFlags:flags];
+        } else {
+            retVal = [self networkStatusForFlags:flags];
+        }
+    }
+    return retVal;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Utils/NSData+Base64.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Utils/NSData+Base64.h b/CordovaLib/CordovaLib/Classes/Utils/NSData+Base64.h
new file mode 100644
index 0000000..ffe9c83
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Utils/NSData+Base64.h
@@ -0,0 +1,33 @@
+//
+//  NSData+Base64.h
+//  base64
+//
+//  Created by Matt Gallagher on 2009/06/03.
+//  Copyright 2009 Matt Gallagher. All rights reserved.
+//
+//  Permission is given to use this source code file, free of charge, in any
+//  project, commercial or otherwise, entirely at your risk, with the condition
+//  that any redistribution (in part or whole) of source code must retain
+//  this copyright and permission notice. Attribution in compiled projects is
+//  appreciated but not required.
+//
+
+#import <Foundation/Foundation.h>
+
+void *CDVNewBase64Decode(
+    const char* inputBuffer,
+    size_t    length,
+    size_t    * outputLength);
+
+char *CDVNewBase64Encode(
+    const void* inputBuffer,
+    size_t    length,
+    bool      separateLines,
+    size_t    * outputLength);
+
+@interface NSData (CDVBase64)
+
++ (NSData*)dataFromBase64String:(NSString*)aString;
+- (NSString*)base64EncodedString;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Utils/NSData+Base64.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Utils/NSData+Base64.m b/CordovaLib/CordovaLib/Classes/Utils/NSData+Base64.m
new file mode 100644
index 0000000..08c801b
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Utils/NSData+Base64.m
@@ -0,0 +1,286 @@
+//
+//  NSData+Base64.m
+//  base64
+//
+//  Created by Matt Gallagher on 2009/06/03.
+//  Copyright 2009 Matt Gallagher. All rights reserved.
+//
+//  Permission is given to use this source code file, free of charge, in any
+//  project, commercial or otherwise, entirely at your risk, with the condition
+//  that any redistribution (in part or whole) of source code must retain
+//  this copyright and permission notice. Attribution in compiled projects is
+//  appreciated but not required.
+//
+
+#import "NSData+Base64.h"
+
+//
+// Mapping from 6 bit pattern to ASCII character.
+//
+static unsigned char cdvbase64EncodeLookup[65] =
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+//
+// Definition for "masked-out" areas of the base64DecodeLookup mapping
+//
+#define xx 65
+
+//
+// Mapping from ASCII character to 6 bit pattern.
+//
+static unsigned char cdvbase64DecodeLookup[256] =
+{
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 62, xx, xx, xx, 63,
+    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, xx, xx, xx, xx, xx, xx,
+    xx, 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  10, 11, 12, 13, 14,
+    15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, xx, xx, xx, xx, xx,
+    xx, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+    xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
+};
+
+//
+// Fundamental sizes of the binary and base64 encode/decode units in bytes
+//
+#define CDV_BINARY_UNIT_SIZE 3
+#define CDV_BASE64_UNIT_SIZE 4
+
+//
+// NewBase64Decode
+//
+// Decodes the base64 ASCII string in the inputBuffer to a newly malloced
+// output buffer.
+//
+//  inputBuffer - the source ASCII string for the decode
+//	length - the length of the string or -1 (to specify strlen should be used)
+//	outputLength - if not-NULL, on output will contain the decoded length
+//
+// returns the decoded buffer. Must be freed by caller. Length is given by
+//	outputLength.
+//
+void *CDVNewBase64Decode(
+    const char* inputBuffer,
+    size_t    length,
+    size_t    * outputLength)
+{
+    if (length == -1) {
+        length = strlen(inputBuffer);
+    }
+
+    size_t outputBufferSize = (length / CDV_BASE64_UNIT_SIZE) * CDV_BINARY_UNIT_SIZE;
+    unsigned char* outputBuffer = (unsigned char*)malloc(outputBufferSize);
+
+    size_t i = 0;
+    size_t j = 0;
+
+    while (i < length) {
+        //
+        // Accumulate 4 valid characters (ignore everything else)
+        //
+        unsigned char accumulated[CDV_BASE64_UNIT_SIZE];
+        bzero(accumulated, sizeof(unsigned char) * CDV_BASE64_UNIT_SIZE);
+        size_t accumulateIndex = 0;
+
+        while (i < length) {
+            unsigned char decode = cdvbase64DecodeLookup[inputBuffer[i++]];
+            if (decode != xx) {
+                accumulated[accumulateIndex] = decode;
+                accumulateIndex++;
+
+                if (accumulateIndex == CDV_BASE64_UNIT_SIZE) {
+                    break;
+                }
+            }
+        }
+
+        //
+        // Store the 6 bits from each of the 4 characters as 3 bytes
+        //
+        outputBuffer[j] = (accumulated[0] << 2) | (accumulated[1] >> 4);
+        outputBuffer[j + 1] = (accumulated[1] << 4) | (accumulated[2] >> 2);
+        outputBuffer[j + 2] = (accumulated[2] << 6) | accumulated[3];
+        j += accumulateIndex - 1;
+    }
+
+    if (outputLength) {
+        *outputLength = j;
+    }
+    return outputBuffer;
+}
+
+//
+// NewBase64Decode
+//
+// Encodes the arbitrary data in the inputBuffer as base64 into a newly malloced
+// output buffer.
+//
+//  inputBuffer - the source data for the encode
+//	length - the length of the input in bytes
+//  separateLines - if zero, no CR/LF characters will be added. Otherwise
+//		a CR/LF pair will be added every 64 encoded chars.
+//	outputLength - if not-NULL, on output will contain the encoded length
+//		(not including terminating 0 char)
+//
+// returns the encoded buffer. Must be freed by caller. Length is given by
+//	outputLength.
+//
+char *CDVNewBase64Encode(
+    const void* buffer,
+    size_t    length,
+    bool      separateLines,
+    size_t    * outputLength)
+{
+    const unsigned char* inputBuffer = (const unsigned char*)buffer;
+
+#define MAX_NUM_PADDING_CHARS 2
+#define OUTPUT_LINE_LENGTH 64
+#define INPUT_LINE_LENGTH ((OUTPUT_LINE_LENGTH / CDV_BASE64_UNIT_SIZE) * CDV_BINARY_UNIT_SIZE)
+#define CR_LF_SIZE 0
+
+    //
+    // Byte accurate calculation of final buffer size
+    //
+    size_t outputBufferSize =
+        ((length / CDV_BINARY_UNIT_SIZE)
+        + ((length % CDV_BINARY_UNIT_SIZE) ? 1 : 0))
+        * CDV_BASE64_UNIT_SIZE;
+    if (separateLines) {
+        outputBufferSize +=
+            (outputBufferSize / OUTPUT_LINE_LENGTH) * CR_LF_SIZE;
+    }
+
+    //
+    // Include space for a terminating zero
+    //
+    outputBufferSize += 1;
+
+    //
+    // Allocate the output buffer
+    //
+    char* outputBuffer = (char*)malloc(outputBufferSize);
+    if (!outputBuffer) {
+        return NULL;
+    }
+
+    size_t i = 0;
+    size_t j = 0;
+    const size_t lineLength = separateLines ? INPUT_LINE_LENGTH : length;
+    size_t lineEnd = lineLength;
+
+    while (true) {
+        if (lineEnd > length) {
+            lineEnd = length;
+        }
+
+        for (; i + CDV_BINARY_UNIT_SIZE - 1 < lineEnd; i += CDV_BINARY_UNIT_SIZE) {
+            //
+            // Inner loop: turn 48 bytes into 64 base64 characters
+            //
+            outputBuffer[j++] = cdvbase64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
+            outputBuffer[j++] = cdvbase64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
+                | ((inputBuffer[i + 1] & 0xF0) >> 4)];
+            outputBuffer[j++] = cdvbase64EncodeLookup[((inputBuffer[i + 1] & 0x0F) << 2)
+                | ((inputBuffer[i + 2] & 0xC0) >> 6)];
+            outputBuffer[j++] = cdvbase64EncodeLookup[inputBuffer[i + 2] & 0x3F];
+        }
+
+        if (lineEnd == length) {
+            break;
+        }
+
+        //
+        // Add the newline
+        //
+        // outputBuffer[j++] = '\r';
+        // outputBuffer[j++] = '\n';
+        lineEnd += lineLength;
+    }
+
+    if (i + 1 < length) {
+        //
+        // Handle the single '=' case
+        //
+        outputBuffer[j++] = cdvbase64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
+        outputBuffer[j++] = cdvbase64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
+            | ((inputBuffer[i + 1] & 0xF0) >> 4)];
+        outputBuffer[j++] = cdvbase64EncodeLookup[(inputBuffer[i + 1] & 0x0F) << 2];
+        outputBuffer[j++] = '=';
+    } else if (i < length) {
+        //
+        // Handle the double '=' case
+        //
+        outputBuffer[j++] = cdvbase64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
+        outputBuffer[j++] = cdvbase64EncodeLookup[(inputBuffer[i] & 0x03) << 4];
+        outputBuffer[j++] = '=';
+        outputBuffer[j++] = '=';
+    }
+    outputBuffer[j] = 0;
+
+    //
+    // Set the output length and return the buffer
+    //
+    if (outputLength) {
+        *outputLength = j;
+    }
+    return outputBuffer;
+}
+
+@implementation NSData (CDVBase64)
+
+//
+// dataFromBase64String:
+//
+// Creates an NSData object containing the base64 decoded representation of
+// the base64 string 'aString'
+//
+// Parameters:
+//    aString - the base64 string to decode
+//
+// returns the autoreleased NSData representation of the base64 string
+//
++ (NSData*)dataFromBase64String:(NSString*)aString
+{
+    NSData* data = [aString dataUsingEncoding:NSASCIIStringEncoding];
+    size_t outputLength;
+    void* outputBuffer = CDVNewBase64Decode([data bytes], [data length], &outputLength);
+    NSData* result = [NSData dataWithBytes:outputBuffer length:outputLength];
+
+    free(outputBuffer);
+    return result;
+}
+
+//
+// base64EncodedString
+//
+// Creates an NSString object that contains the base 64 encoding of the
+// receiver's data. Lines are broken at 64 characters long.
+//
+// returns an autoreleased NSString being the base 64 representation of the
+//	receiver.
+//
+- (NSString*)base64EncodedString
+{
+    size_t outputLength = 0;
+    char* outputBuffer =
+        CDVNewBase64Encode([self bytes], [self length], true, &outputLength);
+
+    NSString* result =
+        [[NSString alloc]
+        initWithBytes:outputBuffer
+               length:outputLength
+             encoding:NSASCIIStringEncoding];
+
+    free(outputBuffer);
+    return result;
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Utils/NSWindow+Utils.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Utils/NSWindow+Utils.h b/CordovaLib/CordovaLib/Classes/Utils/NSWindow+Utils.h
new file mode 100644
index 0000000..03e4253
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Utils/NSWindow+Utils.h
@@ -0,0 +1,27 @@
+/*
+ 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.
+ */
+
+
+#import <Cocoa/Cocoa.h>
+
+@interface NSWindow (Utils)
+
+- (float) titleBarHeight;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Utils/NSWindow+Utils.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Utils/NSWindow+Utils.m b/CordovaLib/CordovaLib/Classes/Utils/NSWindow+Utils.m
new file mode 100644
index 0000000..a4b5f8c
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Utils/NSWindow+Utils.m
@@ -0,0 +1,34 @@
+/*
+ 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.
+ */
+
+
+#import "NSWindow+Utils.h"
+
+@implementation NSWindow (Utils)
+
+- (float) titleBarHeight
+{
+    NSRect frame = [self frame];
+    NSRect contentRect = [NSWindow contentRectForFrameRect: frame
+												 styleMask: NSTitledWindowMask];
+	
+    return (frame.size.height - contentRect.size.height);
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Utils/ShellUtils.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Utils/ShellUtils.h b/CordovaLib/CordovaLib/Classes/Utils/ShellUtils.h
new file mode 100644
index 0000000..ca711c0
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Utils/ShellUtils.h
@@ -0,0 +1,34 @@
+/*
+ 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.
+ */
+
+
+#import <Foundation/Foundation.h>
+
+@class CDVPlugin;
+@interface ShellUtils : NSObject
+
++ (BOOL) restartComputer;
++ (void) quitApp;
+
++ (NSTask*) shellTask:(NSString*)command;
++ (NSTask*) executeShellTaskAsync:(NSString*)command usingBlock:(void (^)(NSNotification *))block;
++ (void) executeShellTaskAsync:(NSString*)command withCallbackId:(NSString*)aCallbackId forPlugin:(CDVPlugin*)plugin;
++ (NSString*) executeShellTask:(NSString*)command;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/Classes/Utils/ShellUtils.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/Classes/Utils/ShellUtils.m b/CordovaLib/CordovaLib/Classes/Utils/ShellUtils.m
new file mode 100644
index 0000000..9dcd55c
--- /dev/null
+++ b/CordovaLib/CordovaLib/Classes/Utils/ShellUtils.m
@@ -0,0 +1,119 @@
+/*
+ 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.
+ */
+
+
+#import "ShellUtils.h"
+#import <Cocoa/Cocoa.h>
+#import <Security/Authorization.h>
+#import "CDVPlugin.h"
+
+@implementation ShellUtils
+
++ (BOOL) restartComputer
+{
+	NSAppleScript* script = [[NSAppleScript alloc] initWithSource:@"tell application \"System Events\" to restart"];
+	NSDictionary* errorInfo;
+	NSAppleEventDescriptor* descriptor = [script executeAndReturnError:&errorInfo];
+    
+	return (descriptor != nil);
+}
+
++ (void) quitApp
+{
+    [[NSApplication sharedApplication] terminate:nil];    
+}
+
++ (NSTask*) shellTask:(NSString*)command
+{
+	NSTask* task = [[NSTask alloc] init];
+    [task setLaunchPath: @"/bin/sh"];
+	[task setStandardInput:[NSFileHandle fileHandleWithNullDevice]];
+    [task setArguments: @[@"-c", command]];
+    
+    return task;
+}
+
++ (NSString*) executeShellTask:(NSString*)command
+{
+    NSPipe* pipe = [NSPipe pipe];
+    NSFileHandle* fileHandle = [pipe fileHandleForReading];
+    
+	NSTask* task = [[self class] shellTask:command];
+    [task setStandardOutput:pipe];
+	[task setStandardError:pipe];
+    [task launch];
+    
+    NSData* outputData = [fileHandle readDataToEndOfFile];
+    
+	return [[NSString alloc] initWithData:outputData encoding:NSUTF8StringEncoding];
+}
+
++ (NSTask*) executeShellTaskAsync:(NSString*)command usingBlock:(void (^)(NSNotification *))block
+{
+    NSPipe* pipe = [NSPipe pipe];
+    NSFileHandle* fileHandle = [pipe fileHandleForReading];
+    
+	NSTask* task = [[self class] shellTask:command];
+    [task setStandardOutput:pipe];
+	[task setStandardError:pipe];
+
+    NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
+    NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
+    
+    [center addObserverForName:NSFileHandleReadCompletionNotification object:fileHandle queue:mainQueue usingBlock:block];
+    [center addObserverForName:NSTaskDidTerminateNotification object:task queue:mainQueue usingBlock:block];
+
+    [task launch];
+    [fileHandle readInBackgroundAndNotify];
+    
+    return task;
+}
+
++ (void) executeShellTaskAsync:(NSString*)command withCallbackId:(NSString*)aCallbackId forPlugin:(CDVPlugin*)plugin
+{
+    __block NSString* callbackId = aCallbackId;
+    __block NSTask* task = nil;
+    
+    task = [[self class] executeShellTaskAsync:command usingBlock:^(NSNotification* notif){
+        if ([notif.object isKindOfClass:[NSFileHandle class]]) {
+            NSFileHandle* fileHandle = (NSFileHandle*)notif.object;
+            NSData* data = [[notif userInfo] valueForKey:NSFileHandleNotificationDataItem];
+            NSString* output = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:@{ @"data": output }];
+            result.keepCallback = [NSNumber numberWithBool:YES];
+            [plugin.commandDelegate sendPluginResult:result callbackId:callbackId];
+            
+            if (task && [task isRunning]) {
+                [fileHandle readInBackgroundAndNotify];
+            }
+            
+        } else if ([notif.object isKindOfClass:[NSTask class]]) {
+            int status = [task terminationStatus];
+            task = nil;
+            
+            CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
+                                       messageAsDictionary:@{ @"resultcode" :[NSNumber numberWithInt:status] }];
+            result.keepCallback = [NSNumber numberWithBool:NO];
+            [plugin.commandDelegate sendPluginResult:result callbackId:callbackId];
+        }
+    }];
+}
+
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib/CordovaLib-Prefix.pch
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib/CordovaLib-Prefix.pch b/CordovaLib/CordovaLib/CordovaLib-Prefix.pch
new file mode 100644
index 0000000..35d7640
--- /dev/null
+++ b/CordovaLib/CordovaLib/CordovaLib-Prefix.pch
@@ -0,0 +1,9 @@
+//
+//  Prefix header
+//
+//  The contents of this file are implicitly included at the beginning of every source file.
+//
+
+#ifdef __OBJC__
+    #import <Cocoa/Cocoa.h>
+#endif

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLibTests/CordovaLibTests-Info.plist
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CordovaLibTests-Info.plist b/CordovaLib/CordovaLibTests/CordovaLibTests-Info.plist
new file mode 100644
index 0000000..b96525e
--- /dev/null
+++ b/CordovaLib/CordovaLibTests/CordovaLibTests-Info.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.apache.${PRODUCT_NAME:rfc1034identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>BNDL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+</dict>
+</plist>


[13/14] mac commit: Fixing ObjC linking and plugin support

Posted by sh...@apache.org.
Fixing ObjC linking and plugin support

Signed-off-by: Shazron Abdullah <sh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cordova-osx/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-osx/commit/3222f135
Tree: http://git-wip-us.apache.org/repos/asf/cordova-osx/tree/3222f135
Diff: http://git-wip-us.apache.org/repos/asf/cordova-osx/diff/3222f135

Branch: refs/heads/master
Commit: 3222f135f7209126e7edabd3591651313c0b7d2d
Parents: c29897a
Author: Tobias Bocanegra <tr...@adobe.com>
Authored: Mon Apr 21 12:14:54 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Apr 22 14:44:25 2014 -0700

----------------------------------------------------------------------
 .../__CDV_PRODUCT_NAME__.xcodeproj/project.pbxproj       | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/3222f135/templates/project/__CDV_PRODUCT_NAME__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__.xcodeproj/project.pbxproj b/templates/project/__CDV_PRODUCT_NAME__.xcodeproj/project.pbxproj
index b4c2dac..71b559d 100644
--- a/templates/project/__CDV_PRODUCT_NAME__.xcodeproj/project.pbxproj
+++ b/templates/project/__CDV_PRODUCT_NAME__.xcodeproj/project.pbxproj
@@ -82,10 +82,19 @@
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
+		7069FBC31905A1F9000B48E1 /* Plugins */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			name = Plugins;
+			path = __CDV_PRODUCT_NAME__/Plugins;
+			sourceTree = SOURCE_ROOT;
+		};
 		70BD681A18FFB02D00A1EFCF = {
 			isa = PBXGroup;
 			children = (
 				70BD686818FFB0BF00A1EFCF /* Classes */,
+				7069FBC31905A1F9000B48E1 /* Plugins */,
 				70BD682C18FFB02D00A1EFCF /* __CDV_PRODUCT_NAME__ */,
 				70BD682518FFB02D00A1EFCF /* Frameworks */,
 				70BD682418FFB02D00A1EFCF /* Products */,
@@ -349,6 +358,7 @@
 				);
 				MACOSX_DEPLOYMENT_TARGET = 10.9;
 				ONLY_ACTIVE_ARCH = YES;
+				OTHER_LDFLAGS = "-ObjC";
 				SDKROOT = macosx;
 			};
 			name = Debug;
@@ -386,6 +396,7 @@
 					"\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include\"",
 				);
 				MACOSX_DEPLOYMENT_TARGET = 10.9;
+				OTHER_LDFLAGS = "-ObjC";
 				SDKROOT = macosx;
 			};
 			name = Release;


[02/14] Update to modern layout

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/MainViewController.xib
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/MainViewController.xib b/templates/project/__CDV_PRODUCT_NAME__/MainViewController.xib
new file mode 100644
index 0000000..2cf1a1e
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/MainViewController.xib
@@ -0,0 +1,705 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13C64" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+    <dependencies>
+        <deployment version="1070" identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
+        <plugIn identifier="com.apple.WebKitIBPlugin" version="5056"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="NSApplication" colorLabel="IBBuiltInLabel-Green">
+            <connections>
+                <outlet property="delegate" destination="494" id="745"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application"/>
+        <menu title="AMainMenu" systemMenu="main" id="29">
+            <items>
+                <menuItem id="56">
+                    <menu key="submenu" systemMenu="apple" id="57">
+                        <items>
+                            <menuItem title="About __CDV_PRODUCT_NAME__" id="58">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <connections>
+                                    <action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="236">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Preferences…" keyEquivalent="," id="129"/>
+                            <menuItem isSeparatorItem="YES" id="143">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Services" id="131">
+                                <menu key="submenu" title="Services" systemMenu="services" id="130"/>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="144">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Hide" keyEquivalent="h" id="134">
+                                <connections>
+                                    <action selector="hide:" target="-1" id="367"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Hide Others" keyEquivalent="h" id="145">
+                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+                                <connections>
+                                    <action selector="hideOtherApplications:" target="-1" id="368"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Show All" id="150">
+                                <connections>
+                                    <action selector="unhideAllApplications:" target="-1" id="370"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="149">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Quit __CDV_PRODUCT_NAME__" keyEquivalent="q" id="136">
+                                <connections>
+                                    <action selector="terminate:" target="-3" id="449"/>
+                                </connections>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+                <menuItem title="File" id="83">
+                    <menu key="submenu" title="File" id="81">
+                        <items>
+                            <menuItem title="New" keyEquivalent="n" id="82">
+                                <connections>
+                                    <action selector="newDocument:" target="-1" id="373"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Open…" keyEquivalent="o" id="72">
+                                <connections>
+                                    <action selector="openDocument:" target="-1" id="374"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Open Recent" id="124">
+                                <menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="125">
+                                    <items>
+                                        <menuItem title="Clear Menu" id="126">
+                                            <connections>
+                                                <action selector="clearRecentDocuments:" target="-1" id="127"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="79">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Close" keyEquivalent="w" id="73">
+                                <connections>
+                                    <action selector="performClose:" target="-1" id="193"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Save…" keyEquivalent="s" id="75">
+                                <connections>
+                                    <action selector="saveDocument:" target="-1" id="362"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Revert to Saved" id="112">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <connections>
+                                    <action selector="revertDocumentToSaved:" target="-1" id="364"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="74">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Page Setup..." keyEquivalent="P" id="77">
+                                <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
+                                <connections>
+                                    <action selector="runPageLayout:" target="-1" id="87"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Print…" keyEquivalent="p" id="78">
+                                <connections>
+                                    <action selector="print:" target="-1" id="86"/>
+                                </connections>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+                <menuItem title="Edit" id="217">
+                    <menu key="submenu" title="Edit" id="205">
+                        <items>
+                            <menuItem title="Undo" keyEquivalent="z" id="207">
+                                <connections>
+                                    <action selector="undo:" target="-1" id="223"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Redo" keyEquivalent="Z" id="215">
+                                <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
+                                <connections>
+                                    <action selector="redo:" target="-1" id="231"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="206">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Cut" keyEquivalent="x" id="199">
+                                <connections>
+                                    <action selector="cut:" target="-1" id="228"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Copy" keyEquivalent="c" id="197">
+                                <connections>
+                                    <action selector="copy:" target="-1" id="224"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Paste" keyEquivalent="v" id="203">
+                                <connections>
+                                    <action selector="paste:" target="-1" id="226"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Paste and Match Style" keyEquivalent="V" id="485">
+                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+                                <connections>
+                                    <action selector="pasteAsPlainText:" target="-1" id="486"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Delete" id="202">
+                                <connections>
+                                    <action selector="delete:" target="-1" id="235"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Select All" keyEquivalent="a" id="198">
+                                <connections>
+                                    <action selector="selectAll:" target="-1" id="232"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="214">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Find" id="218">
+                                <menu key="submenu" title="Find" id="220">
+                                    <items>
+                                        <menuItem title="Find…" tag="1" keyEquivalent="f" id="209">
+                                            <connections>
+                                                <action selector="performFindPanelAction:" target="-1" id="241"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="534">
+                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+                                            <connections>
+                                                <action selector="performFindPanelAction:" target="-1" id="535"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Find Next" tag="2" keyEquivalent="g" id="208">
+                                            <connections>
+                                                <action selector="performFindPanelAction:" target="-1" id="487"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="213">
+                                            <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
+                                            <connections>
+                                                <action selector="performFindPanelAction:" target="-1" id="488"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="221">
+                                            <connections>
+                                                <action selector="performFindPanelAction:" target="-1" id="489"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Jump to Selection" keyEquivalent="j" id="210">
+                                            <connections>
+                                                <action selector="centerSelectionInVisibleArea:" target="-1" id="245"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                            <menuItem title="Spelling and Grammar" id="216">
+                                <menu key="submenu" title="Spelling and Grammar" id="200">
+                                    <items>
+                                        <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="204">
+                                            <connections>
+                                                <action selector="showGuessPanel:" target="-1" id="230"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Check Document Now" keyEquivalent=";" id="201">
+                                            <connections>
+                                                <action selector="checkSpelling:" target="-1" id="225"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem isSeparatorItem="YES" id="453"/>
+                                        <menuItem title="Check Spelling While Typing" id="219">
+                                            <connections>
+                                                <action selector="toggleContinuousSpellChecking:" target="-1" id="222"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Check Grammar With Spelling" id="346">
+                                            <connections>
+                                                <action selector="toggleGrammarChecking:" target="-1" id="347"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Correct Spelling Automatically" id="454">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="toggleAutomaticSpellingCorrection:" target="-1" id="456"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                            <menuItem title="Substitutions" id="348">
+                                <menu key="submenu" title="Substitutions" id="349">
+                                    <items>
+                                        <menuItem title="Show Substitutions" id="457">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="orderFrontSubstitutionsPanel:" target="-1" id="458"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem isSeparatorItem="YES" id="459"/>
+                                        <menuItem title="Smart Copy/Paste" tag="1" keyEquivalent="f" id="350">
+                                            <connections>
+                                                <action selector="toggleSmartInsertDelete:" target="-1" id="355"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Smart Quotes" tag="2" keyEquivalent="g" id="351">
+                                            <connections>
+                                                <action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="356"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Smart Dashes" id="460">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="toggleAutomaticDashSubstitution:" target="-1" id="461"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Smart Links" tag="3" keyEquivalent="G" id="354">
+                                            <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
+                                            <connections>
+                                                <action selector="toggleAutomaticLinkDetection:" target="-1" id="357"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Text Replacement" id="462">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="toggleAutomaticTextReplacement:" target="-1" id="463"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                            <menuItem title="Transformations" id="450">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <menu key="submenu" title="Transformations" id="451">
+                                    <items>
+                                        <menuItem title="Make Upper Case" id="452">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="uppercaseWord:" target="-1" id="464"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Make Lower Case" id="465">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="lowercaseWord:" target="-1" id="468"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Capitalize" id="466">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="capitalizeWord:" target="-1" id="467"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                            <menuItem title="Speech" id="211">
+                                <menu key="submenu" title="Speech" id="212">
+                                    <items>
+                                        <menuItem title="Start Speaking" id="196">
+                                            <connections>
+                                                <action selector="startSpeaking:" target="-1" id="233"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Stop Speaking" id="195">
+                                            <connections>
+                                                <action selector="stopSpeaking:" target="-1" id="227"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+                <menuItem title="Format" id="375">
+                    <modifierMask key="keyEquivalentModifierMask"/>
+                    <menu key="submenu" title="Format" id="376">
+                        <items>
+                            <menuItem title="Font" id="377">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <menu key="submenu" title="Font" systemMenu="font" id="388">
+                                    <items>
+                                        <menuItem title="Show Fonts" keyEquivalent="t" id="389">
+                                            <connections>
+                                                <action selector="orderFrontFontPanel:" target="420" id="424"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Bold" tag="2" keyEquivalent="b" id="390">
+                                            <connections>
+                                                <action selector="addFontTrait:" target="420" id="421"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Italic" tag="1" keyEquivalent="i" id="391">
+                                            <connections>
+                                                <action selector="addFontTrait:" target="420" id="422"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Underline" keyEquivalent="u" id="392">
+                                            <connections>
+                                                <action selector="underline:" target="-1" id="432"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem isSeparatorItem="YES" id="393"/>
+                                        <menuItem title="Bigger" tag="3" keyEquivalent="+" id="394">
+                                            <connections>
+                                                <action selector="modifyFont:" target="420" id="425"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Smaller" tag="4" keyEquivalent="-" id="395">
+                                            <connections>
+                                                <action selector="modifyFont:" target="420" id="423"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem isSeparatorItem="YES" id="396"/>
+                                        <menuItem title="Kern" id="397">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <menu key="submenu" title="Kern" id="415">
+                                                <items>
+                                                    <menuItem title="Use Default" id="416">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="useStandardKerning:" target="-1" id="438"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem title="Use None" id="417">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="turnOffKerning:" target="-1" id="441"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem title="Tighten" id="418">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="tightenKerning:" target="-1" id="431"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem title="Loosen" id="419">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="loosenKerning:" target="-1" id="435"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                </items>
+                                            </menu>
+                                        </menuItem>
+                                        <menuItem title="Ligature" id="398">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <menu key="submenu" title="Ligature" id="411">
+                                                <items>
+                                                    <menuItem title="Use Default" id="412">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="useStandardLigatures:" target="-1" id="439"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem title="Use None" id="413">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="turnOffLigatures:" target="-1" id="440"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem title="Use All" id="414">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="useAllLigatures:" target="-1" id="434"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                </items>
+                                            </menu>
+                                        </menuItem>
+                                        <menuItem title="Baseline" id="399">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <menu key="submenu" title="Baseline" id="405">
+                                                <items>
+                                                    <menuItem title="Use Default" id="406">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="unscript:" target="-1" id="437"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem title="Superscript" id="407">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="superscript:" target="-1" id="430"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem title="Subscript" id="408">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="subscript:" target="-1" id="429"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem title="Raise" id="409">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="raiseBaseline:" target="-1" id="426"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem title="Lower" id="410">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="lowerBaseline:" target="-1" id="427"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                </items>
+                                            </menu>
+                                        </menuItem>
+                                        <menuItem isSeparatorItem="YES" id="400"/>
+                                        <menuItem title="Show Colors" keyEquivalent="C" id="401">
+                                            <connections>
+                                                <action selector="orderFrontColorPanel:" target="-1" id="433"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem isSeparatorItem="YES" id="402"/>
+                                        <menuItem title="Copy Style" keyEquivalent="c" id="403">
+                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+                                            <connections>
+                                                <action selector="copyFont:" target="-1" id="428"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Paste Style" keyEquivalent="v" id="404">
+                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+                                            <connections>
+                                                <action selector="pasteFont:" target="-1" id="436"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                            <menuItem title="Text" id="496">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <menu key="submenu" title="Text" id="497">
+                                    <items>
+                                        <menuItem title="Align Left" keyEquivalent="{" id="498">
+                                            <connections>
+                                                <action selector="alignLeft:" target="-1" id="524"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Center" keyEquivalent="|" id="499">
+                                            <connections>
+                                                <action selector="alignCenter:" target="-1" id="518"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Justify" id="500">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="alignJustified:" target="-1" id="523"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Align Right" keyEquivalent="}" id="501">
+                                            <connections>
+                                                <action selector="alignRight:" target="-1" id="521"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem isSeparatorItem="YES" id="502"/>
+                                        <menuItem title="Writing Direction" id="503">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <menu key="submenu" title="Writing Direction" id="508">
+                                                <items>
+                                                    <menuItem title="Paragraph" enabled="NO" id="509">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                    </menuItem>
+                                                    <menuItem id="510">
+                                                        <string key="title">	Default</string>
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="makeBaseWritingDirectionNatural:" target="-1" id="525"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem id="511">
+                                                        <string key="title">	Left to Right</string>
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="makeBaseWritingDirectionLeftToRight:" target="-1" id="526"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem id="512">
+                                                        <string key="title">	Right to Left</string>
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="makeBaseWritingDirectionRightToLeft:" target="-1" id="527"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem isSeparatorItem="YES" id="513"/>
+                                                    <menuItem title="Selection" enabled="NO" id="514">
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                    </menuItem>
+                                                    <menuItem id="515">
+                                                        <string key="title">	Default</string>
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="makeTextWritingDirectionNatural:" target="-1" id="528"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem id="516">
+                                                        <string key="title">	Left to Right</string>
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="makeTextWritingDirectionLeftToRight:" target="-1" id="529"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                    <menuItem id="517">
+                                                        <string key="title">	Right to Left</string>
+                                                        <modifierMask key="keyEquivalentModifierMask"/>
+                                                        <connections>
+                                                            <action selector="makeTextWritingDirectionRightToLeft:" target="-1" id="530"/>
+                                                        </connections>
+                                                    </menuItem>
+                                                </items>
+                                            </menu>
+                                        </menuItem>
+                                        <menuItem isSeparatorItem="YES" id="504"/>
+                                        <menuItem title="Show Ruler" id="505">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="toggleRuler:" target="-1" id="520"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Copy Ruler" keyEquivalent="c" id="506">
+                                            <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
+                                            <connections>
+                                                <action selector="copyRuler:" target="-1" id="522"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Paste Ruler" keyEquivalent="v" id="507">
+                                            <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
+                                            <connections>
+                                                <action selector="pasteRuler:" target="-1" id="519"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+                <menuItem title="View" id="295">
+                    <menu key="submenu" title="View" id="296">
+                        <items>
+                            <menuItem title="Show Toolbar" keyEquivalent="t" id="297">
+                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+                                <connections>
+                                    <action selector="toggleToolbarShown:" target="-1" id="366"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Customize Toolbar…" id="298">
+                                <connections>
+                                    <action selector="runToolbarCustomizationPalette:" target="-1" id="365"/>
+                                </connections>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+                <menuItem title="Window" id="19">
+                    <menu key="submenu" title="Window" systemMenu="window" id="24">
+                        <items>
+                            <menuItem title="Minimize" keyEquivalent="m" id="23">
+                                <connections>
+                                    <action selector="performMiniaturize:" target="-1" id="37"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem title="Zoom" id="239">
+                                <connections>
+                                    <action selector="performZoom:" target="-1" id="240"/>
+                                </connections>
+                            </menuItem>
+                            <menuItem isSeparatorItem="YES" id="92">
+                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
+                            </menuItem>
+                            <menuItem title="Bring All to Front" id="5">
+                                <connections>
+                                    <action selector="arrangeInFront:" target="-1" id="39"/>
+                                </connections>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+                <menuItem title="Help" id="490">
+                    <modifierMask key="keyEquivalentModifierMask"/>
+                    <menu key="submenu" title="Help" systemMenu="help" id="491">
+                        <items>
+                            <menuItem title="__CDV_PRODUCT_NAME__ Help" keyEquivalent="?" id="492">
+                                <connections>
+                                    <action selector="showHelp:" target="-1" id="493"/>
+                                </connections>
+                            </menuItem>
+                        </items>
+                    </menu>
+                </menuItem>
+            </items>
+        </menu>
+        <window title="__CDV_PRODUCT_NAME__" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="371">
+            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
+            <windowCollectionBehavior key="collectionBehavior" fullScreenPrimary="YES"/>
+            <rect key="contentRect" x="335" y="299" width="640" height="480"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1178"/>
+            <value key="minSize" type="size" width="640" height="480"/>
+            <view key="contentView" horizontalHuggingPriority="1000" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1" verticalCompressionResistancePriority="1" id="372" userLabel="Content View">
+                <rect key="frame" x="0.0" y="0.0" width="640" height="480"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <webView horizontalHuggingPriority="1" verticalHuggingPriority="1" horizontalCompressionResistancePriority="1" verticalCompressionResistancePriority="1" translatesAutoresizingMaskIntoConstraints="NO" id="536">
+                        <rect key="frame" x="0.0" y="0.0" width="640" height="480"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <webPreferences key="preferences" defaultFontSize="12" defaultFixedFontSize="12" plugInsEnabled="NO" javaEnabled="NO"/>
+                        <connections>
+                            <outlet property="UIDelegate" destination="739" id="752"/>
+                            <outlet property="frameLoadDelegate" destination="739" id="751"/>
+                            <outlet property="policyDelegate" destination="739" id="749"/>
+                            <outlet property="resourceLoadDelegate" destination="739" id="750"/>
+                        </connections>
+                    </webView>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="536" firstAttribute="trailing" secondItem="372" secondAttribute="trailing" id="719"/>
+                    <constraint firstItem="536" firstAttribute="bottom" secondItem="372" secondAttribute="bottom" id="725"/>
+                    <constraint firstItem="536" firstAttribute="leading" secondItem="372" secondAttribute="leading" id="726"/>
+                    <constraint firstItem="536" firstAttribute="top" secondItem="372" secondAttribute="top" id="727"/>
+                </constraints>
+            </view>
+            <connections>
+                <outlet property="delegate" destination="-2" id="743"/>
+            </connections>
+        </window>
+        <customObject id="494" customClass="AppDelegate">
+            <connections>
+                <outlet property="viewController" destination="732" id="746"/>
+                <outlet property="window" destination="371" id="748"/>
+            </connections>
+        </customObject>
+        <customObject id="420" customClass="NSFontManager"/>
+        <customObject id="732" customClass="MainViewController">
+            <connections>
+                <outlet property="contentView" destination="372" id="735"/>
+                <outlet property="webView" destination="536" id="734"/>
+                <outlet property="webViewDelegate" destination="739" id="747"/>
+                <outlet property="window" destination="371" id="738"/>
+            </connections>
+        </customObject>
+        <customObject id="739" customClass="CDVWebViewDelegate">
+            <connections>
+                <outlet property="viewController" destination="732" id="xfK-Jk-BoG"/>
+            </connections>
+        </customObject>
+    </objects>
+</document>

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/Plugins/README
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Plugins/README b/templates/project/__CDV_PRODUCT_NAME__/Plugins/README
new file mode 100644
index 0000000..87df09f
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/Plugins/README
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+Put the .h and .m files of your plugin here. The .js files of your plugin belong in the www folder.

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/__CDV_PRODUCT_NAME__-Info.plist
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/__CDV_PRODUCT_NAME__-Info.plist b/templates/project/__CDV_PRODUCT_NAME__/__CDV_PRODUCT_NAME__-Info.plist
new file mode 100644
index 0000000..1a7e7c2
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/__CDV_PRODUCT_NAME__-Info.plist
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIconFile</key>
+	<string></string>
+	<key>CFBundleIdentifier</key>
+	<string>--CDV-COMPANY-ID--.${PRODUCT_NAME:rfc1034identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSMinimumSystemVersion</key>
+	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright © 2014 __CDV_ORGANIZATION_NAME__. All rights reserved.</string>
+	<key>NSMainNibFile</key>
+	<string>MainViewController</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+</dict>
+</plist>

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/__CDV_PRODUCT_NAME__-Prefix.pch
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/__CDV_PRODUCT_NAME__-Prefix.pch b/templates/project/__CDV_PRODUCT_NAME__/__CDV_PRODUCT_NAME__-Prefix.pch
new file mode 100644
index 0000000..35d7640
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/__CDV_PRODUCT_NAME__-Prefix.pch
@@ -0,0 +1,9 @@
+//
+//  Prefix header
+//
+//  The contents of this file are implicitly included at the beginning of every source file.
+//
+
+#ifdef __OBJC__
+    #import <Cocoa/Cocoa.h>
+#endif

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/config.xml
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/config.xml b/templates/project/__CDV_PRODUCT_NAME__/config.xml
new file mode 100644
index 0000000..d38c344
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/config.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding='utf-8'?>
+<widget id="com.example.hello" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+    <preference name="AllowInlineMediaPlayback" value="false" />
+    <preference name="AutoHideSplashScreen" value="true" />
+    <preference name="BackupWebStorage" value="cloud" />
+    <preference name="DisallowOverscroll" value="false" />
+    <preference name="EnableViewportScale" value="false" />
+    <preference name="FadeSplashScreen" value="true" />
+    <preference name="FadeSplashScreenDuration" value=".25" />
+    <preference name="KeyboardDisplayRequiresUserAction" value="true" />
+    <preference name="MediaPlaybackRequiresUserAction" value="false" />
+    <preference name="ShowSplashScreenSpinner" value="true" />
+    <preference name="SuppressesIncrementalRendering" value="false" />
+    <preference name="TopActivityIndicator" value="gray" />
+    <preference name="GapBetweenPages" value="0" />
+    <preference name="PageLength" value="0" />
+    <preference name="PaginationBreakingMode" value="page" />
+    <preference name="PaginationMode" value="unpaginated" />
+    <feature name="LocalStorage">
+        <param name="ios-package" value="CDVLocalStorage" />
+    </feature>
+    <name>Pong</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>
+    <content src="index.html" />
+    <access origin="*" />
+</widget>

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/en.lproj/Credits.rtf
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/en.lproj/Credits.rtf b/templates/project/__CDV_PRODUCT_NAME__/en.lproj/Credits.rtf
new file mode 100644
index 0000000..46576ef
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/en.lproj/Credits.rtf
@@ -0,0 +1,29 @@
+{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\paperw9840\paperh8400
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs24 \cf0 Engineering:
+\b0 \
+	Some people\
+\
+
+\b Human Interface Design:
+\b0 \
+	Some other people\
+\
+
+\b Testing:
+\b0 \
+	Hopefully not nobody\
+\
+
+\b Documentation:
+\b0 \
+	Whoever\
+\
+
+\b With special thanks to:
+\b0 \
+	Mom\
+}

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/en.lproj/InfoPlist.strings
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/en.lproj/InfoPlist.strings b/templates/project/__CDV_PRODUCT_NAME__/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..477b28f
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/en.lproj/MainViewController.strings
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/en.lproj/MainViewController.strings b/templates/project/__CDV_PRODUCT_NAME__/en.lproj/MainViewController.strings
new file mode 100644
index 0000000..464d3cf
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/en.lproj/MainViewController.strings
@@ -0,0 +1,390 @@
+
+/* Class = "NSMenuItem"; title = "Customize Toolbar…"; ObjectID = "1UK-8n-QPP"; */
+"1UK-8n-QPP.title" = "Customize Toolbar…";
+
+/* Class = "NSMenuItem"; title = "__CDV_PRODUCT_NAME__"; ObjectID = "1Xt-HY-uBw"; */
+"1Xt-HY-uBw.title" = "__CDV_PRODUCT_NAME__";
+
+/* Class = "NSMenu"; title = "Find"; ObjectID = "1b7-l0-nxx"; */
+"1b7-l0-nxx.title" = "Find";
+
+/* Class = "NSMenuItem"; title = "Lower"; ObjectID = "1tx-W0-xDw"; */
+"1tx-W0-xDw.title" = "Lower";
+
+/* Class = "NSMenuItem"; title = "Raise"; ObjectID = "2h7-ER-AoG"; */
+"2h7-ER-AoG.title" = "Raise";
+
+/* Class = "NSMenuItem"; title = "Transformations"; ObjectID = "2oI-Rn-ZJC"; */
+"2oI-Rn-ZJC.title" = "Transformations";
+
+/* Class = "NSMenu"; title = "Spelling"; ObjectID = "3IN-sU-3Bg"; */
+"3IN-sU-3Bg.title" = "Spelling";
+
+/* Class = "NSMenuItem"; title = "Use Default"; ObjectID = "3Om-Ey-2VK"; */
+"3Om-Ey-2VK.title" = "Use Default";
+
+/* Class = "NSMenu"; title = "Speech"; ObjectID = "3rS-ZA-NoH"; */
+"3rS-ZA-NoH.title" = "Speech";
+
+/* Class = "NSMenuItem"; title = "Tighten"; ObjectID = "46P-cB-AYj"; */
+"46P-cB-AYj.title" = "Tighten";
+
+/* Class = "NSMenuItem"; title = "Find"; ObjectID = "4EN-yA-p0u"; */
+"4EN-yA-p0u.title" = "Find";
+
+/* Class = "NSMenuItem"; title = "Quit __CDV_PRODUCT_NAME__"; ObjectID = "4sb-4s-VLi"; */
+"4sb-4s-VLi.title" = "Quit __CDV_PRODUCT_NAME__";
+
+/* Class = "NSMenuItem"; title = "Edit"; ObjectID = "5QF-Oa-p0T"; */
+"5QF-Oa-p0T.title" = "Edit";
+
+/* Class = "NSMenuItem"; title = "Copy Style"; ObjectID = "5Vv-lz-BsD"; */
+"5Vv-lz-BsD.title" = "Copy Style";
+
+/* Class = "NSMenuItem"; title = "About __CDV_PRODUCT_NAME__"; ObjectID = "5kV-Vb-QxS"; */
+"5kV-Vb-QxS.title" = "About __CDV_PRODUCT_NAME__";
+
+/* Class = "NSMenuItem"; title = "Redo"; ObjectID = "6dh-zS-Vam"; */
+"6dh-zS-Vam.title" = "Redo";
+
+/* Class = "NSMenuItem"; title = "Correct Spelling Automatically"; ObjectID = "78Y-hA-62v"; */
+"78Y-hA-62v.title" = "Correct Spelling Automatically";
+
+/* Class = "NSMenu"; title = "Writing Direction"; ObjectID = "8mr-sm-Yjd"; */
+"8mr-sm-Yjd.title" = "Writing Direction";
+
+/* Class = "NSMenuItem"; title = "Substitutions"; ObjectID = "9ic-FL-obx"; */
+"9ic-FL-obx.title" = "Substitutions";
+
+/* Class = "NSMenuItem"; title = "Smart Copy/Paste"; ObjectID = "9yt-4B-nSM"; */
+"9yt-4B-nSM.title" = "Smart Copy/Paste";
+
+/* Class = "NSMenu"; title = "Main Menu"; ObjectID = "AYu-sK-qS6"; */
+"AYu-sK-qS6.title" = "Main Menu";
+
+/* Class = "NSMenuItem"; title = "Preferences…"; ObjectID = "BOF-NM-1cW"; */
+"BOF-NM-1cW.title" = "Preferences…";
+
+/* Class = "NSMenuItem"; title = "\tLeft to Right"; ObjectID = "BgM-ve-c93"; */
+"BgM-ve-c93.title" = "\tLeft to Right";
+
+/* Class = "NSMenuItem"; title = "Save As…"; ObjectID = "Bw7-FT-i3A"; */
+"Bw7-FT-i3A.title" = "Save As…";
+
+/* Class = "NSMenuItem"; title = "Close"; ObjectID = "DVo-aG-piG"; */
+"DVo-aG-piG.title" = "Close";
+
+/* Class = "NSMenuItem"; title = "Spelling and Grammar"; ObjectID = "Dv1-io-Yv7"; */
+"Dv1-io-Yv7.title" = "Spelling and Grammar";
+
+/* Class = "NSMenu"; title = "Help"; ObjectID = "F2S-fz-NVQ"; */
+"F2S-fz-NVQ.title" = "Help";
+
+/* Class = "NSMenuItem"; title = "__CDV_PRODUCT_NAME__ Help"; ObjectID = "FKE-Sm-Kum"; */
+"FKE-Sm-Kum.title" = "__CDV_PRODUCT_NAME__ Help";
+
+/* Class = "NSMenuItem"; title = "Text"; ObjectID = "Fal-I4-PZk"; */
+"Fal-I4-PZk.title" = "Text";
+
+/* Class = "NSMenu"; title = "Substitutions"; ObjectID = "FeM-D8-WVr"; */
+"FeM-D8-WVr.title" = "Substitutions";
+
+/* Class = "NSMenuItem"; title = "Bold"; ObjectID = "GB9-OM-e27"; */
+"GB9-OM-e27.title" = "Bold";
+
+/* Class = "NSMenu"; title = "Format"; ObjectID = "GEO-Iw-cKr"; */
+"GEO-Iw-cKr.title" = "Format";
+
+/* Class = "NSMenuItem"; title = "Use Default"; ObjectID = "GUa-eO-cwY"; */
+"GUa-eO-cwY.title" = "Use Default";
+
+/* Class = "NSMenuItem"; title = "Font"; ObjectID = "Gi5-1S-RQB"; */
+"Gi5-1S-RQB.title" = "Font";
+
+/* Class = "NSMenuItem"; title = "Writing Direction"; ObjectID = "H1b-Si-o9J"; */
+"H1b-Si-o9J.title" = "Writing Direction";
+
+/* Class = "NSMenuItem"; title = "View"; ObjectID = "H8h-7b-M4v"; */
+"H8h-7b-M4v.title" = "View";
+
+/* Class = "NSMenuItem"; title = "Text Replacement"; ObjectID = "HFQ-gK-NFA"; */
+"HFQ-gK-NFA.title" = "Text Replacement";
+
+/* Class = "NSMenuItem"; title = "Show Spelling and Grammar"; ObjectID = "HFo-cy-zxI"; */
+"HFo-cy-zxI.title" = "Show Spelling and Grammar";
+
+/* Class = "NSMenu"; title = "View"; ObjectID = "HyV-fh-RgO"; */
+"HyV-fh-RgO.title" = "View";
+
+/* Class = "NSMenuItem"; title = "Subscript"; ObjectID = "I0S-gh-46l"; */
+"I0S-gh-46l.title" = "Subscript";
+
+/* Class = "NSMenuItem"; title = "Open…"; ObjectID = "IAo-SY-fd9"; */
+"IAo-SY-fd9.title" = "Open…";
+
+/* Class = "NSMenuItem"; title = "Justify"; ObjectID = "J5U-5w-g23"; */
+"J5U-5w-g23.title" = "Justify";
+
+/* Class = "NSMenuItem"; title = "Use None"; ObjectID = "J7y-lM-qPV"; */
+"J7y-lM-qPV.title" = "Use None";
+
+/* Class = "NSMenuItem"; title = "Revert to Saved"; ObjectID = "KaW-ft-85H"; */
+"KaW-ft-85H.title" = "Revert to Saved";
+
+/* Class = "NSMenuItem"; title = "Show All"; ObjectID = "Kd2-mp-pUS"; */
+"Kd2-mp-pUS.title" = "Show All";
+
+/* Class = "NSMenuItem"; title = "Bring All to Front"; ObjectID = "LE2-aR-0XJ"; */
+"LE2-aR-0XJ.title" = "Bring All to Front";
+
+/* Class = "NSMenuItem"; title = "Paste Ruler"; ObjectID = "LVM-kO-fVI"; */
+"LVM-kO-fVI.title" = "Paste Ruler";
+
+/* Class = "NSMenuItem"; title = "\tLeft to Right"; ObjectID = "Lbh-J2-qVU"; */
+"Lbh-J2-qVU.title" = "\tLeft to Right";
+
+/* Class = "NSMenuItem"; title = "Copy Ruler"; ObjectID = "MkV-Pr-PK5"; */
+"MkV-Pr-PK5.title" = "Copy Ruler";
+
+/* Class = "NSMenuItem"; title = "Services"; ObjectID = "NMo-om-nkz"; */
+"NMo-om-nkz.title" = "Services";
+
+/* Class = "NSMenuItem"; title = "\tDefault"; ObjectID = "Nop-cj-93Q"; */
+"Nop-cj-93Q.title" = "\tDefault";
+
+/* Class = "NSMenuItem"; title = "Minimize"; ObjectID = "OY7-WF-poV"; */
+"OY7-WF-poV.title" = "Minimize";
+
+/* Class = "NSMenuItem"; title = "Baseline"; ObjectID = "OaQ-X3-Vso"; */
+"OaQ-X3-Vso.title" = "Baseline";
+
+/* Class = "NSMenuItem"; title = "Hide __CDV_PRODUCT_NAME__"; ObjectID = "Olw-nP-bQN"; */
+"Olw-nP-bQN.title" = "Hide __CDV_PRODUCT_NAME__";
+
+/* Class = "NSMenuItem"; title = "Find Previous"; ObjectID = "OwM-mh-QMV"; */
+"OwM-mh-QMV.title" = "Find Previous";
+
+/* Class = "NSMenuItem"; title = "Stop Speaking"; ObjectID = "Oyz-dy-DGm"; */
+"Oyz-dy-DGm.title" = "Stop Speaking";
+
+/* Class = "NSMenuItem"; title = "Bigger"; ObjectID = "Ptp-SP-VEL"; */
+"Ptp-SP-VEL.title" = "Bigger";
+
+/* Class = "NSMenuItem"; title = "Show Fonts"; ObjectID = "Q5e-8K-NDq"; */
+"Q5e-8K-NDq.title" = "Show Fonts";
+
+/* Class = "NSWindow"; title = "__CDV_PRODUCT_NAME__"; ObjectID = "QvC-M9-y7g"; */
+"QvC-M9-y7g.title" = "__CDV_PRODUCT_NAME__";
+
+/* Class = "NSMenuItem"; title = "Zoom"; ObjectID = "R4o-n2-Eq4"; */
+"R4o-n2-Eq4.title" = "Zoom";
+
+/* Class = "NSMenuItem"; title = "\tRight to Left"; ObjectID = "RB4-Sm-HuC"; */
+"RB4-Sm-HuC.title" = "\tRight to Left";
+
+/* Class = "NSMenuItem"; title = "Superscript"; ObjectID = "Rqc-34-cIF"; */
+"Rqc-34-cIF.title" = "Superscript";
+
+/* Class = "NSMenuItem"; title = "Select All"; ObjectID = "Ruw-6m-B2m"; */
+"Ruw-6m-B2m.title" = "Select All";
+
+/* Class = "NSMenuItem"; title = "Jump to Selection"; ObjectID = "S0p-oC-mLd"; */
+"S0p-oC-mLd.title" = "Jump to Selection";
+
+/* Class = "NSMenu"; title = "Window"; ObjectID = "Td7-aD-5lo"; */
+"Td7-aD-5lo.title" = "Window";
+
+/* Class = "NSMenuItem"; title = "Capitalize"; ObjectID = "UEZ-Bs-lqG"; */
+"UEZ-Bs-lqG.title" = "Capitalize";
+
+/* Class = "NSMenuItem"; title = "Center"; ObjectID = "VIY-Ag-zcb"; */
+"VIY-Ag-zcb.title" = "Center";
+
+/* Class = "NSMenuItem"; title = "Hide Others"; ObjectID = "Vdr-fp-XzO"; */
+"Vdr-fp-XzO.title" = "Hide Others";
+
+/* Class = "NSMenuItem"; title = "Italic"; ObjectID = "Vjx-xi-njq"; */
+"Vjx-xi-njq.title" = "Italic";
+
+/* Class = "NSMenu"; title = "Edit"; ObjectID = "W48-6f-4Dl"; */
+"W48-6f-4Dl.title" = "Edit";
+
+/* Class = "NSMenuItem"; title = "Underline"; ObjectID = "WRG-CD-K1S"; */
+"WRG-CD-K1S.title" = "Underline";
+
+/* Class = "NSMenuItem"; title = "New"; ObjectID = "Was-JA-tGl"; */
+"Was-JA-tGl.title" = "New";
+
+/* Class = "NSMenuItem"; title = "Paste and Match Style"; ObjectID = "WeT-3V-zwk"; */
+"WeT-3V-zwk.title" = "Paste and Match Style";
+
+/* Class = "NSMenuItem"; title = "Find…"; ObjectID = "Xz5-n4-O0W"; */
+"Xz5-n4-O0W.title" = "Find…";
+
+/* Class = "NSMenuItem"; title = "Find and Replace…"; ObjectID = "YEy-JH-Tfz"; */
+"YEy-JH-Tfz.title" = "Find and Replace…";
+
+/* Class = "NSMenuItem"; title = "\tDefault"; ObjectID = "YGs-j5-SAR"; */
+"YGs-j5-SAR.title" = "\tDefault";
+
+/* Class = "NSMenuItem"; title = "Start Speaking"; ObjectID = "Ynk-f8-cLZ"; */
+"Ynk-f8-cLZ.title" = "Start Speaking";
+
+/* Class = "NSMenuItem"; title = "Align Left"; ObjectID = "ZM1-6Q-yy1"; */
+"ZM1-6Q-yy1.title" = "Align Left";
+
+/* Class = "NSMenuItem"; title = "Paragraph"; ObjectID = "ZvO-Gk-QUH"; */
+"ZvO-Gk-QUH.title" = "Paragraph";
+
+/* Class = "NSMenuItem"; title = "Print…"; ObjectID = "aTl-1u-JFS"; */
+"aTl-1u-JFS.title" = "Print…";
+
+/* Class = "NSMenuItem"; title = "Window"; ObjectID = "aUF-d1-5bR"; */
+"aUF-d1-5bR.title" = "Window";
+
+/* Class = "NSMenu"; title = "Font"; ObjectID = "aXa-aM-Jaq"; */
+"aXa-aM-Jaq.title" = "Font";
+
+/* Class = "NSMenuItem"; title = "Use Default"; ObjectID = "agt-UL-0e3"; */
+"agt-UL-0e3.title" = "Use Default";
+
+/* Class = "NSMenuItem"; title = "Show Colors"; ObjectID = "bgn-CT-cEk"; */
+"bgn-CT-cEk.title" = "Show Colors";
+
+/* Class = "NSMenu"; title = "File"; ObjectID = "bib-Uj-vzu"; */
+"bib-Uj-vzu.title" = "File";
+
+/* Class = "NSMenuItem"; title = "Use Selection for Find"; ObjectID = "buJ-ug-pKt"; */
+"buJ-ug-pKt.title" = "Use Selection for Find";
+
+/* Class = "NSMenu"; title = "Transformations"; ObjectID = "c8a-y6-VQd"; */
+"c8a-y6-VQd.title" = "Transformations";
+
+/* Class = "NSMenuItem"; title = "Use None"; ObjectID = "cDB-IK-hbR"; */
+"cDB-IK-hbR.title" = "Use None";
+
+/* Class = "NSMenuItem"; title = "Selection"; ObjectID = "cqv-fj-IhA"; */
+"cqv-fj-IhA.title" = "Selection";
+
+/* Class = "NSMenuItem"; title = "Smart Links"; ObjectID = "cwL-P1-jid"; */
+"cwL-P1-jid.title" = "Smart Links";
+
+/* Class = "NSMenuItem"; title = "Make Lower Case"; ObjectID = "d9M-CD-aMd"; */
+"d9M-CD-aMd.title" = "Make Lower Case";
+
+/* Class = "NSMenu"; title = "Text"; ObjectID = "d9c-me-L2H"; */
+"d9c-me-L2H.title" = "Text";
+
+/* Class = "NSMenuItem"; title = "File"; ObjectID = "dMs-cI-mzQ"; */
+"dMs-cI-mzQ.title" = "File";
+
+/* Class = "NSMenuItem"; title = "Undo"; ObjectID = "dRJ-4n-Yzg"; */
+"dRJ-4n-Yzg.title" = "Undo";
+
+/* Class = "NSMenuItem"; title = "Paste"; ObjectID = "gVA-U4-sdL"; */
+"gVA-U4-sdL.title" = "Paste";
+
+/* Class = "NSMenuItem"; title = "Smart Quotes"; ObjectID = "hQb-2v-fYv"; */
+"hQb-2v-fYv.title" = "Smart Quotes";
+
+/* Class = "NSMenuItem"; title = "Check Document Now"; ObjectID = "hz2-CU-CR7"; */
+"hz2-CU-CR7.title" = "Check Document Now";
+
+/* Class = "NSMenu"; title = "Services"; ObjectID = "hz9-B4-Xy5"; */
+"hz9-B4-Xy5.title" = "Services";
+
+/* Class = "NSMenuItem"; title = "Smaller"; ObjectID = "i1d-Er-qST"; */
+"i1d-Er-qST.title" = "Smaller";
+
+/* Class = "NSMenu"; title = "Baseline"; ObjectID = "ijk-EB-dga"; */
+"ijk-EB-dga.title" = "Baseline";
+
+/* Class = "NSMenuItem"; title = "Kern"; ObjectID = "jBQ-r6-VK2"; */
+"jBQ-r6-VK2.title" = "Kern";
+
+/* Class = "NSMenuItem"; title = "\tRight to Left"; ObjectID = "jFq-tB-4Kx"; */
+"jFq-tB-4Kx.title" = "\tRight to Left";
+
+/* Class = "NSMenuItem"; title = "Format"; ObjectID = "jxT-CU-nIS"; */
+"jxT-CU-nIS.title" = "Format";
+
+/* Class = "NSMenuItem"; title = "Check Grammar With Spelling"; ObjectID = "mK6-2p-4JG"; */
+"mK6-2p-4JG.title" = "Check Grammar With Spelling";
+
+/* Class = "NSMenuItem"; title = "Ligatures"; ObjectID = "o6e-r0-MWq"; */
+"o6e-r0-MWq.title" = "Ligatures";
+
+/* Class = "NSMenu"; title = "Open Recent"; ObjectID = "oas-Oc-fiZ"; */
+"oas-Oc-fiZ.title" = "Open Recent";
+
+/* Class = "NSMenuItem"; title = "Loosen"; ObjectID = "ogc-rX-tC1"; */
+"ogc-rX-tC1.title" = "Loosen";
+
+/* Class = "NSMenuItem"; title = "Delete"; ObjectID = "pa3-QI-u2k"; */
+"pa3-QI-u2k.title" = "Delete";
+
+/* Class = "NSMenuItem"; title = "Save…"; ObjectID = "pxx-59-PXV"; */
+"pxx-59-PXV.title" = "Save…";
+
+/* Class = "NSMenuItem"; title = "Find Next"; ObjectID = "q09-fT-Sye"; */
+"q09-fT-Sye.title" = "Find Next";
+
+/* Class = "NSMenuItem"; title = "Page Setup…"; ObjectID = "qIS-W8-SiK"; */
+"qIS-W8-SiK.title" = "Page Setup…";
+
+/* Class = "NSMenuItem"; title = "Check Spelling While Typing"; ObjectID = "rbD-Rh-wIN"; */
+"rbD-Rh-wIN.title" = "Check Spelling While Typing";
+
+/* Class = "NSMenuItem"; title = "Smart Dashes"; ObjectID = "rgM-f4-ycn"; */
+"rgM-f4-ycn.title" = "Smart Dashes";
+
+/* Class = "NSMenuItem"; title = "Show Toolbar"; ObjectID = "snW-S8-Cw5"; */
+"snW-S8-Cw5.title" = "Show Toolbar";
+
+/* Class = "NSMenuItem"; title = "Data Detectors"; ObjectID = "tRr-pd-1PS"; */
+"tRr-pd-1PS.title" = "Data Detectors";
+
+/* Class = "NSMenuItem"; title = "Open Recent"; ObjectID = "tXI-mr-wws"; */
+"tXI-mr-wws.title" = "Open Recent";
+
+/* Class = "NSMenu"; title = "Kern"; ObjectID = "tlD-Oa-oAM"; */
+"tlD-Oa-oAM.title" = "Kern";
+
+/* Class = "NSMenu"; title = "__CDV_PRODUCT_NAME__"; ObjectID = "uQy-DD-JDr"; */
+"uQy-DD-JDr.title" = "__CDV_PRODUCT_NAME__";
+
+/* Class = "NSMenuItem"; title = "Cut"; ObjectID = "uRl-iY-unG"; */
+"uRl-iY-unG.title" = "Cut";
+
+/* Class = "NSMenuItem"; title = "Paste Style"; ObjectID = "vKC-jM-MkH"; */
+"vKC-jM-MkH.title" = "Paste Style";
+
+/* Class = "NSMenuItem"; title = "Show Ruler"; ObjectID = "vLm-3I-IUL"; */
+"vLm-3I-IUL.title" = "Show Ruler";
+
+/* Class = "NSMenuItem"; title = "Clear Menu"; ObjectID = "vNY-rz-j42"; */
+"vNY-rz-j42.title" = "Clear Menu";
+
+/* Class = "NSMenuItem"; title = "Make Upper Case"; ObjectID = "vmV-6d-7jI"; */
+"vmV-6d-7jI.title" = "Make Upper Case";
+
+/* Class = "NSMenu"; title = "Ligatures"; ObjectID = "w0m-vy-SC9"; */
+"w0m-vy-SC9.title" = "Ligatures";
+
+/* Class = "NSMenuItem"; title = "Align Right"; ObjectID = "wb2-vD-lq4"; */
+"wb2-vD-lq4.title" = "Align Right";
+
+/* Class = "NSMenuItem"; title = "Help"; ObjectID = "wpr-3q-Mcd"; */
+"wpr-3q-Mcd.title" = "Help";
+
+/* Class = "NSMenuItem"; title = "Copy"; ObjectID = "x3v-GG-iWU"; */
+"x3v-GG-iWU.title" = "Copy";
+
+/* Class = "NSMenuItem"; title = "Use All"; ObjectID = "xQD-1f-W4t"; */
+"xQD-1f-W4t.title" = "Use All";
+
+/* Class = "NSMenuItem"; title = "Speech"; ObjectID = "xrE-MZ-jX0"; */
+"xrE-MZ-jX0.title" = "Speech";
+
+/* Class = "NSMenuItem"; title = "Show Substitutions"; ObjectID = "z6F-FW-3nz"; */
+"z6F-FW-3nz.title" = "Show Substitutions";

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/main.m
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/main.m b/templates/project/__CDV_PRODUCT_NAME__/main.m
new file mode 100644
index 0000000..f765089
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/main.m
@@ -0,0 +1,25 @@
+/*
+ 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.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+int main(int argc, const char * argv[])
+{
+    return NSApplicationMain(argc, argv);
+}

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/gitignore
----------------------------------------------------------------------
diff --git a/templates/project/gitignore b/templates/project/gitignore
new file mode 100644
index 0000000..cc76483
--- /dev/null
+++ b/templates/project/gitignore
@@ -0,0 +1,5 @@
+*.mode1v3
+*.perspectivev3
+*.pbxuser
+.DS_Store
+build/

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/www/css/index.css
----------------------------------------------------------------------
diff --git a/templates/project/www/css/index.css b/templates/project/www/css/index.css
new file mode 100644
index 0000000..51daa79
--- /dev/null
+++ b/templates/project/www/css/index.css
@@ -0,0 +1,115 @@
+/*
+ * 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.
+ */
+* {
+    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
+}
+
+body {
+    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
+    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
+    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
+    background-color:#E4E4E4;
+    background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
+    background-image:-webkit-gradient(
+        linear,
+        left top,
+        left bottom,
+        color-stop(0, #A7A7A7),
+        color-stop(0.51, #E4E4E4)
+    );
+    background-attachment:fixed;
+    font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
+    font-size:12px;
+    height:100%;
+    margin:0px;
+    padding:0px;
+    text-transform:uppercase;
+    width:100%;
+}
+
+/* Portrait layout (default) */
+.app {
+    background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
+    position:absolute;             /* position in the center of the screen */
+    left:50%;
+    top:50%;
+    height:50px;                   /* text area height */
+    width:225px;                   /* text area width */
+    text-align:center;
+    padding:180px 0px 0px 0px;     /* image height is 200px (bottom 20px are overlapped with text) */
+    margin:-115px 0px 0px -112px;  /* offset vertical: half of image height and text area height */
+                                   /* offset horizontal: half of text area width */
+}
+
+/* Landscape layout (with min-width) */
+@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
+    .app {
+        background-position:left center;
+        padding:75px 0px 75px 170px;  /* padding-top + padding-bottom + text area = image height */
+        margin:-90px 0px 0px -198px;  /* offset vertical: half of image height */
+                                      /* offset horizontal: half of image width and text area width */
+    }
+}
+
+h1 {
+    font-size:24px;
+    font-weight:normal;
+    margin:0px;
+    overflow:visible;
+    padding:0px;
+    text-align:center;
+}
+
+.event {
+    border-radius:4px;
+    -webkit-border-radius:4px;
+    color:#FFFFFF;
+    font-size:12px;
+    margin:0px 30px;
+    padding:2px 0px;
+}
+
+.event.listening {
+    background-color:#333333;
+    display:block;
+}
+
+.event.received {
+    background-color:#4B946A;
+    display:none;
+}
+
+@keyframes fade {
+    from { opacity: 1.0; }
+    50% { opacity: 0.4; }
+    to { opacity: 1.0; }
+}
+ 
+@-webkit-keyframes fade {
+    from { opacity: 1.0; }
+    50% { opacity: 0.4; }
+    to { opacity: 1.0; }
+}
+ 
+.blink {
+    animation:fade 3000ms infinite;
+    -webkit-animation:fade 3000ms infinite;
+}

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/www/img/logo.png
----------------------------------------------------------------------
diff --git a/templates/project/www/img/logo.png b/templates/project/www/img/logo.png
new file mode 100644
index 0000000..9519e7d
Binary files /dev/null and b/templates/project/www/img/logo.png differ

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/www/index.html
----------------------------------------------------------------------
diff --git a/templates/project/www/index.html b/templates/project/www/index.html
new file mode 100644
index 0000000..e7a4c9e
--- /dev/null
+++ b/templates/project/www/index.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<!--
+    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.
+-->
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+        <meta name="format-detection" content="telephone=no" />
+        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
+        <link rel="stylesheet" type="text/css" href="css/index.css" />
+        <title>Hello World</title>
+    </head>
+    <body>
+        <div class="app">
+            <h1>Apache Cordova</h1>
+            <div id="deviceready" class="blink">
+                <p class="event listening">Connecting to Device</p>
+                <p class="event received">Device is Ready</p>
+            </div>
+        </div>
+        <script type="text/javascript" src="cordova.js"></script>
+        <script type="text/javascript" src="js/index.js"></script>
+        <script type="text/javascript">
+            app.initialize();
+        </script>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/www/js/index.js
----------------------------------------------------------------------
diff --git a/templates/project/www/js/index.js b/templates/project/www/js/index.js
new file mode 100644
index 0000000..31d9064
--- /dev/null
+++ b/templates/project/www/js/index.js
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+var app = {
+    // Application Constructor
+    initialize: function() {
+        this.bindEvents();
+    },
+    // Bind Event Listeners
+    //
+    // Bind any events that are required on startup. Common events are:
+    // 'load', 'deviceready', 'offline', and 'online'.
+    bindEvents: function() {
+        document.addEventListener('deviceready', this.onDeviceReady, false);
+    },
+    // deviceready Event Handler
+    //
+    // The scope of 'this' is the event. In order to call the 'receivedEvent'
+    // function, we must explicity call 'app.receivedEvent(...);'
+    onDeviceReady: function() {
+        app.receivedEvent('deviceready');
+    },
+    // Update DOM on a Received Event
+    receivedEvent: function(id) {
+        var parentElement = document.getElementById(id);
+        var listeningElement = parentElement.querySelector('.listening');
+        var receivedElement = parentElement.querySelector('.received');
+
+        listeningElement.setAttribute('style', 'display:none;');
+        receivedElement.setAttribute('style', 'display:block;');
+
+        console.log('Received Event: ' + id);
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/www/spec.html
----------------------------------------------------------------------
diff --git a/templates/project/www/spec.html b/templates/project/www/spec.html
new file mode 100644
index 0000000..71f00de
--- /dev/null
+++ b/templates/project/www/spec.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<!--
+    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.
+-->
+<html>
+    <head>
+        <title>Jasmine Spec Runner</title>
+
+        <!-- jasmine source -->
+        <link rel="shortcut icon" type="image/png" href="spec/lib/jasmine-1.2.0/jasmine_favicon.png">
+        <link rel="stylesheet" type="text/css" href="spec/lib/jasmine-1.2.0/jasmine.css">
+        <script type="text/javascript" src="spec/lib/jasmine-1.2.0/jasmine.js"></script>
+        <script type="text/javascript" src="spec/lib/jasmine-1.2.0/jasmine-html.js"></script>
+
+        <!-- include source files here... -->
+        <script type="text/javascript" src="js/index.js"></script>
+
+        <!-- include spec files here... -->
+        <script type="text/javascript" src="spec/helper.js"></script>
+        <script type="text/javascript" src="spec/index.js"></script>
+
+        <script type="text/javascript">
+            (function() {
+                var jasmineEnv = jasmine.getEnv();
+                jasmineEnv.updateInterval = 1000;
+
+                var htmlReporter = new jasmine.HtmlReporter();
+
+                jasmineEnv.addReporter(htmlReporter);
+
+                jasmineEnv.specFilter = function(spec) {
+                    return htmlReporter.specFilter(spec);
+                };
+
+                var currentWindowOnload = window.onload;
+
+                window.onload = function() {
+                    if (currentWindowOnload) {
+                        currentWindowOnload();
+                    }
+                    execJasmine();
+                };
+
+                function execJasmine() {
+                    jasmineEnv.execute();
+                }
+            })();
+        </script>
+    </head>
+    <body>
+        <div id="stage" style="display:none;"></div>
+    </body>
+</html>

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/www/spec/helper.js
----------------------------------------------------------------------
diff --git a/templates/project/www/spec/helper.js b/templates/project/www/spec/helper.js
new file mode 100644
index 0000000..929f776
--- /dev/null
+++ b/templates/project/www/spec/helper.js
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ */
+afterEach(function() {
+    document.getElementById('stage').innerHTML = '';
+});
+
+var helper = {
+    trigger: function(obj, name) {
+        var e = document.createEvent('Event');
+        e.initEvent(name, true, true);
+        obj.dispatchEvent(e);
+    },
+    getComputedStyle: function(querySelector, property) {
+        var element = document.querySelector(querySelector);
+        return window.getComputedStyle(element).getPropertyValue(property);
+    }
+};


[06/14] Update to modern layout

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLibTests/CordovaLibTests.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CordovaLibTests.m b/CordovaLib/CordovaLibTests/CordovaLibTests.m
new file mode 100644
index 0000000..cd4a778
--- /dev/null
+++ b/CordovaLib/CordovaLibTests/CordovaLibTests.m
@@ -0,0 +1,45 @@
+/*
+ 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.
+ */
+
+#import <XCTest/XCTest.h>
+
+@interface CordovaLibTests : XCTestCase
+
+@end
+
+@implementation CordovaLibTests
+
+- (void)setUp
+{
+    [super setUp];
+    // Put setup code here. This method is called before the invocation of each test method in the class.
+}
+
+- (void)tearDown
+{
+    // Put teardown code here. This method is called after the invocation of each test method in the class.
+    [super tearDown];
+}
+
+- (void)testExample
+{
+    XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLibTests/en.lproj/InfoPlist.strings
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/en.lproj/InfoPlist.strings b/CordovaLib/CordovaLibTests/en.lproj/InfoPlist.strings
new file mode 100644
index 0000000..477b28f
--- /dev/null
+++ b/CordovaLib/CordovaLibTests/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/CordovaLib_Prefix.pch
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib_Prefix.pch b/CordovaLib/CordovaLib_Prefix.pch
new file mode 100644
index 0000000..0880df2
--- /dev/null
+++ b/CordovaLib/CordovaLib_Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'CordovaLib' target in the 'CordovaLib' project
+//
+
+#ifdef __OBJC__
+    #import <Cocoa/Cocoa.h>
+#endif

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/VERSION
----------------------------------------------------------------------
diff --git a/CordovaLib/VERSION b/CordovaLib/VERSION
new file mode 100644
index 0000000..414a102
--- /dev/null
+++ b/CordovaLib/VERSION
@@ -0,0 +1 @@
+3.5.0-dev

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaLib/cordova.js
----------------------------------------------------------------------
diff --git a/CordovaLib/cordova.js b/CordovaLib/cordova.js
new file mode 100644
index 0000000..a5e597f
--- /dev/null
+++ b/CordovaLib/cordova.js
@@ -0,0 +1,1501 @@
+// Platform: osx
+// 3.5.0-dev
+/*
+ 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.
+*/
+;(function() {
+var CORDOVA_JS_BUILD_LABEL = '3.5.0-dev';
+// file: lib/scripts/require.js
+
+var require,
+    define;
+
+(function () {
+    var modules = {},
+    // Stack of moduleIds currently being built.
+        requireStack = [],
+    // Map of module ID -> index into requireStack of modules currently being built.
+        inProgressModules = {},
+        SEPERATOR = ".";
+
+
+
+    function build(module) {
+        var factory = module.factory,
+            localRequire = function (id) {
+                var resultantId = id;
+                //Its a relative path, so lop off the last portion and add the id (minus "./")
+                if (id.charAt(0) === ".") {
+                    resultantId = module.id.slice(0, module.id.lastIndexOf(SEPERATOR)) + SEPERATOR + id.slice(2);
+                }
+                return require(resultantId);
+            };
+        module.exports = {};
+        delete module.factory;
+        factory(localRequire, module.exports, module);
+        return module.exports;
+    }
+
+    require = function (id) {
+        if (!modules[id]) {
+            throw "module " + id + " not found";
+        } else if (id in inProgressModules) {
+            var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;
+            throw "Cycle in require graph: " + cycle;
+        }
+        if (modules[id].factory) {
+            try {
+                inProgressModules[id] = requireStack.length;
+                requireStack.push(id);
+                return build(modules[id]);
+            } finally {
+                delete inProgressModules[id];
+                requireStack.pop();
+            }
+        }
+        return modules[id].exports;
+    };
+
+    define = function (id, factory) {
+        if (modules[id]) {
+            throw "module " + id + " already defined";
+        }
+
+        modules[id] = {
+            id: id,
+            factory: factory
+        };
+    };
+
+    define.remove = function (id) {
+        delete modules[id];
+    };
+
+    define.moduleMap = modules;
+})();
+
+//Export for use in node
+if (typeof module === "object" && typeof require === "function") {
+    module.exports.require = require;
+    module.exports.define = define;
+}
+
+// file: lib/cordova.js
+define("cordova", function(require, exports, module) {
+
+
+var channel = require('cordova/channel');
+
+/**
+ * Listen for DOMContentLoaded and notify our channel subscribers.
+ */
+document.addEventListener('DOMContentLoaded', function() {
+    channel.onDOMContentLoaded.fire();
+}, false);
+if (document.readyState == 'complete' || document.readyState == 'interactive') {
+    channel.onDOMContentLoaded.fire();
+}
+
+/**
+ * Intercept calls to addEventListener + removeEventListener and handle deviceready,
+ * resume, and pause events.
+ */
+var m_document_addEventListener = document.addEventListener;
+var m_document_removeEventListener = document.removeEventListener;
+var m_window_addEventListener = window.addEventListener;
+var m_window_removeEventListener = window.removeEventListener;
+
+/**
+ * Houses custom event handlers to intercept on document + window event listeners.
+ */
+var documentEventHandlers = {},
+    windowEventHandlers = {};
+
+document.addEventListener = function(evt, handler, capture) {
+    var e = evt.toLowerCase();
+    if (typeof documentEventHandlers[e] != 'undefined') {
+        documentEventHandlers[e].subscribe(handler);
+    } else {
+        m_document_addEventListener.call(document, evt, handler, capture);
+    }
+};
+
+window.addEventListener = function(evt, handler, capture) {
+    var e = evt.toLowerCase();
+    if (typeof windowEventHandlers[e] != 'undefined') {
+        windowEventHandlers[e].subscribe(handler);
+    } else {
+        m_window_addEventListener.call(window, evt, handler, capture);
+    }
+};
+
+document.removeEventListener = function(evt, handler, capture) {
+    var e = evt.toLowerCase();
+    // If unsubscribing from an event that is handled by a plugin
+    if (typeof documentEventHandlers[e] != "undefined") {
+        documentEventHandlers[e].unsubscribe(handler);
+    } else {
+        m_document_removeEventListener.call(document, evt, handler, capture);
+    }
+};
+
+window.removeEventListener = function(evt, handler, capture) {
+    var e = evt.toLowerCase();
+    // If unsubscribing from an event that is handled by a plugin
+    if (typeof windowEventHandlers[e] != "undefined") {
+        windowEventHandlers[e].unsubscribe(handler);
+    } else {
+        m_window_removeEventListener.call(window, evt, handler, capture);
+    }
+};
+
+function createEvent(type, data) {
+    var event = document.createEvent('Events');
+    event.initEvent(type, false, false);
+    if (data) {
+        for (var i in data) {
+            if (data.hasOwnProperty(i)) {
+                event[i] = data[i];
+            }
+        }
+    }
+    return event;
+}
+
+if(typeof window.console === "undefined") {
+    window.console = {
+        log:function(){}
+    };
+}
+// there are places in the framework where we call `warn` also, so we should make sure it exists
+if(typeof window.console.warn === "undefined") {
+    window.console.warn = function(msg) {
+        this.log("warn: " + msg);
+    }
+}
+
+var cordova = {
+    define:define,
+    require:require,
+    /**
+     * Methods to add/remove your own addEventListener hijacking on document + window.
+     */
+    addWindowEventHandler:function(event) {
+        return (windowEventHandlers[event] = channel.create(event));
+    },
+    addStickyDocumentEventHandler:function(event) {
+        return (documentEventHandlers[event] = channel.createSticky(event));
+    },
+    addDocumentEventHandler:function(event) {
+        return (documentEventHandlers[event] = channel.create(event));
+    },
+    removeWindowEventHandler:function(event) {
+        delete windowEventHandlers[event];
+    },
+    removeDocumentEventHandler:function(event) {
+        delete documentEventHandlers[event];
+    },
+    /**
+     * Retrieve original event handlers that were replaced by Cordova
+     *
+     * @return object
+     */
+    getOriginalHandlers: function() {
+        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
+        'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
+    },
+    /**
+     * Method to fire event from native code
+     * bNoDetach is required for events which cause an exception which needs to be caught in native code
+     */
+    fireDocumentEvent: function(type, data, bNoDetach) {
+        var evt = createEvent(type, data);
+        if (typeof documentEventHandlers[type] != 'undefined') {
+            if( bNoDetach ) {
+              documentEventHandlers[type].fire(evt);
+            }
+            else {
+              setTimeout(function() {
+                  // Fire deviceready on listeners that were registered before cordova.js was loaded.
+                  if (type == 'deviceready') {
+                      document.dispatchEvent(evt);
+                  }
+                  documentEventHandlers[type].fire(evt);
+              }, 0);
+            }
+        } else {
+            document.dispatchEvent(evt);
+        }
+    },
+    fireWindowEvent: function(type, data) {
+        var evt = createEvent(type,data);
+        if (typeof windowEventHandlers[type] != 'undefined') {
+            setTimeout(function() {
+                windowEventHandlers[type].fire(evt);
+            }, 0);
+        } else {
+            window.dispatchEvent(evt);
+        }
+    },
+
+    /**
+     * Plugin callback mechanism.
+     */
+    // Randomize the starting callbackId to avoid collisions after refreshing or navigating.
+    // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.
+    callbackId: Math.floor(Math.random() * 2000000000),
+    callbacks:  {},
+    callbackStatus: {
+        NO_RESULT: 0,
+        OK: 1,
+        CLASS_NOT_FOUND_EXCEPTION: 2,
+        ILLEGAL_ACCESS_EXCEPTION: 3,
+        INSTANTIATION_EXCEPTION: 4,
+        MALFORMED_URL_EXCEPTION: 5,
+        IO_EXCEPTION: 6,
+        INVALID_ACTION: 7,
+        JSON_EXCEPTION: 8,
+        ERROR: 9
+    },
+
+    /**
+     * Called by native code when returning successful result from an action.
+     */
+    callbackSuccess: function(callbackId, args) {
+        try {
+            cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
+        } catch (e) {
+            console.log("Error in error callback: " + callbackId + " = "+e);
+        }
+    },
+
+    /**
+     * Called by native code when returning error result from an action.
+     */
+    callbackError: function(callbackId, args) {
+        // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
+        // Derive success from status.
+        try {
+            cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
+        } catch (e) {
+            console.log("Error in error callback: " + callbackId + " = "+e);
+        }
+    },
+
+    /**
+     * Called by native code when returning the result from an action.
+     */
+    callbackFromNative: function(callbackId, success, status, args, keepCallback) {
+        var callback = cordova.callbacks[callbackId];
+        if (callback) {
+            if (success && status == cordova.callbackStatus.OK) {
+                callback.success && callback.success.apply(null, args);
+            } else if (!success) {
+                callback.fail && callback.fail.apply(null, args);
+            }
+
+            // Clear callback if not expecting any more results
+            if (!keepCallback) {
+                delete cordova.callbacks[callbackId];
+            }
+        }
+    },
+    addConstructor: function(func) {
+        channel.onCordovaReady.subscribe(function() {
+            try {
+                func();
+            } catch(e) {
+                console.log("Failed to run constructor: " + e);
+            }
+        });
+    }
+};
+
+// Register pause, resume and deviceready channels as events on document.
+channel.onPause = cordova.addDocumentEventHandler('pause');
+channel.onResume = cordova.addDocumentEventHandler('resume');
+channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
+
+module.exports = cordova;
+
+});
+
+// file: lib/common/argscheck.js
+define("cordova/argscheck", function(require, exports, module) {
+
+var exec = require('cordova/exec');
+var utils = require('cordova/utils');
+
+var moduleExports = module.exports;
+
+var typeMap = {
+    'A': 'Array',
+    'D': 'Date',
+    'N': 'Number',
+    'S': 'String',
+    'F': 'Function',
+    'O': 'Object'
+};
+
+function extractParamName(callee, argIndex) {
+  return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex];
+}
+
+function checkArgs(spec, functionName, args, opt_callee) {
+    if (!moduleExports.enableChecks) {
+        return;
+    }
+    var errMsg = null;
+    var typeName;
+    for (var i = 0; i < spec.length; ++i) {
+        var c = spec.charAt(i),
+            cUpper = c.toUpperCase(),
+            arg = args[i];
+        // Asterix means allow anything.
+        if (c == '*') {
+            continue;
+        }
+        typeName = utils.typeName(arg);
+        if ((arg === null || arg === undefined) && c == cUpper) {
+            continue;
+        }
+        if (typeName != typeMap[cUpper]) {
+            errMsg = 'Expected ' + typeMap[cUpper];
+            break;
+        }
+    }
+    if (errMsg) {
+        errMsg += ', but got ' + typeName + '.';
+        errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg;
+        // Don't log when running unit tests.
+        if (typeof jasmine == 'undefined') {
+            console.error(errMsg);
+        }
+        throw TypeError(errMsg);
+    }
+}
+
+function getValue(value, defaultValue) {
+    return value === undefined ? defaultValue : value;
+}
+
+moduleExports.checkArgs = checkArgs;
+moduleExports.getValue = getValue;
+moduleExports.enableChecks = true;
+
+
+});
+
+// file: lib/common/base64.js
+define("cordova/base64", function(require, exports, module) {
+
+var base64 = exports;
+
+base64.fromArrayBuffer = function(arrayBuffer) {
+  var array = new Uint8Array(arrayBuffer);
+  return uint8ToBase64(array);
+};
+
+//------------------------------------------------------------------------------
+
+/* This code is based on the performance tests at http://jsperf.com/b64tests
+ * This 12-bit-at-a-time algorithm was the best performing version on all
+ * platforms tested.
+ */
+
+var b64_6bit = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+var b64_12bit;
+
+var b64_12bitTable = function() {
+    b64_12bit = [];
+    for (var i=0; i<64; i++) {
+        for (var j=0; j<64; j++) {
+            b64_12bit[i*64+j] = b64_6bit[i] + b64_6bit[j];
+        }
+    }
+    b64_12bitTable = function() { return b64_12bit; };
+    return b64_12bit;
+}
+
+function uint8ToBase64(rawData) {
+    var numBytes = rawData.byteLength;
+    var output="";
+    var segment;
+    var table = b64_12bitTable();
+    for (var i=0;i<numBytes-2;i+=3) {
+        segment = (rawData[i] << 16) + (rawData[i+1] << 8) + rawData[i+2];
+        output += table[segment >> 12];
+        output += table[segment & 0xfff];
+    }
+    if (numBytes - i == 2) {
+        segment = (rawData[i] << 16) + (rawData[i+1] << 8);
+        output += table[segment >> 12];
+        output += b64_6bit[(segment & 0xfff) >> 6];
+        output += '=';
+    } else if (numBytes - i == 1) {
+        segment = (rawData[i] << 16);
+        output += table[segment >> 12];
+        output += '==';
+    }
+    return output;
+}
+
+});
+
+// file: lib/common/builder.js
+define("cordova/builder", function(require, exports, module) {
+
+var utils = require('cordova/utils');
+
+function each(objects, func, context) {
+    for (var prop in objects) {
+        if (objects.hasOwnProperty(prop)) {
+            func.apply(context, [objects[prop], prop]);
+        }
+    }
+}
+
+function clobber(obj, key, value) {
+    exports.replaceHookForTesting(obj, key);
+    obj[key] = value;
+    // Getters can only be overridden by getters.
+    if (obj[key] !== value) {
+        utils.defineGetter(obj, key, function() {
+            return value;
+        });
+    }
+}
+
+function assignOrWrapInDeprecateGetter(obj, key, value, message) {
+    if (message) {
+        utils.defineGetter(obj, key, function() {
+            console.log(message);
+            delete obj[key];
+            clobber(obj, key, value);
+            return value;
+        });
+    } else {
+        clobber(obj, key, value);
+    }
+}
+
+function include(parent, objects, clobber, merge) {
+    each(objects, function (obj, key) {
+        try {
+          var result = obj.path ? require(obj.path) : {};
+
+          if (clobber) {
+              // Clobber if it doesn't exist.
+              if (typeof parent[key] === 'undefined') {
+                  assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
+              } else if (typeof obj.path !== 'undefined') {
+                  // If merging, merge properties onto parent, otherwise, clobber.
+                  if (merge) {
+                      recursiveMerge(parent[key], result);
+                  } else {
+                      assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
+                  }
+              }
+              result = parent[key];
+          } else {
+            // Overwrite if not currently defined.
+            if (typeof parent[key] == 'undefined') {
+              assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
+            } else {
+              // Set result to what already exists, so we can build children into it if they exist.
+              result = parent[key];
+            }
+          }
+
+          if (obj.children) {
+            include(result, obj.children, clobber, merge);
+          }
+        } catch(e) {
+          utils.alert('Exception building cordova JS globals: ' + e + ' for key "' + key + '"');
+        }
+    });
+}
+
+/**
+ * Merge properties from one object onto another recursively.  Properties from
+ * the src object will overwrite existing target property.
+ *
+ * @param target Object to merge properties into.
+ * @param src Object to merge properties from.
+ */
+function recursiveMerge(target, src) {
+    for (var prop in src) {
+        if (src.hasOwnProperty(prop)) {
+            if (target.prototype && target.prototype.constructor === target) {
+                // If the target object is a constructor override off prototype.
+                clobber(target.prototype, prop, src[prop]);
+            } else {
+                if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {
+                    recursiveMerge(target[prop], src[prop]);
+                } else {
+                    clobber(target, prop, src[prop]);
+                }
+            }
+        }
+    }
+}
+
+exports.buildIntoButDoNotClobber = function(objects, target) {
+    include(target, objects, false, false);
+};
+exports.buildIntoAndClobber = function(objects, target) {
+    include(target, objects, true, false);
+};
+exports.buildIntoAndMerge = function(objects, target) {
+    include(target, objects, true, true);
+};
+exports.recursiveMerge = recursiveMerge;
+exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;
+exports.replaceHookForTesting = function() {};
+
+});
+
+// file: lib/common/channel.js
+define("cordova/channel", function(require, exports, module) {
+
+var utils = require('cordova/utils'),
+    nextGuid = 1;
+
+/**
+ * Custom pub-sub "channel" that can have functions subscribed to it
+ * This object is used to define and control firing of events for
+ * cordova initialization, as well as for custom events thereafter.
+ *
+ * The order of events during page load and Cordova startup is as follows:
+ *
+ * onDOMContentLoaded*         Internal event that is received when the web page is loaded and parsed.
+ * onNativeReady*              Internal event that indicates the Cordova native side is ready.
+ * onCordovaReady*             Internal event fired when all Cordova JavaScript objects have been created.
+ * onDeviceReady*              User event fired to indicate that Cordova is ready
+ * onResume                    User event fired to indicate a start/resume lifecycle event
+ * onPause                     User event fired to indicate a pause lifecycle event
+ * onDestroy*                  Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
+ *
+ * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
+ * All listeners that subscribe after the event is fired will be executed right away.
+ *
+ * The only Cordova events that user code should register for are:
+ *      deviceready           Cordova native code is initialized and Cordova APIs can be called from JavaScript
+ *      pause                 App has moved to background
+ *      resume                App has returned to foreground
+ *
+ * Listeners can be registered as:
+ *      document.addEventListener("deviceready", myDeviceReadyListener, false);
+ *      document.addEventListener("resume", myResumeListener, false);
+ *      document.addEventListener("pause", myPauseListener, false);
+ *
+ * The DOM lifecycle events should be used for saving and restoring state
+ *      window.onload
+ *      window.onunload
+ *
+ */
+
+/**
+ * Channel
+ * @constructor
+ * @param type  String the channel name
+ */
+var Channel = function(type, sticky) {
+    this.type = type;
+    // Map of guid -> function.
+    this.handlers = {};
+    // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.
+    this.state = sticky ? 1 : 0;
+    // Used in sticky mode to remember args passed to fire().
+    this.fireArgs = null;
+    // Used by onHasSubscribersChange to know if there are any listeners.
+    this.numHandlers = 0;
+    // Function that is called when the first listener is subscribed, or when
+    // the last listener is unsubscribed.
+    this.onHasSubscribersChange = null;
+},
+    channel = {
+        /**
+         * Calls the provided function only after all of the channels specified
+         * have been fired. All channels must be sticky channels.
+         */
+        join: function(h, c) {
+            var len = c.length,
+                i = len,
+                f = function() {
+                    if (!(--i)) h();
+                };
+            for (var j=0; j<len; j++) {
+                if (c[j].state === 0) {
+                    throw Error('Can only use join with sticky channels.');
+                }
+                c[j].subscribe(f);
+            }
+            if (!len) h();
+        },
+        create: function(type) {
+            return channel[type] = new Channel(type, false);
+        },
+        createSticky: function(type) {
+            return channel[type] = new Channel(type, true);
+        },
+
+        /**
+         * cordova Channels that must fire before "deviceready" is fired.
+         */
+        deviceReadyChannelsArray: [],
+        deviceReadyChannelsMap: {},
+
+        /**
+         * Indicate that a feature needs to be initialized before it is ready to be used.
+         * This holds up Cordova's "deviceready" event until the feature has been initialized
+         * and Cordova.initComplete(feature) is called.
+         *
+         * @param feature {String}     The unique feature name
+         */
+        waitForInitialization: function(feature) {
+            if (feature) {
+                var c = channel[feature] || this.createSticky(feature);
+                this.deviceReadyChannelsMap[feature] = c;
+                this.deviceReadyChannelsArray.push(c);
+            }
+        },
+
+        /**
+         * Indicate that initialization code has completed and the feature is ready to be used.
+         *
+         * @param feature {String}     The unique feature name
+         */
+        initializationComplete: function(feature) {
+            var c = this.deviceReadyChannelsMap[feature];
+            if (c) {
+                c.fire();
+            }
+        }
+    };
+
+function forceFunction(f) {
+    if (typeof f != 'function') throw "Function required as first argument!";
+}
+
+/**
+ * Subscribes the given function to the channel. Any time that
+ * Channel.fire is called so too will the function.
+ * Optionally specify an execution context for the function
+ * and a guid that can be used to stop subscribing to the channel.
+ * Returns the guid.
+ */
+Channel.prototype.subscribe = function(f, c) {
+    // need a function to call
+    forceFunction(f);
+    if (this.state == 2) {
+        f.apply(c || this, this.fireArgs);
+        return;
+    }
+
+    var func = f,
+        guid = f.observer_guid;
+    if (typeof c == "object") { func = utils.close(c, f); }
+
+    if (!guid) {
+        // first time any channel has seen this subscriber
+        guid = '' + nextGuid++;
+    }
+    func.observer_guid = guid;
+    f.observer_guid = guid;
+
+    // Don't add the same handler more than once.
+    if (!this.handlers[guid]) {
+        this.handlers[guid] = func;
+        this.numHandlers++;
+        if (this.numHandlers == 1) {
+            this.onHasSubscribersChange && this.onHasSubscribersChange();
+        }
+    }
+};
+
+/**
+ * Unsubscribes the function with the given guid from the channel.
+ */
+Channel.prototype.unsubscribe = function(f) {
+    // need a function to unsubscribe
+    forceFunction(f);
+
+    var guid = f.observer_guid,
+        handler = this.handlers[guid];
+    if (handler) {
+        delete this.handlers[guid];
+        this.numHandlers--;
+        if (this.numHandlers === 0) {
+            this.onHasSubscribersChange && this.onHasSubscribersChange();
+        }
+    }
+};
+
+/**
+ * Calls all functions subscribed to this channel.
+ */
+Channel.prototype.fire = function(e) {
+    var fail = false,
+        fireArgs = Array.prototype.slice.call(arguments);
+    // Apply stickiness.
+    if (this.state == 1) {
+        this.state = 2;
+        this.fireArgs = fireArgs;
+    }
+    if (this.numHandlers) {
+        // Copy the values first so that it is safe to modify it from within
+        // callbacks.
+        var toCall = [];
+        for (var item in this.handlers) {
+            toCall.push(this.handlers[item]);
+        }
+        for (var i = 0; i < toCall.length; ++i) {
+            toCall[i].apply(this, fireArgs);
+        }
+        if (this.state == 2 && this.numHandlers) {
+            this.numHandlers = 0;
+            this.handlers = {};
+            this.onHasSubscribersChange && this.onHasSubscribersChange();
+        }
+    }
+};
+
+
+// defining them here so they are ready super fast!
+// DOM event that is received when the web page is loaded and parsed.
+channel.createSticky('onDOMContentLoaded');
+
+// Event to indicate the Cordova native side is ready.
+channel.createSticky('onNativeReady');
+
+// Event to indicate that all Cordova JavaScript objects have been created
+// and it's time to run plugin constructors.
+channel.createSticky('onCordovaReady');
+
+// Event to indicate that all automatically loaded JS plugins are loaded and ready.
+channel.createSticky('onPluginsReady');
+
+// Event to indicate that Cordova is ready
+channel.createSticky('onDeviceReady');
+
+// Event to indicate a resume lifecycle event
+channel.create('onResume');
+
+// Event to indicate a pause lifecycle event
+channel.create('onPause');
+
+// Event to indicate a destroy lifecycle event
+channel.createSticky('onDestroy');
+
+// Channels that must fire before "deviceready" is fired.
+channel.waitForInitialization('onCordovaReady');
+channel.waitForInitialization('onDOMContentLoaded');
+
+module.exports = channel;
+
+});
+
+// file: lib/common/commandProxy.js
+define("cordova/commandProxy", function(require, exports, module) {
+
+
+// internal map of proxy function
+var CommandProxyMap = {};
+
+module.exports = {
+
+    // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
+    add:function(id,proxyObj) {
+        console.log("adding proxy for " + id);
+        CommandProxyMap[id] = proxyObj;
+        return proxyObj;
+    },
+
+    // cordova.commandProxy.remove("Accelerometer");
+    remove:function(id) {
+        var proxy = CommandProxyMap[id];
+        delete CommandProxyMap[id];
+        CommandProxyMap[id] = null;
+        return proxy;
+    },
+
+    get:function(service,action) {
+        return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
+    }
+};
+});
+
+// file: lib/osx/exec.js
+define("cordova/exec", function(require, exports, module) {
+
+/**
+ * Creates a gap bridge used to notify the native code about commands.
+
+ * @private
+ */
+var cordova = require('cordova'),
+    channel = require('cordova/channel'),
+    utils = require('cordova/utils'),
+    base64 = require('cordova/base64');
+
+
+function massageMessageNativeToJs(message) {
+    if (message.CDVType == 'ArrayBuffer') {
+        var stringToArrayBuffer = function(str) {
+            var ret = new Uint8Array(str.length);
+            for (var i = 0; i < str.length; i++) {
+                ret[i] = str.charCodeAt(i);
+            }
+            return ret.buffer;
+        };
+        var base64ToArrayBuffer = function(b64) {
+            return stringToArrayBuffer(atob(b64));
+        };
+        message = base64ToArrayBuffer(message.data);
+    }
+    return message;
+}
+
+function convertMessageToArgsNativeToJs(message) {
+    var args = [];
+    if (!message || !message.hasOwnProperty('CDVType')) {
+        args.push(message);
+    } else if (message.CDVType == 'MultiPart') {
+        message.messages.forEach(function(e) {
+            args.push(massageMessageNativeToJs(e));
+        });
+    } else {
+        args.push(massageMessageNativeToJs(message));
+    }
+    return args;
+}
+
+function massageArgsJsToNative(args) {
+    if (!args || utils.typeName(args) != 'Array') {
+       return args;
+    }
+    var ret = [];
+    args.forEach(function(arg, i) {
+        if (utils.typeName(arg) == 'ArrayBuffer') {
+            ret.push({
+                'CDVType': 'ArrayBuffer',
+                'data': base64.fromArrayBuffer(arg)
+            });
+        } else {
+            ret.push(arg);
+        }
+    });
+    return ret;
+}
+
+function OSXExec() {
+
+    var successCallback, failCallback, service, action, actionArgs, splitCommand;
+    var callbackId = 'INVALID';
+
+    successCallback = arguments[0];
+    failCallback = arguments[1];
+    service = arguments[2];
+    action = arguments[3];
+    actionArgs = arguments[4];
+
+    // 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};
+    }
+
+     actionArgs = massageArgsJsToNative(actionArgs);
+
+    if (window.cordovabridge && window.cordovabridge.exec) {
+        window.cordovabridge.exec(callbackId, service, action, actionArgs);
+    } else {
+        alert('window.cordovabridge binding is missing.');
+    }
+}
+
+
+OSXExec.nativeCallback = function(callbackId, status, message, keepCallback) {
+    var success = status === 0 || status === 1;
+    var args = convertMessageToArgsNativeToJs(message);
+    cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
+};
+
+module.exports = OSXExec;
+
+});
+
+// file: lib/common/modulemapper.js
+define("cordova/modulemapper", function(require, exports, module) {
+
+var builder = require('cordova/builder'),
+    moduleMap = define.moduleMap,
+    symbolList,
+    deprecationMap;
+
+exports.reset = function() {
+    symbolList = [];
+    deprecationMap = {};
+};
+
+function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
+    if (!(moduleName in moduleMap)) {
+        throw new Error('Module ' + moduleName + ' does not exist.');
+    }
+    symbolList.push(strategy, moduleName, symbolPath);
+    if (opt_deprecationMessage) {
+        deprecationMap[symbolPath] = opt_deprecationMessage;
+    }
+}
+
+// Note: Android 2.3 does have Function.bind().
+exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
+    addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
+    addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
+    addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.runs = function(moduleName) {
+    addEntry('r', moduleName, null);
+};
+
+function prepareNamespace(symbolPath, context) {
+    if (!symbolPath) {
+        return context;
+    }
+    var parts = symbolPath.split('.');
+    var cur = context;
+    for (var i = 0, part; part = parts[i]; ++i) {
+        cur = cur[part] = cur[part] || {};
+    }
+    return cur;
+}
+
+exports.mapModules = function(context) {
+    var origSymbols = {};
+    context.CDV_origSymbols = origSymbols;
+    for (var i = 0, len = symbolList.length; i < len; i += 3) {
+        var strategy = symbolList[i];
+        var moduleName = symbolList[i + 1];
+        var module = require(moduleName);
+        // <runs/>
+        if (strategy == 'r') {
+            continue;
+        }
+        var symbolPath = symbolList[i + 2];
+        var lastDot = symbolPath.lastIndexOf('.');
+        var namespace = symbolPath.substr(0, lastDot);
+        var lastName = symbolPath.substr(lastDot + 1);
+
+        var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
+        var parentObj = prepareNamespace(namespace, context);
+        var target = parentObj[lastName];
+
+        if (strategy == 'm' && target) {
+            builder.recursiveMerge(target, module);
+        } else if ((strategy == 'd' && !target) || (strategy != 'd')) {
+            if (!(symbolPath in origSymbols)) {
+                origSymbols[symbolPath] = target;
+            }
+            builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
+        }
+    }
+};
+
+exports.getOriginalSymbol = function(context, symbolPath) {
+    var origSymbols = context.CDV_origSymbols;
+    if (origSymbols && (symbolPath in origSymbols)) {
+        return origSymbols[symbolPath];
+    }
+    var parts = symbolPath.split('.');
+    var obj = context;
+    for (var i = 0; i < parts.length; ++i) {
+        obj = obj && obj[parts[i]];
+    }
+    return obj;
+};
+
+exports.loadMatchingModules = function(matchingRegExp) {
+    for (var k in moduleMap) {
+        if (matchingRegExp.exec(k)) {
+            require(k);
+        }
+    }
+};
+
+exports.reset();
+
+
+});
+
+// file: lib/osx/platform.js
+define("cordova/platform", function(require, exports, module) {
+
+module.exports = {
+    id: "osx",
+    initialize:function() {
+        var modulemapper = require('cordova/modulemapper');
+
+        modulemapper.loadMatchingModules(/cordova.*\/plugininit$/);
+
+        modulemapper.loadMatchingModules(/cordova.*\/symbols$/);
+        modulemapper.mapModules(window);
+    }
+};
+
+
+});
+
+// file: lib/common/plugin/echo.js
+define("cordova/plugin/echo", function(require, exports, module) {
+
+var exec = require('cordova/exec'),
+    utils = require('cordova/utils');
+
+/**
+ * Sends the given message through exec() to the Echo plugin, which sends it back to the successCallback.
+ * @param successCallback  invoked with a FileSystem object
+ * @param errorCallback  invoked if error occurs retrieving file system
+ * @param message  The string to be echoed.
+ * @param forceAsync  Whether to force an async return value (for testing native->js bridge).
+ */
+module.exports = function(successCallback, errorCallback, message, forceAsync) {
+    var action = 'echo';
+    var messageIsMultipart = (utils.typeName(message) == "Array");
+    var args = messageIsMultipart ? message : [message];
+
+    if (utils.typeName(message) == 'ArrayBuffer') {
+        if (forceAsync) {
+            console.warn('Cannot echo ArrayBuffer with forced async, falling back to sync.');
+        }
+        action += 'ArrayBuffer';
+    } else if (messageIsMultipart) {
+        if (forceAsync) {
+            console.warn('Cannot echo MultiPart Array with forced async, falling back to sync.');
+        }
+        action += 'MultiPart';
+    } else if (forceAsync) {
+        action += 'Async';
+    }
+
+    exec(successCallback, errorCallback, "Echo", action, args);
+};
+
+
+});
+
+// file: lib/common/pluginloader.js
+define("cordova/pluginloader", function(require, exports, module) {
+
+var channel = require('cordova/channel');
+var modulemapper = require('cordova/modulemapper');
+
+// Helper function to inject a <script> tag.
+function injectScript(url, onload, onerror) {
+    var script = document.createElement("script");
+    // onload fires even when script fails loads with an error.
+    script.onload = onload;
+    script.onerror = onerror || onload;
+    script.src = url;
+    document.head.appendChild(script);
+}
+
+function onScriptLoadingComplete(moduleList) {
+    // Loop through all the plugins and then through their clobbers and merges.
+    for (var i = 0, module; module = moduleList[i]; i++) {
+        if (module) {
+            try {
+                if (module.clobbers && module.clobbers.length) {
+                    for (var j = 0; j < module.clobbers.length; j++) {
+                        modulemapper.clobbers(module.id, module.clobbers[j]);
+                    }
+                }
+
+                if (module.merges && module.merges.length) {
+                    for (var k = 0; k < module.merges.length; k++) {
+                        modulemapper.merges(module.id, module.merges[k]);
+                    }
+                }
+
+                // Finally, if runs is truthy we want to simply require() the module.
+                // This can be skipped if it had any merges or clobbers, though,
+                // since the mapper will already have required the module.
+                if (module.runs && !(module.clobbers && module.clobbers.length) && !(module.merges && module.merges.length)) {
+                    modulemapper.runs(module.id);
+                }
+            }
+            catch(err) {
+                // error with module, most likely clobbers, should we continue?
+            }
+        }
+    }
+
+    finishPluginLoading();
+}
+
+// Called when:
+// * There are plugins defined and all plugins are finished loading.
+// * There are no plugins to load.
+function finishPluginLoading() {
+    channel.onPluginsReady.fire();
+}
+
+// Handler for the cordova_plugins.js content.
+// See plugman's plugin_loader.js for the details of this object.
+// This function is only called if the really is a plugins array that isn't empty.
+// Otherwise the onerror response handler will just call finishPluginLoading().
+function handlePluginsObject(path, moduleList) {
+    // Now inject the scripts.
+    var scriptCounter = moduleList.length;
+
+    if (!scriptCounter) {
+        onScriptLoadingComplete();
+        return;
+    }
+    function scriptLoadedCallback() {
+        if (!--scriptCounter) {
+            onScriptLoadingComplete(moduleList);
+        }
+    }
+
+    for (var i = 0; i < moduleList.length; i++) {
+        injectScript(path + moduleList[i].file, scriptLoadedCallback);
+    }
+}
+
+function injectPluginScript(pathPrefix) {
+    injectScript(pathPrefix + 'cordova_plugins.js', function(){
+        try {
+            var moduleList = require("cordova/plugin_list");
+            handlePluginsObject(pathPrefix, moduleList);
+        } catch (e) {
+            // Error loading cordova_plugins.js, file not found or something
+            // this is an acceptable error, pre-3.0.0, so we just move on.
+            finishPluginLoading();
+        }
+    },finishPluginLoading); // also, add script load error handler for file not found
+}
+
+function findCordovaPath() {
+    var path = null;
+    var scripts = document.getElementsByTagName('script');
+    var term = 'cordova.js';
+    for (var n = scripts.length-1; n>-1; n--) {
+        var src = scripts[n].src;
+        if (src.indexOf(term) == (src.length - term.length)) {
+            path = src.substring(0, src.length - term.length);
+            break;
+        }
+    }
+    return path;
+}
+
+// Tries to load all plugins' js-modules.
+// This is an async process, but onDeviceReady is blocked on onPluginsReady.
+// onPluginsReady is fired when there are no plugins to load, or they are all done.
+exports.load = function() {
+    var pathPrefix = findCordovaPath();
+    if (pathPrefix === null) {
+        console.log('Could not find cordova.js script tag. Plugin loading may fail.');
+        pathPrefix = '';
+    }
+    injectPluginScript(pathPrefix);
+};
+
+
+});
+
+// file: lib/common/symbols.js
+define("cordova/symbols", function(require, exports, module) {
+
+var modulemapper = require('cordova/modulemapper');
+
+// Use merges here in case others symbols files depend on this running first,
+// but fail to declare the dependency with a require().
+modulemapper.merges('cordova', 'cordova');
+modulemapper.clobbers('cordova/exec', 'cordova.exec');
+modulemapper.clobbers('cordova/exec', 'Cordova.exec');
+
+});
+
+// file: lib/common/utils.js
+define("cordova/utils", function(require, exports, module) {
+
+var utils = exports;
+
+/**
+ * Defines a property getter / setter for obj[key].
+ */
+utils.defineGetterSetter = function(obj, key, getFunc, opt_setFunc) {
+    if (Object.defineProperty) {
+        var desc = {
+            get: getFunc,
+            configurable: true
+        };
+        if (opt_setFunc) {
+            desc.set = opt_setFunc;
+        }
+        Object.defineProperty(obj, key, desc);
+    } else {
+        obj.__defineGetter__(key, getFunc);
+        if (opt_setFunc) {
+            obj.__defineSetter__(key, opt_setFunc);
+        }
+    }
+};
+
+/**
+ * Defines a property getter for obj[key].
+ */
+utils.defineGetter = utils.defineGetterSetter;
+
+utils.arrayIndexOf = function(a, item) {
+    if (a.indexOf) {
+        return a.indexOf(item);
+    }
+    var len = a.length;
+    for (var i = 0; i < len; ++i) {
+        if (a[i] == item) {
+            return i;
+        }
+    }
+    return -1;
+};
+
+/**
+ * Returns whether the item was found in the array.
+ */
+utils.arrayRemove = function(a, item) {
+    var index = utils.arrayIndexOf(a, item);
+    if (index != -1) {
+        a.splice(index, 1);
+    }
+    return index != -1;
+};
+
+utils.typeName = function(val) {
+    return Object.prototype.toString.call(val).slice(8, -1);
+};
+
+/**
+ * Returns an indication of whether the argument is an array or not
+ */
+utils.isArray = function(a) {
+    return utils.typeName(a) == 'Array';
+};
+
+/**
+ * Returns an indication of whether the argument is a Date or not
+ */
+utils.isDate = function(d) {
+    return utils.typeName(d) == 'Date';
+};
+
+/**
+ * Does a deep clone of the object.
+ */
+utils.clone = function(obj) {
+    if(!obj || typeof obj == 'function' || utils.isDate(obj) || typeof obj != 'object') {
+        return obj;
+    }
+
+    var retVal, i;
+
+    if(utils.isArray(obj)){
+        retVal = [];
+        for(i = 0; i < obj.length; ++i){
+            retVal.push(utils.clone(obj[i]));
+        }
+        return retVal;
+    }
+
+    retVal = {};
+    for(i in obj){
+        if(!(i in retVal) || retVal[i] != obj[i]) {
+            retVal[i] = utils.clone(obj[i]);
+        }
+    }
+    return retVal;
+};
+
+/**
+ * Returns a wrapped version of the function
+ */
+utils.close = function(context, func, params) {
+    if (typeof params == 'undefined') {
+        return function() {
+            return func.apply(context, arguments);
+        };
+    } else {
+        return function() {
+            return func.apply(context, params);
+        };
+    }
+};
+
+/**
+ * Create a UUID
+ */
+utils.createUUID = function() {
+    return UUIDcreatePart(4) + '-' +
+        UUIDcreatePart(2) + '-' +
+        UUIDcreatePart(2) + '-' +
+        UUIDcreatePart(2) + '-' +
+        UUIDcreatePart(6);
+};
+
+/**
+ * Extends a child object from a parent object using classical inheritance
+ * pattern.
+ */
+utils.extend = (function() {
+    // proxy used to establish prototype chain
+    var F = function() {};
+    // extend Child from Parent
+    return function(Child, Parent) {
+        F.prototype = Parent.prototype;
+        Child.prototype = new F();
+        Child.__super__ = Parent.prototype;
+        Child.prototype.constructor = Child;
+    };
+}());
+
+/**
+ * Alerts a message in any available way: alert or console.log.
+ */
+utils.alert = function(msg) {
+    if (window.alert) {
+        window.alert(msg);
+    } else if (console && console.log) {
+        console.log(msg);
+    }
+};
+
+
+//------------------------------------------------------------------------------
+function UUIDcreatePart(length) {
+    var uuidpart = "";
+    for (var i=0; i<length; i++) {
+        var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
+        if (uuidchar.length == 1) {
+            uuidchar = "0" + uuidchar;
+        }
+        uuidpart += uuidchar;
+    }
+    return uuidpart;
+}
+
+
+});
+
+window.cordova = require('cordova');
+// file: lib/scripts/bootstrap.js
+
+(function (context) {
+    if (context._cordovaJsLoaded) {
+        throw new Error('cordova.js included multiple times.');
+    }
+    context._cordovaJsLoaded = true;
+
+    var channel = require('cordova/channel');
+    var pluginloader = require('cordova/pluginloader');
+
+    var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady];
+
+    function logUnfiredChannels(arr) {
+        for (var i = 0; i < arr.length; ++i) {
+            if (arr[i].state != 2) {
+                console.log('Channel not fired: ' + arr[i].type);
+            }
+        }
+    }
+
+    window.setTimeout(function() {
+        if (channel.onDeviceReady.state != 2) {
+            console.log('deviceready has not fired after 5 seconds.');
+            logUnfiredChannels(platformInitChannelsArray);
+            logUnfiredChannels(channel.deviceReadyChannelsArray);
+        }
+    }, 5000);
+
+    // Replace navigator before any modules are required(), to ensure it happens as soon as possible.
+    // We replace it so that properties that can't be clobbered can instead be overridden.
+    function replaceNavigator(origNavigator) {
+        var CordovaNavigator = function() {};
+        CordovaNavigator.prototype = origNavigator;
+        var newNavigator = new CordovaNavigator();
+        // This work-around really only applies to new APIs that are newer than Function.bind.
+        // Without it, APIs such as getGamepads() break.
+        if (CordovaNavigator.bind) {
+            for (var key in origNavigator) {
+                if (typeof origNavigator[key] == 'function') {
+                    newNavigator[key] = origNavigator[key].bind(origNavigator);
+                }
+            }
+        }
+        return newNavigator;
+    }
+    if (context.navigator) {
+        context.navigator = replaceNavigator(context.navigator);
+    }
+
+    // _nativeReady is global variable that the native side can set
+    // to signify that the native code is ready. It is a global since
+    // it may be called before any cordova JS is ready.
+    if (window._nativeReady) {
+        channel.onNativeReady.fire();
+    }
+
+    /**
+     * Create all cordova objects once native side is ready.
+     */
+    channel.join(function() {
+        // Call the platform-specific initialization
+        require('cordova/platform').initialize();
+
+        // Fire event to notify that all objects are created
+        channel.onCordovaReady.fire();
+
+        // Fire onDeviceReady event once page has fully loaded, all
+        // constructors have run and cordova info has been received from native
+        // side.
+        // This join call is deliberately made after platform.initialize() in
+        // order that plugins may manipulate channel.deviceReadyChannelsArray
+        // if necessary.
+        channel.join(function() {
+            require('cordova').fireDocumentEvent('deviceready');
+        }, channel.deviceReadyChannelsArray);
+
+    }, platformInitChannelsArray);
+
+    // Don't attempt to load when running unit tests.
+    if (typeof XMLHttpRequest != 'undefined') {
+        pluginloader.load();
+    }
+}(window));
+
+})();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index b502a4c..1621bab 100644
--- a/LICENSE
+++ b/LICENSE
@@ -204,7 +204,7 @@
  ADDITIONAL LICENSES:
  
  /*
- File: CordovaFramework/CordovaFramework/Classes/CDVReachability.*
+ File: CordovaLib/Classes/CDVReachability.*
  Abstract: Basic demonstration of how to use the SystemConfiguration Reachability APIs.
  
  Version: 2.2
@@ -250,7 +250,7 @@
 */
 
 //
-//  CordovaFramework/CordovaFramework/Classes/Utils/NSData+Base64.*
+//  CordovaLib/Classes/Utils/NSData+Base64.*
 //  base64
 //
 //  Created by Matt Gallagher on 2009/06/03.

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index ea03527..b960730 100644
--- a/README.md
+++ b/README.md
@@ -20,70 +20,75 @@
 -->
 Cordova OSX
 =============================================================
-CordovaFramework is a framework that enables users to include Cordova in their OS X application projects easily, and also create new Cordova based OS X application projects.
-<br />
+CordovaLib is a framework that enables users to include Cordova in their OS X application projects easily, and also create new Cordova based OS X application projects.
+
 
 Pre-requisites
 -------------------------------------------------------------
-Make sure you have installed the latest released OS X SDK which comes with Xcode 4. Download it at [http://developer.apple.com/downloads](http://developer.apple.com/downloads) or the [Mac App Store](http://itunes.apple.com/us/app/xcode/id497799835?mt=12).
-<br />
+Make sure you have installed the latest released OS X SDK which comes with Xcode 5. Download it at [http://developer.apple.com/downloads](http://developer.apple.com/downloads) or the [Mac App Store](http://itunes.apple.com/us/app/xcode/id497799835?mt=12).
+
 
-Install CordovaFramework
+Add the Cordova OSX Platform the a CLI project
 -------------------------------------------------------------
+1. Get a patched version of cordova CLI and Plugman
+    1. checkout the master. see https://github.com/apache/cordova-cli#installing-from-master
+    2. patch the 2 projects with the patches provided in the `patches` directory to
+       enable the osx platform    
 
-1. Download the source
-2. Extract to their final location
-3. There is no step 3
+2. Follow the instructions in the [**Command-Line Usage** section](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface) of [http://docs.cordova.io](http://docs.cordova.io)
+
+3. add the osx platform:
 
-<br />
+    ````
+    $ cordova platform add osx
+    $ cordova run osx
+    ````
 
-Create a Cordova project
+
+You can also open the project in XCode:
+
+    $ open platforms/osx/<yourproject>.xcodeproj
+
+Create a Cordova OSX Standalone project
 -------------------------------------------------------------
 
-1. Launch **Terminal.app**
-2. Go to the location where you installed Cordova, in the **bin** sub-folder
-3. Follow the instructions in the [**Command-Line Usage** section](http://docs.cordova.io/en/edge/guide_command-line_index.md.html#Command-Line%20Usage) of [http://docs.cordova.io](http://docs.cordova.io)
+1. Download the source
+2. execute the `create` command to setup an empty project:
 
-The docs should also have been included in the distribution.
+    ````
+    $ bin/create <path_to_new_project> <package_name> <project_name>
+    ````
+    
+    for example
+    
+    ````
+    $ bin/create ../Foo org.apache.foo FooBar
+    ````
 
-To use a **shared CordovaFramework**, add as the first parameter "**--shared**" to the **bin/create** command.
+To use a **shared CordovaLib**, add as the first parameter "**--shared**" to the **bin/create** command.
 
-<br />
 
-Updating a CordovaFramework subproject reference in your project
+Updating a CordovaLib subproject reference in your project
 -------------------------------------------------------------
 
-When you update to a new Cordova version, you may need to update the CordovaFramework reference in an existing project. Cordova comes with a script that will help you to do this. 
+When you update to a new Cordova version, you may need to update the CordovaLib reference in an existing project. Cordova comes with a script that will help you to do this.
 
 1. Launch **Terminal.app**
 2. Go to the location where you installed Cordova, in the **bin** sub-folder
 3. Run **"update_cordova_subproject [path/to/your/project/xcodeproj]"**  where the first parameter is the path to your project's .xcodeproj file
 
-<br />
-
-Unit Tests
---------------------------------------------------------------------
-1. **Create** a new Cordova-based Application project
-2. **Download** the code from the **[mobile-spec](https://github.com/apache/cordova-mobile-spec)** and put all of it in the root of your **www** folder
-3. **Modify cordova.js** to point to your correct cordova-X.X.X.js version
-4. **Run** the project
-
-<br />
 
 
 FAQ
 ---
-
 None yet.
 
 
 BUGS?
 -----
 File them at the [Cordova Issue Tracker](https://issues.apache.org/jira/browse/CB)      
-<br />
+
 
 MORE INFO
 ----------
 * [http://cordova.apache.org/](http://cordova.apache.org/)
-
-<br />

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index fbc83f2..3bee18c 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -22,6 +22,10 @@
  
  Cordova is a framework that enables developers to include the Cordova API in their OS X application projects easily, and also create new Cordova-based OS X application projects through the command-line.
 
+### 3.5.0 (20140418) ###
+* Fixed layout and updated scripts to work with cli
+
+
 ### 3.0.0 (20130718) ###
 
 * [CB-3179] Change <plugin> to <feature> in config.xml and remove deprecation notice in OSX

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/apple_ios_version
----------------------------------------------------------------------
diff --git a/bin/apple_ios_version b/bin/apple_ios_version
new file mode 100755
index 0000000..9fed61d
--- /dev/null
+++ b/bin/apple_ios_version
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+#
+# 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.
+#
+
+# outputs the highest level of iOS sdk installed
+iOS_X_VERSIONS=$(xcodebuild -showsdks | sed -e '/./{H;$!d;}' -e 'x;/iOS SDKs/!d;' | grep -o '[0-9]*\.[0-9]* ');
+echo $iOS_X_VERSIONS | tr " " "\n" | sort -g | tail -1;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/apple_osx_version
----------------------------------------------------------------------
diff --git a/bin/apple_osx_version b/bin/apple_osx_version
new file mode 100755
index 0000000..44b04ea
--- /dev/null
+++ b/bin/apple_osx_version
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+#
+# 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.
+#
+
+# outputs the highest level of OS X sdk installed
+OS_X_VERSIONS=$(xcodebuild -showsdks | sed -e '/./{H;$!d;}' -e 'x;/OS X SDKs/!d;' | grep -o '[0-9]*\.[0-9]* ');
+echo $OS_X_VERSIONS | tr " " "\n" | sort -g | tail -1;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/apple_xcode_version
----------------------------------------------------------------------
diff --git a/bin/apple_xcode_version b/bin/apple_xcode_version
new file mode 100755
index 0000000..f67d85c
--- /dev/null
+++ b/bin/apple_xcode_version
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+#
+# 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.
+#
+
+# outputs which version of XCODE is installed
+XCODEBUILD_VERSION=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
+echo $XCODEBUILD_VERSION
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/check_reqs
----------------------------------------------------------------------
diff --git a/bin/check_reqs b/bin/check_reqs
new file mode 100755
index 0000000..aa5b831
--- /dev/null
+++ b/bin/check_reqs
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+#
+# 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.
+#
+
+XCODEBUILD_LOCATION=$(which xcodebuild)
+if [ $? != 0 ]; then
+	echo "Xcode is (probably) not installed, specifically the command 'xcodebuild' is unavailable."
+	exit 2
+fi
+
+XCODEBUILD_MIN_VERSION="4.6"
+XCODEBUILD_VERSION=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
+
+if [[ "$XCODEBUILD_VERSION" < "$XCODEBUILD_MIN_VERSION" ]]; then
+	echo "Cordova can only run in Xcode version $XCODEBUILD_MIN_VERSION or greater."
+	exit 2
+fi

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index ed8c522..b924cd9 100755
--- a/bin/create
+++ b/bin/create
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/sh
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -31,23 +31,44 @@
 set -e
 
 function usage() {
-  echo "Usage: $0 [--shared] <path_to_new_project> <package_name> <project_name>"
-  echo "	--shared (optional): Link directly against the shared copy of the CordovaFramework instead of a copy of it."
-  echo "	<path_to_new_project>: Path to your new Cordova OS X project"
-  echo "	<package_name>: Package name, following reverse-domain style convention"
-  echo "	<project_name>: Project name"
-  exit 1
+    echo "Usage: $0 [--shared] [--arc] [--cli] <path_to_new_project> <package_name> <project_name> [<project_template_dir>]"
+    echo "	--shared (optional): Link directly against the shared copy of the CordovaLib instead of a copy of it."
+    echo "	--cli (optional): Use the CLI-project template."
+    echo "	<path_to_new_project>: Path to your new Cordova iOS project"
+    echo "	<package_name>: Package name, following reverse-domain style convention"
+    echo "	<project_name>: Project name"
+    echo "	<project_template_dir>: Path to project template (override)."
+    exit 1
 }
 
 USE_SHARED=0
-if [[ $1 == "--shared" ]]; then
-    USE_SHARED=1
-    shift;
-fi
+USE_CLI=0
+while [ $# -gt 0 ]; do
+    case "$1" in
+    --shared) USE_SHARED=1 ;;
+    --arc) USE_ARC=1 ;;
+    --cli) USE_CLI=1 ;;
+    -*) echo "Unrecognized argument: $1" >&2; usage ;;
+    *)
+        if [[ -z "$PROJECT_PATH" ]]; then
+            PROJECT_PATH="$1"
+        elif [[ -z "$PACKAGE" ]]; then
+            PACKAGE="$1"
+        elif [[ -z "$PROJECT_NAME" ]]; then
+            PROJECT_NAME="$1"
+        elif [[ -z "$PROJECT_TEMPLATE_DIR" ]]; then
+            PROJECT_TEMPLATE_DIR="$1"
+        else
+            echo "Too many arguments to $0". >&2
+            usage
+        fi
+    esac
+    shift
+done
 
 # check whether it is a proper create command (at least 3 arguments)
-if [ $# -lt 3 ]; then
-	usage
+if [[ -z "$PROJECT_NAME" ]]; then
+    usage
 fi
 
 # the two lines below are to get the current folder, and resolve symlinks
@@ -57,82 +78,77 @@ while [ -h "$SCRIPT" ] ; do
    SCRIPT=`readlink "$SCRIPT"`
 done
 
-BINDIR=$( cd "$( dirname "$SCRIPT" )" && pwd )
-CORDOVAFRAMEWORK_DIR="$BINDIR/../CordovaFramework"
-CDV_VER=$(cat $CORDOVAFRAMEWORK_DIR/VERSION)
+BINDIR=$(cd "$(dirname "$SCRIPT" )" && pwd)
+CORDOVALIB_DIR="$BINDIR/../CordovaLib"
+CDV_VER=$(cat "$CORDOVALIB_DIR/VERSION")
+
+PROJECT_PARENT=$(dirname "$PROJECT_PATH")
+PROJECT_TEMPLATE_DIR=${PROJECT_TEMPLATE_DIR:-"$BINDIR/../templates/project"}
+SCRIPT_TEMPLATE_DIR=$BINDIR/../templates/scripts
 
-PROJECT_PATH=$1
-PACKAGE=$2
-PROJECT_NAME=$3
+"$BINDIR/check_reqs" || exit $?
 
 # check whether the project path exists and is not empty
 if [ -d "$PROJECT_PATH" ]; then
-	if [ "$(ls -1A "$PROJECT_PATH")" ]; then
-		echo "\033[31mError: $PROJECT_PATH is not empty. Please specify an empty folder.\033[m"
-		exit 1
-	fi
+    if [ "$(ls -1A "$PROJECT_PATH")" ]; then
+        echo "\033[31mError: $PROJECT_PATH is not empty. Please specify an empty folder.\033[m"
+        exit 1
+    fi
 fi
 
-# copy the files in; then modify them
-cp -r "$BINDIR/templates/project/" "$PROJECT_PATH"
-
-# Copy in the JS.
-cp "$CORDOVAFRAMEWORK_DIR/cordova.js" "$PROJECT_PATH/www/cordova.js"
+#Ensure the parent directory exists so cp -r will not fail
+if [ ! -d "$PROJECT_PARENT" ]; then
+    echo "\033[31mError: $PROJECT_PARENT does not exist. Please specify an existing parent folder.\033[m"
+    exit 1
+fi
 
-# I've tried to be thorough in my documentation of the manual actions below...
-# on first brush it would seem that the right solution would be to brute force
-# recurse the directory tree renaming instances of __ID__ and __TESTING__ ...however this is a little blunt
-# and while so the below is too being very manual it was/is easier to test, fucking manually, and sort out the automation
+# create the project directory. eg: MyProject/platforms/osx
+mkdir -p "$PROJECT_PATH"
+cp -r "$PROJECT_TEMPLATE_DIR/www" "$PROJECT_PATH"/www
+cp "$CORDOVALIB_DIR/cordova.js" "$PROJECT_PATH/www/cordova.js"
 
-# rename the folders/files:
-#
-# - ./__TESTING__.xcodeproj/
-# - ./__TESTING__/
-# - ./__TESTING__/__TESTING__-info.plist
-# - ./__TESTING__/__TESTING__-Prefix.plist
-# - ./__TESTING__/Resources/__TESTING__.icns
-mv "$PROJECT_PATH/__TESTING__.xcodeproj" "$PROJECT_PATH/$PROJECT_NAME.xcodeproj"
-mv "$PROJECT_PATH/__TESTING__" "$PROJECT_PATH/$PROJECT_NAME"
-mv "$PROJECT_PATH/$PROJECT_NAME/__TESTING__-Info.plist" "$PROJECT_PATH/$PROJECT_NAME/$PROJECT_NAME-Info.plist"
-mv "$PROJECT_PATH/$PROJECT_NAME/__TESTING__-Prefix.pch" "$PROJECT_PATH/$PROJECT_NAME/$PROJECT_NAME-Prefix.pch"
-mv "$PROJECT_PATH/$PROJECT_NAME/Resources/__TESTING__.icns" "$PROJECT_PATH/$PROJECT_NAME/Resources/$PROJECT_NAME.icns"
-
-# lets store a reference to the root
-R=$PROJECT_PATH/$PROJECT_NAME
-
-# replace __TESTING__ and --ID-- with ACTIVITY and ID strings, respectively, in:
-#
-# - ./__TESTING__.xcodeproj/project.pbxproj
-# - ./__TESTING__/Classes/AppDelegate.h
-# - ./__TESTING__/Classes/AppDelegate.m
-# - ./__TESTING__/Resources/main.m
-# - ./__TESTING__/Resources/__TESTING__-info.plist
-# - ./__TESTING__/Resources/__TESTING__-Prefix.plist
-# - ./__TESTING__/Resources/en.lproj/MainViewController.xib
-
-"$BINDIR/replaces" "$R.xcodeproj/project.pbxproj" __TESTING__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/Classes/AppDelegate.h"     __TESTING__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/Classes/AppDelegate.m"     __TESTING__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/Classes/MainViewController.h" __TESTING__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/Classes/MainViewController.m" __TESTING__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/main.m"                    __TESTING__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/$PROJECT_NAME-Info.plist"  __TESTING__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/$PROJECT_NAME-Prefix.pch"  __TESTING__ "$PROJECT_NAME"
-"$BINDIR/replaces" "$R/$PROJECT_NAME-Info.plist" --ID-- $PACKAGE
-"$BINDIR/replaces" "$R/Resources/en.lproj/MainViewController.xib"  __TESTING__ "$PROJECT_NAME"
+# create and copy the XCode stuff. eg:
+#   MyProject/platforms/osx/MyProject
+#   MyProject/platforms/osx/MyProject.xcodeproj
+for filename in "" ".xcodeproj"; do
+    cp -r "$PROJECT_TEMPLATE_DIR/__CDV_PRODUCT_NAME__${filename}" "${PROJECT_PATH}/${PROJECT_NAME}${filename}"
+done
+cp -r "$PROJECT_TEMPLATE_DIR/gitignore" "${PROJECT_PATH}/.gitignore"
+
+# rename some files
+export filename=$PROJECT_NAME
+find "${PROJECT_PATH}" -name '__CDV_PRODUCT_NAME__*' -type f -exec sh -c 'mv "$1" "${1//__CDV_PRODUCT_NAME__/${filename}}"' -- {} \;
+unset filename
+
+# replace placeholders in templates
+for filename in `fgrep -rl __CDV_ "${PROJECT_PATH}"`; do
+    sed -i.bak -e "s/__CDV_PRODUCT_NAME__/${PROJECT_NAME}/g" \
+           -e "s/__CDV_ORGANIZATION_NAME__/${PACKAGE}/g" \
+           -e "s/--CDV-COMPANY-ID--/${PACKAGE}/g" \
+           ${filename}
+    rm -f ${filename}.bak
+done
 
 if [[ $USE_SHARED = 1 ]]; then
     # Make the sub-project reference to Cordova have the correct path.
     "$BINDIR/update_cordova_subproject" "$R.xcodeproj/project.pbxproj"
+            "${PROJECT_PATH}/${PROJECT_NAME}.xcodeproj/project.pbxproj" > /dev/null
 else
-    # Copy in the CordovaFramework directory.
-    mkdir -p "$PROJECT_PATH/CordovaFramework/CordovaFramework.xcodeproj"
-    mkdir -p "$PROJECT_PATH/CordovaFramework/CordovaFramework/"
-    cp -r "$BINDIR/../CordovaFramework/CordovaFramework/" "$PROJECT_PATH/CordovaFramework/CordovaFramework/"
-    cp "$BINDIR/../CordovaFramework/VERSION" "$PROJECT_PATH/CordovaFramework"
-    cp "$BINDIR/../CordovaFramework/cordova.js" "$PROJECT_PATH/CordovaFramework"
-    cp "$BINDIR/../CordovaFramework/CordovaFramework.xcodeproj/project.pbxproj" "$PROJECT_PATH/CordovaFramework/CordovaFramework.xcodeproj"
+    # Copy in the CordovaLib directory.
+    cp -r "${CORDOVALIB_DIR}" "${PROJECT_PATH}/"
     # Make the sub-project reference to Cordova have the correct path.
-    "$BINDIR/update_cordova_subproject" "$R.xcodeproj/project.pbxproj" "$PROJECT_PATH/CordovaFramework/CordovaFramework.xcodeproj/project.pbxproj" > /dev/null
+    "$BINDIR/update_cordova_subproject" \
+        "${PROJECT_PATH}/${PROJECT_NAME}.xcodeproj/project.pbxproj" \
+        "${PROJECT_PATH}/CordovaLib/CordovaLib.xcodeproj/project.pbxproj" > /dev/null
 fi
 
+# Finally copy the scripts
+cp -r "$SCRIPT_TEMPLATE_DIR"/* "$PROJECT_PATH/"
+
+# copy the check_reqs script
+cp "$BINDIR/check_reqs" "$PROJECT_PATH"/cordova
+
+# copy the version scripts script
+cp "$BINDIR/apple_ios_version" "$PROJECT_PATH"/cordova
+cp "$BINDIR/apple_osx_version" "$PROJECT_PATH"/cordova
+cp "$BINDIR/apple_xcode_version" "$PROJECT_PATH"/cordova

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/replaces
----------------------------------------------------------------------
diff --git a/bin/replaces b/bin/replaces
index 4aee85a..09f8fe9 100755
--- a/bin/replaces
+++ b/bin/replaces
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/sh
 #
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file


[14/14] mac commit: Removing some unused menu items

Posted by sh...@apache.org.
Removing some unused menu items

Signed-off-by: Shazron Abdullah <sh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cordova-osx/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-osx/commit/c29897ac
Tree: http://git-wip-us.apache.org/repos/asf/cordova-osx/tree/c29897ac
Diff: http://git-wip-us.apache.org/repos/asf/cordova-osx/diff/c29897ac

Branch: refs/heads/master
Commit: c29897ac5bdb69c49ebaa29184379aa21c703afb
Parents: edc253b
Author: Tobias Bocanegra <tr...@adobe.com>
Authored: Fri Apr 18 16:58:09 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Apr 22 14:44:25 2014 -0700

----------------------------------------------------------------------
 .../__CDV_PRODUCT_NAME__/MainViewController.xib | 545 +------------------
 1 file changed, 9 insertions(+), 536 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/c29897ac/templates/project/__CDV_PRODUCT_NAME__/MainViewController.xib
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/MainViewController.xib b/templates/project/__CDV_PRODUCT_NAME__/MainViewController.xib
index 2cf1a1e..ab4eeac 100644
--- a/templates/project/__CDV_PRODUCT_NAME__/MainViewController.xib
+++ b/templates/project/__CDV_PRODUCT_NAME__/MainViewController.xib
@@ -64,547 +64,18 @@
                         </items>
                     </menu>
                 </menuItem>
-                <menuItem title="File" id="83">
-                    <menu key="submenu" title="File" id="81">
-                        <items>
-                            <menuItem title="New" keyEquivalent="n" id="82">
-                                <connections>
-                                    <action selector="newDocument:" target="-1" id="373"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Open…" keyEquivalent="o" id="72">
-                                <connections>
-                                    <action selector="openDocument:" target="-1" id="374"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Open Recent" id="124">
-                                <menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="125">
-                                    <items>
-                                        <menuItem title="Clear Menu" id="126">
-                                            <connections>
-                                                <action selector="clearRecentDocuments:" target="-1" id="127"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem isSeparatorItem="YES" id="79">
-                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
-                            </menuItem>
-                            <menuItem title="Close" keyEquivalent="w" id="73">
-                                <connections>
-                                    <action selector="performClose:" target="-1" id="193"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Save…" keyEquivalent="s" id="75">
-                                <connections>
-                                    <action selector="saveDocument:" target="-1" id="362"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Revert to Saved" id="112">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <connections>
-                                    <action selector="revertDocumentToSaved:" target="-1" id="364"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem isSeparatorItem="YES" id="74">
-                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
-                            </menuItem>
-                            <menuItem title="Page Setup..." keyEquivalent="P" id="77">
-                                <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
-                                <connections>
-                                    <action selector="runPageLayout:" target="-1" id="87"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Print…" keyEquivalent="p" id="78">
-                                <connections>
-                                    <action selector="print:" target="-1" id="86"/>
-                                </connections>
-                            </menuItem>
-                        </items>
-                    </menu>
-                </menuItem>
-                <menuItem title="Edit" id="217">
-                    <menu key="submenu" title="Edit" id="205">
-                        <items>
-                            <menuItem title="Undo" keyEquivalent="z" id="207">
-                                <connections>
-                                    <action selector="undo:" target="-1" id="223"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Redo" keyEquivalent="Z" id="215">
-                                <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
-                                <connections>
-                                    <action selector="redo:" target="-1" id="231"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem isSeparatorItem="YES" id="206">
-                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
-                            </menuItem>
-                            <menuItem title="Cut" keyEquivalent="x" id="199">
-                                <connections>
-                                    <action selector="cut:" target="-1" id="228"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Copy" keyEquivalent="c" id="197">
-                                <connections>
-                                    <action selector="copy:" target="-1" id="224"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Paste" keyEquivalent="v" id="203">
-                                <connections>
-                                    <action selector="paste:" target="-1" id="226"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Paste and Match Style" keyEquivalent="V" id="485">
-                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                <connections>
-                                    <action selector="pasteAsPlainText:" target="-1" id="486"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Delete" id="202">
-                                <connections>
-                                    <action selector="delete:" target="-1" id="235"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Select All" keyEquivalent="a" id="198">
-                                <connections>
-                                    <action selector="selectAll:" target="-1" id="232"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem isSeparatorItem="YES" id="214">
-                                <modifierMask key="keyEquivalentModifierMask" command="YES"/>
-                            </menuItem>
-                            <menuItem title="Find" id="218">
-                                <menu key="submenu" title="Find" id="220">
-                                    <items>
-                                        <menuItem title="Find…" tag="1" keyEquivalent="f" id="209">
-                                            <connections>
-                                                <action selector="performFindPanelAction:" target="-1" id="241"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="534">
-                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="performFindPanelAction:" target="-1" id="535"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Find Next" tag="2" keyEquivalent="g" id="208">
-                                            <connections>
-                                                <action selector="performFindPanelAction:" target="-1" id="487"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="213">
-                                            <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="performFindPanelAction:" target="-1" id="488"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="221">
-                                            <connections>
-                                                <action selector="performFindPanelAction:" target="-1" id="489"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Jump to Selection" keyEquivalent="j" id="210">
-                                            <connections>
-                                                <action selector="centerSelectionInVisibleArea:" target="-1" id="245"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Spelling and Grammar" id="216">
-                                <menu key="submenu" title="Spelling and Grammar" id="200">
-                                    <items>
-                                        <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="204">
-                                            <connections>
-                                                <action selector="showGuessPanel:" target="-1" id="230"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Check Document Now" keyEquivalent=";" id="201">
-                                            <connections>
-                                                <action selector="checkSpelling:" target="-1" id="225"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="453"/>
-                                        <menuItem title="Check Spelling While Typing" id="219">
-                                            <connections>
-                                                <action selector="toggleContinuousSpellChecking:" target="-1" id="222"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Check Grammar With Spelling" id="346">
-                                            <connections>
-                                                <action selector="toggleGrammarChecking:" target="-1" id="347"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Correct Spelling Automatically" id="454">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleAutomaticSpellingCorrection:" target="-1" id="456"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Substitutions" id="348">
-                                <menu key="submenu" title="Substitutions" id="349">
-                                    <items>
-                                        <menuItem title="Show Substitutions" id="457">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="orderFrontSubstitutionsPanel:" target="-1" id="458"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="459"/>
-                                        <menuItem title="Smart Copy/Paste" tag="1" keyEquivalent="f" id="350">
-                                            <connections>
-                                                <action selector="toggleSmartInsertDelete:" target="-1" id="355"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Smart Quotes" tag="2" keyEquivalent="g" id="351">
-                                            <connections>
-                                                <action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="356"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Smart Dashes" id="460">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleAutomaticDashSubstitution:" target="-1" id="461"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Smart Links" tag="3" keyEquivalent="G" id="354">
-                                            <modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="toggleAutomaticLinkDetection:" target="-1" id="357"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Text Replacement" id="462">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleAutomaticTextReplacement:" target="-1" id="463"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Transformations" id="450">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Transformations" id="451">
-                                    <items>
-                                        <menuItem title="Make Upper Case" id="452">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="uppercaseWord:" target="-1" id="464"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Make Lower Case" id="465">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="lowercaseWord:" target="-1" id="468"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Capitalize" id="466">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="capitalizeWord:" target="-1" id="467"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Speech" id="211">
-                                <menu key="submenu" title="Speech" id="212">
-                                    <items>
-                                        <menuItem title="Start Speaking" id="196">
-                                            <connections>
-                                                <action selector="startSpeaking:" target="-1" id="233"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Stop Speaking" id="195">
-                                            <connections>
-                                                <action selector="stopSpeaking:" target="-1" id="227"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                        </items>
-                    </menu>
-                </menuItem>
+                <menuItem title="File" id="83"/>
+                <menuItem title="Edit" id="217"/>
                 <menuItem title="Format" id="375">
                     <modifierMask key="keyEquivalentModifierMask"/>
-                    <menu key="submenu" title="Format" id="376">
-                        <items>
-                            <menuItem title="Font" id="377">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Font" systemMenu="font" id="388">
-                                    <items>
-                                        <menuItem title="Show Fonts" keyEquivalent="t" id="389">
-                                            <connections>
-                                                <action selector="orderFrontFontPanel:" target="420" id="424"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Bold" tag="2" keyEquivalent="b" id="390">
-                                            <connections>
-                                                <action selector="addFontTrait:" target="420" id="421"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Italic" tag="1" keyEquivalent="i" id="391">
-                                            <connections>
-                                                <action selector="addFontTrait:" target="420" id="422"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Underline" keyEquivalent="u" id="392">
-                                            <connections>
-                                                <action selector="underline:" target="-1" id="432"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="393"/>
-                                        <menuItem title="Bigger" tag="3" keyEquivalent="+" id="394">
-                                            <connections>
-                                                <action selector="modifyFont:" target="420" id="425"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Smaller" tag="4" keyEquivalent="-" id="395">
-                                            <connections>
-                                                <action selector="modifyFont:" target="420" id="423"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="396"/>
-                                        <menuItem title="Kern" id="397">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Kern" id="415">
-                                                <items>
-                                                    <menuItem title="Use Default" id="416">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="useStandardKerning:" target="-1" id="438"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Use None" id="417">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="turnOffKerning:" target="-1" id="441"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Tighten" id="418">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="tightenKerning:" target="-1" id="431"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Loosen" id="419">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="loosenKerning:" target="-1" id="435"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem title="Ligature" id="398">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Ligature" id="411">
-                                                <items>
-                                                    <menuItem title="Use Default" id="412">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="useStandardLigatures:" target="-1" id="439"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Use None" id="413">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="turnOffLigatures:" target="-1" id="440"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Use All" id="414">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="useAllLigatures:" target="-1" id="434"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem title="Baseline" id="399">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Baseline" id="405">
-                                                <items>
-                                                    <menuItem title="Use Default" id="406">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="unscript:" target="-1" id="437"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Superscript" id="407">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="superscript:" target="-1" id="430"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Subscript" id="408">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="subscript:" target="-1" id="429"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Raise" id="409">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="raiseBaseline:" target="-1" id="426"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem title="Lower" id="410">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="lowerBaseline:" target="-1" id="427"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="400"/>
-                                        <menuItem title="Show Colors" keyEquivalent="C" id="401">
-                                            <connections>
-                                                <action selector="orderFrontColorPanel:" target="-1" id="433"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="402"/>
-                                        <menuItem title="Copy Style" keyEquivalent="c" id="403">
-                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="copyFont:" target="-1" id="428"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Paste Style" keyEquivalent="v" id="404">
-                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="pasteFont:" target="-1" id="436"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                            <menuItem title="Text" id="496">
-                                <modifierMask key="keyEquivalentModifierMask"/>
-                                <menu key="submenu" title="Text" id="497">
-                                    <items>
-                                        <menuItem title="Align Left" keyEquivalent="{" id="498">
-                                            <connections>
-                                                <action selector="alignLeft:" target="-1" id="524"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Center" keyEquivalent="|" id="499">
-                                            <connections>
-                                                <action selector="alignCenter:" target="-1" id="518"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Justify" id="500">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="alignJustified:" target="-1" id="523"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Align Right" keyEquivalent="}" id="501">
-                                            <connections>
-                                                <action selector="alignRight:" target="-1" id="521"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="502"/>
-                                        <menuItem title="Writing Direction" id="503">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <menu key="submenu" title="Writing Direction" id="508">
-                                                <items>
-                                                    <menuItem title="Paragraph" enabled="NO" id="509">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                    </menuItem>
-                                                    <menuItem id="510">
-                                                        <string key="title">	Default</string>
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="makeBaseWritingDirectionNatural:" target="-1" id="525"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem id="511">
-                                                        <string key="title">	Left to Right</string>
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="makeBaseWritingDirectionLeftToRight:" target="-1" id="526"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem id="512">
-                                                        <string key="title">	Right to Left</string>
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="makeBaseWritingDirectionRightToLeft:" target="-1" id="527"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem isSeparatorItem="YES" id="513"/>
-                                                    <menuItem title="Selection" enabled="NO" id="514">
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                    </menuItem>
-                                                    <menuItem id="515">
-                                                        <string key="title">	Default</string>
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="makeTextWritingDirectionNatural:" target="-1" id="528"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem id="516">
-                                                        <string key="title">	Left to Right</string>
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="makeTextWritingDirectionLeftToRight:" target="-1" id="529"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                    <menuItem id="517">
-                                                        <string key="title">	Right to Left</string>
-                                                        <modifierMask key="keyEquivalentModifierMask"/>
-                                                        <connections>
-                                                            <action selector="makeTextWritingDirectionRightToLeft:" target="-1" id="530"/>
-                                                        </connections>
-                                                    </menuItem>
-                                                </items>
-                                            </menu>
-                                        </menuItem>
-                                        <menuItem isSeparatorItem="YES" id="504"/>
-                                        <menuItem title="Show Ruler" id="505">
-                                            <modifierMask key="keyEquivalentModifierMask"/>
-                                            <connections>
-                                                <action selector="toggleRuler:" target="-1" id="520"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Copy Ruler" keyEquivalent="c" id="506">
-                                            <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="copyRuler:" target="-1" id="522"/>
-                                            </connections>
-                                        </menuItem>
-                                        <menuItem title="Paste Ruler" keyEquivalent="v" id="507">
-                                            <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
-                                            <connections>
-                                                <action selector="pasteRuler:" target="-1" id="519"/>
-                                            </connections>
-                                        </menuItem>
-                                    </items>
-                                </menu>
-                            </menuItem>
-                        </items>
-                    </menu>
                 </menuItem>
                 <menuItem title="View" id="295">
                     <menu key="submenu" title="View" id="296">
                         <items>
-                            <menuItem title="Show Toolbar" keyEquivalent="t" id="297">
-                                <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
-                                <connections>
-                                    <action selector="toggleToolbarShown:" target="-1" id="366"/>
-                                </connections>
-                            </menuItem>
-                            <menuItem title="Customize Toolbar…" id="298">
+                            <menuItem title="Enter Full Screen" keyEquivalent="f" id="afF-KY-ioe">
+                                <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
                                 <connections>
-                                    <action selector="runToolbarCustomizationPalette:" target="-1" id="365"/>
+                                    <action selector="toggleFullScreen:" target="-1" id="dWi-nX-EnS"/>
                                 </connections>
                             </menuItem>
                         </items>
@@ -652,7 +123,7 @@
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowCollectionBehavior key="collectionBehavior" fullScreenPrimary="YES"/>
             <rect key="contentRect" x="335" y="299" width="640" height="480"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1178"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1418"/>
             <value key="minSize" type="size" width="640" height="480"/>
             <view key="contentView" horizontalHuggingPriority="1000" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1" verticalCompressionResistancePriority="1" id="372" userLabel="Content View">
                 <rect key="frame" x="0.0" y="0.0" width="640" height="480"/>
@@ -661,7 +132,9 @@
                     <webView horizontalHuggingPriority="1" verticalHuggingPriority="1" horizontalCompressionResistancePriority="1" verticalCompressionResistancePriority="1" translatesAutoresizingMaskIntoConstraints="NO" id="536">
                         <rect key="frame" x="0.0" y="0.0" width="640" height="480"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <webPreferences key="preferences" defaultFontSize="12" defaultFixedFontSize="12" plugInsEnabled="NO" javaEnabled="NO"/>
+                        <webPreferences key="preferences" defaultFontSize="12" defaultFixedFontSize="12" plugInsEnabled="NO" javaEnabled="NO">
+                            <nil key="identifier"/>
+                        </webPreferences>
                         <connections>
                             <outlet property="UIDelegate" destination="739" id="752"/>
                             <outlet property="frameLoadDelegate" destination="739" id="751"/>


[04/14] Update to modern layout

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/Resources/en.lproj/MainViewController.xib
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Resources/en.lproj/MainViewController.xib b/bin/templates/project/__TESTING__/Resources/en.lproj/MainViewController.xib
deleted file mode 100644
index e80658d..0000000
--- a/bin/templates/project/__TESTING__/Resources/en.lproj/MainViewController.xib
+++ /dev/null
@@ -1,3521 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
-	<data>
-		<int key="IBDocument.SystemTarget">1070</int>
-		<string key="IBDocument.SystemVersion">12D78</string>
-		<string key="IBDocument.InterfaceBuilderVersion">3084</string>
-		<string key="IBDocument.AppKitVersion">1187.37</string>
-		<string key="IBDocument.HIToolboxVersion">626.00</string>
-		<dictionary class="NSMutableDictionary" key="IBDocument.PluginVersions">
-			<string key="com.apple.InterfaceBuilder.CocoaPlugin">3084</string>
-			<string key="com.apple.WebKitIBPlugin">2053</string>
-		</dictionary>
-		<array key="IBDocument.IntegratedClassDependencies">
-			<string>IBNSLayoutConstraint</string>
-			<string>NSCustomObject</string>
-			<string>NSMenu</string>
-			<string>NSMenuItem</string>
-			<string>NSView</string>
-			<string>NSWindowTemplate</string>
-			<string>WebView</string>
-		</array>
-		<array key="IBDocument.PluginDependencies">
-			<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-			<string>com.apple.WebKitIBPlugin</string>
-		</array>
-		<object class="NSMutableDictionary" key="IBDocument.Metadata">
-			<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
-			<integer value="1" key="NS.object.0"/>
-		</object>
-		<array class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
-			<object class="NSCustomObject" id="1021">
-				<string key="NSClassName">NSApplication</string>
-			</object>
-			<object class="NSCustomObject" id="1014">
-				<string key="NSClassName">FirstResponder</string>
-			</object>
-			<object class="NSCustomObject" id="1050">
-				<string key="NSClassName">NSApplication</string>
-			</object>
-			<object class="NSMenu" id="649796088">
-				<string key="NSTitle">AMainMenu</string>
-				<array class="NSMutableArray" key="NSMenuItems">
-					<object class="NSMenuItem" id="694149608">
-						<reference key="NSMenu" ref="649796088"/>
-						<string key="NSTitle"/>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<object class="NSCustomResource" key="NSOnImage" id="35465992">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">NSMenuCheckmark</string>
-						</object>
-						<object class="NSCustomResource" key="NSMixedImage" id="502551668">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">NSMenuMixedState</string>
-						</object>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="110575045">
-							<string key="NSTitle"/>
-							<array class="NSMutableArray" key="NSMenuItems">
-								<object class="NSMenuItem" id="238522557">
-									<reference key="NSMenu" ref="110575045"/>
-									<string key="NSTitle">About __TESTING__</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="304266470">
-									<reference key="NSMenu" ref="110575045"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="609285721">
-									<reference key="NSMenu" ref="110575045"/>
-									<string key="NSTitle">Preferences…</string>
-									<string key="NSKeyEquiv">,</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="481834944">
-									<reference key="NSMenu" ref="110575045"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="1046388886">
-									<reference key="NSMenu" ref="110575045"/>
-									<string key="NSTitle">Services</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-									<string key="NSAction">submenuAction:</string>
-									<object class="NSMenu" key="NSSubmenu" id="752062318">
-										<string key="NSTitle">Services</string>
-										<array class="NSMutableArray" key="NSMenuItems"/>
-										<string key="NSName">_NSServicesMenu</string>
-									</object>
-								</object>
-								<object class="NSMenuItem" id="646227648">
-									<reference key="NSMenu" ref="110575045"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="755159360">
-									<reference key="NSMenu" ref="110575045"/>
-									<string key="NSTitle">Hide</string>
-									<string key="NSKeyEquiv">h</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="342932134">
-									<reference key="NSMenu" ref="110575045"/>
-									<string key="NSTitle">Hide Others</string>
-									<string key="NSKeyEquiv">h</string>
-									<int key="NSKeyEquivModMask">1572864</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="908899353">
-									<reference key="NSMenu" ref="110575045"/>
-									<string key="NSTitle">Show All</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="1056857174">
-									<reference key="NSMenu" ref="110575045"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="632727374">
-									<reference key="NSMenu" ref="110575045"/>
-									<string key="NSTitle">Quit __TESTING__</string>
-									<string key="NSKeyEquiv">q</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-							</array>
-							<string key="NSName">_NSAppleMenu</string>
-						</object>
-					</object>
-					<object class="NSMenuItem" id="379814623">
-						<reference key="NSMenu" ref="649796088"/>
-						<string key="NSTitle">File</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="35465992"/>
-						<reference key="NSMixedImage" ref="502551668"/>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="720053764">
-							<string key="NSTitle">File</string>
-							<array class="NSMutableArray" key="NSMenuItems">
-								<object class="NSMenuItem" id="705341025">
-									<reference key="NSMenu" ref="720053764"/>
-									<string key="NSTitle">New</string>
-									<string key="NSKeyEquiv">n</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="722745758">
-									<reference key="NSMenu" ref="720053764"/>
-									<string key="NSTitle">Open…</string>
-									<string key="NSKeyEquiv">o</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="1025936716">
-									<reference key="NSMenu" ref="720053764"/>
-									<string key="NSTitle">Open Recent</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-									<string key="NSAction">submenuAction:</string>
-									<object class="NSMenu" key="NSSubmenu" id="1065607017">
-										<string key="NSTitle">Open Recent</string>
-										<array class="NSMutableArray" key="NSMenuItems">
-											<object class="NSMenuItem" id="759406840">
-												<reference key="NSMenu" ref="1065607017"/>
-												<string key="NSTitle">Clear Menu</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-										</array>
-										<string key="NSName">_NSRecentDocumentsMenu</string>
-									</object>
-								</object>
-								<object class="NSMenuItem" id="425164168">
-									<reference key="NSMenu" ref="720053764"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="776162233">
-									<reference key="NSMenu" ref="720053764"/>
-									<string key="NSTitle">Close</string>
-									<string key="NSKeyEquiv">w</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="1023925487">
-									<reference key="NSMenu" ref="720053764"/>
-									<string key="NSTitle">Save…</string>
-									<string key="NSKeyEquiv">s</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="579971712">
-									<reference key="NSMenu" ref="720053764"/>
-									<string key="NSTitle">Revert to Saved</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="1010469920">
-									<reference key="NSMenu" ref="720053764"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="294629803">
-									<reference key="NSMenu" ref="720053764"/>
-									<string key="NSTitle">Page Setup...</string>
-									<string key="NSKeyEquiv">P</string>
-									<int key="NSKeyEquivModMask">1179648</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-									<string key="NSToolTip"/>
-								</object>
-								<object class="NSMenuItem" id="49223823">
-									<reference key="NSMenu" ref="720053764"/>
-									<string key="NSTitle">Print…</string>
-									<string key="NSKeyEquiv">p</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-							</array>
-						</object>
-					</object>
-					<object class="NSMenuItem" id="952259628">
-						<reference key="NSMenu" ref="649796088"/>
-						<string key="NSTitle">Edit</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="35465992"/>
-						<reference key="NSMixedImage" ref="502551668"/>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="789758025">
-							<string key="NSTitle">Edit</string>
-							<array class="NSMutableArray" key="NSMenuItems">
-								<object class="NSMenuItem" id="1058277027">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Undo</string>
-									<string key="NSKeyEquiv">z</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="790794224">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Redo</string>
-									<string key="NSKeyEquiv">Z</string>
-									<int key="NSKeyEquivModMask">1179648</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="1040322652">
-									<reference key="NSMenu" ref="789758025"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="296257095">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Cut</string>
-									<string key="NSKeyEquiv">x</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="860595796">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Copy</string>
-									<string key="NSKeyEquiv">c</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="29853731">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Paste</string>
-									<string key="NSKeyEquiv">v</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="82994268">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Paste and Match Style</string>
-									<string key="NSKeyEquiv">V</string>
-									<int key="NSKeyEquivModMask">1572864</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="437104165">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Delete</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="583158037">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Select All</string>
-									<string key="NSKeyEquiv">a</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="212016141">
-									<reference key="NSMenu" ref="789758025"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="892235320">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Find</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-									<string key="NSAction">submenuAction:</string>
-									<object class="NSMenu" key="NSSubmenu" id="963351320">
-										<string key="NSTitle">Find</string>
-										<array class="NSMutableArray" key="NSMenuItems">
-											<object class="NSMenuItem" id="447796847">
-												<reference key="NSMenu" ref="963351320"/>
-												<string key="NSTitle">Find…</string>
-												<string key="NSKeyEquiv">f</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<int key="NSTag">1</int>
-											</object>
-											<object class="NSMenuItem" id="738670835">
-												<reference key="NSMenu" ref="963351320"/>
-												<string key="NSTitle">Find and Replace…</string>
-												<string key="NSKeyEquiv">f</string>
-												<int key="NSKeyEquivModMask">1572864</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<int key="NSTag">12</int>
-											</object>
-											<object class="NSMenuItem" id="326711663">
-												<reference key="NSMenu" ref="963351320"/>
-												<string key="NSTitle">Find Next</string>
-												<string key="NSKeyEquiv">g</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<int key="NSTag">2</int>
-											</object>
-											<object class="NSMenuItem" id="270902937">
-												<reference key="NSMenu" ref="963351320"/>
-												<string key="NSTitle">Find Previous</string>
-												<string key="NSKeyEquiv">G</string>
-												<int key="NSKeyEquivModMask">1179648</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<int key="NSTag">3</int>
-											</object>
-											<object class="NSMenuItem" id="159080638">
-												<reference key="NSMenu" ref="963351320"/>
-												<string key="NSTitle">Use Selection for Find</string>
-												<string key="NSKeyEquiv">e</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<int key="NSTag">7</int>
-											</object>
-											<object class="NSMenuItem" id="88285865">
-												<reference key="NSMenu" ref="963351320"/>
-												<string key="NSTitle">Jump to Selection</string>
-												<string key="NSKeyEquiv">j</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-										</array>
-									</object>
-								</object>
-								<object class="NSMenuItem" id="972420730">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Spelling and Grammar</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-									<string key="NSAction">submenuAction:</string>
-									<object class="NSMenu" key="NSSubmenu" id="769623530">
-										<string key="NSTitle">Spelling and Grammar</string>
-										<array class="NSMutableArray" key="NSMenuItems">
-											<object class="NSMenuItem" id="679648819">
-												<reference key="NSMenu" ref="769623530"/>
-												<string key="NSTitle">Show Spelling and Grammar</string>
-												<string key="NSKeyEquiv">:</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="96193923">
-												<reference key="NSMenu" ref="769623530"/>
-												<string key="NSTitle">Check Document Now</string>
-												<string key="NSKeyEquiv">;</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="859480356">
-												<reference key="NSMenu" ref="769623530"/>
-												<bool key="NSIsDisabled">YES</bool>
-												<bool key="NSIsSeparator">YES</bool>
-												<string key="NSTitle"/>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="948374510">
-												<reference key="NSMenu" ref="769623530"/>
-												<string key="NSTitle">Check Spelling While Typing</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="967646866">
-												<reference key="NSMenu" ref="769623530"/>
-												<string key="NSTitle">Check Grammar With Spelling</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="795346622">
-												<reference key="NSMenu" ref="769623530"/>
-												<string key="NSTitle">Correct Spelling Automatically</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-										</array>
-									</object>
-								</object>
-								<object class="NSMenuItem" id="507821607">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Substitutions</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-									<string key="NSAction">submenuAction:</string>
-									<object class="NSMenu" key="NSSubmenu" id="698887838">
-										<string key="NSTitle">Substitutions</string>
-										<array class="NSMutableArray" key="NSMenuItems">
-											<object class="NSMenuItem" id="65139061">
-												<reference key="NSMenu" ref="698887838"/>
-												<string key="NSTitle">Show Substitutions</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="19036812">
-												<reference key="NSMenu" ref="698887838"/>
-												<bool key="NSIsDisabled">YES</bool>
-												<bool key="NSIsSeparator">YES</bool>
-												<string key="NSTitle"/>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="605118523">
-												<reference key="NSMenu" ref="698887838"/>
-												<string key="NSTitle">Smart Copy/Paste</string>
-												<string key="NSKeyEquiv">f</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<int key="NSTag">1</int>
-											</object>
-											<object class="NSMenuItem" id="197661976">
-												<reference key="NSMenu" ref="698887838"/>
-												<string key="NSTitle">Smart Quotes</string>
-												<string key="NSKeyEquiv">g</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<int key="NSTag">2</int>
-											</object>
-											<object class="NSMenuItem" id="672708820">
-												<reference key="NSMenu" ref="698887838"/>
-												<string key="NSTitle">Smart Dashes</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="708854459">
-												<reference key="NSMenu" ref="698887838"/>
-												<string key="NSTitle">Smart Links</string>
-												<string key="NSKeyEquiv">G</string>
-												<int key="NSKeyEquivModMask">1179648</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<int key="NSTag">3</int>
-											</object>
-											<object class="NSMenuItem" id="537092702">
-												<reference key="NSMenu" ref="698887838"/>
-												<string key="NSTitle">Text Replacement</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-										</array>
-									</object>
-								</object>
-								<object class="NSMenuItem" id="288088188">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Transformations</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-									<string key="NSAction">submenuAction:</string>
-									<object class="NSMenu" key="NSSubmenu" id="579392910">
-										<string key="NSTitle">Transformations</string>
-										<array class="NSMutableArray" key="NSMenuItems">
-											<object class="NSMenuItem" id="1060694897">
-												<reference key="NSMenu" ref="579392910"/>
-												<string key="NSTitle">Make Upper Case</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="879586729">
-												<reference key="NSMenu" ref="579392910"/>
-												<string key="NSTitle">Make Lower Case</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="56570060">
-												<reference key="NSMenu" ref="579392910"/>
-												<string key="NSTitle">Capitalize</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-										</array>
-									</object>
-								</object>
-								<object class="NSMenuItem" id="676164635">
-									<reference key="NSMenu" ref="789758025"/>
-									<string key="NSTitle">Speech</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-									<string key="NSAction">submenuAction:</string>
-									<object class="NSMenu" key="NSSubmenu" id="785027613">
-										<string key="NSTitle">Speech</string>
-										<array class="NSMutableArray" key="NSMenuItems">
-											<object class="NSMenuItem" id="731782645">
-												<reference key="NSMenu" ref="785027613"/>
-												<string key="NSTitle">Start Speaking</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="680220178">
-												<reference key="NSMenu" ref="785027613"/>
-												<string key="NSTitle">Stop Speaking</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-										</array>
-									</object>
-								</object>
-							</array>
-						</object>
-					</object>
-					<object class="NSMenuItem" id="302598603">
-						<reference key="NSMenu" ref="649796088"/>
-						<string key="NSTitle">Format</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="35465992"/>
-						<reference key="NSMixedImage" ref="502551668"/>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="941447902">
-							<string key="NSTitle">Format</string>
-							<array class="NSMutableArray" key="NSMenuItems">
-								<object class="NSMenuItem" id="792887677">
-									<reference key="NSMenu" ref="941447902"/>
-									<string key="NSTitle">Font</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-									<string key="NSAction">submenuAction:</string>
-									<object class="NSMenu" key="NSSubmenu" id="786677654">
-										<string key="NSTitle">Font</string>
-										<array class="NSMutableArray" key="NSMenuItems">
-											<object class="NSMenuItem" id="159677712">
-												<reference key="NSMenu" ref="786677654"/>
-												<string key="NSTitle">Show Fonts</string>
-												<string key="NSKeyEquiv">t</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="305399458">
-												<reference key="NSMenu" ref="786677654"/>
-												<string key="NSTitle">Bold</string>
-												<string key="NSKeyEquiv">b</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<int key="NSTag">2</int>
-											</object>
-											<object class="NSMenuItem" id="814362025">
-												<reference key="NSMenu" ref="786677654"/>
-												<string key="NSTitle">Italic</string>
-												<string key="NSKeyEquiv">i</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<int key="NSTag">1</int>
-											</object>
-											<object class="NSMenuItem" id="330926929">
-												<reference key="NSMenu" ref="786677654"/>
-												<string key="NSTitle">Underline</string>
-												<string key="NSKeyEquiv">u</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="533507878">
-												<reference key="NSMenu" ref="786677654"/>
-												<bool key="NSIsDisabled">YES</bool>
-												<bool key="NSIsSeparator">YES</bool>
-												<string key="NSTitle"/>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="158063935">
-												<reference key="NSMenu" ref="786677654"/>
-												<string key="NSTitle">Bigger</string>
-												<string key="NSKeyEquiv">+</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<int key="NSTag">3</int>
-											</object>
-											<object class="NSMenuItem" id="885547335">
-												<reference key="NSMenu" ref="786677654"/>
-												<string key="NSTitle">Smaller</string>
-												<string key="NSKeyEquiv">-</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<int key="NSTag">4</int>
-											</object>
-											<object class="NSMenuItem" id="901062459">
-												<reference key="NSMenu" ref="786677654"/>
-												<bool key="NSIsDisabled">YES</bool>
-												<bool key="NSIsSeparator">YES</bool>
-												<string key="NSTitle"/>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="767671776">
-												<reference key="NSMenu" ref="786677654"/>
-												<string key="NSTitle">Kern</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<string key="NSAction">submenuAction:</string>
-												<object class="NSMenu" key="NSSubmenu" id="175441468">
-													<string key="NSTitle">Kern</string>
-													<array class="NSMutableArray" key="NSMenuItems">
-														<object class="NSMenuItem" id="252969304">
-															<reference key="NSMenu" ref="175441468"/>
-															<string key="NSTitle">Use Default</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="766922938">
-															<reference key="NSMenu" ref="175441468"/>
-															<string key="NSTitle">Use None</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="677519740">
-															<reference key="NSMenu" ref="175441468"/>
-															<string key="NSTitle">Tighten</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="238351151">
-															<reference key="NSMenu" ref="175441468"/>
-															<string key="NSTitle">Loosen</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-													</array>
-												</object>
-											</object>
-											<object class="NSMenuItem" id="691570813">
-												<reference key="NSMenu" ref="786677654"/>
-												<string key="NSTitle">Ligature</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<string key="NSAction">submenuAction:</string>
-												<object class="NSMenu" key="NSSubmenu" id="1058217995">
-													<string key="NSTitle">Ligature</string>
-													<array class="NSMutableArray" key="NSMenuItems">
-														<object class="NSMenuItem" id="706297211">
-															<reference key="NSMenu" ref="1058217995"/>
-															<string key="NSTitle">Use Default</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="568384683">
-															<reference key="NSMenu" ref="1058217995"/>
-															<string key="NSTitle">Use None</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="663508465">
-															<reference key="NSMenu" ref="1058217995"/>
-															<string key="NSTitle">Use All</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-													</array>
-												</object>
-											</object>
-											<object class="NSMenuItem" id="769124883">
-												<reference key="NSMenu" ref="786677654"/>
-												<string key="NSTitle">Baseline</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<string key="NSAction">submenuAction:</string>
-												<object class="NSMenu" key="NSSubmenu" id="18263474">
-													<string key="NSTitle">Baseline</string>
-													<array class="NSMutableArray" key="NSMenuItems">
-														<object class="NSMenuItem" id="257962622">
-															<reference key="NSMenu" ref="18263474"/>
-															<string key="NSTitle">Use Default</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="644725453">
-															<reference key="NSMenu" ref="18263474"/>
-															<string key="NSTitle">Superscript</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="1037576581">
-															<reference key="NSMenu" ref="18263474"/>
-															<string key="NSTitle">Subscript</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="941806246">
-															<reference key="NSMenu" ref="18263474"/>
-															<string key="NSTitle">Raise</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="1045724900">
-															<reference key="NSMenu" ref="18263474"/>
-															<string key="NSTitle">Lower</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-													</array>
-												</object>
-											</object>
-											<object class="NSMenuItem" id="739652853">
-												<reference key="NSMenu" ref="786677654"/>
-												<bool key="NSIsDisabled">YES</bool>
-												<bool key="NSIsSeparator">YES</bool>
-												<string key="NSTitle"/>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="1012600125">
-												<reference key="NSMenu" ref="786677654"/>
-												<string key="NSTitle">Show Colors</string>
-												<string key="NSKeyEquiv">C</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="214559597">
-												<reference key="NSMenu" ref="786677654"/>
-												<bool key="NSIsDisabled">YES</bool>
-												<bool key="NSIsSeparator">YES</bool>
-												<string key="NSTitle"/>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="596732606">
-												<reference key="NSMenu" ref="786677654"/>
-												<string key="NSTitle">Copy Style</string>
-												<string key="NSKeyEquiv">c</string>
-												<int key="NSKeyEquivModMask">1572864</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="393423671">
-												<reference key="NSMenu" ref="786677654"/>
-												<string key="NSTitle">Paste Style</string>
-												<string key="NSKeyEquiv">v</string>
-												<int key="NSKeyEquivModMask">1572864</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-										</array>
-										<string key="NSName">_NSFontMenu</string>
-									</object>
-								</object>
-								<object class="NSMenuItem" id="215659978">
-									<reference key="NSMenu" ref="941447902"/>
-									<string key="NSTitle">Text</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-									<string key="NSAction">submenuAction:</string>
-									<object class="NSMenu" key="NSSubmenu" id="446991534">
-										<string key="NSTitle">Text</string>
-										<array class="NSMutableArray" key="NSMenuItems">
-											<object class="NSMenuItem" id="875092757">
-												<reference key="NSMenu" ref="446991534"/>
-												<string key="NSTitle">Align Left</string>
-												<string key="NSKeyEquiv">{</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="630155264">
-												<reference key="NSMenu" ref="446991534"/>
-												<string key="NSTitle">Center</string>
-												<string key="NSKeyEquiv">|</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="945678886">
-												<reference key="NSMenu" ref="446991534"/>
-												<string key="NSTitle">Justify</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="512868991">
-												<reference key="NSMenu" ref="446991534"/>
-												<string key="NSTitle">Align Right</string>
-												<string key="NSKeyEquiv">}</string>
-												<int key="NSKeyEquivModMask">1048576</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="163117631">
-												<reference key="NSMenu" ref="446991534"/>
-												<bool key="NSIsDisabled">YES</bool>
-												<bool key="NSIsSeparator">YES</bool>
-												<string key="NSTitle"/>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="31516759">
-												<reference key="NSMenu" ref="446991534"/>
-												<string key="NSTitle">Writing Direction</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-												<string key="NSAction">submenuAction:</string>
-												<object class="NSMenu" key="NSSubmenu" id="956096989">
-													<string key="NSTitle">Writing Direction</string>
-													<array class="NSMutableArray" key="NSMenuItems">
-														<object class="NSMenuItem" id="257099033">
-															<reference key="NSMenu" ref="956096989"/>
-															<bool key="NSIsDisabled">YES</bool>
-															<string key="NSTitle">Paragraph</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="551969625">
-															<reference key="NSMenu" ref="956096989"/>
-															<string type="base64-UTF8" key="NSTitle">CURlZmF1bHQ</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="249532473">
-															<reference key="NSMenu" ref="956096989"/>
-															<string type="base64-UTF8" key="NSTitle">CUxlZnQgdG8gUmlnaHQ</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="607364498">
-															<reference key="NSMenu" ref="956096989"/>
-															<string type="base64-UTF8" key="NSTitle">CVJpZ2h0IHRvIExlZnQ</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="508151438">
-															<reference key="NSMenu" ref="956096989"/>
-															<bool key="NSIsDisabled">YES</bool>
-															<bool key="NSIsSeparator">YES</bool>
-															<string key="NSTitle"/>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="981751889">
-															<reference key="NSMenu" ref="956096989"/>
-															<bool key="NSIsDisabled">YES</bool>
-															<string key="NSTitle">Selection</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="380031999">
-															<reference key="NSMenu" ref="956096989"/>
-															<string type="base64-UTF8" key="NSTitle">CURlZmF1bHQ</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="825984362">
-															<reference key="NSMenu" ref="956096989"/>
-															<string type="base64-UTF8" key="NSTitle">CUxlZnQgdG8gUmlnaHQ</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-														<object class="NSMenuItem" id="560145579">
-															<reference key="NSMenu" ref="956096989"/>
-															<string type="base64-UTF8" key="NSTitle">CVJpZ2h0IHRvIExlZnQ</string>
-															<string key="NSKeyEquiv"/>
-															<int key="NSMnemonicLoc">2147483647</int>
-															<reference key="NSOnImage" ref="35465992"/>
-															<reference key="NSMixedImage" ref="502551668"/>
-														</object>
-													</array>
-												</object>
-											</object>
-											<object class="NSMenuItem" id="908105787">
-												<reference key="NSMenu" ref="446991534"/>
-												<bool key="NSIsDisabled">YES</bool>
-												<bool key="NSIsSeparator">YES</bool>
-												<string key="NSTitle"/>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="644046920">
-												<reference key="NSMenu" ref="446991534"/>
-												<string key="NSTitle">Show Ruler</string>
-												<string key="NSKeyEquiv"/>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="231811626">
-												<reference key="NSMenu" ref="446991534"/>
-												<string key="NSTitle">Copy Ruler</string>
-												<string key="NSKeyEquiv">c</string>
-												<int key="NSKeyEquivModMask">1310720</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-											<object class="NSMenuItem" id="883618387">
-												<reference key="NSMenu" ref="446991534"/>
-												<string key="NSTitle">Paste Ruler</string>
-												<string key="NSKeyEquiv">v</string>
-												<int key="NSKeyEquivModMask">1310720</int>
-												<int key="NSMnemonicLoc">2147483647</int>
-												<reference key="NSOnImage" ref="35465992"/>
-												<reference key="NSMixedImage" ref="502551668"/>
-											</object>
-										</array>
-									</object>
-								</object>
-							</array>
-						</object>
-					</object>
-					<object class="NSMenuItem" id="586577488">
-						<reference key="NSMenu" ref="649796088"/>
-						<string key="NSTitle">View</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="35465992"/>
-						<reference key="NSMixedImage" ref="502551668"/>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="466310130">
-							<string key="NSTitle">View</string>
-							<array class="NSMutableArray" key="NSMenuItems">
-								<object class="NSMenuItem" id="102151532">
-									<reference key="NSMenu" ref="466310130"/>
-									<string key="NSTitle">Show Toolbar</string>
-									<string key="NSKeyEquiv">t</string>
-									<int key="NSKeyEquivModMask">1572864</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="237841660">
-									<reference key="NSMenu" ref="466310130"/>
-									<string key="NSTitle">Customize Toolbar…</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-							</array>
-						</object>
-					</object>
-					<object class="NSMenuItem" id="713487014">
-						<reference key="NSMenu" ref="649796088"/>
-						<string key="NSTitle">Window</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSKeyEquivModMask">1048576</int>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="35465992"/>
-						<reference key="NSMixedImage" ref="502551668"/>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="835318025">
-							<string key="NSTitle">Window</string>
-							<array class="NSMutableArray" key="NSMenuItems">
-								<object class="NSMenuItem" id="1011231497">
-									<reference key="NSMenu" ref="835318025"/>
-									<string key="NSTitle">Minimize</string>
-									<string key="NSKeyEquiv">m</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="575023229">
-									<reference key="NSMenu" ref="835318025"/>
-									<string key="NSTitle">Zoom</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="299356726">
-									<reference key="NSMenu" ref="835318025"/>
-									<bool key="NSIsDisabled">YES</bool>
-									<bool key="NSIsSeparator">YES</bool>
-									<string key="NSTitle"/>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-								<object class="NSMenuItem" id="625202149">
-									<reference key="NSMenu" ref="835318025"/>
-									<string key="NSTitle">Bring All to Front</string>
-									<string key="NSKeyEquiv"/>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-							</array>
-							<string key="NSName">_NSWindowsMenu</string>
-						</object>
-					</object>
-					<object class="NSMenuItem" id="448692316">
-						<reference key="NSMenu" ref="649796088"/>
-						<string key="NSTitle">Help</string>
-						<string key="NSKeyEquiv"/>
-						<int key="NSMnemonicLoc">2147483647</int>
-						<reference key="NSOnImage" ref="35465992"/>
-						<reference key="NSMixedImage" ref="502551668"/>
-						<string key="NSAction">submenuAction:</string>
-						<object class="NSMenu" key="NSSubmenu" id="992780483">
-							<string key="NSTitle">Help</string>
-							<array class="NSMutableArray" key="NSMenuItems">
-								<object class="NSMenuItem" id="105068016">
-									<reference key="NSMenu" ref="992780483"/>
-									<string key="NSTitle">__TESTING__ Help</string>
-									<string key="NSKeyEquiv">?</string>
-									<int key="NSKeyEquivModMask">1048576</int>
-									<int key="NSMnemonicLoc">2147483647</int>
-									<reference key="NSOnImage" ref="35465992"/>
-									<reference key="NSMixedImage" ref="502551668"/>
-								</object>
-							</array>
-							<string key="NSName">_NSHelpMenu</string>
-						</object>
-					</object>
-				</array>
-				<string key="NSName">_NSMainMenu</string>
-			</object>
-			<object class="NSWindowTemplate" id="972006081">
-				<int key="NSWindowStyleMask">15</int>
-				<int key="NSWindowBacking">2</int>
-				<string key="NSWindowRect">{{335, 299}, {640, 480}}</string>
-				<int key="NSWTFlags">1954021376</int>
-				<string key="NSWindowTitle">__TESTING__</string>
-				<string key="NSWindowClass">NSWindow</string>
-				<nil key="NSViewClass"/>
-				<nil key="NSUserInterfaceItemIdentifier"/>
-				<string key="NSWindowContentMinSize">{640, 480}</string>
-				<object class="NSView" key="NSWindowView" id="439893737">
-					<reference key="NSNextResponder"/>
-					<int key="NSvFlags">256</int>
-					<array class="NSMutableArray" key="NSSubviews">
-						<object class="WebView" id="286545035">
-							<reference key="NSNextResponder" ref="439893737"/>
-							<int key="NSvFlags">274</int>
-							<set class="NSMutableSet" key="NSDragTypes">
-								<string>Apple HTML pasteboard type</string>
-								<string>Apple PDF pasteboard type</string>
-								<string>Apple PICT pasteboard type</string>
-								<string>Apple URL pasteboard type</string>
-								<string>Apple Web Archive pasteboard type</string>
-								<string>NSColor pasteboard type</string>
-								<string>NSFilenamesPboardType</string>
-								<string>NSStringPboardType</string>
-								<string>NeXT RTFD pasteboard type</string>
-								<string>NeXT Rich Text Format v1.0 pasteboard type</string>
-								<string>NeXT TIFF v4.0 pasteboard type</string>
-								<string>WebURLsWithTitlesPboardType</string>
-								<string>public.png</string>
-								<string>public.url</string>
-								<string>public.url-name</string>
-							</set>
-							<string key="NSFrameSize">{640, 480}</string>
-							<reference key="NSSuperview" ref="439893737"/>
-							<reference key="NSWindow"/>
-							<reference key="NSNextKeyView"/>
-							<string key="NSHuggingPriority">{1, 1}</string>
-							<string key="NSAntiCompressionPriority">{1, 1}</string>
-							<string key="FrameName"/>
-							<string key="GroupName"/>
-							<object class="WebPreferences" key="Preferences">
-								<string key="Identifier"/>
-								<dictionary class="NSMutableDictionary" key="Values">
-									<integer value="12" key="WebKitDefaultFixedFontSize"/>
-									<integer value="12" key="WebKitDefaultFontSize"/>
-									<boolean value="NO" key="WebKitJavaEnabled"/>
-									<integer value="1" key="WebKitMinimumFontSize"/>
-									<boolean value="NO" key="WebKitPluginsEnabled"/>
-								</dictionary>
-							</object>
-							<bool key="UseBackForwardList">YES</bool>
-							<bool key="AllowsUndo">YES</bool>
-						</object>
-					</array>
-					<string key="NSFrameSize">{640, 480}</string>
-					<reference key="NSSuperview"/>
-					<reference key="NSWindow"/>
-					<reference key="NSNextKeyView" ref="286545035"/>
-					<string key="NSHuggingPriority">{1000, 1000}</string>
-					<string key="NSAntiCompressionPriority">{1, 1}</string>
-				</object>
-				<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
-				<string key="NSMinSize">{640, 502}</string>
-				<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
-				<int key="NSWindowCollectionBehavior">128</int>
-				<bool key="NSWindowIsRestorable">YES</bool>
-			</object>
-			<object class="NSCustomObject" id="976324537">
-				<string key="NSClassName">AppDelegate</string>
-			</object>
-			<object class="NSCustomObject" id="755631768">
-				<string key="NSClassName">NSFontManager</string>
-			</object>
-			<object class="NSCustomObject" id="382806442">
-				<string key="NSClassName">MainViewController</string>
-			</object>
-			<object class="NSCustomObject" id="898714931">
-				<string key="NSClassName">CDVWebViewDelegate</string>
-			</object>
-		</array>
-		<object class="IBObjectContainer" key="IBDocument.Objects">
-			<array class="NSMutableArray" key="connectionRecords">
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">terminate:</string>
-						<reference key="source" ref="1050"/>
-						<reference key="destination" ref="632727374"/>
-					</object>
-					<int key="connectionID">449</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">orderFrontStandardAboutPanel:</string>
-						<reference key="source" ref="1021"/>
-						<reference key="destination" ref="238522557"/>
-					</object>
-					<int key="connectionID">142</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBOutletConnection" key="connection">
-						<string key="label">delegate</string>
-						<reference key="source" ref="1021"/>
-						<reference key="destination" ref="976324537"/>
-					</object>
-					<int key="connectionID">745</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">performMiniaturize:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="1011231497"/>
-					</object>
-					<int key="connectionID">37</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">arrangeInFront:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="625202149"/>
-					</object>
-					<int key="connectionID">39</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">print:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="49223823"/>
-					</object>
-					<int key="connectionID">86</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">runPageLayout:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="294629803"/>
-					</object>
-					<int key="connectionID">87</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">clearRecentDocuments:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="759406840"/>
-					</object>
-					<int key="connectionID">127</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">performClose:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="776162233"/>
-					</object>
-					<int key="connectionID">193</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">toggleContinuousSpellChecking:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="948374510"/>
-					</object>
-					<int key="connectionID">222</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">undo:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="1058277027"/>
-					</object>
-					<int key="connectionID">223</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">copy:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="860595796"/>
-					</object>
-					<int key="connectionID">224</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">checkSpelling:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="96193923"/>
-					</object>
-					<int key="connectionID">225</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">paste:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="29853731"/>
-					</object>
-					<int key="connectionID">226</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">stopSpeaking:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="680220178"/>
-					</object>
-					<int key="connectionID">227</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">cut:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="296257095"/>
-					</object>
-					<int key="connectionID">228</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">showGuessPanel:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="679648819"/>
-					</object>
-					<int key="connectionID">230</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">redo:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="790794224"/>
-					</object>
-					<int key="connectionID">231</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">selectAll:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="583158037"/>
-					</object>
-					<int key="connectionID">232</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">startSpeaking:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="731782645"/>
-					</object>
-					<int key="connectionID">233</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">delete:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="437104165"/>
-					</object>
-					<int key="connectionID">235</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">performZoom:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="575023229"/>
-					</object>
-					<int key="connectionID">240</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">performFindPanelAction:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="447796847"/>
-					</object>
-					<int key="connectionID">241</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">centerSelectionInVisibleArea:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="88285865"/>
-					</object>
-					<int key="connectionID">245</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">toggleGrammarChecking:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="967646866"/>
-					</object>
-					<int key="connectionID">347</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">toggleSmartInsertDelete:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="605118523"/>
-					</object>
-					<int key="connectionID">355</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">toggleAutomaticQuoteSubstitution:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="197661976"/>
-					</object>
-					<int key="connectionID">356</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">toggleAutomaticLinkDetection:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="708854459"/>
-					</object>
-					<int key="connectionID">357</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">saveDocument:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="1023925487"/>
-					</object>
-					<int key="connectionID">362</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">revertDocumentToSaved:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="579971712"/>
-					</object>
-					<int key="connectionID">364</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">runToolbarCustomizationPalette:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="237841660"/>
-					</object>
-					<int key="connectionID">365</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">toggleToolbarShown:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="102151532"/>
-					</object>
-					<int key="connectionID">366</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">hide:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="755159360"/>
-					</object>
-					<int key="connectionID">367</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">hideOtherApplications:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="342932134"/>
-					</object>
-					<int key="connectionID">368</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">unhideAllApplications:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="908899353"/>
-					</object>
-					<int key="connectionID">370</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">newDocument:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="705341025"/>
-					</object>
-					<int key="connectionID">373</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">openDocument:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="722745758"/>
-					</object>
-					<int key="connectionID">374</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">raiseBaseline:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="941806246"/>
-					</object>
-					<int key="connectionID">426</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">lowerBaseline:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="1045724900"/>
-					</object>
-					<int key="connectionID">427</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">copyFont:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="596732606"/>
-					</object>
-					<int key="connectionID">428</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">subscript:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="1037576581"/>
-					</object>
-					<int key="connectionID">429</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">superscript:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="644725453"/>
-					</object>
-					<int key="connectionID">430</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">tightenKerning:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="677519740"/>
-					</object>
-					<int key="connectionID">431</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">underline:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="330926929"/>
-					</object>
-					<int key="connectionID">432</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">orderFrontColorPanel:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="1012600125"/>
-					</object>
-					<int key="connectionID">433</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">useAllLigatures:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="663508465"/>
-					</object>
-					<int key="connectionID">434</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">loosenKerning:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="238351151"/>
-					</object>
-					<int key="connectionID">435</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">pasteFont:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="393423671"/>
-					</object>
-					<int key="connectionID">436</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">unscript:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="257962622"/>
-					</object>
-					<int key="connectionID">437</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">useStandardKerning:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="252969304"/>
-					</object>
-					<int key="connectionID">438</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">useStandardLigatures:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="706297211"/>
-					</object>
-					<int key="connectionID">439</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">turnOffLigatures:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="568384683"/>
-					</object>
-					<int key="connectionID">440</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">turnOffKerning:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="766922938"/>
-					</object>
-					<int key="connectionID">441</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">toggleAutomaticSpellingCorrection:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="795346622"/>
-					</object>
-					<int key="connectionID">456</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">orderFrontSubstitutionsPanel:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="65139061"/>
-					</object>
-					<int key="connectionID">458</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">toggleAutomaticDashSubstitution:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="672708820"/>
-					</object>
-					<int key="connectionID">461</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">toggleAutomaticTextReplacement:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="537092702"/>
-					</object>
-					<int key="connectionID">463</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">uppercaseWord:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="1060694897"/>
-					</object>
-					<int key="connectionID">464</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">capitalizeWord:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="56570060"/>
-					</object>
-					<int key="connectionID">467</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">lowercaseWord:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="879586729"/>
-					</object>
-					<int key="connectionID">468</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">pasteAsPlainText:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="82994268"/>
-					</object>
-					<int key="connectionID">486</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">performFindPanelAction:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="326711663"/>
-					</object>
-					<int key="connectionID">487</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">performFindPanelAction:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="270902937"/>
-					</object>
-					<int key="connectionID">488</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">performFindPanelAction:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="159080638"/>
-					</object>
-					<int key="connectionID">489</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">showHelp:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="105068016"/>
-					</object>
-					<int key="connectionID">493</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">alignCenter:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="630155264"/>
-					</object>
-					<int key="connectionID">518</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">pasteRuler:</string>
-						<reference key="source" ref="1014"/>
-						<reference key="destination" ref="883618387"/>
-					</object>
-					<int key="connectionID">519</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBActionConnection" key="connection">
-						<string key="label">toggleRuler:</string>
-						<reference key="source" ref="1014"/>
-						<re

<TRUNCATED>

[03/14] Update to modern layout

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/__TESTING__-Info.plist
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/__TESTING__-Info.plist b/bin/templates/project/__TESTING__/__TESTING__-Info.plist
deleted file mode 100644
index b11653e..0000000
--- a/bin/templates/project/__TESTING__/__TESTING__-Info.plist
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>en</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string>__TESTING__.icns</string>
-	<key>CFBundleIdentifier</key>
-	<string>--ID--</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1</string>
-	<key>LSMinimumSystemVersion</key>
-	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
-	<key>NSHumanReadableCopyright</key>
-	<string>Apache License, Version 2.0</string>
-	<key>NSMainNibFile</key>
-	<string>MainViewController</string>
-	<key>NSPrincipalClass</key>
-	<string>NSApplication</string>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/__TESTING__-Prefix.pch
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/__TESTING__-Prefix.pch b/bin/templates/project/__TESTING__/__TESTING__-Prefix.pch
deleted file mode 100644
index 03d1fa2..0000000
--- a/bin/templates/project/__TESTING__/__TESTING__-Prefix.pch
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- 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.
- */
-
-#ifdef __OBJC__
-
-#import <Cocoa/Cocoa.h>
-
-
-#endif

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/config.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/config.xml b/bin/templates/project/__TESTING__/config.xml
deleted file mode 100644
index bb89a5d..0000000
--- a/bin/templates/project/__TESTING__/config.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-#
-# 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="*"/>
-
-    <!-- <content src="http://mysite.com/myapp.html" /> for external pages -->
-    <content src="index.html" />
-
-    <!-- Preferences for OSX -->
-    <preference name="EnableWebGL" value="false" />
-
-    <feature name="Device">
-      <param name="ios-package" value="CDVDevice"/>
-    </feature>
-    <feature name="NetworkStatus">
-      <param name="ios-package" value="CDVConnection"/>
-    </feature>
-</widget>

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/main.m
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/main.m b/bin/templates/project/__TESTING__/main.m
deleted file mode 100644
index 736a22e..0000000
--- a/bin/templates/project/__TESTING__/main.m
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- 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.
- */
-
-#import <Cocoa/Cocoa.h>
-
-int main(int argc, char *argv[])
-{
-	return NSApplicationMain(argc, (const char **)argv);
-}

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/www/css/index.css
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/css/index.css b/bin/templates/project/www/css/index.css
deleted file mode 100644
index 51daa79..0000000
--- a/bin/templates/project/www/css/index.css
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.
- */
-* {
-    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
-}
-
-body {
-    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
-    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
-    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
-    background-color:#E4E4E4;
-    background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-webkit-gradient(
-        linear,
-        left top,
-        left bottom,
-        color-stop(0, #A7A7A7),
-        color-stop(0.51, #E4E4E4)
-    );
-    background-attachment:fixed;
-    font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
-    font-size:12px;
-    height:100%;
-    margin:0px;
-    padding:0px;
-    text-transform:uppercase;
-    width:100%;
-}
-
-/* Portrait layout (default) */
-.app {
-    background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
-    position:absolute;             /* position in the center of the screen */
-    left:50%;
-    top:50%;
-    height:50px;                   /* text area height */
-    width:225px;                   /* text area width */
-    text-align:center;
-    padding:180px 0px 0px 0px;     /* image height is 200px (bottom 20px are overlapped with text) */
-    margin:-115px 0px 0px -112px;  /* offset vertical: half of image height and text area height */
-                                   /* offset horizontal: half of text area width */
-}
-
-/* Landscape layout (with min-width) */
-@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
-    .app {
-        background-position:left center;
-        padding:75px 0px 75px 170px;  /* padding-top + padding-bottom + text area = image height */
-        margin:-90px 0px 0px -198px;  /* offset vertical: half of image height */
-                                      /* offset horizontal: half of image width and text area width */
-    }
-}
-
-h1 {
-    font-size:24px;
-    font-weight:normal;
-    margin:0px;
-    overflow:visible;
-    padding:0px;
-    text-align:center;
-}
-
-.event {
-    border-radius:4px;
-    -webkit-border-radius:4px;
-    color:#FFFFFF;
-    font-size:12px;
-    margin:0px 30px;
-    padding:2px 0px;
-}
-
-.event.listening {
-    background-color:#333333;
-    display:block;
-}
-
-.event.received {
-    background-color:#4B946A;
-    display:none;
-}
-
-@keyframes fade {
-    from { opacity: 1.0; }
-    50% { opacity: 0.4; }
-    to { opacity: 1.0; }
-}
- 
-@-webkit-keyframes fade {
-    from { opacity: 1.0; }
-    50% { opacity: 0.4; }
-    to { opacity: 1.0; }
-}
- 
-.blink {
-    animation:fade 3000ms infinite;
-    -webkit-animation:fade 3000ms infinite;
-}

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/www/img/logo.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/img/logo.png b/bin/templates/project/www/img/logo.png
deleted file mode 100644
index 9519e7d..0000000
Binary files a/bin/templates/project/www/img/logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/www/index.html
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/index.html b/bin/templates/project/www/index.html
deleted file mode 100644
index e7a4c9e..0000000
--- a/bin/templates/project/www/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
-    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.
--->
-<html>
-    <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-        <meta name="format-detection" content="telephone=no" />
-        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
-        <link rel="stylesheet" type="text/css" href="css/index.css" />
-        <title>Hello World</title>
-    </head>
-    <body>
-        <div class="app">
-            <h1>Apache Cordova</h1>
-            <div id="deviceready" class="blink">
-                <p class="event listening">Connecting to Device</p>
-                <p class="event received">Device is Ready</p>
-            </div>
-        </div>
-        <script type="text/javascript" src="cordova.js"></script>
-        <script type="text/javascript" src="js/index.js"></script>
-        <script type="text/javascript">
-            app.initialize();
-        </script>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/www/js/index.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/js/index.js b/bin/templates/project/www/js/index.js
deleted file mode 100644
index 31d9064..0000000
--- a/bin/templates/project/www/js/index.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.
- */
-var app = {
-    // Application Constructor
-    initialize: function() {
-        this.bindEvents();
-    },
-    // Bind Event Listeners
-    //
-    // Bind any events that are required on startup. Common events are:
-    // 'load', 'deviceready', 'offline', and 'online'.
-    bindEvents: function() {
-        document.addEventListener('deviceready', this.onDeviceReady, false);
-    },
-    // deviceready Event Handler
-    //
-    // The scope of 'this' is the event. In order to call the 'receivedEvent'
-    // function, we must explicity call 'app.receivedEvent(...);'
-    onDeviceReady: function() {
-        app.receivedEvent('deviceready');
-    },
-    // Update DOM on a Received Event
-    receivedEvent: function(id) {
-        var parentElement = document.getElementById(id);
-        var listeningElement = parentElement.querySelector('.listening');
-        var receivedElement = parentElement.querySelector('.received');
-
-        listeningElement.setAttribute('style', 'display:none;');
-        receivedElement.setAttribute('style', 'display:block;');
-
-        console.log('Received Event: ' + id);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/www/spec.html
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/spec.html b/bin/templates/project/www/spec.html
deleted file mode 100644
index 71f00de..0000000
--- a/bin/templates/project/www/spec.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<!--
-    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.
--->
-<html>
-    <head>
-        <title>Jasmine Spec Runner</title>
-
-        <!-- jasmine source -->
-        <link rel="shortcut icon" type="image/png" href="spec/lib/jasmine-1.2.0/jasmine_favicon.png">
-        <link rel="stylesheet" type="text/css" href="spec/lib/jasmine-1.2.0/jasmine.css">
-        <script type="text/javascript" src="spec/lib/jasmine-1.2.0/jasmine.js"></script>
-        <script type="text/javascript" src="spec/lib/jasmine-1.2.0/jasmine-html.js"></script>
-
-        <!-- include source files here... -->
-        <script type="text/javascript" src="js/index.js"></script>
-
-        <!-- include spec files here... -->
-        <script type="text/javascript" src="spec/helper.js"></script>
-        <script type="text/javascript" src="spec/index.js"></script>
-
-        <script type="text/javascript">
-            (function() {
-                var jasmineEnv = jasmine.getEnv();
-                jasmineEnv.updateInterval = 1000;
-
-                var htmlReporter = new jasmine.HtmlReporter();
-
-                jasmineEnv.addReporter(htmlReporter);
-
-                jasmineEnv.specFilter = function(spec) {
-                    return htmlReporter.specFilter(spec);
-                };
-
-                var currentWindowOnload = window.onload;
-
-                window.onload = function() {
-                    if (currentWindowOnload) {
-                        currentWindowOnload();
-                    }
-                    execJasmine();
-                };
-
-                function execJasmine() {
-                    jasmineEnv.execute();
-                }
-            })();
-        </script>
-    </head>
-    <body>
-        <div id="stage" style="display:none;"></div>
-    </body>
-</html>

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/www/spec/helper.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/spec/helper.js b/bin/templates/project/www/spec/helper.js
deleted file mode 100644
index 929f776..0000000
--- a/bin/templates/project/www/spec/helper.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.
- */
-afterEach(function() {
-    document.getElementById('stage').innerHTML = '';
-});
-
-var helper = {
-    trigger: function(obj, name) {
-        var e = document.createEvent('Event');
-        e.initEvent(name, true, true);
-        obj.dispatchEvent(e);
-    },
-    getComputedStyle: function(querySelector, property) {
-        var element = document.querySelector(querySelector);
-        return window.getComputedStyle(element).getPropertyValue(property);
-    }
-};

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/www/spec/index.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/spec/index.js b/bin/templates/project/www/spec/index.js
deleted file mode 100644
index 20f8be5..0000000
--- a/bin/templates/project/www/spec/index.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.
- */
-describe('app', function() {
-    describe('initialize', function() {
-        it('should bind deviceready', function() {
-            runs(function() {
-                spyOn(app, 'onDeviceReady');
-                app.initialize();
-                helper.trigger(window.document, 'deviceready');
-            });
-
-            waitsFor(function() {
-                return (app.onDeviceReady.calls.length > 0);
-            }, 'onDeviceReady should be called once', 500);
-
-            runs(function() {
-                expect(app.onDeviceReady).toHaveBeenCalled();
-            });
-        });
-    });
-
-    describe('onDeviceReady', function() {
-        it('should report that it fired', function() {
-            spyOn(app, 'receivedEvent');
-            app.onDeviceReady();
-            expect(app.receivedEvent).toHaveBeenCalledWith('deviceready');
-        });
-    });
-
-    describe('receivedEvent', function() {
-        beforeEach(function() {
-            var el = document.getElementById('stage');
-            el.innerHTML = ['<div id="deviceready">',
-                            '    <p class="event listening">Listening</p>',
-                            '    <p class="event received">Received</p>',
-                            '</div>'].join('\n');
-        });
-
-        it('should hide the listening element', function() {
-            app.receivedEvent('deviceready');
-            var displayStyle = helper.getComputedStyle('#deviceready .listening', 'display');
-            expect(displayStyle).toEqual('none');
-        });
-
-        it('should show the received element', function() {
-            app.receivedEvent('deviceready');
-            var displayStyle = helper.getComputedStyle('#deviceready .received', 'display');
-            expect(displayStyle).toEqual('block');
-        });
-    });
-});

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/update_cordova_subproject
----------------------------------------------------------------------
diff --git a/bin/update_cordova_subproject b/bin/update_cordova_subproject
index 7e9c25d..138477e 100755
--- a/bin/update_cordova_subproject
+++ b/bin/update_cordova_subproject
@@ -16,9 +16,9 @@
 # specific language governing permissions and limitations
 # under the License.
 """
-Updates the subproject path of the CordovaFramework entry to point to this script's version of Cordova.
+Updates the subproject path of the CordovaLib entry to point to this script's version of Cordova.
 
-Usage: CordovaVersion/bin/update_cordova_subproject path/to/your/app.xcodeproj [path/to/CordovaFramework.xcodeproj]
+Usage: CordovaVersion/bin/update_cordova_subproject path/to/your/app.xcodeproj [path/to/CordovaLib.xcodeproj]
 """
 
 import fileinput
@@ -74,32 +74,32 @@ def main(argv):
   project_path = AbsProjectPath(argv[1])
   if len(argv) < 3:
     framework_path = AbsFrameworkPath(argv[0])
-    cordova_lib_xcode_path = os.path.join(framework_path, 'CordovaFramework', 'CordovaFramework.xcodeproj')
+    cordova_lib_xcode_path = os.path.join(framework_path, 'CordovaLib', 'CordovaLib.xcodeproj')
   else:
     cordova_lib_xcode_path = AbsProjectPath(argv[2])
 
   parent_project_path = AbsParentPath(project_path)
   subproject_path = relpath(cordova_lib_xcode_path, parent_project_path)
 
-  # /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = CordovaFramework.xcodeproj; sourceTree = "<group>"; };
+  # /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = CordovaLib.xcodeproj; sourceTree = "<group>"; };
   REGEX = re.compile(r'(.+PBXFileReference.+wrapper.pb-project.+)(path = .+?;)(.*)(sourceTree.+;)(.+)')
 
   file_handle = fileinput.input(os.path.join(project_path, 'project.pbxproj'), inplace=1)
   found = False
   for line in file_handle:
-    if 'CordovaFramework.xcodeproj' in line:
+    if 'CordovaLib.xcodeproj' in line:
       m = REGEX.match(line)
       if m:
         found = True
         line = m.expand(r'\1path = "%s";\3sourceTree = "<group>";\5\n') % subproject_path
         if 'name =' not in line:
-            line = line.replace('path = ', 'name = CordovaFramework.xcodeproj; path = ')
+            line = line.replace('path = ', 'name = CordovaLib.xcodeproj; path = ')
     print line,
   file_handle.close()
 
   if not found:
     raise Exception('Sub-project entry not found in project file.')
-  print('CordovaFramework set to path: %s' % subproject_path)
+  print('CordovaLib set to path: %s' % subproject_path)
 
 
 if __name__ == '__main__':

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/patches/cordova-cli.patch
----------------------------------------------------------------------
diff --git a/patches/cordova-cli.patch b/patches/cordova-cli.patch
new file mode 100644
index 0000000..e2377a2
--- /dev/null
+++ b/patches/cordova-cli.patch
@@ -0,0 +1,30 @@
+diff --git a/platforms.js b/platforms.js
+index 5bb82f1..a5f8e7e 100644
+--- a/platforms.js
++++ b/platforms.js
+@@ -24,6 +24,12 @@ module.exports = {
+         url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git',
+         version: '3.4.1'
+     }, 
++    'osx' : {
++        hostos : ['darwin'],
++        parser : './src/metadata/ios_parser',
++        url    : 'https://github.com/tripodsan/cordova-osx.git',
++        version: '3.4.1'
++    },
+     'android' : {
+         parser : './src/metadata/android_parser',
+         url    : 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git',
+diff --git a/src/platform.js b/src/platform.js
+index 1f21f22..cf983a1 100644
+--- a/src/platform.js
++++ b/src/platform.js
+@@ -345,7 +345,7 @@ function call_into_create(target, projectRoot, cfg, libDir, template_dir, opts)
+                 if (semver.gt(platformVersion, '3.3.0')) {
+                     args.push('--cli');
+                 }
+-            } else if (target == 'ios') {
++            } else if (target == 'ios' || target == 'osx') {
+                 var platformVersion = fs.readFileSync(path.join(libDir, 'CordovaLib', 'VERSION'), 'UTF-8').trim();
+                 args.push('--arc');
+                 if (semver.gt(platformVersion, '3.3.0')) {

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/patches/cordova-plugman.patch
----------------------------------------------------------------------
diff --git a/patches/cordova-plugman.patch b/patches/cordova-plugman.patch
new file mode 100644
index 0000000..114db5c
--- /dev/null
+++ b/patches/cordova-plugman.patch
@@ -0,0 +1,233 @@
+diff --git a/src/platforms.js b/src/platforms.js
+index a2ad634..ae5d764 100644
+--- a/src/platforms.js
++++ b/src/platforms.js
+@@ -2,6 +2,7 @@ module.exports = {
+     'android': require('./platforms/android'),
+     'amazon-fireos': require('./platforms/amazon-fireos'),
+     'ios': require('./platforms/ios'),
++    'osx': require('./platforms/osx'),
+     'blackberry10': require('./platforms/blackberry10'),
+     'wp7': require('./platforms/wp7'),
+     'wp8': require('./platforms/wp8'),
+diff --git a/src/platforms/osx.js b/src/platforms/osx.js
+new file mode 100644
+index 0000000..c19e3cb
+--- /dev/null
++++ b/src/platforms/osx.js
+@@ -0,0 +1,215 @@
++/*
++ *
++ * Copyright 2013 Anis Kadri
++ *
++ * Licensed 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.
++ *
++*/
++
++var path = require('path')
++  , fs   = require('fs')
++  , glob = require('glob')
++  , xcode = require('xcode')
++  , plist = require('plist-with-patches')
++  , shell = require('shelljs')
++  , cachedProjectFiles = {};
++
++module.exports = {
++    www_dir:function(project_dir) {
++        return path.join(project_dir, 'www');
++    },
++    package_name:function(project_dir) {
++        var plist_file = glob.sync(path.join(project_dir, '**', '*-Info.plist'))[0];
++        return plist.parseFileSync(plist_file).CFBundleIdentifier;
++    },
++    "source-file":{
++        install:function(source_el, plugin_dir, project_dir, plugin_id, project) {
++            var src = source_el.attrib['src'];
++            var srcFile = path.resolve(plugin_dir, src);
++            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(source_el));
++            var destFile = path.resolve(targetDir, path.basename(src));
++            var is_framework = source_el.attrib['framework'] && (source_el.attrib['framework'] == 'true' || source_el.attrib['framework'] == true);
++            var has_flags = source_el.attrib['compiler-flags'] && source_el.attrib['compiler-flags'].length ? true : false ;
++
++            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <source-file>');
++            if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
++            var project_ref = path.join('Plugins', path.relative(project.plugins_dir, destFile));
++
++            if (is_framework) {
++                var weak = source_el.attrib['weak'];
++                var opt = { weak: (weak == undefined || weak == null || weak != 'true' ? false : true ) };
++                var project_relative = path.join(path.basename(project.xcode_path), project_ref);
++                project.xcode.addFramework(project_relative, opt);
++                project.xcode.addToLibrarySearchPaths({path:project_ref});
++            } else {
++                project.xcode.addSourceFile(project_ref, has_flags ? {compilerFlags:source_el.attrib['compiler-flags']} : {});
++            }
++            shell.mkdir('-p', targetDir);
++            shell.cp(srcFile, destFile);
++        },
++        uninstall:function(source_el, project_dir, plugin_id, project) {
++            var src = source_el.attrib['src'];
++            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(source_el));
++            var destFile = path.resolve(targetDir, path.basename(src));
++            var is_framework = source_el.attrib['framework'] && (source_el.attrib['framework'] == 'true' || source_el.attrib['framework'] == true);
++
++            var project_ref = path.join('Plugins', path.relative(project.plugins_dir, destFile));
++            project.xcode.removeSourceFile(project_ref);
++            if (is_framework) {
++                var project_relative = path.join(path.basename(project.xcode_path), project_ref);
++                project.xcode.removeFramework(project_relative);
++                project.xcode.removeFromLibrarySearchPaths({path:project_ref});
++            }
++            shell.rm('-rf', destFile);
++
++            if(fs.existsSync(targetDir) && fs.readdirSync(targetDir).length>0){
++                shell.rm('-rf', targetDir);
++            }
++        }
++    },
++    "header-file":{
++        install:function(header_el, plugin_dir, project_dir, plugin_id, project) {
++            var src = header_el.attrib['src'];
++            var srcFile = path.resolve(plugin_dir, src);
++            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(header_el));
++            var destFile = path.resolve(targetDir, path.basename(src));
++            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <header-file>');
++            if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
++            project.xcode.addHeaderFile(path.join('Plugins', path.relative(project.plugins_dir, destFile)));
++            shell.mkdir('-p', targetDir);
++            shell.cp(srcFile, destFile);
++        },
++        uninstall:function(header_el, project_dir, plugin_id, project) {
++            var src = header_el.attrib['src'];
++            var targetDir = path.resolve(project.plugins_dir, plugin_id, getRelativeDir(header_el));
++            var destFile = path.resolve(targetDir, path.basename(src));
++            project.xcode.removeHeaderFile(path.join('Plugins', path.relative(project.plugins_dir, destFile)));
++            shell.rm('-rf', destFile);
++            if(fs.existsSync(targetDir) && fs.readdirSync(targetDir).length>0){
++                shell.rm('-rf', targetDir);
++            }
++        }
++    },
++    "resource-file":{
++        install:function(resource_el, plugin_dir, project_dir, plugin_id, project) {
++            var src = resource_el.attrib['src'],
++                srcFile = path.resolve(plugin_dir, src),
++                destFile = path.resolve(project.resources_dir, path.basename(src));
++            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <resource-file>');
++            if (fs.existsSync(destFile)) throw new Error('target destination "' + destFile + '" already exists');
++            project.xcode.addResourceFile(path.join('Resources', path.basename(src)));
++            shell.cp('-R', srcFile, project.resources_dir);
++        },
++        uninstall:function(resource_el, project_dir, plugin_id, project) {
++            var src = resource_el.attrib['src'],
++                destFile = path.resolve(project.resources_dir, path.basename(src));
++            project.xcode.removeResourceFile(path.join('Resources', path.basename(src)));
++            shell.rm('-rf', destFile);
++        }
++    },
++    "framework":{ // CB-5238 custom frameworks only
++        install:function(framework_el, plugin_dir, project_dir, plugin_id, project) {
++            var src = framework_el.attrib['src'],
++                custom = framework_el.attrib['custom'],
++                srcFile = path.resolve(plugin_dir, src),
++                targetDir = path.resolve(project.plugins_dir, plugin_id, path.basename(src));
++            if (!custom) throw new Error('cannot add non custom frameworks.');
++            if (!fs.existsSync(srcFile)) throw new Error('cannot find "' + srcFile + '" ios <framework>');
++            if (fs.existsSync(targetDir)) throw new Error('target destination "' + targetDir + '" already exists');
++            shell.mkdir('-p', path.dirname(targetDir));
++            shell.cp('-R', srcFile, path.dirname(targetDir)); // frameworks are directories
++            var project_relative = path.relative(project_dir, targetDir);
++            project.xcode.addFramework(project_relative, {customFramework: true});
++        },
++        uninstall:function(framework_el, project_dir, plugin_id, project) {
++            var src = framework_el.attrib['src'],
++                targetDir = path.resolve(project.plugins_dir, plugin_id, path.basename(src));
++            project.xcode.removeFramework(targetDir, {customFramework: true});
++            shell.rm('-rf', targetDir);
++        }
++    },
++    "lib-file": {
++        install:function(source_el, plugin_dir, project_dir, plugin_id) {
++            require('../../plugman').emit('verbose', 'lib-file.install is not supported for ios');
++        },
++        uninstall:function(source_el, project_dir, plugin_id) {
++            require('../../plugman').emit('verbose', 'lib-file.uninstall is not supported for ios');
++        }
++    },    
++    parseProjectFile:function(project_dir) {
++        // TODO: With ConfigKeeper introduced in config-changes.js
++        // there is now double caching of iOS project files.
++        // Remove the cache here when install can handle
++        // a list of plugins at once.
++        if (cachedProjectFiles[project_dir]) {
++            return cachedProjectFiles[project_dir];
++        }
++        // grab and parse pbxproj
++        // we don't want CordovaLib's xcode project
++        var project_files = glob.sync(path.join(project_dir, '*.xcodeproj', 'project.pbxproj'));
++
++        if (project_files.length === 0) {
++            throw new Error("does not appear to be an xcode project (no xcode project file)");
++        }
++        var pbxPath = project_files[0];
++        var xcodeproj = xcode.project(pbxPath);
++        xcodeproj.parseSync();
++
++        // grab and parse plist file or config.xml
++        var config_files = (glob.sync(path.join(project_dir, '**', '{PhoneGap,Cordova}.plist')).length == 0 ?
++                            glob.sync(path.join(project_dir, '**', 'config.xml')) :
++                            glob.sync(path.join(project_dir, '**', '{PhoneGap,Cordova}.plist'))
++                           );
++
++        config_files = config_files.filter(function (val) {
++            return !(/^build\//.test(val)) && !(/\/www\/config.xml$/.test(val));
++        });
++
++        if (config_files.length === 0) {
++            throw new Error("could not find PhoneGap/Cordova plist file, or config.xml file.");
++        }
++
++        var config_file = config_files[0];
++        var config_filename = path.basename(config_file);
++        var xcode_dir = path.dirname(config_file);
++        var pluginsDir = path.resolve(xcode_dir, 'Plugins');
++        var resourcesDir = path.resolve(xcode_dir, 'Resources');
++
++        cachedProjectFiles[project_dir] = {
++            plugins_dir:pluginsDir,
++            resources_dir:resourcesDir,
++            xcode:xcodeproj,
++            xcode_path:xcode_dir,
++            pbx: pbxPath,
++            write: function () {
++                fs.writeFileSync(pbxPath, xcodeproj.writeSync());
++            }
++        };
++
++        return cachedProjectFiles[project_dir];
++    },
++    purgeProjectFileCache:function(project_dir) {
++        delete cachedProjectFiles[project_dir];
++    }
++
++};
++
++function getRelativeDir(file) {
++    var targetDir = file.attrib['target-dir'];
++    if (targetDir) {
++        return targetDir;
++    } else {
++        return '';
++    }
++}

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__.xcodeproj/project.pbxproj b/templates/project/__CDV_PRODUCT_NAME__.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..b4c2dac
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__.xcodeproj/project.pbxproj
@@ -0,0 +1,443 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		707060AF18FFC05700755D46 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 707060AE18FFC05700755D46 /* MainViewController.xib */; };
+		70BD682718FFB02D00A1EFCF /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70BD682618FFB02D00A1EFCF /* Cocoa.framework */; };
+		70BD683118FFB02D00A1EFCF /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 70BD682F18FFB02D00A1EFCF /* InfoPlist.strings */; };
+		70BD683318FFB02D00A1EFCF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD683218FFB02D00A1EFCF /* main.m */; };
+		70BD683718FFB02D00A1EFCF /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 70BD683518FFB02D00A1EFCF /* Credits.rtf */; };
+		70BD683F18FFB02D00A1EFCF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 70BD683E18FFB02D00A1EFCF /* Images.xcassets */; };
+		70BD686318FFB04800A1EFCF /* libCordovaLib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 70BD686018FFB04300A1EFCF /* libCordovaLib.a */; };
+		70BD686618FFB06500A1EFCF /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70BD686418FFB06500A1EFCF /* SystemConfiguration.framework */; };
+		70BD686718FFB06500A1EFCF /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70BD686518FFB06500A1EFCF /* WebKit.framework */; };
+		70BD686D18FFB0BF00A1EFCF /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD686A18FFB0BF00A1EFCF /* AppDelegate.m */; };
+		70BD686E18FFB0BF00A1EFCF /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BD686C18FFB0BF00A1EFCF /* MainViewController.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		70BD685F18FFB04300A1EFCF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 70BD685A18FFB04300A1EFCF /* CordovaLib.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 70BD673A18FF9DAE00A1EFCF;
+			remoteInfo = CordovaLib;
+		};
+		70BD686118FFB04300A1EFCF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 70BD685A18FFB04300A1EFCF /* CordovaLib.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 70BD674D18FF9DAE00A1EFCF;
+			remoteInfo = CordovaLibTests;
+		};
+		70BD687018FFB19500A1EFCF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 70BD685A18FFB04300A1EFCF /* CordovaLib.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 70BD673918FF9DAE00A1EFCF;
+			remoteInfo = CordovaLib;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		707060AE18FFC05700755D46 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainViewController.xib; sourceTree = "<group>"; };
+		707060B018FFC0D900755D46 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = "<group>"; };
+		70BD682318FFB02D00A1EFCF /* __CDV_PRODUCT_NAME__.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = __CDV_PRODUCT_NAME__.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		70BD682618FFB02D00A1EFCF /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+		70BD682918FFB02D00A1EFCF /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+		70BD682A18FFB02D00A1EFCF /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
+		70BD682B18FFB02D00A1EFCF /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		70BD682E18FFB02D00A1EFCF /* __CDV_PRODUCT_NAME__-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "__CDV_PRODUCT_NAME__-Info.plist"; sourceTree = "<group>"; };
+		70BD683018FFB02D00A1EFCF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		70BD683218FFB02D00A1EFCF /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		70BD683418FFB02D00A1EFCF /* __CDV_PRODUCT_NAME__-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "__CDV_PRODUCT_NAME__-Prefix.pch"; sourceTree = "<group>"; };
+		70BD683618FFB02D00A1EFCF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
+		70BD683E18FFB02D00A1EFCF /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
+		70BD685A18FFB04300A1EFCF /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = ../CordovaLib/CordovaLib.xcodeproj; sourceTree = "<group>"; };
+		70BD686418FFB06500A1EFCF /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+		70BD686518FFB06500A1EFCF /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
+		70BD686918FFB0BF00A1EFCF /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+		70BD686A18FFB0BF00A1EFCF /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+		70BD686B18FFB0BF00A1EFCF /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
+		70BD686C18FFB0BF00A1EFCF /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		70BD682018FFB02D00A1EFCF /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				70BD686318FFB04800A1EFCF /* libCordovaLib.a in Frameworks */,
+				70BD686618FFB06500A1EFCF /* SystemConfiguration.framework in Frameworks */,
+				70BD686718FFB06500A1EFCF /* WebKit.framework in Frameworks */,
+				70BD682718FFB02D00A1EFCF /* Cocoa.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		70BD681A18FFB02D00A1EFCF = {
+			isa = PBXGroup;
+			children = (
+				70BD686818FFB0BF00A1EFCF /* Classes */,
+				70BD682C18FFB02D00A1EFCF /* __CDV_PRODUCT_NAME__ */,
+				70BD682518FFB02D00A1EFCF /* Frameworks */,
+				70BD682418FFB02D00A1EFCF /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		70BD682418FFB02D00A1EFCF /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				70BD682318FFB02D00A1EFCF /* __CDV_PRODUCT_NAME__.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		70BD682518FFB02D00A1EFCF /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				70BD686418FFB06500A1EFCF /* SystemConfiguration.framework */,
+				70BD686518FFB06500A1EFCF /* WebKit.framework */,
+				70BD685A18FFB04300A1EFCF /* CordovaLib.xcodeproj */,
+				70BD682618FFB02D00A1EFCF /* Cocoa.framework */,
+				70BD682818FFB02D00A1EFCF /* Other Frameworks */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		70BD682818FFB02D00A1EFCF /* Other Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				70BD682918FFB02D00A1EFCF /* AppKit.framework */,
+				70BD682A18FFB02D00A1EFCF /* CoreData.framework */,
+				70BD682B18FFB02D00A1EFCF /* Foundation.framework */,
+			);
+			name = "Other Frameworks";
+			sourceTree = "<group>";
+		};
+		70BD682C18FFB02D00A1EFCF /* __CDV_PRODUCT_NAME__ */ = {
+			isa = PBXGroup;
+			children = (
+				707060B018FFC0D900755D46 /* config.xml */,
+				707060AE18FFC05700755D46 /* MainViewController.xib */,
+				70BD683E18FFB02D00A1EFCF /* Images.xcassets */,
+				70BD682D18FFB02D00A1EFCF /* Supporting Files */,
+			);
+			path = __CDV_PRODUCT_NAME__;
+			sourceTree = "<group>";
+		};
+		70BD682D18FFB02D00A1EFCF /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				70BD682E18FFB02D00A1EFCF /* __CDV_PRODUCT_NAME__-Info.plist */,
+				70BD682F18FFB02D00A1EFCF /* InfoPlist.strings */,
+				70BD683218FFB02D00A1EFCF /* main.m */,
+				70BD683418FFB02D00A1EFCF /* __CDV_PRODUCT_NAME__-Prefix.pch */,
+				70BD683518FFB02D00A1EFCF /* Credits.rtf */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		70BD685B18FFB04300A1EFCF /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				70BD686018FFB04300A1EFCF /* libCordovaLib.a */,
+				70BD686218FFB04300A1EFCF /* CordovaLibTests.xctest */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		70BD686818FFB0BF00A1EFCF /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				70BD686918FFB0BF00A1EFCF /* AppDelegate.h */,
+				70BD686A18FFB0BF00A1EFCF /* AppDelegate.m */,
+				70BD686B18FFB0BF00A1EFCF /* MainViewController.h */,
+				70BD686C18FFB0BF00A1EFCF /* MainViewController.m */,
+			);
+			name = Classes;
+			path = __CDV_PRODUCT_NAME__/Classes;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		70BD682218FFB02D00A1EFCF /* __CDV_PRODUCT_NAME__ */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 70BD685418FFB02D00A1EFCF /* Build configuration list for PBXNativeTarget "__CDV_PRODUCT_NAME__" */;
+			buildPhases = (
+				70BD687218FFB1A300A1EFCF /* Copy www directory */,
+				70BD681F18FFB02D00A1EFCF /* Sources */,
+				70BD682018FFB02D00A1EFCF /* Frameworks */,
+				70BD682118FFB02D00A1EFCF /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				70BD687118FFB19500A1EFCF /* PBXTargetDependency */,
+			);
+			name = __CDV_PRODUCT_NAME__;
+			productName = __CDV_PRODUCT_NAME__;
+			productReference = 70BD682318FFB02D00A1EFCF /* __CDV_PRODUCT_NAME__.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		70BD681B18FFB02D00A1EFCF /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0510;
+				ORGANIZATIONNAME = __CDV_ORGANIZATION_NAME__;
+			};
+			buildConfigurationList = 70BD681E18FFB02D00A1EFCF /* Build configuration list for PBXProject "__CDV_PRODUCT_NAME__" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = 70BD681A18FFB02D00A1EFCF;
+			productRefGroup = 70BD682418FFB02D00A1EFCF /* Products */;
+			projectDirPath = "";
+			projectReferences = (
+				{
+					ProductGroup = 70BD685B18FFB04300A1EFCF /* Products */;
+					ProjectRef = 70BD685A18FFB04300A1EFCF /* CordovaLib.xcodeproj */;
+				},
+			);
+			projectRoot = "";
+			targets = (
+				70BD682218FFB02D00A1EFCF /* __CDV_PRODUCT_NAME__ */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+		70BD686018FFB04300A1EFCF /* libCordovaLib.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libCordovaLib.a;
+			remoteRef = 70BD685F18FFB04300A1EFCF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		70BD686218FFB04300A1EFCF /* CordovaLibTests.xctest */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.cfbundle;
+			path = CordovaLibTests.xctest;
+			remoteRef = 70BD686118FFB04300A1EFCF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+		70BD682118FFB02D00A1EFCF /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				70BD683118FFB02D00A1EFCF /* InfoPlist.strings in Resources */,
+				707060AF18FFC05700755D46 /* MainViewController.xib in Resources */,
+				70BD683F18FFB02D00A1EFCF /* Images.xcassets in Resources */,
+				70BD683718FFB02D00A1EFCF /* Credits.rtf in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		70BD687218FFB1A300A1EFCF /* Copy www directory */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 12;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Copy www directory";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "cordova/lib/copy-www-build-step.sh\n";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		70BD681F18FFB02D00A1EFCF /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				70BD683318FFB02D00A1EFCF /* main.m in Sources */,
+				70BD686D18FFB0BF00A1EFCF /* AppDelegate.m in Sources */,
+				70BD686E18FFB0BF00A1EFCF /* MainViewController.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		70BD687118FFB19500A1EFCF /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = CordovaLib;
+			targetProxy = 70BD687018FFB19500A1EFCF /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+		70BD682F18FFB02D00A1EFCF /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				70BD683018FFB02D00A1EFCF /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+		70BD683518FFB02D00A1EFCF /* Credits.rtf */ = {
+			isa = PBXVariantGroup;
+			children = (
+				70BD683618FFB02D00A1EFCF /* en */,
+			);
+			name = Credits.rtf;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		70BD685218FFB02D00A1EFCF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+					"\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include\"",
+				);
+				MACOSX_DEPLOYMENT_TARGET = 10.9;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = macosx;
+			};
+			name = Debug;
+		};
+		70BD685318FFB02D00A1EFCF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					"$(inherited)",
+					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
+					"\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include\"",
+				);
+				MACOSX_DEPLOYMENT_TARGET = 10.9;
+				SDKROOT = macosx;
+			};
+			name = Release;
+		};
+		70BD685518FFB02D00A1EFCF /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				COMBINE_HIDPI_IMAGES = YES;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "__CDV_PRODUCT_NAME__/__CDV_PRODUCT_NAME__-Prefix.pch";
+				INFOPLIST_FILE = "__CDV_PRODUCT_NAME__/__CDV_PRODUCT_NAME__-Info.plist";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		70BD685618FFB02D00A1EFCF /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				COMBINE_HIDPI_IMAGES = YES;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "__CDV_PRODUCT_NAME__/__CDV_PRODUCT_NAME__-Prefix.pch";
+				INFOPLIST_FILE = "__CDV_PRODUCT_NAME__/__CDV_PRODUCT_NAME__-Info.plist";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		70BD681E18FFB02D00A1EFCF /* Build configuration list for PBXProject "__CDV_PRODUCT_NAME__" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				70BD685218FFB02D00A1EFCF /* Debug */,
+				70BD685318FFB02D00A1EFCF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		70BD685418FFB02D00A1EFCF /* Build configuration list for PBXNativeTarget "__CDV_PRODUCT_NAME__" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				70BD685518FFB02D00A1EFCF /* Debug */,
+				70BD685618FFB02D00A1EFCF /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 70BD681B18FFB02D00A1EFCF /* Project object */;
+}

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/Classes/AppDelegate.h
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Classes/AppDelegate.h b/templates/project/__CDV_PRODUCT_NAME__/Classes/AppDelegate.h
new file mode 100644
index 0000000..ccbb9d2
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/Classes/AppDelegate.h
@@ -0,0 +1,32 @@
+/*
+ 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.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import <Cordova/CDVViewController.h>
+
+@interface AppDelegate : NSObject <NSApplicationDelegate> {
+
+	IBOutlet NSWindow* window;
+}
+
+@property (nonatomic, strong) IBOutlet NSWindow* window;
+@property (nonatomic, strong) IBOutlet CDVViewController* viewController;
+
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/Classes/AppDelegate.m
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Classes/AppDelegate.m b/templates/project/__CDV_PRODUCT_NAME__/Classes/AppDelegate.m
new file mode 100644
index 0000000..9a463e0
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/Classes/AppDelegate.m
@@ -0,0 +1,47 @@
+/*
+ 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.
+ */
+
+#import "AppDelegate.h"
+#import "MainViewController.h"
+
+@implementation AppDelegate
+
+
+@synthesize window;
+
+- (id)init
+{
+    self = [super init];
+    return self;
+}
+
+- (void) applicationDidStartLaunching:(NSNotification*) aNotification 
+{
+}
+
+- (void) applicationWillFinishLaunching:(NSNotification*)aNotification
+{
+}
+
+- (void) applicationDidFinishLaunching:(NSNotification*)aNotification 
+{
+
+}
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/Classes/MainViewController.h
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Classes/MainViewController.h b/templates/project/__CDV_PRODUCT_NAME__/Classes/MainViewController.h
new file mode 100644
index 0000000..4d02eeb
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/Classes/MainViewController.h
@@ -0,0 +1,32 @@
+/*
+ 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.
+ */
+
+#import <Cordova/CDVViewController.h>
+#import <Cordova/CDVCommandDelegateImpl.h>
+#import <Cordova/CDVCommandQueue.h>
+
+@interface MainViewController : CDVViewController
+
+@end
+
+@interface MainCommandDelegate : CDVCommandDelegateImpl
+@end
+
+@interface MainCommandQueue : CDVCommandQueue
+@end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/Classes/MainViewController.m
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Classes/MainViewController.m b/templates/project/__CDV_PRODUCT_NAME__/Classes/MainViewController.m
new file mode 100644
index 0000000..be7c5d6
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/Classes/MainViewController.m
@@ -0,0 +1,125 @@
+/*
+ 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.
+ */
+
+#import "MainViewController.h"
+
+@interface MainViewController ()
+
+@end
+
+@implementation MainViewController
+
+- (id)initWithWindow:(NSWindow *)window
+{
+    self = [super initWithWindow:window];
+    if (self) {
+        // Initialization code here.
+    }
+    
+    return self;
+}
+
+- (id)initWithWindowNibName:(NSString*)nibNameOrNil
+{
+    self = [super initWithWindowNibName:nibNameOrNil];
+    if (self) {
+        // Uncomment to override the CDVCommandDelegateImpl used
+        // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self];
+        // Uncomment to override the CDVCommandQueue used
+        // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self];
+    }
+    return self;
+}
+
+
+- (id)init
+{
+    self = [super init];
+    if (self) {
+        // Uncomment to override the CDVCommandDelegateImpl used
+        // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self];
+        // Uncomment to override the CDVCommandQueue used
+        // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self];
+    }
+    return self;
+}
+
+
+- (void)awakeFromNib
+{
+    [super awakeFromNib];
+    
+    // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
+
+    // enable HTML5 webStorage
+    WebPreferences* prefs = [self.webView preferences];
+    if ([prefs respondsToSelector:@selector(_setLocalStorageDatabasePath:)]) {
+        NSString* webStoragePath = @"~/Library/Application Support/__CDV_PRODUCT_NAME__";
+        [prefs performSelector:@selector(_setLocalStorageDatabasePath:) withObject:webStoragePath];
+        NSLog(@"WebStoragePath is '%@', modify in MainViewController.m.", webStoragePath);
+    }
+    if ([prefs respondsToSelector:@selector(setLocalStorageEnabled:)]) {
+        [prefs performSelector:@selector(setLocalStorageEnabled:) withObject:[NSNumber numberWithBool:YES]];
+    }
+}
+
+@end
+
+@implementation MainCommandDelegate
+
+/* To override the methods, uncomment the line in the init function(s)
+ in MainViewController.m
+ */
+
+#pragma mark CDVCommandDelegate implementation
+
+- (id)getCommandInstance:(NSString*)className
+{
+    return [super getCommandInstance:className];
+}
+
+/*
+ NOTE: this will only inspect execute calls coming explicitly from native plugins,
+ not the commandQueue (from JavaScript). To see execute calls from JavaScript, see
+ MainCommandQueue below
+ */
+- (BOOL)execute:(CDVInvokedUrlCommand*)command
+{
+    return [super execute:command];
+}
+
+- (NSString*)pathForResource:(NSString*)resourcepath;
+{
+    return [super pathForResource:resourcepath];
+}
+
+@end
+
+@implementation MainCommandQueue
+
+/* To override, uncomment the line in the init function(s)
+ in MainViewController.m
+ */
+- (BOOL)execute:(CDVInvokedUrlCommand*)command
+{
+    return [super execute:command];
+}
+
+@end
+

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/Contents.json
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/Contents.json b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..b0a0761
--- /dev/null
+++ b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,60 @@
+{
+  "images" : [
+    {
+      "idiom" : "mac",
+      "size" : "16x16",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "16x16",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "32x32",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "32x32",
+      "scale" : "2x"
+    },
+    {
+      "size" : "128x128",
+      "idiom" : "mac",
+      "filename" : "cordova_bot_128x128.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "128x128",
+      "idiom" : "mac",
+      "filename" : "cordova_bot_256x256.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "256x256",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "256x256",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "512x512",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "512x512",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_128x128.png
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_128x128.png b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_128x128.png
new file mode 100644
index 0000000..8a006a5
Binary files /dev/null and b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_128x128.png differ

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_256x256.png
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_256x256.png b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_256x256.png
new file mode 100644
index 0000000..ed19d0a
Binary files /dev/null and b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_256x256.png differ


[05/14] Update to modern layout

Posted by sh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__.xcodeproj/project.pbxproj b/bin/templates/project/__TESTING__.xcodeproj/project.pbxproj
deleted file mode 100644
index 60fff7e..0000000
--- a/bin/templates/project/__TESTING__.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,444 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		48B43519152E5E3500906A36 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48B43518152E5E3500906A36 /* Cocoa.framework */; };
-		48B43525152E5E3500906A36 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 48B43524152E5E3500906A36 /* main.m */; };
-		48B43536152E5E4100906A36 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48B43535152E5E4100906A36 /* WebKit.framework */; };
-		48B43538152E5E6B00906A36 /* www in Resources */ = {isa = PBXBuildFile; fileRef = 48B43537152E5E6B00906A36 /* www */; };
-		7E4C0B0916EAA4EB00542982 /* Cordova.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E4C0B0416EAA3CF00542982 /* Cordova.framework */; };
-		7E4C0B0D16EAA6A700542982 /* Cordova.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7E4C0B0416EAA3CF00542982 /* Cordova.framework */; };
-		7E545ABE17175CEF006EEBC6 /* README in Resources */ = {isa = PBXBuildFile; fileRef = 7E545ABD17175CEF006EEBC6 /* README */; };
-		7E608F2B16E7D9B00018F512 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 7E608F2A16E7D9B00018F512 /* config.xml */; };
-		7E608F3C16E7EE8D0018F512 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E608F3416E7EE8D0018F512 /* AppDelegate.m */; };
-		7E608F4816E7EE970018F512 /* __TESTING__.icns in Resources */ = {isa = PBXBuildFile; fileRef = 7E608F4116E7EE970018F512 /* __TESTING__.icns */; };
-		7E608F4916E7EE970018F512 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 7E608F4216E7EE970018F512 /* Credits.rtf */; };
-		7E608F4A16E7EE970018F512 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7E608F4416E7EE970018F512 /* InfoPlist.strings */; };
-		7E608F4B16E7EE970018F512 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7E608F4616E7EE970018F512 /* MainViewController.xib */; };
-		7E608F8216E7F0880018F512 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E608F8116E7F0880018F512 /* MainViewController.m */; };
-		7E79276A16E7C900002E20B9 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E79276916E7C8FF002E20B9 /* SystemConfiguration.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
-		7E4C0B0316EAA3CF00542982 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 7E4C0AFE16EAA3CF00542982 /* CordovaFramework.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 7E4C0A7016EAA1C600542982;
-			remoteInfo = Cordova;
-		};
-		7E4C0B0516EAA3CF00542982 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 7E4C0AFE16EAA3CF00542982 /* CordovaFramework.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 7E4C0A8816EAA1C600542982;
-			remoteInfo = CordovaFrameworkTests;
-		};
-		7E4C0B0716EAA4C500542982 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 7E4C0AFE16EAA3CF00542982 /* CordovaFramework.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 7E4C0A6F16EAA1C600542982;
-			remoteInfo = Cordova;
-		};
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		7E4C0B0B16EAA68E00542982 /* CopyFiles */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				7E4C0B0D16EAA6A700542982 /* Cordova.framework in CopyFiles */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		48B43514152E5E3500906A36 /* __TESTING__.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = __TESTING__.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		48B43518152E5E3500906A36 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
-		48B4351B152E5E3500906A36 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
-		48B4351C152E5E3500906A36 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
-		48B4351D152E5E3500906A36 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		48B43524152E5E3500906A36 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = main.m; path = __TESTING__/main.m; sourceTree = "<group>"; };
-		48B43526152E5E3500906A36 /* __TESTING__-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "__TESTING__-Prefix.pch"; path = "__TESTING__/__TESTING__-Prefix.pch"; sourceTree = "<group>"; };
-		48B43535152E5E4100906A36 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
-		48B43537152E5E6B00906A36 /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
-		7E4C0AFE16EAA3CF00542982 /* CordovaFramework.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaFramework.xcodeproj; path = ../CordovaFramework/CordovaFramework.xcodeproj; sourceTree = "<group>"; };
-		7E545ABD17175CEF006EEBC6 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
-		7E608F2A16E7D9B00018F512 /* config.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = config.xml; path = __TESTING__/config.xml; sourceTree = "<group>"; };
-		7E608F3316E7EE8D0018F512 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
-		7E608F3416E7EE8D0018F512 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
-		7E608F4116E7EE970018F512 /* __TESTING__.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = __TESTING__.icns; sourceTree = "<group>"; };
-		7E608F4316E7EE970018F512 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
-		7E608F4516E7EE970018F512 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		7E608F4716E7EE970018F512 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainViewController.xib; sourceTree = "<group>"; };
-		7E608F8016E7F0880018F512 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
-		7E608F8116E7F0880018F512 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; };
-		7E608F8316E7F6940018F512 /* __TESTING__-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "__TESTING__-Info.plist"; path = "__TESTING__/__TESTING__-Info.plist"; sourceTree = SOURCE_ROOT; };
-		7E79276916E7C8FF002E20B9 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		48B43511152E5E3500906A36 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				7E4C0B0916EAA4EB00542982 /* Cordova.framework in Frameworks */,
-				7E79276A16E7C900002E20B9 /* SystemConfiguration.framework in Frameworks */,
-				48B43536152E5E4100906A36 /* WebKit.framework in Frameworks */,
-				48B43519152E5E3500906A36 /* Cocoa.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		48B43509152E5E3500906A36 = {
-			isa = PBXGroup;
-			children = (
-				7E608F2A16E7D9B00018F512 /* config.xml */,
-				48B43537152E5E6B00906A36 /* www */,
-				7E4C0AFE16EAA3CF00542982 /* CordovaFramework.xcodeproj */,
-				7E608F4016E7EE970018F512 /* Resources */,
-				7E608F3216E7EE8D0018F512 /* Classes */,
-				7E545ABC17175CEF006EEBC6 /* Plugins */,
-				7E608F2E16E7EC900018F512 /* Other Sources */,
-				48B43517152E5E3500906A36 /* Frameworks */,
-				48B43515152E5E3500906A36 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		48B43515152E5E3500906A36 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				48B43514152E5E3500906A36 /* __TESTING__.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		48B43517152E5E3500906A36 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				48B4351B152E5E3500906A36 /* AppKit.framework */,
-				48B4351C152E5E3500906A36 /* CoreData.framework */,
-				48B4351D152E5E3500906A36 /* Foundation.framework */,
-				7E79276916E7C8FF002E20B9 /* SystemConfiguration.framework */,
-				48B43535152E5E4100906A36 /* WebKit.framework */,
-				48B43518152E5E3500906A36 /* Cocoa.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		7E4C0AFF16EAA3CF00542982 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				7E4C0B0416EAA3CF00542982 /* Cordova.framework */,
-				7E4C0B0616EAA3CF00542982 /* CordovaFrameworkTests.octest */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		7E545ABC17175CEF006EEBC6 /* Plugins */ = {
-			isa = PBXGroup;
-			children = (
-				7E545ABD17175CEF006EEBC6 /* README */,
-			);
-			name = Plugins;
-			path = __TESTING__/Plugins;
-			sourceTree = "<group>";
-		};
-		7E608F2E16E7EC900018F512 /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				48B43524152E5E3500906A36 /* main.m */,
-				48B43526152E5E3500906A36 /* __TESTING__-Prefix.pch */,
-			);
-			name = "Other Sources";
-			sourceTree = "<group>";
-		};
-		7E608F3216E7EE8D0018F512 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				7E608F4616E7EE970018F512 /* MainViewController.xib */,
-				7E608F3316E7EE8D0018F512 /* AppDelegate.h */,
-				7E608F3416E7EE8D0018F512 /* AppDelegate.m */,
-				7E608F8016E7F0880018F512 /* MainViewController.h */,
-				7E608F8116E7F0880018F512 /* MainViewController.m */,
-			);
-			name = Classes;
-			path = __TESTING__/Classes;
-			sourceTree = "<group>";
-		};
-		7E608F4016E7EE970018F512 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				7E608F8316E7F6940018F512 /* __TESTING__-Info.plist */,
-				7E608F4116E7EE970018F512 /* __TESTING__.icns */,
-				7E608F4216E7EE970018F512 /* Credits.rtf */,
-				7E608F4416E7EE970018F512 /* InfoPlist.strings */,
-			);
-			name = Resources;
-			path = "__TESTING__/Resources";
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		48B43513152E5E3500906A36 /* __TESTING__ */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 48B43532152E5E3600906A36 /* Build configuration list for PBXNativeTarget "__TESTING__" */;
-			buildPhases = (
-				48B43510152E5E3500906A36 /* Sources */,
-				48B43511152E5E3500906A36 /* Frameworks */,
-				48B43512152E5E3500906A36 /* Resources */,
-				7E4C0B0B16EAA68E00542982 /* CopyFiles */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				7E4C0B0816EAA4C500542982 /* PBXTargetDependency */,
-			);
-			name = __TESTING__;
-			productName = __TESTING__;
-			productReference = 48B43514152E5E3500906A36 /* __TESTING__.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		48B4350B152E5E3500906A36 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				CLASSPREFIX = CDV;
-				LastUpgradeCheck = 0460;
-				ORGANIZATIONNAME = OpenOSX.org;
-			};
-			buildConfigurationList = 48B4350E152E5E3500906A36 /* Build configuration list for PBXProject "__TESTING__" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-			);
-			mainGroup = 48B43509152E5E3500906A36;
-			productRefGroup = 48B43515152E5E3500906A36 /* Products */;
-			projectDirPath = "";
-			projectReferences = (
-				{
-					ProductGroup = 7E4C0AFF16EAA3CF00542982 /* Products */;
-					ProjectRef = 7E4C0AFE16EAA3CF00542982 /* CordovaFramework.xcodeproj */;
-				},
-			);
-			projectRoot = "";
-			targets = (
-				48B43513152E5E3500906A36 /* __TESTING__ */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXReferenceProxy section */
-		7E4C0B0416EAA3CF00542982 /* Cordova.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = Cordova.framework;
-			remoteRef = 7E4C0B0316EAA3CF00542982 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		7E4C0B0616EAA3CF00542982 /* CordovaFrameworkTests.octest */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.cfbundle;
-			path = CordovaFrameworkTests.octest;
-			remoteRef = 7E4C0B0516EAA3CF00542982 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-/* End PBXReferenceProxy section */
-
-/* Begin PBXResourcesBuildPhase section */
-		48B43512152E5E3500906A36 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				48B43538152E5E6B00906A36 /* www in Resources */,
-				7E608F2B16E7D9B00018F512 /* config.xml in Resources */,
-				7E608F4816E7EE970018F512 /* __TESTING__.icns in Resources */,
-				7E608F4916E7EE970018F512 /* Credits.rtf in Resources */,
-				7E608F4A16E7EE970018F512 /* InfoPlist.strings in Resources */,
-				7E608F4B16E7EE970018F512 /* MainViewController.xib in Resources */,
-				7E545ABE17175CEF006EEBC6 /* README in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		48B43510152E5E3500906A36 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				48B43525152E5E3500906A36 /* main.m in Sources */,
-				7E608F3C16E7EE8D0018F512 /* AppDelegate.m in Sources */,
-				7E608F8216E7F0880018F512 /* MainViewController.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
-		7E4C0B0816EAA4C500542982 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = Cordova;
-			targetProxy = 7E4C0B0716EAA4C500542982 /* PBXContainerItemProxy */;
-		};
-/* End PBXTargetDependency section */
-
-/* Begin PBXVariantGroup section */
-		7E608F4216E7EE970018F512 /* Credits.rtf */ = {
-			isa = PBXVariantGroup;
-			children = (
-				7E608F4316E7EE970018F512 /* en */,
-			);
-			name = Credits.rtf;
-			sourceTree = "<group>";
-		};
-		7E608F4416E7EE970018F512 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				7E608F4516E7EE970018F512 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		7E608F4616E7EE970018F512 /* MainViewController.xib */ = {
-			isa = PBXVariantGroup;
-			children = (
-				7E608F4716E7EE970018F512 /* en */,
-			);
-			name = MainViewController.xib;
-			path = ../Resources;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		48B43530152E5E3600906A36 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				INSTALL_PATH = "";
-				LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
-				MACOSX_DEPLOYMENT_TARGET = 10.7;
-				ONLY_ACTIVE_ARCH = YES;
-				SDKROOT = "";
-			};
-			name = Debug;
-		};
-		48B43531152E5E3600906A36 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				INSTALL_PATH = "";
-				LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
-				MACOSX_DEPLOYMENT_TARGET = 10.7;
-				SDKROOT = "";
-			};
-			name = Release;
-		};
-		48B43533152E5E3600906A36 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_ENABLE_OBJC_ARC = YES;
-				COMBINE_HIDPI_IMAGES = YES;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "__TESTING__/__TESTING__-Prefix.pch";
-				INFOPLIST_FILE = "__TESTING__/__TESTING__-Info.plist";
-				INSTALL_PATH = "";
-				LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = "";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		48B43534152E5E3600906A36 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_ENABLE_OBJC_ARC = YES;
-				COMBINE_HIDPI_IMAGES = YES;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "__TESTING__/__TESTING__-Prefix.pch";
-				INFOPLIST_FILE = "__TESTING__/__TESTING__-Info.plist";
-				INSTALL_PATH = "";
-				LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = "";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		48B4350E152E5E3500906A36 /* Build configuration list for PBXProject "__TESTING__" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				48B43530152E5E3600906A36 /* Debug */,
-				48B43531152E5E3600906A36 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		48B43532152E5E3600906A36 /* Build configuration list for PBXNativeTarget "__TESTING__" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				48B43533152E5E3600906A36 /* Debug */,
-				48B43534152E5E3600906A36 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 48B4350B152E5E3500906A36 /* Project object */;
-}

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/Classes/AppDelegate.h
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Classes/AppDelegate.h b/bin/templates/project/__TESTING__/Classes/AppDelegate.h
deleted file mode 100644
index ccbb9d2..0000000
--- a/bin/templates/project/__TESTING__/Classes/AppDelegate.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- 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.
- */
-
-#import <Cocoa/Cocoa.h>
-#import <Cordova/CDVViewController.h>
-
-@interface AppDelegate : NSObject <NSApplicationDelegate> {
-
-	IBOutlet NSWindow* window;
-}
-
-@property (nonatomic, strong) IBOutlet NSWindow* window;
-@property (nonatomic, strong) IBOutlet CDVViewController* viewController;
-
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/Classes/AppDelegate.m
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Classes/AppDelegate.m b/bin/templates/project/__TESTING__/Classes/AppDelegate.m
deleted file mode 100644
index 9a463e0..0000000
--- a/bin/templates/project/__TESTING__/Classes/AppDelegate.m
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- 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.
- */
-
-#import "AppDelegate.h"
-#import "MainViewController.h"
-
-@implementation AppDelegate
-
-
-@synthesize window;
-
-- (id)init
-{
-    self = [super init];
-    return self;
-}
-
-- (void) applicationDidStartLaunching:(NSNotification*) aNotification 
-{
-}
-
-- (void) applicationWillFinishLaunching:(NSNotification*)aNotification
-{
-}
-
-- (void) applicationDidFinishLaunching:(NSNotification*)aNotification 
-{
-
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/Classes/MainViewController.h
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Classes/MainViewController.h b/bin/templates/project/__TESTING__/Classes/MainViewController.h
deleted file mode 100644
index 4d02eeb..0000000
--- a/bin/templates/project/__TESTING__/Classes/MainViewController.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- 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.
- */
-
-#import <Cordova/CDVViewController.h>
-#import <Cordova/CDVCommandDelegateImpl.h>
-#import <Cordova/CDVCommandQueue.h>
-
-@interface MainViewController : CDVViewController
-
-@end
-
-@interface MainCommandDelegate : CDVCommandDelegateImpl
-@end
-
-@interface MainCommandQueue : CDVCommandQueue
-@end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/Classes/MainViewController.m
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Classes/MainViewController.m b/bin/templates/project/__TESTING__/Classes/MainViewController.m
deleted file mode 100644
index 366291d..0000000
--- a/bin/templates/project/__TESTING__/Classes/MainViewController.m
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- 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.
- */
-
-#import "MainViewController.h"
-
-@interface MainViewController ()
-
-@end
-
-@implementation MainViewController
-
-- (id)initWithWindow:(NSWindow *)window
-{
-    self = [super initWithWindow:window];
-    if (self) {
-        // Initialization code here.
-    }
-    
-    return self;
-}
-
-- (id)initWithWindowNibName:(NSString*)nibNameOrNil
-{
-    self = [super initWithWindowNibName:nibNameOrNil];
-    if (self) {
-        // Uncomment to override the CDVCommandDelegateImpl used
-        // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self];
-        // Uncomment to override the CDVCommandQueue used
-        // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self];
-    }
-    return self;
-}
-
-
-- (id)init
-{
-    self = [super init];
-    if (self) {
-        // Uncomment to override the CDVCommandDelegateImpl used
-        // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self];
-        // Uncomment to override the CDVCommandQueue used
-        // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self];
-    }
-    return self;
-}
-
-
-- (void)awakeFromNib
-{
-    [super awakeFromNib];
-    
-    // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-
-    // enable HTML5 webStorage
-    WebPreferences* prefs = [self.webView preferences];
-    if ([prefs respondsToSelector:@selector(_setLocalStorageDatabasePath:)]) {
-        NSString* webStoragePath = @"~/Library/Application Support/__TESTING__";
-        [prefs performSelector:@selector(_setLocalStorageDatabasePath:) withObject:webStoragePath];
-        NSLog(@"WebStoragePath is '%@', modify in MainViewController.m.", webStoragePath);
-    }
-    if ([prefs respondsToSelector:@selector(setLocalStorageEnabled:)]) {
-        [prefs performSelector:@selector(setLocalStorageEnabled:) withObject:[NSNumber numberWithBool:YES]];
-    }
-}
-
-@end
-
-@implementation MainCommandDelegate
-
-/* To override the methods, uncomment the line in the init function(s)
- in MainViewController.m
- */
-
-#pragma mark CDVCommandDelegate implementation
-
-- (id)getCommandInstance:(NSString*)className
-{
-    return [super getCommandInstance:className];
-}
-
-/*
- NOTE: this will only inspect execute calls coming explicitly from native plugins,
- not the commandQueue (from JavaScript). To see execute calls from JavaScript, see
- MainCommandQueue below
- */
-- (BOOL)execute:(CDVInvokedUrlCommand*)command
-{
-    return [super execute:command];
-}
-
-- (NSString*)pathForResource:(NSString*)resourcepath;
-{
-    return [super pathForResource:resourcepath];
-}
-
-@end
-
-@implementation MainCommandQueue
-
-/* To override, uncomment the line in the init function(s)
- in MainViewController.m
- */
-- (BOOL)execute:(CDVInvokedUrlCommand*)command
-{
-    return [super execute:command];
-}
-
-@end
-

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/Plugins/README
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Plugins/README b/bin/templates/project/__TESTING__/Plugins/README
deleted file mode 100644
index f6e19d7..0000000
--- a/bin/templates/project/__TESTING__/Plugins/README
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# 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.
-#
-
-Put the .h and .m files of your plugin here. The .js files of your plugin belong in the www folder.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/Resources/__TESTING__.icns
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Resources/__TESTING__.icns b/bin/templates/project/__TESTING__/Resources/__TESTING__.icns
deleted file mode 100644
index 20fc3d3..0000000
Binary files a/bin/templates/project/__TESTING__/Resources/__TESTING__.icns and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/Resources/en.lproj/Credits.rtf
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Resources/en.lproj/Credits.rtf b/bin/templates/project/__TESTING__/Resources/en.lproj/Credits.rtf
deleted file mode 100644
index 816c9db..0000000
--- a/bin/templates/project/__TESTING__/Resources/en.lproj/Credits.rtf
+++ /dev/null
@@ -1,18 +0,0 @@
-{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf320
-{\fonttbl\f0\fnil\fcharset0 HelveticaNeue;\f1\fnil\fcharset0 HelveticaNeue-Light;}
-{\colortbl;\red255\green255\blue255;}
-\vieww9600\viewh8400\viewkind0
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
-{\field{\*\fldinst{HYPERLINK "http://www.apache.org/"}}{\fldrslt 
-\f0\fs36 \cf0 Apache Software Foundation\
-}}\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
-
-\f1\fs36 \cf0 \
-
-\fs28 The {\field{\*\fldinst{HYPERLINK "http://phonegap.com/about"}}{\fldrslt PhoneGap}} code was contributed to the Apache Software Foundation (ASF) under the name Apache Callback in October 2011. It is currently under incubation until it can become a full Apache project. Through the ASF, future {\field{\*\fldinst{HYPERLINK "http://phonegap.com/about"}}{\fldrslt PhoneGap}} development will ensure open stewardship of the project. It will always remain free and open source under the Apache License, Version 2.0.
-\fs32 \
-\
-\pard\tx560\pardeftab560\pardirnatural
-
-\fs28 \cf0 \CocoaLigature0 Licensed to the {\field{\*\fldinst{HYPERLINK "http://www.apache.org/"}}{\fldrslt 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 {\field{\*\fldinst{HYPERLINK "http://www.apache.org/licenses/LICENSE-2.0"}}{\fldrslt 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.\
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/bin/templates/project/__TESTING__/Resources/en.lproj/InfoPlist.strings
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/Resources/en.lproj/InfoPlist.strings b/bin/templates/project/__TESTING__/Resources/en.lproj/InfoPlist.strings
deleted file mode 100644
index d277f9d..0000000
--- a/bin/templates/project/__TESTING__/Resources/en.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- 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.
- */
-
-
-
-/* Localized versions of Info.plist keys */
-


[11/14] mac commit: Update to modern layout

Posted by sh...@apache.org.
Update to modern layout

Signed-off-by: Shazron Abdullah <sh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cordova-osx/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-osx/commit/18ecff57
Tree: http://git-wip-us.apache.org/repos/asf/cordova-osx/tree/18ecff57
Diff: http://git-wip-us.apache.org/repos/asf/cordova-osx/diff/18ecff57

Branch: refs/heads/master
Commit: 18ecff578beb363fce9dc4fc33d61b4942a842d0
Parents: 339bbeb
Author: Tobias Bocanegra <tr...@adobe.com>
Authored: Thu Apr 17 16:43:07 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Apr 22 14:44:24 2014 -0700

----------------------------------------------------------------------
 .../CordovaFramework.xcodeproj/project.pbxproj  |  671 ----
 .../CordovaFramework/Classes/CDVBridge.h        |   42 -
 .../CordovaFramework/Classes/CDVBridge.m        |  206 -
 .../Classes/CDVViewController.h                 |   58 -
 .../Classes/CDVViewController.m                 |  218 --
 .../Classes/CDVWebViewDelegate.h                |   40 -
 .../Classes/CDVWebViewDelegate.m                |  151 -
 .../CordovaFramework/Classes/Commands/CDV.h     |   29 -
 .../Classes/Commands/CDVAvailability.h          |   59 -
 .../Classes/Commands/CDVCommandDelegate.h       |   55 -
 .../Classes/Commands/CDVCommandDelegateImpl.h   |   35 -
 .../Classes/Commands/CDVCommandDelegateImpl.m   |  156 -
 .../Classes/Commands/CDVCommandQueue.h          |   40 -
 .../Classes/Commands/CDVCommandQueue.m          |  167 -
 .../Classes/Commands/CDVConfigParser.h          |   31 -
 .../Classes/Commands/CDVConfigParser.m          |  106 -
 .../Classes/Commands/CDVConnection.h            |   34 -
 .../Classes/Commands/CDVConnection.m            |  125 -
 .../Classes/Commands/CDVConsole.h               |   29 -
 .../Classes/Commands/CDVConsole.m               |   75 -
 .../Classes/Commands/CDVDebug.h                 |   25 -
 .../Classes/Commands/CDVDevice.h                |   29 -
 .../Classes/Commands/CDVDevice.m                |  102 -
 .../Classes/Commands/CDVInvokedUrlCommand.h     |   52 -
 .../Classes/Commands/CDVInvokedUrlCommand.m     |  140 -
 .../CordovaFramework/Classes/Commands/CDVJSON.h |   30 -
 .../CordovaFramework/Classes/Commands/CDVJSON.m |   77 -
 .../Classes/Commands/CDVPlugin.h                |   59 -
 .../Classes/Commands/CDVPlugin.m                |  129 -
 .../Classes/Commands/CDVPluginResult.h          |   65 -
 .../Classes/Commands/CDVPluginResult.m          |  224 --
 .../Classes/Commands/CDVReachability.h          |   85 -
 .../Classes/Commands/CDVReachability.m          |  261 --
 .../Classes/Utils/NSData+Base64.h               |   33 -
 .../Classes/Utils/NSData+Base64.m               |  286 --
 .../Classes/Utils/NSWindow+Utils.h              |   27 -
 .../Classes/Utils/NSWindow+Utils.m              |   34 -
 .../CordovaFramework/Classes/Utils/ShellUtils.h |   34 -
 .../CordovaFramework/Classes/Utils/ShellUtils.m |  119 -
 .../CordovaFramework-Info.plist                 |   30 -
 .../CordovaFramework-Prefix.pch                 |    7 -
 .../CordovaFramework/en.lproj/InfoPlist.strings |    2 -
 .../CordovaFrameworkTests-Info.plist            |   22 -
 .../CordovaFrameworkTests.h                     |   24 -
 .../CordovaFrameworkTests.m                     |   43 -
 .../en.lproj/InfoPlist.strings                  |   19 -
 CordovaFramework/VERSION                        |    1 -
 CordovaFramework/cordova.js                     | 1501 --------
 CordovaLib/.gitignore                           |    5 +
 CordovaLib/CordovaLib-Info.plist                |   30 +
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj |  604 +++
 CordovaLib/CordovaLib/Classes/CDVBridge.h       |   42 +
 CordovaLib/CordovaLib/Classes/CDVBridge.m       |  206 +
 .../CordovaLib/Classes/CDVViewController.h      |   58 +
 .../CordovaLib/Classes/CDVViewController.m      |  222 ++
 .../CordovaLib/Classes/CDVWebViewDelegate.h     |   40 +
 .../CordovaLib/Classes/CDVWebViewDelegate.m     |  151 +
 CordovaLib/CordovaLib/Classes/Commands/CDV.h    |   29 +
 .../Classes/Commands/CDVAvailability.h          |   59 +
 .../Classes/Commands/CDVCommandDelegate.h       |   55 +
 .../Classes/Commands/CDVCommandDelegateImpl.h   |   35 +
 .../Classes/Commands/CDVCommandDelegateImpl.m   |  156 +
 .../Classes/Commands/CDVCommandQueue.h          |   40 +
 .../Classes/Commands/CDVCommandQueue.m          |  167 +
 .../Classes/Commands/CDVConfigParser.h          |   31 +
 .../Classes/Commands/CDVConfigParser.m          |  106 +
 .../CordovaLib/Classes/Commands/CDVConnection.h |   34 +
 .../CordovaLib/Classes/Commands/CDVConnection.m |  125 +
 .../CordovaLib/Classes/Commands/CDVConsole.h    |   29 +
 .../CordovaLib/Classes/Commands/CDVConsole.m    |   75 +
 .../CordovaLib/Classes/Commands/CDVDebug.h      |   25 +
 .../CordovaLib/Classes/Commands/CDVDevice.h     |   29 +
 .../CordovaLib/Classes/Commands/CDVDevice.m     |  102 +
 .../Classes/Commands/CDVInvokedUrlCommand.h     |   52 +
 .../Classes/Commands/CDVInvokedUrlCommand.m     |  140 +
 .../CordovaLib/Classes/Commands/CDVJSON.h       |   30 +
 .../CordovaLib/Classes/Commands/CDVJSON.m       |   77 +
 .../CordovaLib/Classes/Commands/CDVPlugin.h     |   59 +
 .../CordovaLib/Classes/Commands/CDVPlugin.m     |  129 +
 .../Classes/Commands/CDVPluginResult.h          |   65 +
 .../Classes/Commands/CDVPluginResult.m          |  224 ++
 .../Classes/Commands/CDVReachability.h          |   85 +
 .../Classes/Commands/CDVReachability.m          |  261 ++
 .../CordovaLib/Classes/Utils/NSData+Base64.h    |   33 +
 .../CordovaLib/Classes/Utils/NSData+Base64.m    |  286 ++
 .../CordovaLib/Classes/Utils/NSWindow+Utils.h   |   27 +
 .../CordovaLib/Classes/Utils/NSWindow+Utils.m   |   34 +
 .../CordovaLib/Classes/Utils/ShellUtils.h       |   34 +
 .../CordovaLib/Classes/Utils/ShellUtils.m       |  119 +
 CordovaLib/CordovaLib/CordovaLib-Prefix.pch     |    9 +
 .../CordovaLibTests/CordovaLibTests-Info.plist  |   22 +
 CordovaLib/CordovaLibTests/CordovaLibTests.m    |   45 +
 .../CordovaLibTests/en.lproj/InfoPlist.strings  |    2 +
 CordovaLib/CordovaLib_Prefix.pch                |    7 +
 CordovaLib/VERSION                              |    1 +
 CordovaLib/cordova.js                           | 1501 ++++++++
 LICENSE                                         |    4 +-
 README.md                                       |   69 +-
 RELEASENOTES.md                                 |    4 +
 bin/apple_ios_version                           |   24 +
 bin/apple_osx_version                           |   24 +
 bin/apple_xcode_version                         |   24 +
 bin/check_reqs                                  |   34 +
 bin/create                                      |  168 +-
 bin/replaces                                    |    2 +-
 .../__TESTING__.xcodeproj/project.pbxproj       |  444 ---
 .../project/__TESTING__/Classes/AppDelegate.h   |   32 -
 .../project/__TESTING__/Classes/AppDelegate.m   |   47 -
 .../__TESTING__/Classes/MainViewController.h    |   32 -
 .../__TESTING__/Classes/MainViewController.m    |  125 -
 .../project/__TESTING__/Plugins/README          |   20 -
 .../__TESTING__/Resources/__TESTING__.icns      |  Bin 117212 -> 0 bytes
 .../__TESTING__/Resources/en.lproj/Credits.rtf  |   18 -
 .../Resources/en.lproj/InfoPlist.strings        |   23 -
 .../Resources/en.lproj/MainViewController.xib   | 3521 ------------------
 .../project/__TESTING__/__TESTING__-Info.plist  |   34 -
 .../project/__TESTING__/__TESTING__-Prefix.pch  |   25 -
 bin/templates/project/__TESTING__/config.xml    |   49 -
 bin/templates/project/__TESTING__/main.m        |   25 -
 bin/templates/project/www/css/index.css         |  115 -
 bin/templates/project/www/img/logo.png          |  Bin 21814 -> 0 bytes
 bin/templates/project/www/index.html            |   42 -
 bin/templates/project/www/js/index.js           |   49 -
 bin/templates/project/www/spec.html             |   68 -
 bin/templates/project/www/spec/helper.js        |   33 -
 bin/templates/project/www/spec/index.js         |   67 -
 bin/update_cordova_subproject                   |   14 +-
 patches/cordova-cli.patch                       |   30 +
 patches/cordova-plugman.patch                   |  233 ++
 .../project.pbxproj                             |  443 +++
 .../__CDV_PRODUCT_NAME__/Classes/AppDelegate.h  |   32 +
 .../__CDV_PRODUCT_NAME__/Classes/AppDelegate.m  |   47 +
 .../Classes/MainViewController.h                |   32 +
 .../Classes/MainViewController.m                |  125 +
 .../AppIcon.appiconset/Contents.json            |   60 +
 .../AppIcon.appiconset/cordova_bot_128x128.png  |  Bin 0 -> 19350 bytes
 .../AppIcon.appiconset/cordova_bot_256x256.png  |  Bin 0 -> 46182 bytes
 .../__CDV_PRODUCT_NAME__/MainViewController.xib |  705 ++++
 .../project/__CDV_PRODUCT_NAME__/Plugins/README |   20 +
 .../__CDV_PRODUCT_NAME__-Info.plist             |   34 +
 .../__CDV_PRODUCT_NAME__-Prefix.pch             |    9 +
 .../project/__CDV_PRODUCT_NAME__/config.xml     |   31 +
 .../__CDV_PRODUCT_NAME__/en.lproj/Credits.rtf   |   29 +
 .../en.lproj/InfoPlist.strings                  |    2 +
 .../en.lproj/MainViewController.strings         |  390 ++
 templates/project/__CDV_PRODUCT_NAME__/main.m   |   25 +
 templates/project/gitignore                     |    5 +
 templates/project/www/css/index.css             |  115 +
 templates/project/www/img/logo.png              |  Bin 0 -> 21814 bytes
 templates/project/www/index.html                |   42 +
 templates/project/www/js/index.js               |   49 +
 templates/project/www/spec.html                 |   68 +
 templates/project/www/spec/helper.js            |   33 +
 templates/project/www/spec/index.js             |   67 +
 templates/scripts/cordova/build.xcconfig        |   12 +
 templates/scripts/cordova/clean                 |   40 +
 templates/scripts/cordova/defaults.xml          |   45 +
 templates/scripts/cordova/log                   |   24 +
 templates/scripts/cordova/run                   |   23 +
 templates/scripts/cordova/version               |   40 +
 160 files changed, 8756 insertions(+), 10674 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework.xcodeproj/project.pbxproj b/CordovaFramework/CordovaFramework.xcodeproj/project.pbxproj
deleted file mode 100644
index a11e82b..0000000
--- a/CordovaFramework/CordovaFramework.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,671 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		7E4C0A7416EAA1C600542982 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E4C0A7316EAA1C600542982 /* Cocoa.framework */; };
-		7E4C0A7E16EAA1C600542982 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7E4C0A7C16EAA1C600542982 /* InfoPlist.strings */; };
-		7E4C0A8A16EAA1C600542982 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E4C0A8916EAA1C600542982 /* SenTestingKit.framework */; };
-		7E4C0A8B16EAA1C600542982 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E4C0A7316EAA1C600542982 /* Cocoa.framework */; };
-		7E4C0A8E16EAA1C600542982 /* Cordova.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E4C0A7016EAA1C600542982 /* Cordova.framework */; };
-		7E4C0A9416EAA1C700542982 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7E4C0A9216EAA1C700542982 /* InfoPlist.strings */; };
-		7E4C0A9716EAA1C700542982 /* CordovaFrameworkTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0A9616EAA1C700542982 /* CordovaFrameworkTests.m */; };
-		7E4C0AC616EAA2AD00542982 /* CDVBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AA016EAA2AD00542982 /* CDVBridge.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AC716EAA2AD00542982 /* CDVBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AA116EAA2AD00542982 /* CDVBridge.m */; };
-		7E4C0AC816EAA2AD00542982 /* CDVBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AA116EAA2AD00542982 /* CDVBridge.m */; };
-		7E4C0AC916EAA2AD00542982 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AA216EAA2AD00542982 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0ACA16EAA2AD00542982 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AA316EAA2AD00542982 /* CDVViewController.m */; };
-		7E4C0ACB16EAA2AD00542982 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AA316EAA2AD00542982 /* CDVViewController.m */; };
-		7E4C0ACC16EAA2AD00542982 /* CDVWebViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AA416EAA2AD00542982 /* CDVWebViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0ACD16EAA2AD00542982 /* CDVWebViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AA516EAA2AD00542982 /* CDVWebViewDelegate.m */; };
-		7E4C0ACE16EAA2AD00542982 /* CDVWebViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AA516EAA2AD00542982 /* CDVWebViewDelegate.m */; };
-		7E4C0ACF16EAA2AD00542982 /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AA716EAA2AD00542982 /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AD016EAA2AD00542982 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AA816EAA2AD00542982 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AD116EAA2AD00542982 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AA916EAA2AD00542982 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AD216EAA2AD00542982 /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AAA16EAA2AD00542982 /* CDVCommandDelegateImpl.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AD316EAA2AD00542982 /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AAB16EAA2AD00542982 /* CDVCommandDelegateImpl.m */; };
-		7E4C0AD416EAA2AD00542982 /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AAB16EAA2AD00542982 /* CDVCommandDelegateImpl.m */; };
-		7E4C0AD516EAA2AD00542982 /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AAC16EAA2AD00542982 /* CDVCommandQueue.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AD616EAA2AD00542982 /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AAD16EAA2AD00542982 /* CDVCommandQueue.m */; };
-		7E4C0AD716EAA2AD00542982 /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AAD16EAA2AD00542982 /* CDVCommandQueue.m */; };
-		7E4C0AD816EAA2AD00542982 /* CDVConfigParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AAE16EAA2AD00542982 /* CDVConfigParser.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AD916EAA2AD00542982 /* CDVConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AAF16EAA2AD00542982 /* CDVConfigParser.m */; };
-		7E4C0ADA16EAA2AD00542982 /* CDVConfigParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AAF16EAA2AD00542982 /* CDVConfigParser.m */; };
-		7E4C0ADB16EAA2AD00542982 /* CDVConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AB016EAA2AD00542982 /* CDVConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0ADC16EAA2AD00542982 /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AB116EAA2AD00542982 /* CDVConnection.m */; };
-		7E4C0ADD16EAA2AD00542982 /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AB116EAA2AD00542982 /* CDVConnection.m */; };
-		7E4C0ADE16EAA2AD00542982 /* CDVConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AB216EAA2AD00542982 /* CDVConsole.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0ADF16EAA2AD00542982 /* CDVConsole.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AB316EAA2AD00542982 /* CDVConsole.m */; };
-		7E4C0AE016EAA2AD00542982 /* CDVConsole.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AB316EAA2AD00542982 /* CDVConsole.m */; };
-		7E4C0AE116EAA2AD00542982 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AB416EAA2AD00542982 /* CDVDebug.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AE216EAA2AD00542982 /* CDVDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AB516EAA2AD00542982 /* CDVDevice.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AE316EAA2AD00542982 /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AB616EAA2AD00542982 /* CDVDevice.m */; };
-		7E4C0AE416EAA2AD00542982 /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AB616EAA2AD00542982 /* CDVDevice.m */; };
-		7E4C0AE516EAA2AD00542982 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AB716EAA2AD00542982 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AE616EAA2AD00542982 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AB816EAA2AD00542982 /* CDVInvokedUrlCommand.m */; };
-		7E4C0AE716EAA2AD00542982 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AB816EAA2AD00542982 /* CDVInvokedUrlCommand.m */; };
-		7E4C0AE816EAA2AD00542982 /* CDVJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AB916EAA2AD00542982 /* CDVJSON.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AE916EAA2AD00542982 /* CDVJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0ABA16EAA2AD00542982 /* CDVJSON.m */; };
-		7E4C0AEA16EAA2AD00542982 /* CDVJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0ABA16EAA2AD00542982 /* CDVJSON.m */; };
-		7E4C0AEB16EAA2AD00542982 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0ABB16EAA2AD00542982 /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AEC16EAA2AD00542982 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0ABC16EAA2AD00542982 /* CDVPlugin.m */; };
-		7E4C0AED16EAA2AD00542982 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0ABC16EAA2AD00542982 /* CDVPlugin.m */; };
-		7E4C0AEE16EAA2AD00542982 /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0ABD16EAA2AD00542982 /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AEF16EAA2AD00542982 /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0ABE16EAA2AD00542982 /* CDVPluginResult.m */; };
-		7E4C0AF016EAA2AD00542982 /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0ABE16EAA2AD00542982 /* CDVPluginResult.m */; };
-		7E4C0AF116EAA2AD00542982 /* CDVReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0ABF16EAA2AD00542982 /* CDVReachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AF216EAA2AD00542982 /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AC016EAA2AD00542982 /* CDVReachability.m */; };
-		7E4C0AF316EAA2AD00542982 /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AC016EAA2AD00542982 /* CDVReachability.m */; };
-		7E4C0AF416EAA2AD00542982 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AC216EAA2AD00542982 /* NSData+Base64.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AF516EAA2AD00542982 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AC316EAA2AD00542982 /* NSData+Base64.m */; };
-		7E4C0AF616EAA2AD00542982 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AC316EAA2AD00542982 /* NSData+Base64.m */; };
-		7E4C0AF716EAA2AD00542982 /* NSWindow+Utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4C0AC416EAA2AD00542982 /* NSWindow+Utils.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7E4C0AF816EAA2AD00542982 /* NSWindow+Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AC516EAA2AD00542982 /* NSWindow+Utils.m */; };
-		7E4C0AF916EAA2AD00542982 /* NSWindow+Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E4C0AC516EAA2AD00542982 /* NSWindow+Utils.m */; };
-		7E4C0AFB16EAA35300542982 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E4C0AFA16EAA35300542982 /* SystemConfiguration.framework */; };
-		7E4C0AFD16EAA36400542982 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E4C0AFC16EAA36400542982 /* WebKit.framework */; };
-		7EE6E73D1714E77C0051492C /* ShellUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 7EE6E73B1714E77C0051492C /* ShellUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		7EE6E73E1714E77C0051492C /* ShellUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EE6E73C1714E77C0051492C /* ShellUtils.m */; };
-		7EE6E73F1714E77C0051492C /* ShellUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EE6E73C1714E77C0051492C /* ShellUtils.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
-		7E4C0A8C16EAA1C600542982 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 7E4C0A6716EAA1C600542982 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 7E4C0A6F16EAA1C600542982;
-			remoteInfo = CordovaFramework;
-		};
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXFileReference section */
-		7E4C0A7016EAA1C600542982 /* Cordova.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Cordova.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		7E4C0A7316EAA1C600542982 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
-		7E4C0A7616EAA1C600542982 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
-		7E4C0A7716EAA1C600542982 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
-		7E4C0A7816EAA1C600542982 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		7E4C0A7B16EAA1C600542982 /* CordovaFramework-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CordovaFramework-Info.plist"; sourceTree = "<group>"; };
-		7E4C0A7D16EAA1C600542982 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		7E4C0A7F16EAA1C600542982 /* CordovaFramework-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CordovaFramework-Prefix.pch"; sourceTree = "<group>"; };
-		7E4C0A8816EAA1C600542982 /* CordovaFrameworkTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CordovaFrameworkTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
-		7E4C0A8916EAA1C600542982 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
-		7E4C0A9116EAA1C700542982 /* CordovaFrameworkTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CordovaFrameworkTests-Info.plist"; sourceTree = "<group>"; };
-		7E4C0A9316EAA1C700542982 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		7E4C0A9516EAA1C700542982 /* CordovaFrameworkTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CordovaFrameworkTests.h; sourceTree = "<group>"; };
-		7E4C0A9616EAA1C700542982 /* CordovaFrameworkTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CordovaFrameworkTests.m; sourceTree = "<group>"; };
-		7E4C0AA016EAA2AD00542982 /* CDVBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVBridge.h; path = Classes/CDVBridge.h; sourceTree = "<group>"; };
-		7E4C0AA116EAA2AD00542982 /* CDVBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVBridge.m; path = Classes/CDVBridge.m; sourceTree = "<group>"; };
-		7E4C0AA216EAA2AD00542982 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
-		7E4C0AA316EAA2AD00542982 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
-		7E4C0AA416EAA2AD00542982 /* CDVWebViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVWebViewDelegate.h; path = Classes/CDVWebViewDelegate.h; sourceTree = "<group>"; };
-		7E4C0AA516EAA2AD00542982 /* CDVWebViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVWebViewDelegate.m; path = Classes/CDVWebViewDelegate.m; sourceTree = "<group>"; };
-		7E4C0AA716EAA2AD00542982 /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDV.h; sourceTree = "<group>"; };
-		7E4C0AA816EAA2AD00542982 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVAvailability.h; sourceTree = "<group>"; };
-		7E4C0AA916EAA2AD00542982 /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVCommandDelegate.h; sourceTree = "<group>"; };
-		7E4C0AAA16EAA2AD00542982 /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVCommandDelegateImpl.h; sourceTree = "<group>"; };
-		7E4C0AAB16EAA2AD00542982 /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVCommandDelegateImpl.m; sourceTree = "<group>"; };
-		7E4C0AAC16EAA2AD00542982 /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVCommandQueue.h; sourceTree = "<group>"; };
-		7E4C0AAD16EAA2AD00542982 /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVCommandQueue.m; sourceTree = "<group>"; };
-		7E4C0AAE16EAA2AD00542982 /* CDVConfigParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVConfigParser.h; sourceTree = "<group>"; };
-		7E4C0AAF16EAA2AD00542982 /* CDVConfigParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVConfigParser.m; sourceTree = "<group>"; };
-		7E4C0AB016EAA2AD00542982 /* CDVConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVConnection.h; sourceTree = "<group>"; };
-		7E4C0AB116EAA2AD00542982 /* CDVConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVConnection.m; sourceTree = "<group>"; };
-		7E4C0AB216EAA2AD00542982 /* CDVConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVConsole.h; sourceTree = "<group>"; };
-		7E4C0AB316EAA2AD00542982 /* CDVConsole.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVConsole.m; sourceTree = "<group>"; };
-		7E4C0AB416EAA2AD00542982 /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVDebug.h; sourceTree = "<group>"; };
-		7E4C0AB516EAA2AD00542982 /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVDevice.h; sourceTree = "<group>"; };
-		7E4C0AB616EAA2AD00542982 /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVDevice.m; sourceTree = "<group>"; };
-		7E4C0AB716EAA2AD00542982 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
-		7E4C0AB816EAA2AD00542982 /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVInvokedUrlCommand.m; sourceTree = "<group>"; };
-		7E4C0AB916EAA2AD00542982 /* CDVJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVJSON.h; sourceTree = "<group>"; };
-		7E4C0ABA16EAA2AD00542982 /* CDVJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVJSON.m; sourceTree = "<group>"; };
-		7E4C0ABB16EAA2AD00542982 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVPlugin.h; sourceTree = "<group>"; };
-		7E4C0ABC16EAA2AD00542982 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVPlugin.m; sourceTree = "<group>"; };
-		7E4C0ABD16EAA2AD00542982 /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVPluginResult.h; sourceTree = "<group>"; };
-		7E4C0ABE16EAA2AD00542982 /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVPluginResult.m; sourceTree = "<group>"; };
-		7E4C0ABF16EAA2AD00542982 /* CDVReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVReachability.h; sourceTree = "<group>"; };
-		7E4C0AC016EAA2AD00542982 /* CDVReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVReachability.m; sourceTree = "<group>"; };
-		7E4C0AC216EAA2AD00542982 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Base64.h"; sourceTree = "<group>"; };
-		7E4C0AC316EAA2AD00542982 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Base64.m"; sourceTree = "<group>"; };
-		7E4C0AC416EAA2AD00542982 /* NSWindow+Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSWindow+Utils.h"; sourceTree = "<group>"; };
-		7E4C0AC516EAA2AD00542982 /* NSWindow+Utils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSWindow+Utils.m"; sourceTree = "<group>"; };
-		7E4C0AFA16EAA35300542982 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		7E4C0AFC16EAA36400542982 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
-		7EE6E73B1714E77C0051492C /* ShellUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShellUtils.h; sourceTree = "<group>"; };
-		7EE6E73C1714E77C0051492C /* ShellUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShellUtils.m; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		7E4C0A6C16EAA1C600542982 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				7E4C0AFD16EAA36400542982 /* WebKit.framework in Frameworks */,
-				7E4C0AFB16EAA35300542982 /* SystemConfiguration.framework in Frameworks */,
-				7E4C0A7416EAA1C600542982 /* Cocoa.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		7E4C0A8416EAA1C600542982 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				7E4C0A8A16EAA1C600542982 /* SenTestingKit.framework in Frameworks */,
-				7E4C0A8B16EAA1C600542982 /* Cocoa.framework in Frameworks */,
-				7E4C0A8E16EAA1C600542982 /* Cordova.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		7E4C0A6616EAA1C600542982 = {
-			isa = PBXGroup;
-			children = (
-				7E4C0A7916EAA1C600542982 /* CordovaFramework */,
-				7E4C0A7A16EAA1C600542982 /* Supporting Files */,
-				7E4C0A8F16EAA1C600542982 /* CordovaFrameworkTests */,
-				7E4C0A7216EAA1C600542982 /* Frameworks */,
-				7E4C0A7116EAA1C600542982 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		7E4C0A7116EAA1C600542982 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				7E4C0A7016EAA1C600542982 /* Cordova.framework */,
-				7E4C0A8816EAA1C600542982 /* CordovaFrameworkTests.octest */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		7E4C0A7216EAA1C600542982 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				7E4C0AFC16EAA36400542982 /* WebKit.framework */,
-				7E4C0AFA16EAA35300542982 /* SystemConfiguration.framework */,
-				7E4C0A7316EAA1C600542982 /* Cocoa.framework */,
-				7E4C0A8916EAA1C600542982 /* SenTestingKit.framework */,
-				7E4C0A7516EAA1C600542982 /* Other Frameworks */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		7E4C0A7516EAA1C600542982 /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				7E4C0A7616EAA1C600542982 /* AppKit.framework */,
-				7E4C0A7716EAA1C600542982 /* CoreData.framework */,
-				7E4C0A7816EAA1C600542982 /* Foundation.framework */,
-			);
-			name = "Other Frameworks";
-			sourceTree = "<group>";
-		};
-		7E4C0A7916EAA1C600542982 /* CordovaFramework */ = {
-			isa = PBXGroup;
-			children = (
-				7E4C0AA016EAA2AD00542982 /* CDVBridge.h */,
-				7E4C0AA116EAA2AD00542982 /* CDVBridge.m */,
-				7E4C0AA216EAA2AD00542982 /* CDVViewController.h */,
-				7E4C0AA316EAA2AD00542982 /* CDVViewController.m */,
-				7E4C0AA416EAA2AD00542982 /* CDVWebViewDelegate.h */,
-				7E4C0AA516EAA2AD00542982 /* CDVWebViewDelegate.m */,
-				7E4C0AA616EAA2AD00542982 /* Commands */,
-				7E4C0AC116EAA2AD00542982 /* Utils */,
-			);
-			path = CordovaFramework;
-			sourceTree = "<group>";
-		};
-		7E4C0A7A16EAA1C600542982 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				7E4C0A7B16EAA1C600542982 /* CordovaFramework-Info.plist */,
-				7E4C0A7C16EAA1C600542982 /* InfoPlist.strings */,
-				7E4C0A7F16EAA1C600542982 /* CordovaFramework-Prefix.pch */,
-			);
-			name = "Supporting Files";
-			path = CordovaFramework;
-			sourceTree = "<group>";
-		};
-		7E4C0A8F16EAA1C600542982 /* CordovaFrameworkTests */ = {
-			isa = PBXGroup;
-			children = (
-				7E4C0A9516EAA1C700542982 /* CordovaFrameworkTests.h */,
-				7E4C0A9616EAA1C700542982 /* CordovaFrameworkTests.m */,
-				7E4C0A9016EAA1C700542982 /* Supporting Files */,
-			);
-			path = CordovaFrameworkTests;
-			sourceTree = "<group>";
-		};
-		7E4C0A9016EAA1C700542982 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				7E4C0A9116EAA1C700542982 /* CordovaFrameworkTests-Info.plist */,
-				7E4C0A9216EAA1C700542982 /* InfoPlist.strings */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-		7E4C0AA616EAA2AD00542982 /* Commands */ = {
-			isa = PBXGroup;
-			children = (
-				7E4C0AA716EAA2AD00542982 /* CDV.h */,
-				7E4C0AA816EAA2AD00542982 /* CDVAvailability.h */,
-				7E4C0AA916EAA2AD00542982 /* CDVCommandDelegate.h */,
-				7E4C0AAA16EAA2AD00542982 /* CDVCommandDelegateImpl.h */,
-				7E4C0AAB16EAA2AD00542982 /* CDVCommandDelegateImpl.m */,
-				7E4C0AAC16EAA2AD00542982 /* CDVCommandQueue.h */,
-				7E4C0AAD16EAA2AD00542982 /* CDVCommandQueue.m */,
-				7E4C0AAE16EAA2AD00542982 /* CDVConfigParser.h */,
-				7E4C0AAF16EAA2AD00542982 /* CDVConfigParser.m */,
-				7E4C0AB016EAA2AD00542982 /* CDVConnection.h */,
-				7E4C0AB116EAA2AD00542982 /* CDVConnection.m */,
-				7E4C0AB216EAA2AD00542982 /* CDVConsole.h */,
-				7E4C0AB316EAA2AD00542982 /* CDVConsole.m */,
-				7E4C0AB416EAA2AD00542982 /* CDVDebug.h */,
-				7E4C0AB516EAA2AD00542982 /* CDVDevice.h */,
-				7E4C0AB616EAA2AD00542982 /* CDVDevice.m */,
-				7E4C0AB716EAA2AD00542982 /* CDVInvokedUrlCommand.h */,
-				7E4C0AB816EAA2AD00542982 /* CDVInvokedUrlCommand.m */,
-				7E4C0AB916EAA2AD00542982 /* CDVJSON.h */,
-				7E4C0ABA16EAA2AD00542982 /* CDVJSON.m */,
-				7E4C0ABB16EAA2AD00542982 /* CDVPlugin.h */,
-				7E4C0ABC16EAA2AD00542982 /* CDVPlugin.m */,
-				7E4C0ABD16EAA2AD00542982 /* CDVPluginResult.h */,
-				7E4C0ABE16EAA2AD00542982 /* CDVPluginResult.m */,
-				7E4C0ABF16EAA2AD00542982 /* CDVReachability.h */,
-				7E4C0AC016EAA2AD00542982 /* CDVReachability.m */,
-			);
-			name = Commands;
-			path = Classes/Commands;
-			sourceTree = "<group>";
-		};
-		7E4C0AC116EAA2AD00542982 /* Utils */ = {
-			isa = PBXGroup;
-			children = (
-				7E4C0AC216EAA2AD00542982 /* NSData+Base64.h */,
-				7E4C0AC316EAA2AD00542982 /* NSData+Base64.m */,
-				7E4C0AC416EAA2AD00542982 /* NSWindow+Utils.h */,
-				7E4C0AC516EAA2AD00542982 /* NSWindow+Utils.m */,
-				7EE6E73B1714E77C0051492C /* ShellUtils.h */,
-				7EE6E73C1714E77C0051492C /* ShellUtils.m */,
-			);
-			name = Utils;
-			path = Classes/Utils;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		7E4C0A6D16EAA1C600542982 /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				7E4C0AC616EAA2AD00542982 /* CDVBridge.h in Headers */,
-				7E4C0AC916EAA2AD00542982 /* CDVViewController.h in Headers */,
-				7E4C0ACC16EAA2AD00542982 /* CDVWebViewDelegate.h in Headers */,
-				7E4C0ACF16EAA2AD00542982 /* CDV.h in Headers */,
-				7E4C0AD016EAA2AD00542982 /* CDVAvailability.h in Headers */,
-				7E4C0AD116EAA2AD00542982 /* CDVCommandDelegate.h in Headers */,
-				7E4C0AD216EAA2AD00542982 /* CDVCommandDelegateImpl.h in Headers */,
-				7E4C0AD516EAA2AD00542982 /* CDVCommandQueue.h in Headers */,
-				7E4C0AD816EAA2AD00542982 /* CDVConfigParser.h in Headers */,
-				7E4C0ADB16EAA2AD00542982 /* CDVConnection.h in Headers */,
-				7E4C0ADE16EAA2AD00542982 /* CDVConsole.h in Headers */,
-				7E4C0AE116EAA2AD00542982 /* CDVDebug.h in Headers */,
-				7E4C0AE216EAA2AD00542982 /* CDVDevice.h in Headers */,
-				7E4C0AE516EAA2AD00542982 /* CDVInvokedUrlCommand.h in Headers */,
-				7E4C0AE816EAA2AD00542982 /* CDVJSON.h in Headers */,
-				7E4C0AEB16EAA2AD00542982 /* CDVPlugin.h in Headers */,
-				7E4C0AEE16EAA2AD00542982 /* CDVPluginResult.h in Headers */,
-				7E4C0AF116EAA2AD00542982 /* CDVReachability.h in Headers */,
-				7E4C0AF416EAA2AD00542982 /* NSData+Base64.h in Headers */,
-				7E4C0AF716EAA2AD00542982 /* NSWindow+Utils.h in Headers */,
-				7EE6E73D1714E77C0051492C /* ShellUtils.h in Headers */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
-		7E4C0A6F16EAA1C600542982 /* Cordova */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 7E4C0A9A16EAA1C700542982 /* Build configuration list for PBXNativeTarget "Cordova" */;
-			buildPhases = (
-				7E4C0A6B16EAA1C600542982 /* Sources */,
-				7E4C0A6C16EAA1C600542982 /* Frameworks */,
-				7E4C0A6D16EAA1C600542982 /* Headers */,
-				7E4C0A6E16EAA1C600542982 /* Resources */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = Cordova;
-			productName = CordovaFramework;
-			productReference = 7E4C0A7016EAA1C600542982 /* Cordova.framework */;
-			productType = "com.apple.product-type.framework";
-		};
-		7E4C0A8716EAA1C600542982 /* CordovaFrameworkTests */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 7E4C0A9D16EAA1C700542982 /* Build configuration list for PBXNativeTarget "CordovaFrameworkTests" */;
-			buildPhases = (
-				7E4C0A8316EAA1C600542982 /* Sources */,
-				7E4C0A8416EAA1C600542982 /* Frameworks */,
-				7E4C0A8516EAA1C600542982 /* Resources */,
-				7E4C0A8616EAA1C600542982 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				7E4C0A8D16EAA1C600542982 /* PBXTargetDependency */,
-			);
-			name = CordovaFrameworkTests;
-			productName = CordovaFrameworkTests;
-			productReference = 7E4C0A8816EAA1C600542982 /* CordovaFrameworkTests.octest */;
-			productType = "com.apple.product-type.bundle";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		7E4C0A6716EAA1C600542982 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0460;
-				ORGANIZATIONNAME = "Apache Foundation";
-			};
-			buildConfigurationList = 7E4C0A6A16EAA1C600542982 /* Build configuration list for PBXProject "CordovaFramework" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-			);
-			mainGroup = 7E4C0A6616EAA1C600542982;
-			productRefGroup = 7E4C0A7116EAA1C600542982 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				7E4C0A6F16EAA1C600542982 /* Cordova */,
-				7E4C0A8716EAA1C600542982 /* CordovaFrameworkTests */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		7E4C0A6E16EAA1C600542982 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				7E4C0A7E16EAA1C600542982 /* InfoPlist.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		7E4C0A8516EAA1C600542982 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				7E4C0A9416EAA1C700542982 /* InfoPlist.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		7E4C0A8616EAA1C600542982 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		7E4C0A6B16EAA1C600542982 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				7E4C0AC716EAA2AD00542982 /* CDVBridge.m in Sources */,
-				7E4C0ACA16EAA2AD00542982 /* CDVViewController.m in Sources */,
-				7E4C0ACD16EAA2AD00542982 /* CDVWebViewDelegate.m in Sources */,
-				7E4C0AD316EAA2AD00542982 /* CDVCommandDelegateImpl.m in Sources */,
-				7E4C0AD616EAA2AD00542982 /* CDVCommandQueue.m in Sources */,
-				7E4C0AD916EAA2AD00542982 /* CDVConfigParser.m in Sources */,
-				7E4C0ADC16EAA2AD00542982 /* CDVConnection.m in Sources */,
-				7E4C0ADF16EAA2AD00542982 /* CDVConsole.m in Sources */,
-				7E4C0AE316EAA2AD00542982 /* CDVDevice.m in Sources */,
-				7E4C0AE616EAA2AD00542982 /* CDVInvokedUrlCommand.m in Sources */,
-				7E4C0AE916EAA2AD00542982 /* CDVJSON.m in Sources */,
-				7E4C0AEC16EAA2AD00542982 /* CDVPlugin.m in Sources */,
-				7E4C0AEF16EAA2AD00542982 /* CDVPluginResult.m in Sources */,
-				7E4C0AF216EAA2AD00542982 /* CDVReachability.m in Sources */,
-				7E4C0AF516EAA2AD00542982 /* NSData+Base64.m in Sources */,
-				7E4C0AF816EAA2AD00542982 /* NSWindow+Utils.m in Sources */,
-				7EE6E73E1714E77C0051492C /* ShellUtils.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		7E4C0A8316EAA1C600542982 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				7E4C0A9716EAA1C700542982 /* CordovaFrameworkTests.m in Sources */,
-				7E4C0AC816EAA2AD00542982 /* CDVBridge.m in Sources */,
-				7E4C0ACB16EAA2AD00542982 /* CDVViewController.m in Sources */,
-				7E4C0ACE16EAA2AD00542982 /* CDVWebViewDelegate.m in Sources */,
-				7E4C0AD416EAA2AD00542982 /* CDVCommandDelegateImpl.m in Sources */,
-				7E4C0AD716EAA2AD00542982 /* CDVCommandQueue.m in Sources */,
-				7E4C0ADA16EAA2AD00542982 /* CDVConfigParser.m in Sources */,
-				7E4C0ADD16EAA2AD00542982 /* CDVConnection.m in Sources */,
-				7E4C0AE016EAA2AD00542982 /* CDVConsole.m in Sources */,
-				7E4C0AE416EAA2AD00542982 /* CDVDevice.m in Sources */,
-				7E4C0AE716EAA2AD00542982 /* CDVInvokedUrlCommand.m in Sources */,
-				7E4C0AEA16EAA2AD00542982 /* CDVJSON.m in Sources */,
-				7E4C0AED16EAA2AD00542982 /* CDVPlugin.m in Sources */,
-				7E4C0AF016EAA2AD00542982 /* CDVPluginResult.m in Sources */,
-				7E4C0AF316EAA2AD00542982 /* CDVReachability.m in Sources */,
-				7E4C0AF616EAA2AD00542982 /* NSData+Base64.m in Sources */,
-				7E4C0AF916EAA2AD00542982 /* NSWindow+Utils.m in Sources */,
-				7EE6E73F1714E77C0051492C /* ShellUtils.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
-		7E4C0A8D16EAA1C600542982 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 7E4C0A6F16EAA1C600542982 /* Cordova */;
-			targetProxy = 7E4C0A8C16EAA1C600542982 /* PBXContainerItemProxy */;
-		};
-/* End PBXTargetDependency section */
-
-/* Begin PBXVariantGroup section */
-		7E4C0A7C16EAA1C600542982 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				7E4C0A7D16EAA1C600542982 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		7E4C0A9216EAA1C700542982 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				7E4C0A9316EAA1C700542982 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		7E4C0A9816EAA1C700542982 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.7;
-				ONLY_ACTIVE_ARCH = YES;
-				SDKROOT = "";
-			};
-			name = Debug;
-		};
-		7E4C0A9916EAA1C700542982 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_64_BIT)";
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				MACOSX_DEPLOYMENT_TARGET = 10.7;
-				SDKROOT = "";
-			};
-			name = Release;
-		};
-		7E4C0A9B16EAA1C700542982 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				FRAMEWORK_VERSION = A;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "CordovaFramework/CordovaFramework-Prefix.pch";
-				INFOPLIST_FILE = "CordovaFramework/CordovaFramework-Info.plist";
-				INSTALL_PATH = "@rpath";
-				LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
-				MACOSX_DEPLOYMENT_TARGET = 10.7;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = "";
-				WRAPPER_EXTENSION = framework;
-			};
-			name = Debug;
-		};
-		7E4C0A9C16EAA1C700542982 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1;
-				FRAMEWORK_VERSION = A;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "CordovaFramework/CordovaFramework-Prefix.pch";
-				INFOPLIST_FILE = "CordovaFramework/CordovaFramework-Info.plist";
-				INSTALL_PATH = "@rpath";
-				LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
-				MACOSX_DEPLOYMENT_TARGET = 10.7;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = "";
-				WRAPPER_EXTENSION = framework;
-			};
-			name = Release;
-		};
-		7E4C0A9E16EAA1C700542982 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				FRAMEWORK_SEARCH_PATHS = "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"";
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "CordovaFramework/CordovaFramework-Prefix.pch";
-				INFOPLIST_FILE = "CordovaFrameworkTests/CordovaFrameworkTests-Info.plist";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				WRAPPER_EXTENSION = octest;
-			};
-			name = Debug;
-		};
-		7E4C0A9F16EAA1C700542982 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				FRAMEWORK_SEARCH_PATHS = "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"";
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "CordovaFramework/CordovaFramework-Prefix.pch";
-				INFOPLIST_FILE = "CordovaFrameworkTests/CordovaFrameworkTests-Info.plist";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				WRAPPER_EXTENSION = octest;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		7E4C0A6A16EAA1C600542982 /* Build configuration list for PBXProject "CordovaFramework" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				7E4C0A9816EAA1C700542982 /* Debug */,
-				7E4C0A9916EAA1C700542982 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		7E4C0A9A16EAA1C700542982 /* Build configuration list for PBXNativeTarget "Cordova" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				7E4C0A9B16EAA1C700542982 /* Debug */,
-				7E4C0A9C16EAA1C700542982 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		7E4C0A9D16EAA1C700542982 /* Build configuration list for PBXNativeTarget "CordovaFrameworkTests" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				7E4C0A9E16EAA1C700542982 /* Debug */,
-				7E4C0A9F16EAA1C700542982 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 7E4C0A6716EAA1C600542982 /* Project object */;
-}

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/CDVBridge.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/CDVBridge.h b/CordovaFramework/CordovaFramework/Classes/CDVBridge.h
deleted file mode 100644
index 5d15064..0000000
--- a/CordovaFramework/CordovaFramework/Classes/CDVBridge.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- 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.
- */
-
-#import <Cocoa/Cocoa.h>
-@class WebView;
-@class CDVViewController;
-
-@interface CDVBridge : NSObject {
-	
-}
-
-@property (nonatomic, weak) WebView* webView;
-@property (nonatomic,
-#ifdef __MAC_10_8
-           weak
-#else
-           assign
-#endif
-           ) CDVViewController* viewController;
-
-
-- (id) initWithWebView:(WebView*)webView andViewController:(CDVViewController*)viewController;
-- (void) exec:(NSString*)callbackId withService:(NSString*)service andAction:(NSString*)action andArguments:(NSArray*)arguments;
-
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/CDVBridge.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/CDVBridge.m b/CordovaFramework/CordovaFramework/Classes/CDVBridge.m
deleted file mode 100644
index e34f8ed..0000000
--- a/CordovaFramework/CordovaFramework/Classes/CDVBridge.m
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- 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.
- */
-
-#import <WebKit/WebKit.h>
-#import <AppKit/AppKit.h>
-#import <Foundation/NSJSONSerialization.h>
-#include <objc/message.h>
-
-#import "CDVBridge.h"
-#import "CDVViewController.h"
-
-@implementation CDVBridge
-
-- (BOOL) isArray:(id)item
-{
-    id win = [self.webView windowScriptObject];
-    WebScriptObject* bridgeUtil = [win evaluateWebScript:@"CordovaBridgeUtil"];
-    NSNumber* result = [bridgeUtil callWebScriptMethod:@"isArray" withArguments:[NSArray arrayWithObject:item]];
-
-    return [result boolValue];
-}
-
-- (BOOL) isDictionary:(id)item
-{
-    id win = [self.webView windowScriptObject];
-    WebScriptObject* bridgeUtil = [win evaluateWebScript:@"CordovaBridgeUtil"];
-    NSNumber* result = [bridgeUtil callWebScriptMethod:@"isObject" withArguments:[NSArray arrayWithObject:item]];
-    return [result boolValue];
-}
-
-- (NSDictionary*) convertWebScriptObjectToNSDictionary:(WebScriptObject*)webScriptObject
-{
-    // Assumption: webScriptObject has already been tested using isDictionary:
-
-    id win = [self.webView windowScriptObject];
-
-    WebScriptObject* keysObject = [win callWebScriptMethod:@"CordovaBridgeUtil.getDictionaryKeys" withArguments:[NSArray arrayWithObject:webScriptObject]];
-    NSArray* keys = [self convertWebScriptObjectToNSArray:keysObject];
-    NSMutableDictionary* dict = [NSMutableDictionary dictionaryWithCapacity:[keys count]];
-
-    NSEnumerator* enumerator = [keys objectEnumerator];
-    id key;
-    while (key = [enumerator nextObject]) {
-        [dict setObject:[webScriptObject valueForKey:key] forKey:key];
-    }
-    
-    return dict;
-}
-
-- (NSArray*) convertWebScriptObjectToNSArray:(WebScriptObject*)webScriptObject
-{
-    // Assumption: webScriptObject has already been tested using isArray:
-    
-    NSUInteger count = [[webScriptObject valueForKey:@"length"] integerValue];
-    NSMutableArray *a = [NSMutableArray array];
-    for (unsigned i = 0; i < count; i++) {
-        id item = [webScriptObject webScriptValueAtIndex:i];
-        if ([item isKindOfClass:[WebScriptObject class]]) {
-            if ([self isArray:item]) {
-                [a addObject:[self convertWebScriptObjectToNSArray:item]];
-            } else if ([self isDictionary:item]) {
-                [a addObject:[self convertWebScriptObjectToNSDictionary:item]];
-            };
-        } else {
-            [a addObject:item];
-        }
-    }
-    
-    return a;
-}
-
-- (void) registerJavaScriptHelpers
-{
-    NSString* cordovaBridgeUtil = @"CordovaBridgeUtil = {};";
-    NSString* isArray = [NSString stringWithFormat:@"CordovaBridgeUtil.isArray = function(obj) { return obj.constructor == Array; };"];
-    NSString* isObject = [NSString stringWithFormat:@"CordovaBridgeUtil.isObject = function(obj) { return obj.constructor == Object; };"];
-    NSString* dictionaryKeys = [NSString stringWithFormat:
-                                @" \
-                                CordovaBridgeUtil.getDictionaryKeys = function(obj) { \
-                                    var a = []; \
-                                    for (var key in obj) { \
-                                        if (!obj.hasOwnProperty(key)) { \
-                                            continue; \
-                                        } \
-                                        a.push(key); \
-                                    } \
-                                    return a; \
-                                }"
-                                ];
-    
-    id win = [self.webView windowScriptObject];
-    [win evaluateWebScript:cordovaBridgeUtil];
-    [win evaluateWebScript:isArray];
-    [win evaluateWebScript:isObject];
-    [win evaluateWebScript:dictionaryKeys];
-}
-
-- (id) initWithWebView:(WebView *)webView andViewController:(CDVViewController*)viewController
-{
-    if ((self = [super init]) != nil) {
-        self.webView = webView;
-        self.viewController = viewController;
-        [self registerJavaScriptHelpers];
-    }
-    
-    return self;
-}
-
-- (void) exec:(NSString*)callbackId withService:(NSString*)service andAction:(NSString*)action andArguments:(WebScriptObject*)webScriptObject
-{
-    // We are going with the iOS method of passing in a callbackId.
-    // Note that we can use the JavaScriptCore C API to pass in the JavaScript function references
-    // and context and call them directly, but this is done this way for possible plugin sharing
-    // between iOS and OS X. Also we are going async as well.
-    
-    // we're just going to assume the webScriptObject passed in is an NSArray
-    NSArray* arguments = [self convertWebScriptObjectToNSArray:webScriptObject];
-    
-    CDVInvokedUrlCommand* command = [[CDVInvokedUrlCommand alloc] initWithArguments:arguments callbackId:callbackId className:service methodName:action];
-    
-    if ((command.className == nil) || (command.methodName == nil)) {
-        NSLog(@"ERROR: Classname and/or methodName not found for command.");
-        return;
-    }
-    
-    // Fetch an instance of this class
-    CDVPlugin* obj = [_viewController.commandDelegate getCommandInstance:command.className];
-    
-    if (!([obj isKindOfClass:[CDVPlugin class]])) {
-        NSLog(@"ERROR: Plugin '%@' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.", command.className);
-        return;
-    }
-
-    // Find the proper selector to call.
-    NSString* methodName = [NSString stringWithFormat:@"%@:", command.methodName];
-    SEL normalSelector = NSSelectorFromString(methodName);
-    if ([obj respondsToSelector:normalSelector]) {
-        // [obj performSelector:normalSelector withObject:command];
-        objc_msgSend(obj, normalSelector, command);
-    } else {
-        // There's no method to call, so throw an error.
-        NSLog(@"ERROR: Method '%@' not defined in Plugin '%@'", methodName, command.className);
-    }
-}
-
-#pragma mark WebScripting Protocol
-
-/* checks whether a selector is acceptable to be called from JavaScript */
-+ (BOOL) isSelectorExcludedFromWebScript:(SEL)selector
-{
-	BOOL	result = YES;
-	
-	int			i = 0;
-	static SEL	* acceptableList = NULL;
-	SEL			currentSelector;
-	
-	if (acceptableList == NULL && (acceptableList = calloc(256, sizeof(SEL))))	// up to 256 selectors
-	{
-		acceptableList[i++] = @selector(exec:withService:andAction:andArguments:);
-	}
-	
-	i = 0;
-	while (result == YES && (currentSelector = acceptableList[i++]))
-	{
-		//checking for exclusions
-		result = !(selector == currentSelector);
-	}
-	
-	return result;
-}
-
-/* helper function so we don't have to have underscores and stuff in js to refer to the right method */
-+ (NSString*) webScriptNameForSelector:(SEL)aSelector
-{
-	id	result = nil;
-	
-	if (aSelector == @selector(exec:withService:andAction:andArguments:)) {
-		result = @"exec";
-	}
-	
-	return result;
-}
-
-// right now exclude all properties (eg keys)
-+ (BOOL) isKeyExcludedFromWebScript:(const char*)name
-{
-	return YES;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/CDVViewController.h b/CordovaFramework/CordovaFramework/Classes/CDVViewController.h
deleted file mode 100644
index cdd3bfd..0000000
--- a/CordovaFramework/CordovaFramework/Classes/CDVViewController.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- 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.
- */
-
-#import <Cocoa/Cocoa.h>
-#import <WebKit/WebKit.h>
-#import <Foundation/NSJSONSerialization.h>
-#import "CDVAvailability.h"
-#import "CDVInvokedUrlCommand.h"
-#import "CDVCommandDelegate.h"
-#import "CDVCommandQueue.h"
-#import "CDVPlugin.h"
-#import "CDVWebViewDelegate.h"
-
-@interface CDVViewController : NSWindowController
-{
-    @protected
-    id <CDVCommandDelegate> _commandDelegate;
-    @protected
-    CDVCommandQueue* _commandQueue;
-    NSString* _userAgent;
-}
-
-@property (nonatomic, strong) IBOutlet NSView* contentView;
-@property (nonatomic, strong) IBOutlet WebView* webView;
-@property (nonatomic, strong) IBOutlet CDVWebViewDelegate* webViewDelegate;
-
-@property (nonatomic, readonly, strong) NSMutableDictionary* pluginObjects;
-@property (nonatomic, readonly, strong) NSDictionary* pluginsMap;
-@property (nonatomic, readonly, strong) NSMutableDictionary* settings;
-@property (nonatomic, readonly, strong) NSXMLParser* configParser;
-@property (nonatomic, readonly, assign) BOOL loadFromString;
-
-@property (nonatomic, readwrite, copy) NSString* wwwFolderName;
-@property (nonatomic, readwrite, copy) NSString* startPage;
-@property (nonatomic, readonly, strong) CDVCommandQueue* commandQueue;
-@property (nonatomic, readonly, strong) id <CDVCommandDelegate> commandDelegate;
-
-- (id)getCommandInstance:(NSString*)pluginName;
-- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className;
-- (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/CDVViewController.m b/CordovaFramework/CordovaFramework/Classes/CDVViewController.m
deleted file mode 100644
index b0aa043..0000000
--- a/CordovaFramework/CordovaFramework/Classes/CDVViewController.m
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVViewController.h"
-#import "CDVConfigParser.h"
-#import "CDVCommandDelegateImpl.h"
-
-@interface CDVViewController ()
-
-@property (nonatomic, readwrite, strong) NSXMLParser* configParser;
-@property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
-@property (nonatomic, readwrite, strong) NSMutableDictionary* pluginObjects;
-@property (nonatomic, readwrite, strong) NSArray* startupPluginNames;
-@property (nonatomic, readwrite, strong) NSDictionary* pluginsMap;
-@property (nonatomic, readwrite, assign) BOOL loadFromString;
-
-@end
-
-@implementation CDVViewController
-
-@synthesize webView;
-@synthesize pluginObjects, pluginsMap, startupPluginNames;
-@synthesize configParser, settings, loadFromString;
-@synthesize wwwFolderName, startPage;
-@synthesize commandDelegate = _commandDelegate;
-@synthesize commandQueue = _commandQueue;
-
-- (void) awakeFromNib
-{
-    _commandDelegate = [[CDVCommandDelegateImpl alloc] initWithViewController:self];
-    self.webViewDelegate.viewController = self;
-    
-    NSURL* appURL = nil;
-    NSString* loadErr = nil;
-    
-    if ([self.startPage rangeOfString:@"://"].location != NSNotFound) {
-        appURL = [NSURL URLWithString:self.startPage];
-    } else if ([self.wwwFolderName rangeOfString:@"://"].location != NSNotFound) {
-        appURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", self.wwwFolderName, self.startPage]];
-    } else {
-        NSString* startFilePath = [self.commandDelegate pathForResource:self.startPage];
-        if (startFilePath == nil) {
-            loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.wwwFolderName, self.startPage];
-            NSLog(@"%@", loadErr);
-            self.loadFromString = YES;
-            appURL = nil;
-        } else {
-            appURL = [NSURL fileURLWithPath:startFilePath];
-        }
-    }
-    
-    if (!loadErr) {
-        NSURLRequest* appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
-        [[self.webView mainFrame] loadRequest:appReq];
-        
-    } else {
-        NSString* html = [NSString stringWithFormat:@"<html><body> %@ </body></html>", loadErr];
-        [[self.webView mainFrame] loadHTMLString:html baseURL:nil];
-    }
-    
-    for (NSString* pluginName in self.startupPluginNames) {
-        [self getCommandInstance:pluginName];
-    }
-    
-    // initialize items based on settings
-    
-    BOOL enableWebGL = [[self.settings objectForKey:@"EnableWebGL"] boolValue];
-    WebPreferences* prefs = [self.webView preferences];
-    
-    // Note that this preference may not be Mac App Store safe
-    if (enableWebGL && [prefs respondsToSelector:@selector(setWebGLEnabled:)]) {
-        [prefs performSelector:@selector(setWebGLEnabled:) withObject:[NSNumber numberWithBool:enableWebGL]];
-    }
-}
-
-- (void) __init
-{
-    [self loadSettings];
-}
-
-- (id) init
-{
-    self = [super init];
-    if (self) {
-        // Initialization code here.
-        [self __init];
-    }
-    return self;
-}
-
-- (id)initWithWindowNibName:(NSString*)nibNameOrNil
-{
-    self = [super initWithWindowNibName:nibNameOrNil];
-    if (self) {
-        // Initialization code here.
-        [self __init];
-    }
-    return self;
-}
-
-- (void)loadSettings
-{
-    CDVConfigParser* delegate = [[CDVConfigParser alloc] init];
-    
-    // read from config.xml in the app bundle
-    NSString* path = [[NSBundle mainBundle] pathForResource:@"config" ofType:@"xml"];
-    
-    if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
-        NSAssert(NO, @"ERROR: config.xml does not exist.");
-        return;
-    }
-    
-    NSURL* url = [NSURL fileURLWithPath:path];
-    
-    configParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
-    if (configParser == nil) {
-        NSLog(@"Failed to initialize XML parser.");
-        return;
-    }
-    [configParser setDelegate:((id < NSXMLParserDelegate >)delegate)];
-    [configParser parse];
-    
-    // Get the plugin dictionary, whitelist and settings from the delegate.
-    self.pluginsMap = delegate.pluginsDict;
-    self.startupPluginNames = delegate.startupPluginNames;
-    self.settings = delegate.settings;
-    
-    // And the start folder/page.
-    self.wwwFolderName = @"www";
-    self.startPage = delegate.startPage;
-    if (self.startPage == nil) {
-        self.startPage = @"index.html";
-    }
-    
-    // Initialize the plugin objects dict.
-    self.pluginObjects = [[NSMutableDictionary alloc] initWithCapacity:20];
-}
-
-- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className
-{
-    if ([plugin respondsToSelector:@selector(setViewController:)]) {
-        [plugin setViewController:self];
-    }
-    
-    if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) {
-        [plugin setCommandDelegate:_commandDelegate];
-    }
-    
-    [self.pluginObjects setObject:plugin forKey:className];
-    [plugin pluginInitialize];
-}
-
-- (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName
-{
-    if ([plugin respondsToSelector:@selector(setViewController:)]) {
-        [plugin setViewController:self];
-    }
-    
-    if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) {
-        [plugin setCommandDelegate:_commandDelegate];
-    }
-    
-    NSString* className = NSStringFromClass([plugin class]);
-    [self.pluginObjects setObject:plugin forKey:className];
-    [self.pluginsMap setValue:className forKey:[pluginName lowercaseString]];
-    [plugin pluginInitialize];
-}
-
-/**
- Returns an instance of a CordovaCommand object, based on its name.  If one exists already, it is returned.
- */
-- (id)getCommandInstance:(NSString*)pluginName
-{
-    // first, we try to find the pluginName in the pluginsMap
-    // (acts as a whitelist as well) if it does not exist, we return nil
-    // NOTE: plugin names are matched as lowercase to avoid problems - however, a
-    // possible issue is there can be duplicates possible if you had:
-    // "org.apache.cordova.Foo" and "org.apache.cordova.foo" - only the lower-cased entry will match
-    NSString* className = [self.pluginsMap objectForKey:[pluginName lowercaseString]];
-    
-    if (className == nil) {
-        return nil;
-    }
-    
-    id obj = [self.pluginObjects objectForKey:className];
-    if (!obj) {
-        obj = [[NSClassFromString (className)alloc] initWithWebView:webView];
-        
-        if (obj != nil) {
-            [self registerPlugin:obj withClassName:className];
-        } else {
-            NSLog(@"CDVPlugin class %@ (pluginName: %@) does not exist.", className, pluginName);
-        }
-    }
-    return obj;
-}
-
-- (void) windowResized:(NSNotification*)notification;
-{
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/CDVWebViewDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/CDVWebViewDelegate.h b/CordovaFramework/CordovaFramework/Classes/CDVWebViewDelegate.h
deleted file mode 100644
index 37616c3..0000000
--- a/CordovaFramework/CordovaFramework/Classes/CDVWebViewDelegate.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- 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.
- */
-
-#import <Cocoa/Cocoa.h>
-#import <WebKit/WebKit.h>
-
-@class CDVConsole;
-@class CDVBridge;
-@class CDVViewController;
-
-@interface CDVWebViewDelegate : NSObject {
-}
-
-@property (nonatomic, strong) CDVConsole* console;
-@property (nonatomic, strong) CDVBridge* bridge;
-@property (nonatomic,
-#ifdef __MAC_10_8
-           weak
-#else
-           strong
-#endif
-           )   CDVViewController* viewController;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/CDVWebViewDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/CDVWebViewDelegate.m b/CordovaFramework/CordovaFramework/Classes/CDVWebViewDelegate.m
deleted file mode 100644
index 04fbd86..0000000
--- a/CordovaFramework/CordovaFramework/Classes/CDVWebViewDelegate.m
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- 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.
- */
-
-
-#import "CDVWebViewDelegate.h"
-#import "CDVConsole.h"
-#import "CDVBridge.h"
-
-@implementation CDVWebViewDelegate
-
-@synthesize console;
-
-- (void)webView:(WebView*)webView didClearWindowObject:(WebScriptObject*)windowScriptObject forFrame:(WebFrame*)frame
-{
-	if (self.console == nil) {
-        self.console = [CDVConsole new];
-    }
-	[windowScriptObject setValue:self.console forKey:@"console"];
-	
-	if (self.bridge == nil) {
-        self.bridge = [[CDVBridge alloc] initWithWebView:webView andViewController:self.viewController];
-    }
-    [windowScriptObject setValue:self.bridge forKey:@"cordovabridge"];
-}
-
-- (void)webView:(WebView*)sender didFinishLoadForFrame:(WebFrame*)frame
-{
-    id win = [sender windowScriptObject];
-    NSString* nativeReady = @"try{cordova.require('cordova/channel').onNativeReady.fire();}catch(e){window._nativeReady = true;}";
-    [win evaluateWebScript:nativeReady];
-}
-
-- (void) webView:(WebView*)webView addMessageToConsole:(NSDictionary*)message
-{
-	if (![message isKindOfClass:[NSDictionary class]]) { 
-		return;
-	}
-	
-	NSLog(@"JavaScript error: %@:%@: %@", 
-		  [[message objectForKey:@"sourceURL"] lastPathComponent],	// could be nil
-		  [message objectForKey:@"lineNumber"],
-		  [message objectForKey:@"message"]);
-}
-
-#pragma mark WebScripting protocol
-
-/* checks whether a selector is acceptable to be called from JavaScript */
-+ (BOOL) isSelectorExcludedFromWebScript:(SEL)selector
-{
-	return YES;
-}
-
-// right now exclude all properties (eg keys)
-+ (BOOL) isKeyExcludedFromWebScript:(const char*)name
-{
-	return YES;
-}
-
-#pragma mark WebPolicyDelegate
-
-- (void)webView:(WebView *)sender decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener
-{	
-    NSString* url = [[request URL] description];
-    NSLog(@"navigating to %@", url);
-
-    [listener use];
-}
-
-
-#pragma mark WebUIDelegate
-
-- (BOOL)webView:(WebView*)sender runBeforeUnloadConfirmPanelWithMessage:(NSString*)message initiatedByFrame:(WebFrame*)frame
-{
-    return [self webView:sender runJavaScriptConfirmPanelWithMessage:message initiatedByFrame:frame];
-}
-
-- (void)webView:(WebView *)sender runOpenPanelForFileButtonWithResultListener:(id < WebOpenPanelResultListener >)resultListener allowMultipleFiles:(BOOL)allowMultipleFiles
-{
-    NSOpenPanel* dialog = [NSOpenPanel openPanel];
-    
-    [dialog setCanChooseFiles:YES];
-    [dialog setAllowsMultipleSelection:allowMultipleFiles];
-    [dialog setCanChooseDirectories:YES];
-    
-    if ([dialog runModal] == NSOKButton) {
-        [resultListener chooseFilenames:[[dialog URLs] valueForKey:@"relativePath"]];
-    }
-}
-
-- (void)webView:(WebView*)sender runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener
-{
-    [self webView:sender runOpenPanelForFileButtonWithResultListener:resultListener allowMultipleFiles:NO];
-}
-
-- (void)webView:(WebView*)sender runJavaScriptAlertPanelWithMessage:(NSString*)message initiatedByFrame:(WebFrame*)frame
-{
-    NSAlert* alert = [[NSAlert alloc] init];
-    [alert addButtonWithTitle:NSLocalizedString(@"OK", @"")];
-    [alert setMessageText:message];
-    
-    [alert runModal];
-}
-
-- (BOOL)webView:(WebView*)sender runJavaScriptConfirmPanelWithMessage:(NSString*)message initiatedByFrame:(WebFrame*)frame
-{
-    NSAlert* alert = [[NSAlert alloc] init];
-    [alert addButtonWithTitle:NSLocalizedString(@"OK", @"")];
-    [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"")];
-    [alert setMessageText:message];
-    
-    return ([alert runModal] == NSAlertFirstButtonReturn);
-}
-
-- (NSString*)webView:(WebView*)sender runJavaScriptTextInputPanelWithPrompt:(NSString*)prompt defaultText:(NSString*)defaultText initiatedByFrame:(WebFrame*)frame
-{
-    NSAlert* alert = [NSAlert alertWithMessageText:prompt
-                                     defaultButton:NSLocalizedString(@"OK", @"")
-                                   alternateButton:NSLocalizedString(@"Cancel", @"")
-                                       otherButton:nil
-                         informativeTextWithFormat:@""];
-    
-    NSTextField* input = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)];
-    [input setStringValue:defaultText];
-    [alert setAccessoryView:input];
-    
-    NSInteger button = [alert runModal];
-    if (button == NSAlertDefaultReturn) {
-        [input validateEditing];
-        return [input stringValue];
-    }
-    
-    return nil;
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDV.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDV.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDV.h
deleted file mode 100644
index 2442121..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDV.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVAvailability.h"
-
-#import "CDVJSON.h"
-#import "CDVDebug.h"
-#import "CDVPluginResult.h"
-#import "CDVInvokedUrlCommand.h"
-#import "CDVPlugin.h"
-#import "CDVDevice.h"
-
-#import "ShellUtils.h"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVAvailability.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVAvailability.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVAvailability.h
deleted file mode 100644
index fb16806..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVAvailability.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- 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.
- */
-
-#define __CORDOVA_OSX__
-
-#define __CORDOVA_2_6_0 20600
-#define __CORDOVA_2_7_0 20700
-#define __CORDOVA_2_8_0 20800
-#define __CORDOVA_2_9_0 20900
-#define __CORDOVA_3_0_0 30000
-#define __CORDOVA_NA 99999      /* not available */
-
-/*
- #if CORDOVA_VERSION_MIN_REQUIRED >= __CORDOVA_1_7_0
-    // do something when its at least 1.7.0
- #else
-    // do something else (non 1.7.0)
- #endif
- */
-#ifndef CORDOVA_VERSION_MIN_REQUIRED
-    #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_3_0_0
-#endif
-
-
-/* Return the string version of the decimal version */
-#define CDV_VERSION [NSString stringWithFormat:@"%d.%d.%d", \
-        (CORDOVA_VERSION_MIN_REQUIRED / 10000),             \
-        (CORDOVA_VERSION_MIN_REQUIRED % 10000) / 100,       \
-        (CORDOVA_VERSION_MIN_REQUIRED % 10000) % 100]
-
-#ifdef __clang__
-    #define CDV_DEPRECATED(version, msg) __attribute__((deprecated("Deprecated in Cordova " #version ". " msg)))
-#else
-    #define CDV_DEPRECATED(version, msg) __attribute__((deprecated()))
-#endif
-
-// Enable this to log all exec() calls.
-#define CDV_ENABLE_EXEC_LOGGING 0
-#if CDV_ENABLE_EXEC_LOGGING
-    #define CDV_EXEC_LOG NSLog
-#else
-    #define CDV_EXEC_LOG(...) do {} while (NO)
-#endif

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandDelegate.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandDelegate.h
deleted file mode 100644
index e177c63..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandDelegate.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVAvailability.h"
-#import "CDVInvokedUrlCommand.h"
-
-@class CDVPlugin;
-@class CDVPluginResult;
-@class CDVWhitelist;
-
-@protocol CDVCommandDelegate <NSObject>
-
-@property (nonatomic, readonly) NSDictionary* settings;
-
-- (NSString*)pathForResource:(NSString*)resourcepath;
-- (id)getCommandInstance:(NSString*)pluginName;
-- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className CDV_DEPRECATED(2.2, "Use CDVViewController to register plugins, or use config.xml.");
-
-// Plugins should not be using this interface to call other plugins since it
-// will result in bogus callbacks being made.
-- (BOOL)execute:(CDVInvokedUrlCommand*)command CDV_DEPRECATED(2.2, "Use direct method calls instead.");
-
-// Sends a plugin result to the JS. This is thread-safe.
-- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId;
-// Evaluates the given JS. This is thread-safe.
-- (void)evalJs:(NSString*)js;
-// Can be used to evaluate JS right away instead of scheduling it on the run-loop.
-// This is required for dispatch resign and pause events, but should not be used
-// without reason. Without the run-loop delay, alerts used in JS callbacks may result
-// in dead-lock. This method must be called from the UI thread.
-- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop;
-// Runs the given block on a background thread using a shared thread-pool.
-- (void)runInBackground:(void (^)())block;
-// Returns the User-Agent of the associated UIWebView.
-- (NSString*)userAgent;
-// Returns whether the given URL passes the white-list.
-- (BOOL)URLIsWhitelisted:(NSURL*)url;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/18ecff57/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandDelegateImpl.h
----------------------------------------------------------------------
diff --git a/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandDelegateImpl.h b/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandDelegateImpl.h
deleted file mode 100644
index acbb236..0000000
--- a/CordovaFramework/CordovaFramework/Classes/Commands/CDVCommandDelegateImpl.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- 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.
- */
-
-#import "CDVCommandDelegate.h"
-
-@class CDVViewController;
-@class CDVCommandQueue;
-
-@interface CDVCommandDelegateImpl : NSObject <CDVCommandDelegate>{
-//    @private
-#ifdef __MAC_10_8
-    __weak
-#endif
-    CDVViewController* _viewController;
-    @protected
-    __weak CDVCommandQueue* _commandQueue;
-}
-- (id)initWithViewController:(CDVViewController*)viewController;
-@end


[12/14] mac commit: Adding better default icons and copy the project icons during build phase

Posted by sh...@apache.org.
Adding better default icons and copy the project icons during build phase

Signed-off-by: Shazron Abdullah <sh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cordova-osx/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-osx/commit/edc253bd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-osx/tree/edc253bd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-osx/diff/edc253bd

Branch: refs/heads/master
Commit: edc253bde3d3b1272e1ac721ec3606e59b12a32a
Parents: 18ecff5
Author: Tobias Bocanegra <tr...@adobe.com>
Authored: Fri Apr 18 16:53:23 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Apr 22 14:44:25 2014 -0700

----------------------------------------------------------------------
 bin/replaces                                    |  28 -------------------
 .../AppIcon.appiconset/Contents.json            |  27 +++++++++++-------
 .../AppIcon.appiconset/cordova_bot_128x128.png  | Bin 19350 -> 0 bytes
 .../AppIcon.appiconset/cordova_bot_256x256.png  | Bin 46182 -> 0 bytes
 .../AppIcon.appiconset/icon-128x128.png         | Bin 0 -> 11401 bytes
 .../AppIcon.appiconset/icon-16x16.png           | Bin 0 -> 1699 bytes
 .../AppIcon.appiconset/icon-256x256.png         | Bin 0 -> 27408 bytes
 .../AppIcon.appiconset/icon-32x32.png           | Bin 0 -> 2843 bytes
 .../AppIcon.appiconset/icon-512x512.png         | Bin 0 -> 39830 bytes
 .../AppIcon.appiconset/icon-64x64.png           | Bin 0 -> 5463 bytes
 10 files changed, 17 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/edc253bd/bin/replaces
----------------------------------------------------------------------
diff --git a/bin/replaces b/bin/replaces
deleted file mode 100755
index 09f8fe9..0000000
--- a/bin/replaces
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# 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.
-#
-
-# 
-# USAGE
-#   ./replaces path from to
-#
-# EXAMPLE
-#   ./replaces ./foo.txt FOO BAR
-#
-sed "s/$2/$3/g" "$1" > tmpFile ; mv tmpFile "$1"

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/edc253bd/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/Contents.json
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/Contents.json b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/Contents.json
index b0a0761..ec0bd42 100644
--- a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/Contents.json
+++ b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -1,50 +1,57 @@
 {
   "images" : [
     {
-      "idiom" : "mac",
       "size" : "16x16",
+      "idiom" : "mac",
+      "filename" : "icon-16x16.png",
       "scale" : "1x"
     },
     {
-      "idiom" : "mac",
       "size" : "16x16",
+      "idiom" : "mac",
+      "filename" : "icon-32x32.png",
       "scale" : "2x"
     },
     {
-      "idiom" : "mac",
       "size" : "32x32",
+      "idiom" : "mac",
+      "filename" : "icon-32x32.png",
       "scale" : "1x"
     },
     {
-      "idiom" : "mac",
       "size" : "32x32",
+      "idiom" : "mac",
+      "filename" : "icon-64x64.png",
       "scale" : "2x"
     },
     {
       "size" : "128x128",
       "idiom" : "mac",
-      "filename" : "cordova_bot_128x128.png",
+      "filename" : "icon-128x128.png",
       "scale" : "1x"
     },
     {
       "size" : "128x128",
       "idiom" : "mac",
-      "filename" : "cordova_bot_256x256.png",
+      "filename" : "icon-256x256.png",
       "scale" : "2x"
     },
     {
-      "idiom" : "mac",
       "size" : "256x256",
+      "idiom" : "mac",
+      "filename" : "icon-256x256.png",
       "scale" : "1x"
     },
     {
-      "idiom" : "mac",
       "size" : "256x256",
+      "idiom" : "mac",
+      "filename" : "icon-512x512.png",
       "scale" : "2x"
     },
     {
-      "idiom" : "mac",
       "size" : "512x512",
+      "idiom" : "mac",
+      "filename" : "icon-512x512.png",
       "scale" : "1x"
     },
     {
@@ -57,4 +64,4 @@
     "version" : 1,
     "author" : "xcode"
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/edc253bd/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_128x128.png
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_128x128.png b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_128x128.png
deleted file mode 100644
index 8a006a5..0000000
Binary files a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_128x128.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/edc253bd/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_256x256.png
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_256x256.png b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_256x256.png
deleted file mode 100644
index ed19d0a..0000000
Binary files a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/cordova_bot_256x256.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/edc253bd/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-128x128.png
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-128x128.png b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-128x128.png
new file mode 100644
index 0000000..3516df3
Binary files /dev/null and b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-128x128.png differ

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/edc253bd/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-16x16.png
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-16x16.png b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-16x16.png
new file mode 100644
index 0000000..54e19c5
Binary files /dev/null and b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-16x16.png differ

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/edc253bd/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-256x256.png
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-256x256.png b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-256x256.png
new file mode 100644
index 0000000..e1cd0e6
Binary files /dev/null and b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-256x256.png differ

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/edc253bd/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-32x32.png
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-32x32.png b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-32x32.png
new file mode 100644
index 0000000..734fffc
Binary files /dev/null and b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-32x32.png differ

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/edc253bd/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-512x512.png
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-512x512.png b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-512x512.png
new file mode 100644
index 0000000..c9465f3
Binary files /dev/null and b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-512x512.png differ

http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/edc253bd/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-64x64.png
----------------------------------------------------------------------
diff --git a/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-64x64.png b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-64x64.png
new file mode 100644
index 0000000..03b3849
Binary files /dev/null and b/templates/project/__CDV_PRODUCT_NAME__/Images.xcassets/AppIcon.appiconset/icon-64x64.png differ