incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [10/11] bin/uncrustify.sh --all
Date Fri, 21 Sep 2012 15:16:14 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/NSMutableArray+QueueAdditions.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSMutableArray+QueueAdditions.m b/CordovaLib/Classes/NSMutableArray+QueueAdditions.m
old mode 100755
new mode 100644
index 73f1cf9..9e67ede
--- a/CordovaLib/Classes/NSMutableArray+QueueAdditions.m
+++ b/CordovaLib/Classes/NSMutableArray+QueueAdditions.m
@@ -6,9 +6,9 @@
  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
@@ -21,36 +21,36 @@
 
 @implementation NSMutableArray (QueueAdditions)
 
-- (id) queueHead
+- (id)queueHead
 {
     if ([self count] == 0) {
-		return nil;
-	}
-	
+        return nil;
+    }
+
     return [self objectAtIndex:0];
 }
 
-- (__autoreleasing id) dequeue
+- (__autoreleasing id)dequeue
 {
     if ([self count] == 0) {
-		return nil;
-	}
-	
+        return nil;
+    }
+
     id head = [self objectAtIndex:0];
     if (head != nil) {
-       // [[head retain] autorelease]; ARC - the __autoreleasing on the return value should so the same thing
+        // [[head retain] autorelease]; ARC - the __autoreleasing on the return value should so the same thing
         [self removeObjectAtIndex:0];
     }
-	
+
     return head;
 }
 
-- (id) pop
+- (id)pop
 {
-	return [self dequeue];
+    return [self dequeue];
 }
 
-- (void) enqueue:(id)object 
+- (void)enqueue:(id)object
 {
     [self addObject:object];
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/UIDevice+Extensions.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/UIDevice+Extensions.h b/CordovaLib/Classes/UIDevice+Extensions.h
index 5594304..dab73e6 100644
--- a/CordovaLib/Classes/UIDevice+Extensions.h
+++ b/CordovaLib/Classes/UIDevice+Extensions.h
@@ -6,9 +6,9 @@
  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
@@ -19,15 +19,13 @@
 
 #import <Foundation/Foundation.h>
 
-@interface UIDevice(org_apache_cordova_UIDevice_Extension)
+@interface UIDevice (org_apache_cordova_UIDevice_Extension)
 
 /*
     Get the unique identifier from the app bundle's folder, which is already a GUID
     Upgrading and/or deleting the app and re-installing will get you a new GUID, so
     this is only unique per install per device.
  */
-- (NSString*) uniqueAppInstanceIdentifier;
+- (NSString*)uniqueAppInstanceIdentifier;
 
 @end
-
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/UIDevice+Extensions.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/UIDevice+Extensions.m b/CordovaLib/Classes/UIDevice+Extensions.m
index 5ec5de8..c0c91af 100644
--- a/CordovaLib/Classes/UIDevice+Extensions.m
+++ b/CordovaLib/Classes/UIDevice+Extensions.m
@@ -6,9 +6,9 @@
  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
@@ -20,29 +20,28 @@
 #import <UIKit/UIKit.h>
 #import "UIDevice+Extensions.h"
 
-@implementation UIDevice(org_apache_cordova_UIDevice_Extension)
+@implementation UIDevice (org_apache_cordova_UIDevice_Extension)
 
-- (NSString*) uniqueAppInstanceIdentifier
+- (NSString*)uniqueAppInstanceIdentifier
 {
     NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
     static NSString* UUID_KEY = @"CDVUUID";
-    
+
     NSString* app_uuid = [userDefaults stringForKey:UUID_KEY];
-    if (app_uuid == nil)
-    {
+
+    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;
 }
 
 @end
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/compatibility/0.9.6/CDV.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/compatibility/0.9.6/CDV.h b/CordovaLib/Classes/compatibility/0.9.6/CDV.h
index 7e43cdd..9794fa2 100644
--- a/CordovaLib/Classes/compatibility/0.9.6/CDV.h
+++ b/CordovaLib/Classes/compatibility/0.9.6/CDV.h
@@ -6,9 +6,9 @@
  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
@@ -20,12 +20,11 @@
 //  Bridge implementation file for using Cordova plugins in PhoneGap 0.9.6.
 //
 
-/* 
+/*
  Returns YES if it is at least version specified as NSString(X)
- Usage: 
+ Usage:
  if (IsAtLeastiOSVersion(@"5.1")) {
  // do something for iOS 5.1 or greater
  }
  */
 #define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending)
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/compatibility/0.9.6/CDVPlugin.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/compatibility/0.9.6/CDVPlugin.h b/CordovaLib/Classes/compatibility/0.9.6/CDVPlugin.h
index a05626b..7a06e51 100644
--- a/CordovaLib/Classes/compatibility/0.9.6/CDVPlugin.h
+++ b/CordovaLib/Classes/compatibility/0.9.6/CDVPlugin.h
@@ -6,9 +6,9 @@
  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
@@ -27,23 +27,20 @@
 #endif
 
 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_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 CDVPlugin : PGPlugin
 @end
 
 @interface CDVPluginResult : PluginResult
 @end
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/compatibility/0.9.6/CDVPlugin.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/compatibility/0.9.6/CDVPlugin.m b/CordovaLib/Classes/compatibility/0.9.6/CDVPlugin.m
index 2eb3143..52ccd41 100644
--- a/CordovaLib/Classes/compatibility/0.9.6/CDVPlugin.m
+++ b/CordovaLib/Classes/compatibility/0.9.6/CDVPlugin.m
@@ -6,9 +6,9 @@
  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
@@ -27,4 +27,3 @@
 
 @implementation CDVPluginResult
 @end
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/compatibility/1.5.0/CDV.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/compatibility/1.5.0/CDV.h b/CordovaLib/Classes/compatibility/1.5.0/CDV.h
index b3ddd8c..1c76eaa 100644
--- a/CordovaLib/Classes/compatibility/1.5.0/CDV.h
+++ b/CordovaLib/Classes/compatibility/1.5.0/CDV.h
@@ -6,9 +6,9 @@
  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
@@ -22,12 +22,11 @@
 
 #import <Cordova/CDV.h>
 
-/* 
+/*
  Returns YES if it is at least version specified as NSString(X)
- Usage: 
+ Usage:
  if (IsAtLeastiOSVersion(@"5.1")) {
  // do something for iOS 5.1 or greater
  }
  */
 #define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending)
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/compatibility/1.5.0/CDVPlugin.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/compatibility/1.5.0/CDVPlugin.h b/CordovaLib/Classes/compatibility/1.5.0/CDVPlugin.h
index 030b6a5..6e2c4c3 100644
--- a/CordovaLib/Classes/compatibility/1.5.0/CDVPlugin.h
+++ b/CordovaLib/Classes/compatibility/1.5.0/CDVPlugin.h
@@ -6,9 +6,9 @@
  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
@@ -21,4 +21,3 @@
 //
 
 #import <Cordova/CDVPlugin.h>
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/debugview/CDVDebugWebView.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/debugview/CDVDebugWebView.h b/CordovaLib/Classes/debugview/CDVDebugWebView.h
index 6ba4ab5..91a02ef 100644
--- a/CordovaLib/Classes/debugview/CDVDebugWebView.h
+++ b/CordovaLib/Classes/debugview/CDVDebugWebView.h
@@ -6,9 +6,9 @@
  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
@@ -22,34 +22,29 @@
 // http://opensource.apple.com/source/WebKit/WebKit-6531.9/mac/WebView/WebScriptDebugDelegate.h
 #import "WebScriptDebugDelegate.h"
 
-@interface CDVDebugWebSourceData : NSObject {
-}
+@interface CDVDebugWebSourceData : NSObject {}
 
 @property (nonatomic, assign) WebSourceId sourceId;
 @property (nonatomic, assign) WebNSUInteger baseLineNumber;
 @property (nonatomic, retain) NSURL* fromURL;
 @property (nonatomic, retain) NSArray* sourceLines;
 
-+ (NSString*) trimFilePathWithURL:(NSURL*)url;
-- (NSString*) trimFilePath;
++ (NSString*)trimFilePathWithURL:(NSURL*)url;
+- (NSString*)trimFilePath;
 
 @end
 
-@interface CDVDebugWebDelegate : NSObject {
-}
+@interface CDVDebugWebDelegate : NSObject {}
 
 // key is source id, value is a CDVDebugWebSourceData object
 @property (nonatomic, retain) NSMutableDictionary* sourceDataDict;
 
 @end
 
-@interface CDVDebugWebView : CDVCordovaView {
-}
+@interface CDVDebugWebView : CDVCordovaView {}
 @end
 
-@interface WebView {
-    
-}
-- (void) setScriptDebugDelegate:(id)delegate;
+@interface WebView {}
+- (void)setScriptDebugDelegate:(id)delegate;
 
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/debugview/CDVDebugWebView.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/debugview/CDVDebugWebView.m b/CordovaLib/Classes/debugview/CDVDebugWebView.m
index b0fbca6..7014e14 100644
--- a/CordovaLib/Classes/debugview/CDVDebugWebView.m
+++ b/CordovaLib/Classes/debugview/CDVDebugWebView.m
@@ -6,9 +6,9 @@
  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
@@ -20,24 +20,23 @@
 #import <Foundation/Foundation.h>
 #import "CDVDebugWebView.h"
 
-
 @implementation CDVDebugWebSourceData
 
 @synthesize sourceId, sourceLines, fromURL, baseLineNumber;
 
-+ (NSString*) trimFilePathWithURL:(NSURL*)url;
++ (NSString*)trimFilePathWithURL:(NSURL*)url;
 {
     NSString* bundlePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/"];
     NSString* urlPath = [url path];
-    
+
     if ([urlPath hasPrefix:bundlePath]) {
         urlPath = [urlPath substringFromIndex:[bundlePath length]];
     }
-    
+
     return urlPath;
 }
 
-- (NSString*) trimFilePath
+- (NSString*)trimFilePath
 {
     return [[self class] trimFilePathWithURL:self.fromURL];
 }
@@ -52,109 +51,109 @@
  }
  */
 
-
 @implementation CDVDebugWebDelegate
 
 @synthesize sourceDataDict;
 
-- (id) init
+- (id)init
 {
     self = [super init];
     if (self) {
         self.sourceDataDict = [NSMutableDictionary dictionaryWithCapacity:3];
     }
-    
+
     return self;
 }
 
 // some source was parsed, establishing a "source ID" (>= 0) for future reference
 // this delegate method is deprecated, please switch to the new version below
-- (void) webView:(WebView *)webView       didParseSource:(NSString *)source
-        fromURL:(NSString *)url
+- (void)webView:(WebView*)webView didParseSource:(NSString*)source
+        fromURL:(NSString*)url
        sourceId:(WebSourceId)sid
-    forWebFrame:(WebFrame *)webFrame
+    forWebFrame:(WebFrame*)webFrame
 {
-    NSLog(@"deprecated, use newer delegate function webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame"); 
+    NSLog(@"deprecated, use newer delegate function webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame");
 }
 
 // some source was parsed, establishing a "source ID" (>= 0) for future reference
-- (void) webView:(WebView *)webView       didParseSource:(NSString *)source
- baseLineNumber:(WebNSUInteger)lineNumber
-        fromURL:(NSURL *)url
-       sourceId:(WebSourceId)sid
-    forWebFrame:(WebFrame *)webFrame
+- (void)  webView:(WebView*)webView didParseSource:(NSString*)source
+   baseLineNumber:(WebNSUInteger)lineNumber
+          fromURL:(NSURL*)url
+         sourceId:(WebSourceId)sid
+      forWebFrame:(WebFrame*)webFrame
 {
     CDVDebugWebSourceData* sourceData = [[[CDVDebugWebSourceData alloc] init] autorelease];
+
     sourceData.sourceId = sid;
     sourceData.sourceLines = [source componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]];
     sourceData.fromURL = url;
     // this is for example if you have JavaScript in a script tag, the baseLineNumber is the position of this script tag in the html file
     sourceData.baseLineNumber = lineNumber;
-    
+
     [self.sourceDataDict setObject:sourceData forKey:[NSNumber numberWithInt:sid]];
 }
 
 // some source failed to parse
-- (void) webView:(WebView *)webView  failedToParseSource:(NSString *)source
- baseLineNumber:(WebNSUInteger)lineNumber
-        fromURL:(NSURL *)url
-      withError:(NSError *)error
-    forWebFrame:(WebFrame *)webFrame
+- (void)  webView:(WebView*)webView failedToParseSource:(NSString*)source
+   baseLineNumber:(WebNSUInteger)lineNumber
+          fromURL:(NSURL*)url
+        withError:(NSError*)error
+      forWebFrame:(WebFrame*)webFrame
 {
-    NSString* urlStr = url? [CDVDebugWebSourceData trimFilePathWithURL:url] : @"obj-c";                                     
+    NSString* urlStr = url ?[CDVDebugWebSourceData trimFilePathWithURL:url] : @"obj-c";
+
     NSLog(@"JavaScript parse error: (%@) - %@", urlStr, [error description]);
 }
 
 // just entered a stack frame (i.e. called a function, or started global scope)
-- (void) webView:(WebView *)webView    didEnterCallFrame:(WebScriptCallFrame *)frame
+- (void)webView:(WebView*)webView didEnterCallFrame:(WebScriptCallFrame*)frame
        sourceId:(WebSourceId)sid
            line:(int)lineno
-    forWebFrame:(WebFrame *)webFrame
+    forWebFrame:(WebFrame*)webFrame
 {
     // TODO: do something? perhaps if we had a JS debugger UI thingy with breakpoint support
 }
 
 // about to execute some code
-- (void) webView:(WebView *)webView willExecuteStatement:(WebScriptCallFrame *)frame
+- (void)webView:(WebView*)webView willExecuteStatement:(WebScriptCallFrame*)frame
        sourceId:(WebSourceId)sid
            line:(int)lineno
-    forWebFrame:(WebFrame *)webFrame
+    forWebFrame:(WebFrame*)webFrame
 {
     // TODO: do something? perhaps if we had a JS debugger UI thingy with breakpoint support
 }
 
 // about to leave a stack frame (i.e. return from a function)
-- (void) webView:(WebView *)webView   willLeaveCallFrame:(WebScriptCallFrame *)frame
+- (void)webView:(WebView*)webView willLeaveCallFrame:(WebScriptCallFrame*)frame
        sourceId:(WebSourceId)sid
            line:(int)lineno
-    forWebFrame:(WebFrame *)webFrame
+    forWebFrame:(WebFrame*)webFrame
 {
     // TODO: do something? perhaps if we had a JS debugger UI thingy with breakpoint support
 }
 
 // exception is being thrown
-- (void) webView:(WebView *)webView   exceptionWasRaised:(WebScriptCallFrame *)frame
+- (void)webView:(WebView*)webView exceptionWasRaised:(WebScriptCallFrame*)frame
        sourceId:(WebSourceId)sid
            line:(int)lineno
-    forWebFrame:(WebFrame *)webFrame
+    forWebFrame:(WebFrame*)webFrame
 {
     WebScriptObject* exception = [frame exception]; // this is the bound JavaScript Error object which has two properties: name and message
-    
-    NSString *exceptionName, *exceptionMessage;
-    
+
+    NSString* exceptionName, * exceptionMessage;
+
     if ([exception isKindOfClass:[NSString class]]) {
         exceptionName = @"string";
         exceptionMessage = (NSString*)exception;
-    } else  if ([exception isKindOfClass:[NSNumber class]]) {
+    } else if ([exception isKindOfClass:[NSNumber class]]) {
         exceptionName = @"number";
-        exceptionMessage = [((NSNumber*)exception) stringValue];
-    } 
-    else {
+        exceptionMessage = [((NSNumber*)exception)stringValue];
+    } else {
         // we use KVC to extract the name and message
-        @try  {
+        @try {
             exceptionName = [exception valueForKey:@"name"];
             exceptionMessage = [exception valueForKey:@"message"];
-        } @catch (NSException* exc) {
+        } @catch(NSException* exc) {
             if ([[exc name] isEqualToString:NSUndefinedKeyException]) {
                 exceptionName = @"type unknown";
                 exceptionMessage = @"(not an exception object)";
@@ -163,13 +162,13 @@
     }
 
     CDVDebugWebSourceData* sourceData = [self.sourceDataDict objectForKey:[NSNumber numberWithInt:sid]];
-    
+
     NSUInteger max_lines = [sourceData.sourceLines count];
     if (lineno > max_lines) {
         lineno = max_lines;
     }
-    NSString* url = sourceData.fromURL? [sourceData trimFilePath] : @"obj-c";
-    NSString* line = [sourceData.sourceLines objectAtIndex:lineno-1];
+    NSString* url = sourceData.fromURL ?[sourceData trimFilePath] : @"obj-c";
+    NSString* line = [sourceData.sourceLines objectAtIndex:lineno - 1];
 
     NSLog(@"JavaScript exception: (%@):%d - %@ - %@\n\tFunction name: '%@'\tLine: '%@'", url, lineno, exceptionName, exceptionMessage, [frame functionName], line);
 }
@@ -178,34 +177,34 @@
 
 @implementation CDVDebugWebView
 
-- (id) initWithFrame:(CGRect)bounds
+- (id)initWithFrame:(CGRect)bounds
 {
     self = [super initWithFrame:bounds];
-    if (self) 
-    {
+    if (self) {
         NSString* message = [NSString stringWithFormat:
-                             NSLocalizedString(
-                                            @"You are using the %@ class which should not be included in builds for the Apple App Store.",
-                                            @"You are using the %@ class which should not be included in builds for the Apple App Store."
-                                               ), NSStringFromClass([self class])]; 
-        
+            NSLocalizedString(
+                @"You are using the %@ class which should not be included in builds for the Apple App Store.",
+                @"You are using the %@ class which should not be included in builds for the Apple App Store."
+                ), NSStringFromClass([self class])];
+
         UIAlertView* alertView = [[UIAlertView alloc]
-                                   initWithTitle:@"WARNING!"
-                                   message:message 
-                                   delegate:self 
-                                   cancelButtonTitle:nil 
-                                   otherButtonTitles:@"OK",nil];
-        
+                initWithTitle:@"WARNING!"
+                      message:message
+                     delegate:self
+            cancelButtonTitle:nil
+            otherButtonTitles:@"OK", nil];
+
         [alertView show];
         [alertView release];
     }
     return self;
 }
 
-- (void) webView:(id)sender didClearWindowObject:(id)windowObject forFrame:(WebFrame*)frame
+- (void)webView:(id)sender didClearWindowObject:(id)windowObject forFrame:(WebFrame*)frame
 {
     if ([sender respondsToSelector:@selector(setScriptDebugDelegate:)]) {
         [sender setScriptDebugDelegate:[[CDVDebugWebDelegate alloc] init]];
     }
 }
+
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/debugview/WebScriptDebugDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/debugview/WebScriptDebugDelegate.h b/CordovaLib/Classes/debugview/WebScriptDebugDelegate.h
index ef73f3c..fb31121 100644
--- a/CordovaLib/Classes/debugview/WebScriptDebugDelegate.h
+++ b/CordovaLib/Classes/debugview/WebScriptDebugDelegate.h
@@ -6,13 +6,13 @@
  * are met:
  *
  * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
+ *     notice, this list of conditions and the following disclaimer.
  * 2.  Redistributions in binary form must reproduce the above copyright
  *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
+ *     documentation and/or other materials provided with the distribution.
  * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
  *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
+ *     from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -37,9 +37,9 @@ typedef int WebSourceId;
 @class WebScriptCallFramePrivate;
 @class WebScriptObject;
 
-extern NSString * const WebScriptErrorDomain;
-extern NSString * const WebScriptErrorDescriptionKey;
-extern NSString * const WebScriptErrorLineNumberKey;
+extern NSString* const WebScriptErrorDomain;
+extern NSString* const WebScriptErrorDescriptionKey;
+extern NSString* const WebScriptErrorLineNumberKey;
 
 enum {
     WebScriptGeneralErrorCode = -100
@@ -51,61 +51,59 @@ enum {
 
 // some source was parsed, establishing a "source ID" (>= 0) for future reference
 // this delegate method is deprecated, please switch to the new version below
-- (void)webView:(WebView *)webView       didParseSource:(NSString *)source
-                                                fromURL:(NSString *)url
-                                               sourceId:(WebSourceId)sid
-                                            forWebFrame:(WebFrame *)webFrame;
+- (void)webView:(WebView*)webView didParseSource:(NSString*)source
+       fromURL     :(NSString*)url
+      sourceId    :(WebSourceId)sid
+   forWebFrame :(WebFrame*)webFrame;
 
 // some source was parsed, establishing a "source ID" (>= 0) for future reference
-- (void)webView:(WebView *)webView       didParseSource:(NSString *)source
-                                         baseLineNumber:(WebNSUInteger)lineNumber
-                                                fromURL:(NSURL *)url
-                                               sourceId:(WebSourceId)sid
-                                            forWebFrame:(WebFrame *)webFrame;
+- (void)webView  :(WebView*)webView didParseSource:(NSString*)source
+   baseLineNumber:(WebNSUInteger)lineNumber
+          fromURL       :(NSURL*)url
+         sourceId      :(WebSourceId)sid
+      forWebFrame   :(WebFrame*)webFrame;
 
 // some source failed to parse
-- (void)webView:(WebView *)webView  failedToParseSource:(NSString *)source
-                                         baseLineNumber:(WebNSUInteger)lineNumber
-                                                fromURL:(NSURL *)url
-                                              withError:(NSError *)error
-                                            forWebFrame:(WebFrame *)webFrame;
+- (void)webView  :(WebView*)webView failedToParseSource:(NSString*)source
+   baseLineNumber:(WebNSUInteger)lineNumber
+          fromURL       :(NSURL*)url
+        withError     :(NSError*)error
+      forWebFrame   :(WebFrame*)webFrame;
 
 // just entered a stack frame (i.e. called a function, or started global scope)
-- (void)webView:(WebView *)webView    didEnterCallFrame:(WebScriptCallFrame *)frame
-                                               sourceId:(WebSourceId)sid
-                                                   line:(int)lineno
-                                            forWebFrame:(WebFrame *)webFrame;
+- (void)webView:(WebView*)webView didEnterCallFrame:(WebScriptCallFrame*)frame
+      sourceId    :(WebSourceId)sid
+          line        :(int)lineno
+   forWebFrame :(WebFrame*)webFrame;
 
 // about to execute some code
-- (void)webView:(WebView *)webView willExecuteStatement:(WebScriptCallFrame *)frame
-                                               sourceId:(WebSourceId)sid
-                                                   line:(int)lineno
-                                            forWebFrame:(WebFrame *)webFrame;
+- (void)webView:(WebView*)webView willExecuteStatement:(WebScriptCallFrame*)frame
+      sourceId    :(WebSourceId)sid
+          line        :(int)lineno
+   forWebFrame :(WebFrame*)webFrame;
 
 // about to leave a stack frame (i.e. return from a function)
-- (void)webView:(WebView *)webView   willLeaveCallFrame:(WebScriptCallFrame *)frame
-                                               sourceId:(WebSourceId)sid
-                                                   line:(int)lineno
-                                            forWebFrame:(WebFrame *)webFrame;
+- (void)webView:(WebView*)webView willLeaveCallFrame:(WebScriptCallFrame*)frame
+      sourceId    :(WebSourceId)sid
+          line        :(int)lineno
+   forWebFrame :(WebFrame*)webFrame;
 
 // exception is being thrown
-- (void)webView:(WebView *)webView   exceptionWasRaised:(WebScriptCallFrame *)frame
-                                               sourceId:(WebSourceId)sid
-                                                   line:(int)lineno
-                                            forWebFrame:(WebFrame *)webFrame;
+- (void)webView:(WebView*)webView exceptionWasRaised:(WebScriptCallFrame*)frame
+      sourceId    :(WebSourceId)sid
+          line        :(int)lineno
+   forWebFrame :(WebFrame*)webFrame;
 @end
 
-
-
 // WebScriptCallFrame interface
 //
 // These objects are passed as arguments to the debug delegate.
 
 @interface WebScriptCallFrame : NSObject
 {
-@private
+    @private
     WebScriptCallFramePrivate* _private;
-    id                         _userInfo;
+    id _userInfo;
 }
 
 // associate user info with frame
@@ -115,21 +113,20 @@ enum {
 - (id)userInfo;
 
 // get next frame on call stack (or nil if this is already the "global" frame)
-- (WebScriptCallFrame *)caller;
+- (WebScriptCallFrame*)caller;
 
 // get array of WebScriptObjects for each scope (innermost first, last is always global object)
-- (NSArray *)scopeChain;
+- (NSArray*)scopeChain;
 
 // get name of function (if available) or nil
-- (NSString *)functionName;
+- (NSString*)functionName;
 
 // get pending exception (if any) or nil
 - (id)exception;
 
 // evaluate a script (as if by "eval") in the context of this frame
-- (id)evaluateWebScript:(NSString *)script;
+- (id)evaluateWebScript:(NSString*)script;
 
 @end
 
 #undef WebNSUInteger
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/deprecated/CDVDeprecated.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/deprecated/CDVDeprecated.h b/CordovaLib/Classes/deprecated/CDVDeprecated.h
index e2a683d..eb9666e 100644
--- a/CordovaLib/Classes/deprecated/CDVDeprecated.h
+++ b/CordovaLib/Classes/deprecated/CDVDeprecated.h
@@ -6,9 +6,9 @@
  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
@@ -22,31 +22,29 @@
 //  Apache Cordova
 //
 //  Bridge header file for Cordova 1.5 upgrades.
-//  Replace "#import PHONEGAP_FRAMEWORK" block in AppDelegate.h, AppDelegate.m, 
+//  Replace "#import PHONEGAP_FRAMEWORK" block in AppDelegate.h, AppDelegate.m,
 //      MainViewController.h with this header
 //
 
 #ifdef CORDOVA_FRAMEWORK
-	#import <Cordova/CDV.h>
+    #import <Cordova/CDV.h>
 #else
-	#import "CDV.h"
+    #import "CDV.h"
 #endif
 
-__attribute__ ((deprecated)) @interface PGPlugin : CDVPlugin
+__attribute__((deprecated)) @interface PGPlugin : CDVPlugin
 @end
 
-__attribute__ ((deprecated)) @interface PGViewController : CDVViewController
+__attribute__((deprecated)) @interface PGViewController : CDVViewController
 @end
 
-
-__attribute__ ((deprecated)) @interface PGURLProtocol : CDVURLProtocol
+__attribute__((deprecated)) @interface PGURLProtocol : CDVURLProtocol
 @end
 
-__attribute__ ((deprecated)) @interface InvokedUrlCommand : CDVInvokedUrlCommand
+__attribute__((deprecated)) @interface InvokedUrlCommand : CDVInvokedUrlCommand
 @end
 
-__attribute__ ((deprecated))  @protocol PGCommandDelegate <CDVCommandDelegate>
+__attribute__((deprecated))  @protocol PGCommandDelegate <CDVCommandDelegate>
 @end
 
-
 #define PGPluginHandleOpenURLNotification CDVPluginHandleOpenURLNotification

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/deprecated/CDVDeprecated.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/deprecated/CDVDeprecated.m b/CordovaLib/Classes/deprecated/CDVDeprecated.m
index 225cf12..4d7714c 100644
--- a/CordovaLib/Classes/deprecated/CDVDeprecated.m
+++ b/CordovaLib/Classes/deprecated/CDVDeprecated.m
@@ -6,9 +6,9 @@
  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
@@ -31,10 +31,8 @@
 @implementation PGViewController
 @end
 
-
 @implementation PGURLProtocol
 @end
 
 @implementation InvokedUrlCommand
 @end
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibApp/AppDelegate.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibApp/AppDelegate.h b/CordovaLib/CordovaLibApp/AppDelegate.h
index 65a80fc..d26fb8e 100644
--- a/CordovaLib/CordovaLibApp/AppDelegate.h
+++ b/CordovaLib/CordovaLibApp/AppDelegate.h
@@ -6,9 +6,9 @@
  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
@@ -23,9 +23,9 @@
 
 @interface AppDelegate : UIResponder <UIApplicationDelegate>
 
-@property (strong, nonatomic) UIWindow *window;
+@property (strong, nonatomic) UIWindow* window;
 
-@property (strong, nonatomic) ViewController *viewController;
+@property (strong, nonatomic) ViewController* viewController;
 
 - (void)createViewController;
 - (void)destroyViewController;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibApp/AppDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibApp/AppDelegate.m b/CordovaLib/CordovaLibApp/AppDelegate.m
index 2a719d8..d47892d 100644
--- a/CordovaLib/CordovaLibApp/AppDelegate.m
+++ b/CordovaLib/CordovaLibApp/AppDelegate.m
@@ -6,9 +6,9 @@
  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
@@ -27,77 +27,80 @@
 @synthesize window = _window;
 @synthesize viewController = _viewController;
 
-- (id) init
-{ 
-    NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; 
+- (id)init
+{
+    NSHTTPCookieStorage* cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
+
     [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
-        
+
     [CDVURLProtocol registerURLProtocol];
-    
+
     self = [super init];
     return self;
 }
 
-- (void)createViewController {
+- (void)createViewController
+{
     NSAssert(!self.viewController, @"ViewController already created.");
-    
+
     self.viewController = [[ViewController alloc] init];
     self.viewController.useSplashScreen = YES;
     self.viewController.wwwFolderName = @"www";
     self.viewController.startPage = @"index.html";
-    
+
     // NOTE: To control the view's frame size, override [self.viewController viewWillAppear:] in your view controller.
-    
+
     self.window.rootViewController = self.viewController;
 }
 
-- (void)destroyViewController {
+- (void)destroyViewController
+{
     // Clean up circular refs so that the view controller will actully be released.
     [self.viewController dispose];
     self.viewController = nil;
     self.window.rootViewController = nil;
 }
 
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{    
+- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
+{
     CGRect screenBounds = [[UIScreen mainScreen] bounds];
+
     self.window = [[UIWindow alloc] initWithFrame:screenBounds];
     self.window.autoresizesSubviews = YES;
-    
+
     // Create the main view on start-up only when not running unit tests.
     if (!NSClassFromString(@"CDVWebViewTest")) {
         [self createViewController];
     }
-    
+
     [self.window makeKeyAndVisible];
 
     return YES;
 }
 
-- (void)applicationWillResignActive:(UIApplication *)application
+- (void)applicationWillResignActive:(UIApplication*)application
 {
     // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
     // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
 }
 
-- (void)applicationDidEnterBackground:(UIApplication *)application
+- (void)applicationDidEnterBackground:(UIApplication*)application
 {
-    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 
+    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
     // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
 }
 
-- (void)applicationWillEnterForeground:(UIApplication *)application
+- (void)applicationWillEnterForeground:(UIApplication*)application
 {
     // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
 }
 
-- (void)applicationDidBecomeActive:(UIApplication *)application
+- (void)applicationDidBecomeActive:(UIApplication*)application
 {
     // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
 }
 
-- (void)applicationWillTerminate:(UIApplication *)application
+- (void)applicationWillTerminate:(UIApplication*)application
 {
     // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibApp/ViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibApp/ViewController.h b/CordovaLib/CordovaLibApp/ViewController.h
index b03fef7..befeaae 100644
--- a/CordovaLib/CordovaLibApp/ViewController.h
+++ b/CordovaLib/CordovaLibApp/ViewController.h
@@ -6,9 +6,9 @@
  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

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibApp/ViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibApp/ViewController.m b/CordovaLib/CordovaLibApp/ViewController.m
index 68c608b..81be8ec 100644
--- a/CordovaLib/CordovaLibApp/ViewController.m
+++ b/CordovaLib/CordovaLibApp/ViewController.m
@@ -6,9 +6,9 @@
  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
@@ -30,14 +30,14 @@
     // Set the main view to utilize the entire application frame space of the device.
     // Change this to suit your view's UI footprint needs in your application.
     self.view.frame = [[UIScreen mainScreen] applicationFrame];
-    
+
     [super viewWillAppear:animated];
 }
 
 - (void)viewDidLoad
 {
     [super viewDidLoad];
-	// Do any additional setup after loading the view, typically from a nib.
+    // Do any additional setup after loading the view, typically from a nib.
 }
 
 - (void)viewDidUnload

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibApp/main.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibApp/main.m b/CordovaLib/CordovaLibApp/main.m
index e8a42e4..120ac53 100644
--- a/CordovaLib/CordovaLibApp/main.m
+++ b/CordovaLib/CordovaLibApp/main.m
@@ -6,9 +6,9 @@
  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
@@ -17,12 +17,11 @@
  under the License.
  */
 
-
 #import <UIKit/UIKit.h>
 
 #import "AppDelegate.h"
 
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
 {
     @autoreleasepool {
         return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibTests/CDVBase64Tests.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVBase64Tests.m b/CordovaLib/CordovaLibTests/CDVBase64Tests.m
index e7ccf1a..70fb38e 100644
--- a/CordovaLib/CordovaLibTests/CDVBase64Tests.m
+++ b/CordovaLib/CordovaLibTests/CDVBase64Tests.m
@@ -6,9 +6,9 @@
  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
@@ -29,7 +29,7 @@
 - (void)setUp
 {
     [super setUp];
-    
+
     // setup code here
 }
 
@@ -40,24 +40,24 @@
     [super tearDown];
 }
 
-- (void) testBase64Encode
+- (void)testBase64Encode
 {
     NSString* decodedString = @"abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&";
     NSData* decodedData = [decodedString dataUsingEncoding:NSUTF8StringEncoding];
 
     NSString* expectedEncodedString = @"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwIUAjJCVeJg==";
     NSString* actualEncodedString = [decodedData base64EncodedString];
-    
+
     STAssertTrue([expectedEncodedString isEqualToString:actualEncodedString], nil);
 }
 
-- (void) testBase64Decode
+- (void)testBase64Decode
 {
     NSString* encodedString = @"YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY3ODkwIUAjJCVeJg==";
     NSString* decodedString = @"abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&";
     NSData* encodedData = [decodedString dataUsingEncoding:NSUTF8StringEncoding];
     NSData* decodedData = [NSData dataFromBase64String:encodedString];
-    
+
     STAssertTrue([encodedData isEqualToData:decodedData], nil);
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibTests/CDVContactsTests.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVContactsTests.m b/CordovaLib/CordovaLibTests/CDVContactsTests.m
index 52525ac..f239bba 100644
--- a/CordovaLib/CordovaLibTests/CDVContactsTests.m
+++ b/CordovaLib/CordovaLibTests/CDVContactsTests.m
@@ -6,9 +6,9 @@
  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
@@ -37,24 +37,24 @@
     [super tearDown];
 }
 
-- (void) testSearchContacts
+- (void)testSearchContacts
 {
-	STAssertTrue(NO, @"TODO: testSearchContacts");
+    STAssertTrue(NO, @"TODO: testSearchContacts");
 }
 
-- (void) testSaveContact
+- (void)testSaveContact
 {
-	STAssertTrue(NO, @"TODO: testSaveContact");
+    STAssertTrue(NO, @"TODO: testSaveContact");
 }
 
-- (void) testNewContact
+- (void)testNewContact
 {
-	STAssertTrue(NO, @"TODO: testNewContact");
+    STAssertTrue(NO, @"TODO: testNewContact");
 }
 
-- (void) testRemoveContact
+- (void)testRemoveContact
 {
-	STAssertTrue(NO, @"TODO: testRemoveContact");
+    STAssertTrue(NO, @"TODO: testRemoveContact");
 }
 
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibTests/CDVFakeFileManager.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVFakeFileManager.h b/CordovaLib/CordovaLibTests/CDVFakeFileManager.h
index eaf38ed..41e5523 100644
--- a/CordovaLib/CordovaLibTests/CDVFakeFileManager.h
+++ b/CordovaLib/CordovaLibTests/CDVFakeFileManager.h
@@ -6,9 +6,9 @@
  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
@@ -24,8 +24,8 @@ typedef BOOL (^CDVFileExistsBlock)(NSString*);
 // Used in place of an NSFileManager for unit tests. It implements only those functions
 // which are required by the tests that use it.
 @interface CDVFakeFileManager : NSObject {
- @private
-  CDVFileExistsBlock _fileExistsBlock;
+    @private
+    CDVFileExistsBlock _fileExistsBlock;
 }
 
 - (id)initWithFileExistsBlock:(CDVFileExistsBlock)fileExistsBlock;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibTests/CDVFakeFileManager.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVFakeFileManager.m b/CordovaLib/CordovaLibTests/CDVFakeFileManager.m
index edbaad6..1aa7f12 100644
--- a/CordovaLib/CordovaLibTests/CDVFakeFileManager.m
+++ b/CordovaLib/CordovaLibTests/CDVFakeFileManager.m
@@ -6,9 +6,9 @@
  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
@@ -21,7 +21,8 @@
 
 @implementation CDVFakeFileManager
 
-- (id)initWithFileExistsBlock:(CDVFileExistsBlock)fileExistsBlock {
+- (id)initWithFileExistsBlock:(CDVFileExistsBlock)fileExistsBlock
+{
     self = [super init];
     if (self != nil) {
         _fileExistsBlock = [fileExistsBlock copy];
@@ -29,16 +30,19 @@
     return self;
 }
 
-- (void)dealloc {
+- (void)dealloc
+{
     [_fileExistsBlock release];
     [super dealloc];
 }
 
-+ (id)managerWithFileExistsBlock:(CDVFileExistsBlock)fileExistsBlock {
++ (id)managerWithFileExistsBlock:(CDVFileExistsBlock)fileExistsBlock
+{
     return [[[CDVFakeFileManager alloc] initWithFileExistsBlock:fileExistsBlock] autorelease];
 }
 
-- (BOOL)fileExistsAtPath:(NSString*)path {
+- (BOOL)fileExistsAtPath:(NSString*)path
+{
     return _fileExistsBlock(path);
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibTests/CDVFileTransferTests.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVFileTransferTests.m b/CordovaLib/CordovaLibTests/CDVFileTransferTests.m
index 22c609a..4f1c617 100644
--- a/CordovaLib/CordovaLibTests/CDVFileTransferTests.m
+++ b/CordovaLib/CordovaLibTests/CDVFileTransferTests.m
@@ -6,9 +6,9 @@
  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
@@ -28,14 +28,16 @@ static NSString* const kDummyArgServer = @"http://apache.org";
 static NSString* const kDummyFileContents = @"0123456789";
 
 // Reads the given stream and returns the contents as an NSData.
-static NSData* readStream(NSInputStream* stream) {
+static NSData *readStream(NSInputStream* stream)
+{
     static const NSUInteger kBufferSize = 1024;
-        
+
     UInt8* buffer = malloc(kBufferSize);
     NSMutableData* streamData = [NSMutableData data];
-    
+
     [stream open];
-    for (;;) {
+
+    for (;; ) {
         NSInteger read = [stream read:buffer maxLength:kBufferSize];
         if (read > 0) {
             [streamData appendBytes:buffer length:read];
@@ -43,6 +45,7 @@ static NSData* readStream(NSInputStream* stream) {
             break;
         }
     }
+
     free(buffer);
     [stream close];
     return streamData;
@@ -60,7 +63,7 @@ static NSData* readStream(NSInputStream* stream) {
 - (void)setUp
 {
     [super setUp];
-    
+
     _arguments = [[NSMutableArray alloc] initWithObjects:
         kDummyArgTarget, kDummyArgServer, kDummyArgFileKey, [NSNull null],
         [NSNull null], [NSNull null], [NSNull null], [NSNull null], [NSNull null], nil];
@@ -79,35 +82,43 @@ static NSData* readStream(NSInputStream* stream) {
     [super tearDown];
 }
 
-- (void)setFilePathArg:(NSString*)filePath {
+- (void)setFilePathArg:(NSString*)filePath
+{
     [_arguments replaceObjectAtIndex:0 withObject:filePath];
 }
 
-- (void)setServerUrlArg:(NSString*)serverUrl {
+- (void)setServerUrlArg:(NSString*)serverUrl
+{
     [_arguments replaceObjectAtIndex:1 withObject:serverUrl];
 }
 
-- (void)setChunkedModeArg:(BOOL)chunk {
+- (void)setChunkedModeArg:(BOOL)chunk
+{
     [_arguments replaceObjectAtIndex:7 withObject:[NSNumber numberWithBool:chunk]];
 }
 
-- (void)setParams:(NSDictionary*)params {
+- (void)setParams:(NSDictionary*)params
+{
     [_arguments replaceObjectAtIndex:5 withObject:params];
 }
 
-- (void)setHeaders:(NSDictionary*)headers {
+- (void)setHeaders:(NSDictionary*)headers
+{
     [_arguments replaceObjectAtIndex:8 withObject:headers];
 }
 
-- (NSURLRequest*)requestForUpload {
+- (NSURLRequest*)requestForUpload
+{
     CDVInvokedUrlCommand* command = [[[CDVInvokedUrlCommand alloc] initWithArguments:_arguments
                                                                           callbackId:kDummyArgCallbackId
                                                                            className:@"FileTransfer"
                                                                           methodName:@"upload"] autorelease];
+
     return [_fileTransfer requestForUploadCommand:command fileData:_dummyFileData];
 }
 
-- (void)checkUploadRequest:(NSURLRequest*)request chunked:(BOOL)chunked {
+- (void)checkUploadRequest:(NSURLRequest*)request chunked:(BOOL)chunked
+{
     STAssertTrue([@"POST" isEqualToString:[request HTTPMethod]], nil);
     NSData* payloadData = nil;
     if (chunked) {
@@ -124,17 +135,18 @@ static NSData* readStream(NSInputStream* stream) {
     STAssertEquals([payloadData length], contentLength, nil);
 }
 
-- (void)testEscapePathComponentForUrlString {
+- (void)testEscapePathComponentForUrlString
+{
     STAssertTrue([@"" isEqualToString:
-        [_fileTransfer escapePathComponentForUrlString:@""]], nil);
+            [_fileTransfer escapePathComponentForUrlString:@""]], nil);
     STAssertTrue([@"foo" isEqualToString:
-        [_fileTransfer escapePathComponentForUrlString:@"foo"]], nil);
+            [_fileTransfer escapePathComponentForUrlString:@"foo"]], nil);
     STAssertTrue([@"http://a.org/spa%20ce%25" isEqualToString:
-        [_fileTransfer escapePathComponentForUrlString:@"http://a.org/spa ce%"]], nil);
+            [_fileTransfer escapePathComponentForUrlString:@"http://a.org/spa ce%"]], nil);
     STAssertTrue([@"http://a.org/spa%20ce%25/" isEqualToString:
-        [_fileTransfer escapePathComponentForUrlString:@"http://a.org/spa ce%/"]], nil);
+            [_fileTransfer escapePathComponentForUrlString:@"http://a.org/spa ce%/"]], nil);
     STAssertTrue([@"http://a.org/%25/%25/" isEqualToString:
-        [_fileTransfer escapePathComponentForUrlString:@"http://a.org/%/%/"]], nil);
+            [_fileTransfer escapePathComponentForUrlString:@"http://a.org/%/%/"]], nil);
 }
 
 - (void)testUpload_invalidServerUrl
@@ -195,7 +207,7 @@ static NSData* readStream(NSInputStream* stream) {
 {
     [self setChunkedModeArg:NO];
     [self setHeaders:[NSDictionary dictionaryWithObjectsAndKeys:@"val1", @"key1",
-        [NSArray arrayWithObjects:@"val2a", @"val2b", nil], @"key2", [NSNull null], @"X-Requested-With", nil]];
+            [NSArray arrayWithObjects:@"val2a", @"val2b", nil], @"key2", [NSNull null], @"X-Requested-With", nil]];
     NSURLRequest* request = [self requestForUpload];
     STAssertTrue([@"val1" isEqualToString:[request valueForHTTPHeaderField:@"key1"]], nil);
     STAssertTrue([@"val2a,val2b" isEqualToString:[request valueForHTTPHeaderField:@"key2"]], nil);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibTests/CDVInvokedUrlCommandTests.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVInvokedUrlCommandTests.m b/CordovaLib/CordovaLibTests/CDVInvokedUrlCommandTests.m
index 0b50f78..a2366fb 100644
--- a/CordovaLib/CordovaLibTests/CDVInvokedUrlCommandTests.m
+++ b/CordovaLib/CordovaLibTests/CDVInvokedUrlCommandTests.m
@@ -6,9 +6,9 @@
  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
@@ -26,36 +26,38 @@
 
 @implementation CDVInvokedUrlCommandTests
 
-- (void) testInitWithNoArgs
+- (void)testInitWithNoArgs
 {
     NSArray* jsonArr = [NSArray arrayWithObjects:@"callbackId", @"className", @"methodName", [NSArray array], nil];
     CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonArr];
+
     STAssertEquals(@"callbackId", command.callbackId, nil);
     STAssertEquals(@"className", command.className, nil);
     STAssertEquals(@"methodName", command.methodName, nil);
     STAssertEquals([NSArray array], command.arguments, nil);
 }
 
-- (void) testLegacyArgsNoDict
+- (void)testLegacyArgsNoDict
 {
     NSArray* args = [NSArray arrayWithObjects:@"a", @"b", nil];
     NSArray* jsonArr = [NSArray arrayWithObjects:@"callbackId", @"className", @"methodName", args, nil];
     CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonArr];
     NSMutableArray* legacyArgs = nil;
     NSMutableDictionary* dict = nil;
+
     [command legacyArguments:&legacyArgs andDict:&dict];
     // Ensure properties don't change.
     STAssertEquals(@"callbackId", command.callbackId, nil);
     STAssertEquals(@"className", command.className, nil);
     STAssertEquals(@"methodName", command.methodName, nil);
     STAssertEquals(args, command.arguments, nil);
-    
+
     NSArray* expected = [NSArray arrayWithObjects:@"callbackId", @"a", @"b", nil];
     STAssertEqualObjects(expected, legacyArgs, nil);
     STAssertNil(dict, nil);
 }
 
-- (void) testLegacyArgsWithDicts
+- (void)testLegacyArgsWithDicts
 {
     NSDictionary* dummyDict1 = [NSDictionary dictionaryWithObjectsAndKeys:@"val", @"key", nil];
     NSDictionary* dummyDict2 = [NSDictionary dictionaryWithObjectsAndKeys:@"val", @"key", nil];
@@ -64,30 +66,31 @@
     CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonArr];
     NSMutableArray* legacyArgs = nil;
     NSMutableDictionary* dict = nil;
+
     [command legacyArguments:&legacyArgs andDict:&dict];
     // Ensure properties don't change.
     STAssertEquals(@"callbackId", command.callbackId, nil);
     STAssertEquals(@"className", command.className, nil);
     STAssertEquals(@"methodName", command.methodName, nil);
     STAssertEquals(args, command.arguments, nil);
-    
+
     NSArray* expected = [NSArray arrayWithObjects:@"callbackId", @"a", dummyDict2, @"b", nil];
     STAssertEqualObjects(expected, legacyArgs, nil);
     STAssertEqualObjects(dict, dummyDict1, nil);
 }
 
-- (void) testLegacyArgsNoCallbackId
+- (void)testLegacyArgsNoCallbackId
 {
     NSArray* args = [NSArray arrayWithObjects:@"a", @"b", nil];
     NSArray* jsonArr = [NSArray arrayWithObjects:[NSNull null], @"className", @"methodName", args, nil];
     CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonArr];
     NSMutableArray* legacyArgs = nil;
     NSMutableDictionary* dict = nil;
+
     [command legacyArguments:&legacyArgs andDict:&dict];
-    
+
     NSArray* expected = [NSArray arrayWithObjects:@"a", @"b", nil];
     STAssertEqualObjects(expected, legacyArgs, nil);
 }
 
-
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibTests/CDVLocalStorageTests.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVLocalStorageTests.m b/CordovaLib/CordovaLibTests/CDVLocalStorageTests.m
index fca0586..91bfbd2 100644
--- a/CordovaLib/CordovaLibTests/CDVLocalStorageTests.m
+++ b/CordovaLib/CordovaLibTests/CDVLocalStorageTests.m
@@ -6,9 +6,9 @@
  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
@@ -25,10 +25,10 @@
 #import "ViewController.h"
 
 @interface CDVLocalStorageTests : CDVWebViewTest
-// Deletes LocalStorage files from disk.
+                                  // Deletes LocalStorage files from disk.
 - (void)deleteOriginals:(BOOL)originals backups:(BOOL)backups;
 // Returns the CDVLocalStorage instance from the plugins dict.
-- (CDVLocalStorage *)localStorage;
+- (CDVLocalStorage*)localStorage;
 @end
 
 @implementation CDVLocalStorageTests
@@ -47,13 +47,16 @@
     [super tearDown];
 }
 
-- (CDVLocalStorage *)localStorage {
+- (CDVLocalStorage*)localStorage
+{
     return [self pluginForClass:[CDVLocalStorage class]];
 }
 
-- (void)deleteOriginals:(BOOL)originals backups:(BOOL)backups {
+- (void)deleteOriginals:(BOOL)originals backups:(BOOL)backups
+{
     NSFileManager* fileManager = [NSFileManager defaultManager];
-    for (CDVBackupInfo *info in [self localStorage].backupInfo) {
+
+    for (CDVBackupInfo* info in [self localStorage].backupInfo) {
         if (originals) {
             [fileManager removeItemAtPath:info.original error:nil];
         }
@@ -65,33 +68,34 @@
 
 - (void)testBackupAndRestore
 {
-    CDVLocalStorage *localStorage = [self localStorage];
+    CDVLocalStorage* localStorage = [self localStorage];
+
     [self waitForConditionName:@"shouldBackup" block:^{
-        [self evalJs:@"localStorage.setItem('foo', 'bar')"];
-        return [localStorage shouldBackup]; 
-    }];
+            [self evalJs:@"localStorage.setItem('foo', 'bar')"];
+            return [localStorage shouldBackup];
+        }];
     [localStorage backup:[CDVInvokedUrlCommand new]];
     STAssertFalse([localStorage shouldBackup], @"Should have backed up.");
-    
+
     // It would be nice to be able to test that the restore functionality
     // alters what localStorage.getItem('foo') returns, but it seems as though
     // the WebView maintains an in-memory cache of what's in LocalStorage even
     // after we delete the underlying files and recreate the view.
-    
+
     // Instead, we just test the file copying logic.
     [self deleteOriginals:YES backups:NO];
     STAssertTrue([localStorage shouldRestore], @"Should restore after deleting originals");
     [localStorage restore:[CDVInvokedUrlCommand new]];
-    STAssertFalse([localStorage shouldRestore], @"Restore did not complete successfully");    
+    STAssertFalse([localStorage shouldRestore], @"Restore did not complete successfully");
 }
 
 - (void)testVerifyAndFixDatabaseLocations_noChangeRequired
 {
     NSString* const kBundlePath = @"/bpath";
-    id fakeFileManager = [CDVFakeFileManager managerWithFileExistsBlock:^(NSString* path) {
-        STFail(@"fileExists called.");
-        return NO;
-    }];
+    id fakeFileManager = [CDVFakeFileManager managerWithFileExistsBlock:^(NSString * path) {
+            STFail (@"fileExists called.");
+            return NO;
+        }];
     NSMutableDictionary* appPlistDict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
         @"/bpath/foo", @"WebKitLocalStorageDatabasePathPreferenceKey",
         @"/bpath/foo", @"WebDatabaseDirectory",
@@ -99,41 +103,44 @@
     BOOL modified = [CDVLocalStorage __verifyAndFixDatabaseLocationsWithAppPlistDict:appPlistDict
                                                                           bundlePath:kBundlePath
                                                                          fileManager:fakeFileManager];
-	  STAssertFalse(modified, @"Should not have applied fix.");
+
+    STAssertFalse (modified, @"Should not have applied fix.");
 }
 
 - (void)testVerifyAndFixDatabaseLocations_changeRequired1
 {
     NSString* const kBundlePath = @"/bpath";
-    id fakeFileManager = [CDVFakeFileManager managerWithFileExistsBlock:^(NSString* path) {
-        return YES;
-    }];
+    id fakeFileManager = [CDVFakeFileManager managerWithFileExistsBlock:^(NSString * path) {
+            return YES;
+        }];
     NSMutableDictionary* appPlistDict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
         @"/foo", @"WebKitLocalStorageDatabasePathPreferenceKey",
         nil];
     BOOL modified = [CDVLocalStorage __verifyAndFixDatabaseLocationsWithAppPlistDict:appPlistDict
                                                                           bundlePath:kBundlePath
                                                                          fileManager:fakeFileManager];
-	  STAssertTrue(modified, @"Should have applied fix.");
+
+    STAssertTrue (modified, @"Should have applied fix.");
     NSString* newPath = [appPlistDict objectForKey:@"WebKitLocalStorageDatabasePathPreferenceKey"];
-    STAssertTrue([@"/bpath/Library/Caches" isEqualToString:newPath], nil);
+    STAssertTrue ([@"/bpath/Library/Caches" isEqualToString:newPath], nil);
 }
 
 - (void)testVerifyAndFixDatabaseLocations_changeRequired2
 {
     NSString* const kBundlePath = @"/bpath";
-    id fakeFileManager = [CDVFakeFileManager managerWithFileExistsBlock:^(NSString* path) {
-        return NO;
-    }];
+    id fakeFileManager = [CDVFakeFileManager managerWithFileExistsBlock:^(NSString * path) {
+            return NO;
+        }];
     NSMutableDictionary* appPlistDict = [NSMutableDictionary dictionaryWithObjectsAndKeys:
         @"/foo", @"WebDatabaseDirectory",
         nil];
     BOOL modified = [CDVLocalStorage __verifyAndFixDatabaseLocationsWithAppPlistDict:appPlistDict
                                                                           bundlePath:kBundlePath
                                                                          fileManager:fakeFileManager];
-	  STAssertTrue(modified, @"Should have applied fix.");
+
+    STAssertTrue (modified, @"Should have applied fix.");
     NSString* newPath = [appPlistDict objectForKey:@"WebDatabaseDirectory"];
-    STAssertTrue([@"/bpath/Library/WebKit" isEqualToString:newPath], nil);
+    STAssertTrue ([@"/bpath/Library/WebKit" isEqualToString:newPath], nil);
 }
 
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.m b/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.m
index c9fc196..f02ff71 100644
--- a/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.m
+++ b/CordovaLib/CordovaLibTests/CDVPluginResultJSONSerializationTests.m
@@ -6,9 +6,9 @@
  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
@@ -28,32 +28,37 @@
 
 @implementation CDVPluginResultJSONSerializationTests
 
-- (void)testSerializingMessageAsInt {
-    CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:5];
-    NSDictionary *dic = [[result toJSONString] cdvjk_objectFromJSONString];
-    NSNumber *message = [dic objectForKey:@"message"];
+- (void)testSerializingMessageAsInt
+{
+    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:5];
+    NSDictionary* dic = [[result toJSONString] cdvjk_objectFromJSONString];
+    NSNumber* message = [dic objectForKey:@"message"];
+
     STAssertTrue([[NSNumber numberWithInt:5] isEqual:message], nil);
 }
 
-- (void)testSerializingMessageAsDouble {
-    CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDouble:5.5];
-    NSDictionary *dic = [[result toJSONString] cdvjk_objectFromJSONString];
-    NSNumber *message = [dic objectForKey:@"message"];
+- (void)testSerializingMessageAsDouble
+{
+    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDouble:5.5];
+    NSDictionary* dic = [[result toJSONString] cdvjk_objectFromJSONString];
+    NSNumber* message = [dic objectForKey:@"message"];
+
     STAssertTrue([[NSNumber numberWithDouble:5.5] isEqual:message], nil);
 }
 
-- (void)testSerializingMessageAsArray {
-    NSArray *testValues = [NSArray arrayWithObjects:
-                           [NSNull null],
-                           @"string",
-                           [NSNumber numberWithInt:5],
-                           [NSNumber numberWithDouble:5.5],
-                           [NSNumber numberWithBool:true],
-                           nil];
-    
-    CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:testValues];
-    NSDictionary *dic = [[result toJSONString] cdvjk_objectFromJSONString];
-    NSArray *message = [dic objectForKey:@"message"];
+- (void)testSerializingMessageAsArray
+{
+    NSArray* testValues = [NSArray arrayWithObjects:
+        [NSNull null],
+        @"string",
+        [NSNumber numberWithInt:5],
+        [NSNumber numberWithDouble:5.5],
+        [NSNumber numberWithBool:true],
+        nil];
+
+    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:testValues];
+    NSDictionary* dic = [[result toJSONString] cdvjk_objectFromJSONString];
+    NSArray* message = [dic objectForKey:@"message"];
 
     STAssertTrue([message isKindOfClass:[NSArray class]], nil);
     STAssertTrue([testValues count] == [message count], nil);
@@ -63,18 +68,18 @@
     }
 }
 
-- (void) __testDictionary:(NSDictionary*)dictA withDictionary:(NSDictionary*)dictB
+- (void)__testDictionary:(NSDictionary*)dictA withDictionary:(NSDictionary*)dictB
 {
     STAssertTrue([dictA isKindOfClass:[NSDictionary class]], nil);
     STAssertTrue([dictB isKindOfClass:[NSDictionary class]], nil);
-    
-    STAssertTrue([[dictA allKeys ]count] == [[dictB allKeys] count], nil);
-    
+
+    STAssertTrue([[dictA allKeys] count] == [[dictB allKeys] count], nil);
+
     for (NSInteger i = 0; i < [dictA count]; i++) {
-        id keyA =  [[dictA allKeys] objectAtIndex:i];
+        id keyA = [[dictA allKeys] objectAtIndex:i];
         id objA = [dictA objectForKey:keyA];
         id objB = [dictB objectForKey:keyA];
-        
+
         STAssertTrue([[dictB allKeys] containsObject:keyA], nil); // key exists
         if ([objA isKindOfClass:[NSDictionary class]]) {
             [self __testDictionary:objA withDictionary:objB];
@@ -84,53 +89,58 @@
     }
 }
 
-- (void) testSerializingMessageAsDictionary
+- (void)testSerializingMessageAsDictionary
 {
-    NSMutableDictionary *testValues = [NSMutableDictionary dictionaryWithObjectsAndKeys:
-                           [NSNull null], @"nullItem",
-                           @"string",  @"stringItem",
-                           [NSNumber numberWithInt:5],  @"intItem",
-                           [NSNumber numberWithDouble:5.5], @"doubleItem",
-                           [NSNumber numberWithBool:true],  @"boolItem",
-                           nil];
-
-    NSDictionary *nestedDict = [testValues copy];
+    NSMutableDictionary* testValues = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+        [NSNull null], @"nullItem",
+        @"string", @"stringItem",
+        [NSNumber numberWithInt:5], @"intItem",
+        [NSNumber numberWithDouble:5.5], @"doubleItem",
+        [NSNumber numberWithBool:true], @"boolItem",
+        nil];
+
+    NSDictionary* nestedDict = [testValues copy];
+
     [testValues setValue:nestedDict forKey:@"nestedDict"];
-    
-    CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:testValues];
-    NSDictionary *dic = [[result toJSONString] cdvjk_objectFromJSONString];
-    NSDictionary *message = [dic objectForKey:@"message"];
-    
+
+    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:testValues];
+    NSDictionary* dic = [[result toJSONString] cdvjk_objectFromJSONString];
+    NSDictionary* message = [dic objectForKey:@"message"];
+
     [self __testDictionary:testValues withDictionary:message];
 }
 
 - (void)testSerializingMessageAsErrorCode
 {
-    NSMutableDictionary *testValues = [NSMutableDictionary dictionaryWithObjectsAndKeys:
-                                       [NSNumber numberWithInt:1], @"code",
-                                       nil];
-    
-    CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageToErrorObject:1];
-    NSDictionary *dic = [[result toJSONString] cdvjk_objectFromJSONString];
-    NSDictionary *message = [dic objectForKey:@"message"];
-    
+    NSMutableDictionary* testValues = [NSMutableDictionary dictionaryWithObjectsAndKeys:
+        [NSNumber numberWithInt:1], @"code",
+        nil];
+
+    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageToErrorObject:1];
+    NSDictionary* dic = [[result toJSONString] cdvjk_objectFromJSONString];
+    NSDictionary* message = [dic objectForKey:@"message"];
+
     [self __testDictionary:testValues withDictionary:message];
 }
 
-- (void)testSerializingMessageAsStringContainingQuotes {
-    NSString *quotedString = @"\"quoted\"";
-    CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:quotedString];
-    NSDictionary *dic = [[result toJSONString] cdvjk_objectFromJSONString];
-    NSString *message = [dic objectForKey:@"message"];
+- (void)testSerializingMessageAsStringContainingQuotes
+{
+    NSString* quotedString = @"\"quoted\"";
+    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:quotedString];
+    NSDictionary* dic = [[result toJSONString] cdvjk_objectFromJSONString];
+    NSString* message = [dic objectForKey:@"message"];
+
     STAssertTrue([quotedString isEqual:message], nil);
 }
 
-- (void)testSerializingMessageAsStringThatIsNil {
-    NSString *nilString = nil;
-    CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:nilString];
-    NSDictionary *dic = [[result toJSONString] cdvjk_objectFromJSONString];
-    NSString *message = [dic objectForKey:@"message"];
-    STAssertTrue([[NSNull null] isEqual:message], nil);    
+- (void)testSerializingMessageAsStringThatIsNil
+{
+    NSString* nilString = nil;
+    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:nilString];
+    NSDictionary* dic = [[result toJSONString] cdvjk_objectFromJSONString];
+    NSString* message = [dic objectForKey:@"message"];
+
+    STAssertTrue([[NSNull null] isEqual:message], nil);
 }
 
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibTests/CDVWebViewTest.h
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVWebViewTest.h b/CordovaLib/CordovaLibTests/CDVWebViewTest.h
index 35cb28e..4bb9b32 100644
--- a/CordovaLib/CordovaLibTests/CDVWebViewTest.h
+++ b/CordovaLib/CordovaLibTests/CDVWebViewTest.h
@@ -6,9 +6,9 @@
  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
@@ -22,15 +22,13 @@
 @class AppDelegate;
 @class CDVViewController;
 
-
 @interface CDVWebViewTest : SenTestCase
 
 @property (nonatomic, strong) UIWebView* webView;
 
-
-- (AppDelegate *)appDelegate;
-- (CDVViewController *)viewController;
-- (UIWebView *)webView;
+- (AppDelegate*)appDelegate;
+- (CDVViewController*)viewController;
+- (UIWebView*)webView;
 
 // Returns the already registered plugin object for the given class.
 - (id)pluginForClass:(Class)cls;
@@ -38,7 +36,7 @@
 - (void)reloadWebView;
 // Runs the run loop until the given block returns true, or until a timeout
 // occurs.
-- (void)waitForConditionName:(NSString *)conditionName block:(BOOL (^)())block;
+- (void)waitForConditionName:(NSString*)conditionName block:(BOOL (^)())block;
 // Convenince function for stringByEvaluatingJavaScriptFromString.
-- (NSString *)evalJs:(NSString *)code;
+- (NSString*)evalJs:(NSString*)code;
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/CordovaLibTests/CDVWebViewTest.m
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLibTests/CDVWebViewTest.m b/CordovaLib/CordovaLibTests/CDVWebViewTest.m
index 9c4dd1b..d97ee95 100644
--- a/CordovaLib/CordovaLibTests/CDVWebViewTest.m
+++ b/CordovaLib/CordovaLibTests/CDVWebViewTest.m
@@ -6,9 +6,9 @@
  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
@@ -38,7 +38,7 @@
     // first exception makes it much easier to identify the source of the error.
     // On iOS < 5 there is a bug in SenTestingKit where the exception is
     // uncaught and the app crashes upon a failed STAssert (oh well).
-    [self raiseAfterFailure];    
+    [self raiseAfterFailure];
 }
 
 - (void)tearDown
@@ -49,15 +49,17 @@
     [super tearDown];
 }
 
-- (AppDelegate *)appDelegate {
+- (AppDelegate*)appDelegate
+{
     return [[UIApplication sharedApplication] delegate];
 }
 
-- (CDVViewController *)viewController {
+- (CDVViewController*)viewController
+{
     // Lazily create the view controller so that tests that do not require it
     // are not slowed down by it.
     if (self.appDelegate.viewController == nil) {
-        [self.appDelegate createViewController]; 
+        [self.appDelegate createViewController];
         // Things break if tearDown is called before the page has finished
         // loading (a JS error happens and an alert pops up), so enforce a wait
         // here.
@@ -67,46 +69,54 @@
     return self.appDelegate.viewController;
 }
 
-- (UIWebView *)webView {
+- (UIWebView*)webView
+{
     return self.viewController.webView;
 }
 
-- (id)pluginForClass:(Class)cls {
-    NSString *className = NSStringFromClass(cls);
+- (id)pluginForClass:(Class)cls
+{
+    NSString* className = NSStringFromClass(cls);
     id ret = [self.viewController.pluginObjects objectForKey:className];
+
     STAssertNotNil(ret, @"Missing plugin %@", className);
     return ret;
 }
 
-- (void)reloadWebView {
+- (void)reloadWebView
+{
     [self.appDelegate destroyViewController];
     [self.appDelegate createViewController];
 }
 
-- (void)waitForConditionName:(NSString *)conditionName block:(BOOL (^)())block {
+- (void)waitForConditionName:(NSString*)conditionName block:(BOOL (^)())block
+{
     // Number of seconds to wait for a condition to become true before giving up.
     const NSTimeInterval kConditionTimeout = 5.0;
     // Useful when debugging so that it does not timeout after one loop.
     const int kMinIterations = 4;
 
-    NSDate *startTime = [NSDate date];
+    NSDate* startTime = [NSDate date];
     int i = 0;
+
     while (!block()) {
         [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
         NSTimeInterval elapsed = -[startTime timeIntervalSinceNow];
         STAssertTrue(i < kMinIterations || elapsed < kConditionTimeout,
-                     @"Timed out waiting for condition %@", conditionName);
+            @"Timed out waiting for condition %@", conditionName);
         ++i;
     }
 }
 
-- (void)waitForPageLoad {
+- (void)waitForPageLoad
+{
     [self waitForConditionName:@"PageLoad" block:^{
-        return [@"true" isEqualToString:[self evalJs:@"window.pageIsLoaded"]];
-    }];
+            return [@"true" isEqualToString:[self evalJs:@"window.pageIsLoaded"]];
+        }];
 }
 
-- (NSString *)evalJs:(NSString *)code {
+- (NSString*)evalJs:(NSString*)code
+{
     return [self.webView stringByEvaluatingJavaScriptFromString:code];
 }
 


Mime
View raw message