incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [9/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/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index f7a2054..5dae1ab 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.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,7 +37,6 @@
 
 @end
 
-
 @implementation CDVViewController
 
 @synthesize webView, supportedOrientations;
@@ -46,41 +45,39 @@
 @synthesize imageView, activityView, useSplashScreen, commandDelegate;
 @synthesize wwwFolderName, startPage, invokeString, initialized;
 
-- (id) __init
+- (id)__init
 {
-    if (self != nil && !self.initialized) 
-    {
+    if ((self != nil) && !self.initialized) {
         [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receivedOrientationChange)
                                                      name:UIDeviceOrientationDidChangeNotification object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillTerminate:) 
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillTerminate:)
                                                      name:UIApplicationWillTerminateNotification object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillResignActive:) 
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillResignActive:)
                                                      name:UIApplicationWillResignActiveNotification object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidBecomeActive:) 
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidBecomeActive:)
                                                      name:UIApplicationDidBecomeActiveNotification object:nil];
-        
-        if (IsAtLeastiOSVersion(@"4.0")) 
-        {
-            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillEnterForeground:) 
+
+        if (IsAtLeastiOSVersion(@"4.0")) {
+            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppWillEnterForeground:)
                                                          name:UIApplicationWillEnterForegroundNotification object:nil];
-            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidEnterBackground:) 
+            [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidEnterBackground:)
                                                          name:UIApplicationDidEnterBackgroundNotification object:nil];
         }
-        
+
         // read from UISupportedInterfaceOrientations (or UISupportedInterfaceOrientations~iPad, if its iPad) from -Info.plist
         self.supportedOrientations = [self parseInterfaceOrientations:
-									  [[[NSBundle mainBundle] infoDictionary] objectForKey:@"UISupportedInterfaceOrientations"]];
-        
+            [[[NSBundle mainBundle] infoDictionary] objectForKey:@"UISupportedInterfaceOrientations"]];
+
         self.commandDelegate = self;
         self.wwwFolderName = @"www";
         self.startPage = @"index.html";
         [self setWantsFullScreenLayout:YES];
-        
+
         [self printMultitaskingInfo];
         [self printDeprecationNotice];
         self.initialized = YES;
-        
+
         // load Cordova.plist settings
         [self loadSettings];
         // set the whitelist
@@ -88,76 +85,79 @@
         // register this viewcontroller with the NSURLProtocol
         [CDVURLProtocol registerViewController:self];
     }
-    
-    return self; 
+
+    return self;
 }
 
-- (id) initWithNibName:(NSString*)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil
+- (id)initWithNibName:(NSString*)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil
 {
     self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
     return [self __init];
 }
 
-- (id) init
+- (id)init
 {
     self = [super init];
     return [self __init];
 }
 
 // TODO(agrieve): It's probably better to change these to be weak references.
-- (void) dispose {
-    for (CDVPlugin *plugin in [self.pluginObjects allValues]) {
-        if ([plugin respondsToSelector:@selector(setViewController:)]) { 
+- (void)dispose
+{
+    for (CDVPlugin* plugin in [self.pluginObjects allValues]) {
+        if ([plugin respondsToSelector:@selector(setViewController:)]) {
             [plugin setViewController:nil];
         }
-        
-        if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) { 
+
+        if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) {
             [plugin setCommandDelegate:nil];
         }
     }
+
     self.commandDelegate = nil;
     self.webView.delegate = nil;
     self.webView = nil;
 }
 
-- (void) printDeprecationNotice
+- (void)printDeprecationNotice
 {
     if (!IsAtLeastiOSVersion(@"4.2")) {
-        NSLog(@"CRITICAL: For Cordova 2.0, you will need to upgrade to at least iOS 4.2 or greater. Your current version of iOS is %@.", 
-              [[UIDevice currentDevice] systemVersion]
-              );
-    } 
+        NSLog(@"CRITICAL: For Cordova 2.0, you will need to upgrade to at least iOS 4.2 or greater. Your current version of iOS is %@.",
+            [[UIDevice currentDevice] systemVersion]
+            );
+    }
 }
 
-- (void) printMultitaskingInfo
+- (void)printMultitaskingInfo
 {
     UIDevice* device = [UIDevice currentDevice];
     BOOL backgroundSupported = NO;
+
     if ([device respondsToSelector:@selector(isMultitaskingSupported)]) {
         backgroundSupported = device.multitaskingSupported;
     }
-    
+
     NSNumber* exitsOnSuspend = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIApplicationExitsOnSuspend"];
     if (exitsOnSuspend == nil) { // if it's missing, it should be NO (i.e. multi-tasking on by default)
         exitsOnSuspend = [NSNumber numberWithBool:NO];
     }
 
-    NSLog(@"Multi-tasking -> Device: %@, App: %@", (backgroundSupported? @"YES" : @"NO"), (![exitsOnSuspend intValue])? @"YES" : @"NO");
+    NSLog(@"Multi-tasking -> Device: %@, App: %@", (backgroundSupported ? @"YES" : @"NO"), (![exitsOnSuspend intValue]) ? @"YES" : @"NO");
 }
 
-- (void) loadSettings
+- (void)loadSettings
 {
     self.pluginObjects = [[NSMutableDictionary alloc] initWithCapacity:4];
-    
+
     // read from Cordova.plist in the app bundle
     NSString* appPlistName = @"Cordova";
     NSDictionary* cordovaPlist = [[self class] getBundlePlist:appPlistName];
     if (cordovaPlist == nil) {
         NSLog(@"WARNING: %@.plist is missing.", appPlistName);
-		return;
+        return;
     }
     self.settings = [[NSDictionary alloc] initWithDictionary:cordovaPlist];
-	
+
     // read from Plugins dict in Cordova.plist in the app bundle
     NSString* pluginsKey = @"Plugins";
     NSDictionary* pluginsDict = [self.settings objectForKey:@"Plugins"];
@@ -165,19 +165,19 @@
         NSLog(@"WARNING: %@ key in %@.plist is missing! Cordova will not work, you need to have this key.", pluginsKey, appPlistName);
         return;
     }
-    
+
     self.pluginsMap = [pluginsDict dictionaryWithLowercaseKeys];
 }
 
 // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
-- (void) viewDidLoad 
+- (void)viewDidLoad
 {
     [super viewDidLoad];
-    
-	NSString* startFilePath = [self pathForResource:self.startPage];
-	NSURL* appURL  = nil;
+
+    NSString* startFilePath = [self pathForResource:self.startPage];
+    NSURL* appURL = nil;
     NSString* loadErr = nil;
-    
+
     if (startFilePath == nil) {
         loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.wwwFolderName, self.startPage];
         NSLog(@"%@", loadErr);
@@ -186,42 +186,42 @@
     } else {
         appURL = [NSURL fileURLWithPath:startFilePath];
     }
-    
-    //// Fix the iOS 5.1 SECURITY_ERR bug (CB-347), this must be before the webView is instantiated ////
+
+    // // Fix the iOS 5.1 SECURITY_ERR bug (CB-347), this must be before the webView is instantiated ////
 
     BOOL backupWebStorage = YES;  // default value
     if ([self.settings objectForKey:@"BackupWebStorage"]) {
         backupWebStorage = [(NSNumber*)[settings objectForKey:@"BackupWebStorage"] boolValue];
     }
-    
+
     if (backupWebStorage) {
         [CDVLocalStorage __verifyAndFixDatabaseLocations];
     }
-    
-    //// Instantiate the WebView ///////////////
+
+    // // Instantiate the WebView ///////////////
 
     [self createGapView];
-    
-    ///////////////////
-    
-    NSNumber* enableLocation       = [self.settings objectForKey:@"EnableLocation"];
-    NSString* enableViewportScale  = [self.settings objectForKey:@"EnableViewportScale"];
+
+    // /////////////////
+
+    NSNumber* enableLocation = [self.settings objectForKey:@"EnableLocation"];
+    NSString* enableViewportScale = [self.settings objectForKey:@"EnableViewportScale"];
     NSNumber* allowInlineMediaPlayback = [self.settings objectForKey:@"AllowInlineMediaPlayback"];
     BOOL mediaPlaybackRequiresUserAction = YES;  // default value
     if ([self.settings objectForKey:@"MediaPlaybackRequiresUserAction"]) {
         mediaPlaybackRequiresUserAction = [(NSNumber*)[settings objectForKey:@"MediaPlaybackRequiresUserAction"] boolValue];
     }
-    
+
     self.webView.scalesPageToFit = [enableViewportScale boolValue];
-    
+
     /*
      * Fire up the GPS Service right away as it takes a moment for data to come back.
      */
-    
+
     if ([enableLocation boolValue]) {
         [[self.commandDelegate getCommandInstance:@"Geolocation"] getLocation:nil];
     }
-    
+
     /*
      * Fire up CDVLocalStorage on iOS 5.1 to work-around WebKit storage limitations, or adjust set user defaults on iOS 6.0+
      */
@@ -236,50 +236,51 @@
             [CDVLocalStorage __restoreThenRemoveBackupLocations];
         }
     }
-    
+
     /*
      * This is for iOS 4.x, where you can allow inline <video> and <audio>, and also autoplay them
      */
     if ([allowInlineMediaPlayback boolValue] && [self.webView respondsToSelector:@selector(allowsInlineMediaPlayback)]) {
         self.webView.allowsInlineMediaPlayback = YES;
     }
-    if (mediaPlaybackRequiresUserAction == NO && [self.webView respondsToSelector:@selector(mediaPlaybackRequiresUserAction)]) {
+    if ((mediaPlaybackRequiresUserAction == NO) && [self.webView respondsToSelector:@selector(mediaPlaybackRequiresUserAction)]) {
         self.webView.mediaPlaybackRequiresUserAction = NO;
     }
-    
+
     // UIWebViewBounce property - defaults to true
     NSNumber* bouncePreference = [self.settings objectForKey:@"UIWebViewBounce"];
-    BOOL bounceAllowed = (bouncePreference==nil || [bouncePreference boolValue]); 
-    
+    BOOL bounceAllowed = (bouncePreference == nil || [bouncePreference boolValue]);
+
     // prevent webView from bouncing
     // based on UIWebViewBounce key in Cordova.plist
     if (!bounceAllowed) {
-        if ([ self.webView respondsToSelector:@selector(scrollView) ]) {
-            ((UIScrollView *) [self.webView scrollView]).bounces = NO;
+        if ([self.webView respondsToSelector:@selector(scrollView)]) {
+            ((UIScrollView*)[self.webView scrollView]).bounces = NO;
         } else {
-            for (id subview in self.webView.subviews)
-                if ([[subview class] isSubclassOfClass: [UIScrollView class]])
-                    ((UIScrollView *)subview).bounces = NO;
+            for (id subview in self.webView.subviews) {
+                if ([[subview class] isSubclassOfClass:[UIScrollView class]]) {
+                    ((UIScrollView*)subview).bounces = NO;
+                }
+            }
         }
     }
-    
+
     /*
      * iOS 6.0 UIWebView properties
      */
     if (IsAtLeastiOSVersion(@"6.0")) {
-        
         BOOL keyboardDisplayRequiresUserAction = YES; // KeyboardDisplayRequiresUserAction - defaults to YES
         if ([self.settings objectForKey:@"KeyboardDisplayRequiresUserAction"] != nil) {
             if ([self.settings objectForKey:@"KeyboardDisplayRequiresUserAction"]) {
                 keyboardDisplayRequiresUserAction = [(NSNumber*)[self.settings objectForKey:@"KeyboardDisplayRequiresUserAction"] boolValue];
             }
         }
-        
+
         // property check for compiling under iOS < 6
         if ([self.webView respondsToSelector:@selector(setKeyboardDisplayRequiresUserAction:)]) {
             [self.webView setValue:[NSNumber numberWithBool:keyboardDisplayRequiresUserAction] forKey:@"keyboardDisplayRequiresUserAction"];
         }
-        
+
         BOOL suppressesIncrementalRendering = NO; // SuppressesIncrementalRendering - defaults to NO
         if ([self.settings objectForKey:@"SuppressesIncrementalRendering"] != nil) {
             if ([self.settings objectForKey:@"SuppressesIncrementalRendering"]) {
@@ -292,11 +293,11 @@
             [self.webView setValue:[NSNumber numberWithBool:suppressesIncrementalRendering] forKey:@"suppressesIncrementalRendering"];
         }
     }
-    
-    ///////////////////
-    
+
+    // /////////////////
+
     if (!loadErr) {
-        NSURLRequest *appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
+        NSURLRequest* appReq = [NSURLRequest requestWithURL:appURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
         [self.webView loadRequest:appReq];
     } else {
         NSString* html = [NSString stringWithFormat:@"<html><body> %@ </body></html>", loadErr];
@@ -304,17 +305,15 @@
     }
 }
 
-- (NSArray*) parseInterfaceOrientations:(NSArray*)orientations
+- (NSArray*)parseInterfaceOrientations:(NSArray*)orientations
 {
     NSMutableArray* result = [[NSMutableArray alloc] init];
-	
-    if (orientations != nil) 
-    {
+
+    if (orientations != nil) {
         NSEnumerator* enumerator = [orientations objectEnumerator];
         NSString* orientationString;
-        
-        while (orientationString = [enumerator nextObject]) 
-        {
+
+        while (orientationString = [enumerator nextObject]) {
             if ([orientationString isEqualToString:@"UIInterfaceOrientationPortrait"]) {
                 [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortrait]];
             } else if ([orientationString isEqualToString:@"UIInterfaceOrientationPortraitUpsideDown"]) {
@@ -326,49 +325,53 @@
             }
         }
     }
-    
+
     // default
     if ([result count] == 0) {
         [result addObject:[NSNumber numberWithInt:UIInterfaceOrientationPortrait]];
     }
-    
+
     return result;
 }
 
-- (NSInteger) mapIosOrientationToJsOrientation:(UIInterfaceOrientation)orientation
+- (NSInteger)mapIosOrientationToJsOrientation:(UIInterfaceOrientation)orientation
 {
     switch (orientation) {
         case UIInterfaceOrientationPortraitUpsideDown:
             return 180;
+
         case UIInterfaceOrientationLandscapeLeft:
             return -90;
+
         case UIInterfaceOrientationLandscapeRight:
             return 90;
+
         case UIInterfaceOrientationPortrait:
             return 0;
+
         default:
             return 0;
     }
 }
 
-- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
 {
-	// First, ask the webview via JS if it supports the new orientation
-	NSString* jsCall = [NSString stringWithFormat:
-                        @"(function(){ \
+    // First, ask the webview via JS if it supports the new orientation
+    NSString* jsCall = [NSString stringWithFormat:
+        @"(function(){ \
                                 if('shouldRotateToOrientation' in window) { \
                                     return window.shouldRotateToOrientation(%d); \
                                 } \
                             })()"
-                        , [self mapIosOrientationToJsOrientation:interfaceOrientation]];
-	NSString* res = [webView stringByEvaluatingJavaScriptFromString:jsCall];
-	
-	if([res length] > 0) {
-		return [res boolValue];
-	}
-	
-	// if js did not handle the new orientation (no return value), use values from the plist (via supportedOrientations)
-	return [self supportsOrientation:interfaceOrientation];
+        , [self mapIosOrientationToJsOrientation:interfaceOrientation]];
+    NSString* res = [webView stringByEvaluatingJavaScriptFromString:jsCall];
+
+    if ([res length] > 0) {
+        return [res boolValue];
+    }
+
+    // if js did not handle the new orientation (no return value), use values from the plist (via supportedOrientations)
+    return [self supportsOrientation:interfaceOrientation];
 }
 
 - (BOOL)shouldAutorotate
@@ -379,20 +382,24 @@
 - (NSUInteger)supportedInterfaceOrientations
 {
     NSUInteger ret = 0;
-    
-    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationPortrait])
+
+    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationPortrait]) {
         ret = ret | (1 << UIInterfaceOrientationPortrait);
-    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown])
+    }
+    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown]) {
         ret = ret | (1 << UIInterfaceOrientationPortraitUpsideDown);
-    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight])
+    }
+    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeRight]) {
         ret = ret | (1 << UIInterfaceOrientationLandscapeRight);
-    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeLeft])
+    }
+    if ([self shouldAutorotateToInterfaceOrientation:UIInterfaceOrientationLandscapeLeft]) {
         ret = ret | (1 << UIInterfaceOrientationLandscapeLeft);
-    
+    }
+
     return ret;
 }
 
-- (BOOL) supportsOrientation:(UIInterfaceOrientation)orientation
+- (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation
 {
     return [self.supportedOrientations containsObject:[NSNumber numberWithInt:orientation]];
 }
@@ -401,344 +408,339 @@
  Called by UIKit when the device starts to rotate to a new orientation.  This fires the \c setOrientation
  method on the Orientation object in JavaScript.  Look at the JavaScript documentation for more information.
  */
-- (void)didRotateFromInterfaceOrientation: (UIInterfaceOrientation)fromInterfaceOrientation
+- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
 {
     if (!IsAtLeastiOSVersion(@"5.0")) {
         NSString* jsCallback = [NSString stringWithFormat:
-                                @"window.__defineGetter__('orientation',function(){ return %d; }); \
+            @"window.__defineGetter__('orientation',function(){ return %d; }); \
                                   cordova.fireWindowEvent('orientationchange');"
-                                , [self mapIosOrientationToJsOrientation:fromInterfaceOrientation]];
-        [self.webView stringByEvaluatingJavaScriptFromString:jsCallback];    
+            , [self mapIosOrientationToJsOrientation:fromInterfaceOrientation]];
+        [self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
     }
 }
 
-- (CDVCordovaView*) newCordovaViewWithFrame:(CGRect)bounds
+- (CDVCordovaView*)newCordovaViewWithFrame:(CGRect)bounds
 {
     return [[CDVCordovaView alloc] initWithFrame:bounds];
 }
 
-- (void) createGapView
+- (void)createGapView
 {
     CGRect webViewBounds = self.view.bounds;
+
     webViewBounds.origin = self.view.bounds.origin;
-	
-    if (!self.webView) 
-	{
+
+    if (!self.webView) {
         self.webView = [self newCordovaViewWithFrame:webViewBounds];
-		self.webView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
-		
-		[self.view addSubview:self.webView];
-		[self.view sendSubviewToBack:self.webView];
-		
-		self.webView.delegate = self;
+        self.webView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
+
+        [self.view addSubview:self.webView];
+        [self.view sendSubviewToBack:self.webView];
+
+        self.webView.delegate = self;
     }
 }
 
-- (void) didReceiveMemoryWarning {
-    
+- (void)didReceiveMemoryWarning
+{
     // iterate through all the plugin objects, and call hasPendingOperation
     // if at least one has a pending operation, we don't call [super didReceiveMemoryWarning]
-    
+
     NSEnumerator* enumerator = [self.pluginObjects objectEnumerator];
     CDVPlugin* plugin;
-    
+
     BOOL doPurge = YES;
-    while ((plugin = [enumerator nextObject])) 
-    {
+
+    while ((plugin = [enumerator nextObject])) {
         if (plugin.hasPendingOperation) {
             NSLog(@"Plugin '%@' has a pending operation, memory purge is delayed for didReceiveMemoryWarning.", NSStringFromClass([plugin class]));
             doPurge = NO;
         }
     }
-    
-	if (doPurge) {
+
+    if (doPurge) {
         // Releases the view if it doesn't have a superview.
         [super didReceiveMemoryWarning];
     }
-	
-	// Release any cached data, images, etc. that aren't in use.
+
+    // Release any cached data, images, etc. that aren't in use.
 }
 
+- (void)viewDidUnload
+{
+    // Release any retained subviews of the main view.
+    // e.g. self.myOutlet = nil;
 
-- (void) viewDidUnload {
-	// Release any retained subviews of the main view.
-	// e.g. self.myOutlet = nil;
-    
     self.webView.delegate = nil;
     self.webView = nil;
 }
 
-
 #pragma mark UIWebViewDelegate
 
 /**
  When web application loads Add stuff to the DOM, mainly the user-defined settings from the Settings.plist file, and
  the device's data such as device ID, platform version, etc.
  */
-- (void) webViewDidStartLoad:(UIWebView*)theWebView 
-{
-}
+- (void)webViewDidStartLoad:(UIWebView*)theWebView
+{}
 
 /**
  Called when the webview finishes loading.  This stops the activity view and closes the imageview
  */
-- (void) webViewDidFinishLoad:(UIWebView*)theWebView 
+- (void)webViewDidFinishLoad:(UIWebView*)theWebView
 {
     /*
      * Hide the Top Activity THROBBER in the Battery Bar
      */
     [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
-	
+
     id autoHideSplashScreenValue = [self.settings objectForKey:@"AutoHideSplashScreen"];
     // if value is missing, default to yes
-    if (autoHideSplashScreenValue == nil || [autoHideSplashScreenValue boolValue]) {
+    if ((autoHideSplashScreenValue == nil) || [autoHideSplashScreenValue boolValue]) {
         self.imageView.hidden = YES;
-        self.activityView.hidden = YES;    
+        self.activityView.hidden = YES;
         [self.view.superview bringSubviewToFront:self.webView];
     }
     [self didRotateFromInterfaceOrientation:(UIInterfaceOrientation)[[UIDevice currentDevice] orientation]];
-    
+
     // Tell the webview that native is ready.
     NSString* nativeReady = [NSString stringWithFormat:@"cordova.iOSVCAddr='%lld';try{cordova.require('cordova/channel').onNativeReady.fire();}catch(e){window._nativeReady = true;}", (long long)self];
     [theWebView stringByEvaluatingJavaScriptFromString:nativeReady];
 }
 
-- (void) webView:(UIWebView*)webView didFailLoadWithError:(NSError*)error 
+- (void)webView:(UIWebView*)webView didFailLoadWithError:(NSError*)error
 {
     NSLog(@"Failed to load webpage with error: %@", [error localizedDescription]);
+
     /*
-	 if ([error code] != NSURLErrorCancelled)
-	 alert([error localizedDescription]);
+     if ([error code] != NSURLErrorCancelled)
+     alert([error localizedDescription]);
      */
 }
 
-- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
+- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
 {
-	NSURL* url = [request URL];
-    
+    NSURL* url = [request URL];
+
     /*
      * Execute any commands queued with cordova.exec() on the JS side.
      * The part of the URL after gap:// is irrelevant.
      */
-	if ([[url scheme] isEqualToString:@"gap"]) {
+    if ([[url scheme] isEqualToString:@"gap"]) {
         [self flushCommandQueue];
         return NO;
-	}
+    }
+
     /*
      * If a URL is being loaded that's a file/http/https URL, just load it internally
      */
-    else if ([url isFileURL])
-    {
+    else if ([url isFileURL]) {
         return YES;
-    }
-    else if ([self.whitelist schemeIsAllowed:[url scheme]])
-    {            
-        if ([self.whitelist URLIsAllowed:url] == YES)
-        {
-            NSNumber *openAllInWhitelistSetting = [self.settings objectForKey:@"OpenAllWhitelistURLsInWebView"];
+    } else if ([self.whitelist schemeIsAllowed:[url scheme]]) {
+        if ([self.whitelist URLIsAllowed:url] == YES) {
+            NSNumber* openAllInWhitelistSetting = [self.settings objectForKey:@"OpenAllWhitelistURLsInWebView"];
             if ((nil != openAllInWhitelistSetting) && [openAllInWhitelistSetting boolValue]) {
                 NSLog(@"OpenAllWhitelistURLsInWebView set: opening in webview");
                 return YES;
             }
-			
+
             // mainDocument will be nil for an iFrame
             NSString* mainDocument = [theWebView.request.mainDocumentURL absoluteString];
-			
+
             // anchor target="_blank" - load in Mobile Safari
-            if (navigationType == UIWebViewNavigationTypeOther && mainDocument != nil)
-            {
+            if ((navigationType == UIWebViewNavigationTypeOther) && (mainDocument != nil)) {
                 [[UIApplication sharedApplication] openURL:url];
                 return NO;
             }
             // other anchor target - load in Cordova webView
-            else
-            {
+            else {
                 return YES;
             }
         }
-        
+
         return NO;
     }
+
     /*
      *    If we loaded the HTML from a string, we let the app handle it
      */
-    else if (self.loadFromString == YES)
-    {
+    else if (self.loadFromString == YES) {
         self.loadFromString = NO;
         return YES;
     }
+
     /*
      * all tel: scheme urls we let the UIWebview handle it using the default behaviour
      */
-    else if ([[url scheme] isEqualToString:@"tel"])
-    {
+    else if ([[url scheme] isEqualToString:@"tel"]) {
         return YES;
     }
+
     /*
      * all about: scheme urls are not handled
      */
-    else if ([[url scheme] isEqualToString:@"about"])
-    {
+    else if ([[url scheme] isEqualToString:@"about"]) {
         return NO;
     }
+
     /*
      * all data: scheme urls are handled
      */
-    else if ([[url scheme] isEqualToString:@"data"])
-    {
+    else if ([[url scheme] isEqualToString:@"data"]) {
         return YES;
     }
+
     /*
      * We don't have a Cordova or web/local request, load it in the main Safari browser.
      * pass this to the application to handle.  Could be a mailto:dude@duderanch.com or a tel:55555555 or sms:55555555 facetime:55555555
      */
-    else
-    {
+    else {
         NSLog(@"AppDelegate::shouldStartLoadWithRequest: Received Unhandled URL %@", url);
-		
+
         if ([[UIApplication sharedApplication] canOpenURL:url]) {
             [[UIApplication sharedApplication] openURL:url];
         } else { // handle any custom schemes to plugins
             [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]];
         }
-		
+
         return NO;
     }
-    
+
     return YES;
 }
 
 #pragma mark GapHelpers
 
-- (void) javascriptAlert:(NSString*)text
+- (void)javascriptAlert:(NSString*)text
 {
     NSString* jsString = [NSString stringWithFormat:@"alert('%@');", text];
+
     [webView stringByEvaluatingJavaScriptFromString:jsString];
 }
 
-+ (NSString*) resolveImageResource:(NSString*)resource
++ (NSString*)resolveImageResource:(NSString*)resource
 {
     NSString* systemVersion = [[UIDevice currentDevice] systemVersion];
     BOOL isLessThaniOS4 = ([systemVersion compare:@"4.0" options:NSNumericSearch] == NSOrderedAscending);
-    
+
     // the iPad image (nor retina) differentiation code was not in 3.x, and we have to explicitly set the path
-    if (isLessThaniOS4)
-    {
+    if (isLessThaniOS4) {
         if (CDV_IsIPad()) {
             return [NSString stringWithFormat:@"%@~ipad.png", resource];
         } else {
             return [NSString stringWithFormat:@"%@.png", resource];
         }
     }
-    
+
     return resource;
 }
 
-- (NSString*) pathForResource:(NSString*)resourcepath
+- (NSString*)pathForResource:(NSString*)resourcepath
 {
-    NSBundle * mainBundle = [NSBundle mainBundle];
-    NSMutableArray *directoryParts = [NSMutableArray arrayWithArray:[resourcepath componentsSeparatedByString:@"/"]];
-    NSString       *filename       = [directoryParts lastObject];
+    NSBundle* mainBundle = [NSBundle mainBundle];
+    NSMutableArray* directoryParts = [NSMutableArray arrayWithArray:[resourcepath componentsSeparatedByString:@"/"]];
+    NSString* filename = [directoryParts lastObject];
+
     [directoryParts removeLastObject];
-    
-    NSString* directoryPartsJoined =[directoryParts componentsJoinedByString:@"/"];
+
+    NSString* directoryPartsJoined = [directoryParts componentsJoinedByString:@"/"];
     NSString* directoryStr = self.wwwFolderName;
-    
+
     if ([directoryPartsJoined length] > 0) {
         directoryStr = [NSString stringWithFormat:@"%@/%@", self.wwwFolderName, [directoryParts componentsJoinedByString:@"/"]];
     }
-    
+
     return [mainBundle pathForResource:filename ofType:@"" inDirectory:directoryStr];
 }
 
-+ (NSString*) applicationDocumentsDirectory 
++ (NSString*)applicationDocumentsDirectory
 {
-    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
-    NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
+    NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+    NSString* basePath = ([paths count] > 0) ?[paths objectAtIndex:0] : nil;
+
     return basePath;
 }
 
-- (void) showSplashScreen
+- (void)showSplashScreen
 {
     CGRect screenBounds = [[UIScreen mainScreen] bounds];
     NSString* launchImageFile = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"];
+
     if (launchImageFile == nil) { // fallback if no launch image was specified
         if (CDV_IsIPhone5()) {
             // iPhone 5 or iPod Touch 6th-gen
             launchImageFile = @"Default-568h";
         } else {
-            launchImageFile = @"Default"; 
+            launchImageFile = @"Default";
         }
     }
-    
-    NSString* orientedLaunchImageFile = nil;    
+
+    NSString* orientedLaunchImageFile = nil;
     CGAffineTransform startupImageTransform = CGAffineTransformIdentity;
     UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation;
     CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
     UIInterfaceOrientation statusBarOrientation = [UIApplication sharedApplication].statusBarOrientation;
     UIImage* launchImage = nil;
-    
+
     // default to center of screen as in the original implementation. This will produce the 20px jump
     CGPoint center = CGPointMake((screenBounds.size.width / 2), (screenBounds.size.height / 2));
 
-    if (CDV_IsIPad())
-    {
+    if (CDV_IsIPad()) {
         if (!UIDeviceOrientationIsValidInterfaceOrientation(deviceOrientation)) {
             deviceOrientation = (UIDeviceOrientation)statusBarOrientation;
         }
-        
-        switch (deviceOrientation) 
-        {
+
+        switch (deviceOrientation) {
             case UIDeviceOrientationLandscapeLeft: // this is where the home button is on the right (yeah, I know, confusing)
-            {
-                orientedLaunchImageFile = [NSString stringWithFormat:@"%@-Landscape", launchImageFile];
-                startupImageTransform = CGAffineTransformMakeRotation(degreesToRadian(90));
-                center.x -= MIN(statusBarFrame.size.width, statusBarFrame.size.height)/2;
-            }
+                {
+                    orientedLaunchImageFile = [NSString stringWithFormat:@"%@-Landscape", launchImageFile];
+                    startupImageTransform = CGAffineTransformMakeRotation(degreesToRadian(90));
+                    center.x -= MIN(statusBarFrame.size.width, statusBarFrame.size.height) / 2;
+                }
                 break;
+
             case UIDeviceOrientationLandscapeRight: // this is where the home button is on the left (yeah, I know, confusing)
-            {
-                orientedLaunchImageFile = [NSString stringWithFormat:@"%@-Landscape", launchImageFile];
-                startupImageTransform = CGAffineTransformMakeRotation(degreesToRadian(-90));
-                center.x += MIN(statusBarFrame.size.width, statusBarFrame.size.height)/2;
-           } 
+                {
+                    orientedLaunchImageFile = [NSString stringWithFormat:@"%@-Landscape", launchImageFile];
+                    startupImageTransform = CGAffineTransformMakeRotation(degreesToRadian(-90));
+                    center.x += MIN(statusBarFrame.size.width, statusBarFrame.size.height) / 2;
+                }
                 break;
+
             case UIDeviceOrientationPortraitUpsideDown:
-            {
-                orientedLaunchImageFile = [NSString stringWithFormat:@"%@-Portrait", launchImageFile];
-                startupImageTransform = CGAffineTransformMakeRotation(degreesToRadian(180));
-                center.y -= MIN(statusBarFrame.size.width, statusBarFrame.size.height)/2;
-            } 
+                {
+                    orientedLaunchImageFile = [NSString stringWithFormat:@"%@-Portrait", launchImageFile];
+                    startupImageTransform = CGAffineTransformMakeRotation(degreesToRadian(180));
+                    center.y -= MIN(statusBarFrame.size.width, statusBarFrame.size.height) / 2;
+                }
                 break;
+
             case UIDeviceOrientationPortrait:
             default:
-            {
-                orientedLaunchImageFile = [NSString stringWithFormat:@"%@-Portrait", launchImageFile];
-                startupImageTransform = CGAffineTransformIdentity;
-                center.y += MIN(statusBarFrame.size.width, statusBarFrame.size.height)/2;
-            }
+                {
+                    orientedLaunchImageFile = [NSString stringWithFormat:@"%@-Portrait", launchImageFile];
+                    startupImageTransform = CGAffineTransformIdentity;
+                    center.y += MIN(statusBarFrame.size.width, statusBarFrame.size.height) / 2;
+                }
                 break;
         }
-    }
-    else // not iPad
-    {
+    } else { // not iPad
         orientedLaunchImageFile = launchImageFile;
     }
-    
+
     launchImage = [UIImage imageNamed:[[self class] resolveImageResource:orientedLaunchImageFile]];
     if (launchImage == nil) {
         NSLog(@"WARNING: Splash-screen image '%@' was not found. Orientation: %d, iPad: %d", orientedLaunchImageFile, deviceOrientation, CDV_IsIPad());
     }
-    
+
     self.imageView = [[UIImageView alloc] initWithImage:launchImage];
     self.imageView.tag = 1;
     self.imageView.center = center;
-    
-    self.imageView.autoresizingMask = (UIViewAutoresizingFlexibleWidth & UIViewAutoresizingFlexibleHeight & UIViewAutoresizingFlexibleLeftMargin & UIViewAutoresizingFlexibleRightMargin);    
+
+    self.imageView.autoresizingMask = (UIViewAutoresizingFlexibleWidth & UIViewAutoresizingFlexibleHeight & UIViewAutoresizingFlexibleLeftMargin & UIViewAutoresizingFlexibleRightMargin);
     [self.imageView setTransform:startupImageTransform];
     [self.view.superview addSubview:self.imageView];
-    
-    
+
     /*
      * The Activity View is the top spinning throbber in the status/battery bar. We init it with the default Grey Style.
      *
@@ -749,7 +751,7 @@
      */
     NSString* topActivityIndicator = [self.settings objectForKey:@"TopActivityIndicator"];
     UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray;
-    
+
     if ([topActivityIndicator isEqualToString:@"whiteLarge"]) {
         topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhiteLarge;
     } else if ([topActivityIndicator isEqualToString:@"white"]) {
@@ -757,24 +759,24 @@
     } else if ([topActivityIndicator isEqualToString:@"gray"]) {
         topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray;
     }
-    
+
     self.activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:topActivityIndicatorStyle];
     self.activityView.tag = 2;
-    
+
     id showSplashScreenSpinnerValue = [self.settings objectForKey:@"ShowSplashScreenSpinner"];
     // backwards compatibility - if key is missing, default to true
-    if (showSplashScreenSpinnerValue == nil || [showSplashScreenSpinnerValue boolValue]) {
+    if ((showSplashScreenSpinnerValue == nil) || [showSplashScreenSpinnerValue boolValue]) {
         [self.view.superview addSubview:self.activityView];
     }
-    
+
     self.activityView.center = self.view.center;
     [self.activityView startAnimating];
-    
+
     [self.view.superview layoutSubviews];
-}    
+}
 
 BOOL gSplashScreenShown = NO;
-- (void) receivedOrientationChange
+- (void)receivedOrientationChange
 {
     if (self.imageView == nil) {
         gSplashScreenShown = YES;
@@ -793,38 +795,38 @@ BOOL gSplashScreenShown = NO;
  *
  * Returns the number of executed commands.
  */
-- (int) executeCommandsFromJson:(NSString*)queuedCommandsJSON
+- (int)executeCommandsFromJson:(NSString*)queuedCommandsJSON
 {
     // Parse the returned JSON array.
     NSArray* queuedCommands = [queuedCommandsJSON cdvjk_mutableObjectFromJSONString];
-	
+
     // Iterate over and execute all of the commands.
     for (NSArray* jsonEntry in queuedCommands) {
         CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonEntry];
-        if(![self.commandDelegate execute:command]) {
+        if (![self.commandDelegate execute:command]) {
 #ifdef DEBUG
-            NSString* commandJson = [jsonEntry cdvjk_JSONString];
-            static NSUInteger maxLogLength = 1024;
-            NSString* commandString = ([commandJson length] > maxLogLength) ? 
-                [NSString stringWithFormat:@"%@[...]", [commandJson substringToIndex:maxLogLength]] : 
+                NSString* commandJson = [jsonEntry cdvjk_JSONString];
+                static NSUInteger maxLogLength = 1024;
+                NSString* commandString = ([commandJson length] > maxLogLength) ?
+                [NSString stringWithFormat:@"%@[...]", [commandJson substringToIndex:maxLogLength]] :
                 commandJson;
 
-			DLog(@"FAILED pluginJSON = %@", commandString);
+                DLog(@"FAILED pluginJSON = %@", commandString);
 #endif
-		}
+        }
     }
-	
+
     return [queuedCommands count];
 }
 
 /**
  * Repeatedly fetches and executes the command queue until it is empty.
  */
-- (void) flushCommandQueue
+- (void)flushCommandQueue
 {
     [self.webView stringByEvaluatingJavaScriptFromString:
-	 @"cordova.commandQueueFlushing = true"];
-	
+        @"cordova.commandQueueFlushing = true"];
+
     // Keep executing the command queue until no commands get executed.
     // This ensures that commands that are queued while executing other
     // commands are executed as well.
@@ -832,30 +834,29 @@ BOOL gSplashScreenShown = NO;
     do {
         // Grab all the queued commands from the JS side.
         NSString* queuedCommandsJSON = [self.webView stringByEvaluatingJavaScriptFromString:
-                                        @"cordova.require('cordova/plugin/ios/nativecomm')()"];
+            @"cordova.require('cordova/plugin/ios/nativecomm')()"];
         numExecutedCommands = [self executeCommandsFromJson:queuedCommandsJSON];
     } while (numExecutedCommands != 0);
-	
+
     [self.webView stringByEvaluatingJavaScriptFromString:
-	 @"cordova.commandQueueFlushing = false"];
+        @"cordova.commandQueueFlushing = false"];
 }
 
-- (BOOL) execute:(CDVInvokedUrlCommand*)command
+- (BOOL)execute:(CDVInvokedUrlCommand*)command
 {
-    if (command.className == nil || command.methodName == nil) {
+    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
     CDVPlugin* obj = [self.commandDelegate getCommandInstance:command.className];
-    
+
     if (!([obj isKindOfClass:[CDVPlugin class]])) { // still allow deprecated class, until 1.0 release
         NSLog(@"ERROR: Plugin '%@' not found, or is not a CDVPlugin. Check your plugin mapping in Cordova.plist.", command.className);
         return NO;
     }
     BOOL retVal = YES;
-    
 
     // Find the proper selector to call.
     NSString* methodName = [NSString stringWithFormat:@"%@:", command.methodName];
@@ -867,62 +868,61 @@ BOOL gSplashScreenShown = NO;
         NSMutableArray* arguments = nil;
         NSMutableDictionary* dict = nil;
         [command legacyArguments:&arguments andDict:&dict];
-        //[obj performSelector:legacySelector withObject:arguments withObject:dict];
-        objc_msgSend(obj,legacySelector,arguments,dict);
+        // [obj performSelector:legacySelector withObject:arguments withObject:dict];
+        objc_msgSend(obj, legacySelector, arguments, dict);
     } else if ([obj respondsToSelector:normalSelector]) {
-        //[obj performSelector:normalSelector withObject:command];
-        objc_msgSend(obj,normalSelector,command);
-
+        // [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;
 }
 
-- (void) registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className
+- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className
 {
-    if ([plugin respondsToSelector:@selector(setViewController:)]) { 
+    if ([plugin respondsToSelector:@selector(setViewController:)]) {
         [plugin setViewController:self];
     }
-    
-    if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) { 
+
+    if ([plugin respondsToSelector:@selector(setCommandDelegate:)]) {
         [plugin setCommandDelegate:self.commandDelegate];
     }
-    
+
     [self.pluginObjects setObject:plugin forKey:className];
 }
 
 /**
  Returns an instance of a CordovaCommand object, based on its name.  If one exists already, it is returned.
  */
-- (id) getCommandInstance:(NSString*)pluginName
+- (id)getCommandInstance:(NSString*)pluginName
 {
-    // first, we try to find the pluginName in the pluginsMap 
+    // 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 
+    // 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) 
-    {
+    if (!obj) {
         // attempt to load the settings for this command class
         NSDictionary* classSettings = [self.settings objectForKey:className];
-		
+
         if (classSettings) {
-            obj = [[NSClassFromString(className) alloc] initWithWebView:webView settings:classSettings];
+            obj = [[NSClassFromString (className)alloc] initWithWebView:webView settings:classSettings];
         } else {
-            obj = [[NSClassFromString(className) alloc] initWithWebView:webView];
+            obj = [[NSClassFromString (className)alloc] initWithWebView:webView];
         }
-        
-        if (obj != nil && [obj isKindOfClass:[CDVPlugin class]]) {
+
+        if ((obj != nil) && [obj isKindOfClass:[CDVPlugin class]]) {
             [self registerPlugin:obj withClassName:className];
         } else {
             NSLog(@"CDVPlugin class %@ (pluginName: %@) does not exist.", className, pluginName);
@@ -931,40 +931,41 @@ BOOL gSplashScreenShown = NO;
     return obj;
 }
 
-
 #pragma mark -
 
-- (NSString*) appURLScheme
+- (NSString*)appURLScheme
 {
     NSString* URLScheme = nil;
-    
-    NSArray *URLTypes = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleURLTypes"];
-    if(URLTypes != nil ) {
+
+    NSArray* URLTypes = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleURLTypes"];
+
+    if (URLTypes != nil) {
         NSDictionary* dict = [URLTypes objectAtIndex:0];
-        if(dict != nil ) {
+        if (dict != nil) {
             NSArray* URLSchemes = [dict objectForKey:@"CFBundleURLSchemes"];
-            if( URLSchemes != nil ) {    
+            if (URLSchemes != nil) {
                 URLScheme = [URLSchemes objectAtIndex:0];
             }
         }
     }
-    
+
     return URLScheme;
 }
 
 /**
  Returns the contents of the named plist bundle, loaded as a dictionary object
  */
-+ (NSDictionary*) getBundlePlist:(NSString*)plistName
++ (NSDictionary*)getBundlePlist:(NSString*)plistName
 {
-    NSString * errorDesc = nil;
+    NSString* errorDesc = nil;
     NSPropertyListFormat format;
-    NSString *plistPath = [[NSBundle mainBundle] pathForResource:plistName ofType:@"plist"];
-    NSData *plistXML = [[NSFileManager defaultManager] contentsAtPath:plistPath];
-    NSDictionary *temp = (NSDictionary *)[NSPropertyListSerialization
-                                          propertyListFromData:plistXML
-                                          mutabilityOption:NSPropertyListMutableContainersAndLeaves              
-                                          format:&format errorDescription:&errorDesc];
+    NSString* plistPath = [[NSBundle mainBundle] pathForResource:plistName ofType:@"plist"];
+    NSData* plistXML = [[NSFileManager defaultManager] contentsAtPath:plistPath];
+    NSDictionary* temp = (NSDictionary*)[NSPropertyListSerialization
+        propertyListFromData:plistXML
+            mutabilityOption:NSPropertyListMutableContainersAndLeaves
+                      format:&format errorDescription:&errorDesc];
+
     return temp;
 }
 
@@ -974,70 +975,68 @@ BOOL gSplashScreenShown = NO;
 /*
  This method lets your application know that it is about to be terminated and purged from memory entirely
  */
-- (void) onAppWillTerminate:(NSNotification*)notification
+- (void)onAppWillTerminate:(NSNotification*)notification
 {
-    
     // empty the tmp directory
     NSFileManager* fileMgr = [[NSFileManager alloc] init];
     NSError* __autoreleasing err = nil;
-    
-    // clear contents of NSTemporaryDirectory 
+
+    // clear contents of NSTemporaryDirectory
     NSString* tempDirectoryPath = NSTemporaryDirectory();
-    NSDirectoryEnumerator* directoryEnumerator = [fileMgr enumeratorAtPath:tempDirectoryPath];    
+    NSDirectoryEnumerator* directoryEnumerator = [fileMgr enumeratorAtPath:tempDirectoryPath];
     NSString* fileName = nil;
     BOOL result;
-    
+
     while ((fileName = [directoryEnumerator nextObject])) {
         NSString* filePath = [tempDirectoryPath stringByAppendingPathComponent:fileName];
         result = [fileMgr removeItemAtPath:filePath error:&err];
         if (!result && err) {
             NSLog(@"Failed to delete: %@ (error: %@)", filePath, err);
         }
-    }    
+    }
 }
 
 /*
  This method is called to let your application know that it is about to move from the active to inactive state.
  You should use this method to pause ongoing tasks, disable timer, ...
  */
-- (void) onAppWillResignActive:(NSNotification*)notification
+- (void)onAppWillResignActive:(NSNotification*)notification
 {
-    //NSLog(@"%@",@"applicationWillResignActive");
+    // NSLog(@"%@",@"applicationWillResignActive");
     [self.webView stringByEvaluatingJavaScriptFromString:@"cordova.fireDocumentEvent('resign');"];
 }
 
 /*
- In iOS 4.0 and later, this method is called as part of the transition from the background to the inactive state. 
+ In iOS 4.0 and later, this method is called as part of the transition from the background to the inactive state.
  You can use this method to undo many of the changes you made to your application upon entering the background.
  invariably followed by applicationDidBecomeActive
  */
-- (void) onAppWillEnterForeground:(NSNotification*)notification
+- (void)onAppWillEnterForeground:(NSNotification*)notification
 {
-    //NSLog(@"%@",@"applicationWillEnterForeground");
+    // NSLog(@"%@",@"applicationWillEnterForeground");
     [self.webView stringByEvaluatingJavaScriptFromString:@"cordova.fireDocumentEvent('resume');"];
 }
 
-// This method is called to let your application know that it moved from the inactive to active state. 
-- (void) onAppDidBecomeActive:(NSNotification*)notification
+// This method is called to let your application know that it moved from the inactive to active state.
+- (void)onAppDidBecomeActive:(NSNotification*)notification
 {
-    //NSLog(@"%@",@"applicationDidBecomeActive");
+    // NSLog(@"%@",@"applicationDidBecomeActive");
     [self.webView stringByEvaluatingJavaScriptFromString:@"cordova.fireDocumentEvent('active');"];
 }
 
 /*
- In iOS 4.0 and later, this method is called instead of the applicationWillTerminate: method 
+ In iOS 4.0 and later, this method is called instead of the applicationWillTerminate: method
  when the user quits an application that supports background execution.
  */
-- (void) onAppDidEnterBackground:(NSNotification*)notification
+- (void)onAppDidEnterBackground:(NSNotification*)notification
 {
-    //NSLog(@"%@",@"applicationDidEnterBackground");
+    // NSLog(@"%@",@"applicationDidEnterBackground");
     [self.webView stringByEvaluatingJavaScriptFromString:@"cordova.fireDocumentEvent('pause');"];
 }
 
 // ///////////////////////
 
-
-- (void)dealloc 
+- (void)dealloc
 {
     [CDVURLProtocol unregisterViewController:self];
     [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillTerminateNotification object:nil];

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/CDVWhitelist.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVWhitelist.h b/CordovaLib/Classes/CDVWhitelist.h
index 0505cbf..0eb28f9 100644
--- a/CordovaLib/Classes/CDVWhitelist.h
+++ b/CordovaLib/Classes/CDVWhitelist.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
@@ -25,9 +25,9 @@
 @property (nonatomic, readonly, strong) NSArray* expandedWhitelist;
 @property (nonatomic, readonly, assign) BOOL allowAll;
 
-- (id) initWithArray:(NSArray*)array;
-- (BOOL) URLIsAllowed:(NSURL*)url;
-- (BOOL) schemeIsAllowed:(NSString*)scheme;
-- (NSString*) errorStringForURL:(NSURL*)url;
+- (id)initWithArray:(NSArray*)array;
+- (BOOL)URLIsAllowed:(NSURL*)url;
+- (BOOL)schemeIsAllowed:(NSString*)scheme;
+- (NSString*)errorStringForURL:(NSURL*)url;
 
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/CDVWhitelist.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVWhitelist.m b/CordovaLib/Classes/CDVWhitelist.m
index 149daf5..ad2a0c6 100644
--- a/CordovaLib/Classes/CDVWhitelist.m
+++ b/CordovaLib/Classes/CDVWhitelist.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,7 +25,7 @@
 @property (nonatomic, readwrite, strong) NSArray* expandedWhitelist;
 @property (nonatomic, readwrite, assign) BOOL allowAll;
 
-- (void) processWhitelist;
+- (void)processWhitelist;
 
 @end
 
@@ -33,7 +33,7 @@
 
 @synthesize whitelist, expandedWhitelist, allowAll;
 
-- (id) initWithArray:(NSArray*)array
+- (id)initWithArray:(NSArray*)array
 {
     self = [super init];
     if (self) {
@@ -42,149 +42,146 @@
         self.allowAll = NO;
         [self processWhitelist];
     }
-    
+
     return self;
 }
 
-- (BOOL) isIPv4Address:(NSString*)externalHost
+- (BOOL)isIPv4Address:(NSString*)externalHost
 {
-    // an IPv4 address has 4 octets b.b.b.b where b is a number between 0 and 255. 
+    // an IPv4 address has 4 octets b.b.b.b where b is a number between 0 and 255.
     // for our purposes, b can also be the wildcard character '*'
 
     // we could use a regex to solve this problem but then I would have two problems
     // anyways, this is much clearer and maintainable
-    NSArray* octets = [externalHost componentsSeparatedByString: @"."];
+    NSArray* octets = [externalHost componentsSeparatedByString:@"."];
     NSUInteger num_octets = [octets count];
-    
+
     // quick check
     if (num_octets != 4) {
         return NO;
     }
-    
+
     // restrict number parsing to 0-255
     NSNumberFormatter* numberFormatter = [[NSNumberFormatter alloc] init];
     [numberFormatter setMinimum:[NSNumber numberWithUnsignedInteger:0]];
     [numberFormatter setMaximum:[NSNumber numberWithUnsignedInteger:255]];
-    
+
     // iterate through each octet, and test for a number between 0-255 or if it equals '*'
-    for (NSUInteger i=0; i < num_octets; ++i)
-    {
+    for (NSUInteger i = 0; i < num_octets; ++i) {
         NSString* octet = [octets objectAtIndex:i];
-        
+
         if ([octet isEqualToString:@"*"]) { // passes - check next octet
             continue;
         } else if ([numberFormatter numberFromString:octet] == nil) { // fails - not a number and not within our range, return
             return NO;
         }
     }
-    
+
     return YES;
 }
 
-- (NSString*) extractHostFromUrlString:(NSString*)url
+- (NSString*)extractHostFromUrlString:(NSString*)url
 {
     NSURL* aUrl = [NSURL URLWithString:url];
-    if (aUrl != nil && [aUrl scheme] != nil) { // found scheme
+
+    if ((aUrl != nil) && ([aUrl scheme] != nil)) { // found scheme
         return [aUrl host];
     } else {
         return url;
     }
 }
 
-- (void) processWhitelist
+- (void)processWhitelist
 {
     if (self.whitelist == nil) {
         NSLog(@"ERROR: CDVWhitelist was not initialized properly, all urls will be disallowed.");
         return;
     }
-    
+
     NSMutableArray* expanded = [NSMutableArray arrayWithCapacity:[self.whitelist count]];
-    
+
     // iterate through settings ExternalHosts, check for equality
-    NSEnumerator* enumerator = [self.whitelist  objectEnumerator];
+    NSEnumerator* enumerator = [self.whitelist objectEnumerator];
     id externalHost = nil;
-    
+
     // only allow known TLDs (since Aug 23rd 2011), and two character country codes
     // does not match internationalized domain names with non-ASCII characters
     NSString* tld_match = @"(aero|asia|arpa|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|xxx|[a-z][a-z])";
-    
-    while (externalHost = [enumerator nextObject])
-    {
+
+    while (externalHost = [enumerator nextObject]) {
         NSString* regex = [self extractHostFromUrlString:externalHost];
         BOOL is_ip = [self isIPv4Address:regex];
-        
+
         // check for single wildcard '*', if found set allowAll to YES
         if ([regex isEqualToString:@"*"]) {
             self.allowAll = YES;
             self.expandedWhitelist = [NSArray arrayWithObject:regex];
             break;
         }
-        
+
         // starts with wildcard match - we make the first '.' optional (so '*.org.apache.cordova' will match 'org.apache.cordova')
         NSString* prefix = @"*.";
-        if ([regex hasPrefix:prefix]) { 
+        if ([regex hasPrefix:prefix]) {
             // replace the first two characters '*.' with our regex
             regex = [regex stringByReplacingCharactersInRange:NSMakeRange(0, [prefix length]) withString:@"(\\s{0}|*.)"]; // the '*' and '.' will be substituted later
         }
-        
+
         // ends with wildcard match for TLD
-        if (!is_ip && [regex hasSuffix:@".*"]) { 
+        if (!is_ip && [regex hasSuffix:@".*"]) {
             // replace * with tld_match
-            regex = [regex stringByReplacingCharactersInRange:NSMakeRange([regex length]-1, 1) withString:tld_match];
+            regex = [regex stringByReplacingCharactersInRange:NSMakeRange([regex length] - 1, 1) withString:tld_match];
         }
         // escape periods - since '.' means any character in regex
         regex = [regex stringByReplacingOccurrencesOfString:@"." withString:@"\\."];
         // wildcard is match 1 or more characters (to make it simple, since we are not doing verification whether the hostname is valid)
-        regex = [regex stringByReplacingOccurrencesOfString:@"*" withString:@".*"];  
-        
+        regex = [regex stringByReplacingOccurrencesOfString:@"*" withString:@".*"];
+
         [expanded addObject:regex];
     }
-    
+
     self.expandedWhitelist = expanded;
 }
 
-- (BOOL) schemeIsAllowed:(NSString*)scheme
+- (BOOL)schemeIsAllowed:(NSString*)scheme
 {
-    return ([scheme isEqualToString:@"http"] || 
-            [scheme isEqualToString:@"https"] || 
-            [scheme isEqualToString:@"ftp"] || 
-            [scheme isEqualToString:@"ftps"] );
+    return [scheme isEqualToString:@"http"] ||
+           [scheme isEqualToString:@"https"] ||
+           [scheme isEqualToString:@"ftp"] ||
+           [scheme isEqualToString:@"ftps"];
 }
 
-- (BOOL) URLIsAllowed:(NSURL*)url
+- (BOOL)URLIsAllowed:(NSURL*)url
 {
     if (self.expandedWhitelist == nil) {
         return NO;
     }
-    
+
     if (self.allowAll) {
         return YES;
     }
 
     // iterate through settings ExternalHosts, check for equality
-    NSEnumerator* enumerator = [self.expandedWhitelist  objectEnumerator];
+    NSEnumerator* enumerator = [self.expandedWhitelist objectEnumerator];
     id regex = nil;
     NSString* urlHost = [url host];
-    
+
     // if the url host IS found in the whitelist, load it in the app (however UIWebViewNavigationTypeOther kicks it out to Safari)
     // if the url host IS NOT found in the whitelist, we do nothing
-    while (regex = [enumerator nextObject])
-    {
+    while (regex = [enumerator nextObject]) {
         NSPredicate* regex_test = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];
-        
-        if ([regex_test evaluateWithObject:urlHost] == YES)
-        {
-            // if it matches at least one rule, return 
+
+        if ([regex_test evaluateWithObject:urlHost] == YES) {
+            // if it matches at least one rule, return
             return YES;
         }
     }
-    
-    NSLog(@"%@",[self errorStringForURL:url]);
+
+    NSLog(@"%@", [self errorStringForURL:url]);
     // if we got here, the url host is not in the white-list, do nothing
     return NO;
 }
 
-- (NSString*) errorStringForURL:(NSURL*)url
+- (NSString*)errorStringForURL:(NSURL*)url
 {
     return [NSString stringWithFormat:@"ERROR whitelist rejection: url='%@'", [url absoluteString]];
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/NSArray+Comparisons.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSArray+Comparisons.h b/CordovaLib/Classes/NSArray+Comparisons.h
old mode 100755
new mode 100644
index 4633f1a..cd02b71
--- a/CordovaLib/Classes/NSArray+Comparisons.h
+++ b/CordovaLib/Classes/NSArray+Comparisons.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,9 +19,8 @@
 
 #import <Foundation/Foundation.h>
 
-
 @interface NSArray (Comparisons)
 
-- (id) objectAtIndex:(NSUInteger)index withDefault:(id)aDefault;
+- (id)objectAtIndex:(NSUInteger)index withDefault:(id)aDefault;
 
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/NSArray+Comparisons.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSArray+Comparisons.m b/CordovaLib/Classes/NSArray+Comparisons.m
old mode 100755
new mode 100644
index 5df34fa..485e3c8
--- a/CordovaLib/Classes/NSArray+Comparisons.m
+++ b/CordovaLib/Classes/NSArray+Comparisons.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,19 +21,20 @@
 
 @implementation NSArray (Comparisons)
 
-- (id) objectAtIndex:(NSUInteger)index withDefault:(id)aDefault
+- (id)objectAtIndex:(NSUInteger)index withDefault:(id)aDefault
 {
     id obj = nil;
+
     @try {
         obj = [self objectAtIndex:index];
-        if (obj == [NSNull null] || obj == nil) {
+        if ((obj == [NSNull null]) || (obj == nil)) {
             return aDefault;
         }
     }
-    @catch (NSException* exception) {
+    @catch(NSException* exception) {
         NSLog(@"Exception - Name: %@ Reason: %@", [exception name], [exception reason]);
     }
-    
+
     return obj;
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/NSData+Base64.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSData+Base64.h b/CordovaLib/Classes/NSData+Base64.h
index ecabcb5..ffe9c83 100644
--- a/CordovaLib/Classes/NSData+Base64.h
+++ b/CordovaLib/Classes/NSData+Base64.h
@@ -15,19 +15,19 @@
 #import <Foundation/Foundation.h>
 
 void *CDVNewBase64Decode(
-	const char *inputBuffer,
-	size_t length,
-	size_t *outputLength);
+    const char* inputBuffer,
+    size_t    length,
+    size_t    * outputLength);
 
 char *CDVNewBase64Encode(
-	const void *inputBuffer,
-	size_t length,
-	bool separateLines,
-	size_t *outputLength);
+    const void* inputBuffer,
+    size_t    length,
+    bool      separateLines,
+    size_t    * outputLength);
 
 @interface NSData (CDVBase64)
 
-+ (NSData *)dataFromBase64String:(NSString *)aString;
-- (NSString *)base64EncodedString;
++ (NSData*)dataFromBase64String:(NSString*)aString;
+- (NSString*)base64EncodedString;
 
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/NSData+Base64.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSData+Base64.m b/CordovaLib/Classes/NSData+Base64.m
index 39f0633..3083fa1 100644
--- a/CordovaLib/Classes/NSData+Base64.m
+++ b/CordovaLib/Classes/NSData+Base64.m
@@ -18,7 +18,7 @@
 // Mapping from 6 bit pattern to ASCII character.
 //
 static unsigned char cdvbase64EncodeLookup[65] =
-	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
 //
 // Definition for "masked-out" areas of the base64DecodeLookup mapping
@@ -30,22 +30,22 @@ static unsigned char cdvbase64EncodeLookup[65] =
 //
 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, 
+    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,
 };
 
 //
@@ -68,57 +68,53 @@ static unsigned char cdvbase64DecodeLookup[256] =
 //	outputLength.
 //
 void *CDVNewBase64Decode(
-	const char *inputBuffer,
-	size_t length,
-	size_t *outputLength)
+    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;
+    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;
 }
 
 //
@@ -138,114 +134,104 @@ void *CDVNewBase64Decode(
 //	outputLength.
 //
 char *CDVNewBase64Encode(
-	const void *buffer,
-	size_t length,
-	bool separateLines,
-	size_t *outputLength)
+    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;
+    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)
@@ -261,14 +247,15 @@ char *CDVNewBase64Encode(
 //
 // returns the autoreleased NSData representation of the base64 string
 //
-+ (NSData *)dataFromBase64String:(NSString *)aString
++ (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;
+    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;
 }
 
 //
@@ -280,19 +267,20 @@ char *CDVNewBase64Encode(
 // returns an autoreleased NSString being the base 64 representation of the
 //	receiver.
 //
-- (NSString *)base64EncodedString
+- (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;
+    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/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/NSDictionary+Extensions.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSDictionary+Extensions.h b/CordovaLib/Classes/NSDictionary+Extensions.h
index 88ac69d..d38a6fc 100644
--- a/CordovaLib/Classes/NSDictionary+Extensions.h
+++ b/CordovaLib/Classes/NSDictionary+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,19 +19,17 @@
 
 #import <Foundation/Foundation.h>
 
-@interface NSDictionary(org_apache_cordova_NSDictionary_Extension)
+@interface NSDictionary (org_apache_cordova_NSDictionary_Extension)
 
-- (bool) existsValue:(NSString*)expectedValue forKey:(NSString*)key;
-- (NSInteger) integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue withRange:(NSRange)range;
-- (NSInteger) integerValueForKey:(NSString*)key  defaultValue:(NSInteger)defaultValue;
-- (BOOL) typeValueForKey:(NSString *)key isArray:(BOOL*)bArray isNull:(BOOL*)bNull isNumber:(BOOL*) bNumber isString:(BOOL*)bString;
-- (BOOL) valueForKeyIsArray:(NSString *)key;
-- (BOOL) valueForKeyIsNull:(NSString *)key;
-- (BOOL) valueForKeyIsString:(NSString *)key;
-- (BOOL) valueForKeyIsNumber:(NSString *)key;
+- (bool)existsValue:(NSString*)expectedValue forKey:(NSString*)key;
+- (NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue withRange:(NSRange)range;
+- (NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue;
+- (BOOL)typeValueForKey:(NSString*)key isArray:(BOOL*)bArray isNull:(BOOL*)bNull isNumber:(BOOL*)bNumber isString:(BOOL*)bString;
+- (BOOL)valueForKeyIsArray:(NSString*)key;
+- (BOOL)valueForKeyIsNull:(NSString*)key;
+- (BOOL)valueForKeyIsString:(NSString*)key;
+- (BOOL)valueForKeyIsNumber:(NSString*)key;
 
-- (NSDictionary*) dictionaryWithLowercaseKeys;
+- (NSDictionary*)dictionaryWithLowercaseKeys;
 
 @end
-
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/NSDictionary+Extensions.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSDictionary+Extensions.m b/CordovaLib/Classes/NSDictionary+Extensions.m
index b0f76f9..4f05245 100644
--- a/CordovaLib/Classes/NSDictionary+Extensions.m
+++ b/CordovaLib/Classes/NSDictionary+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
@@ -17,48 +17,49 @@
  under the License.
  */
 
-
 #import "NSDictionary+Extensions.h"
 #import <math.h>
 
-@implementation NSDictionary(org_apache_cordova_NSDictionary_Extension)
+@implementation NSDictionary (org_apache_cordova_NSDictionary_Extension)
 
-- (bool) existsValue:(NSString*)expectedValue forKey:(NSString*)key
+- (bool)existsValue:(NSString*)expectedValue forKey:(NSString*)key
 {
-	id val = [self valueForKey:key];
-	bool exists = false;
-	if (val != nil) {
-		exists = [(NSString*)val compare:expectedValue options:NSCaseInsensitiveSearch] == 0;
-	}
-	
-	return exists;
+    id val = [self valueForKey:key];
+    bool exists = false;
+
+    if (val != nil) {
+        exists = [(NSString*) val compare:expectedValue options:NSCaseInsensitiveSearch] == 0;
+    }
+
+    return exists;
 }
 
-- (NSInteger) integerValueForKey:(NSString*)key  defaultValue:(NSInteger)defaultValue withRange:(NSRange)range
+- (NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue withRange:(NSRange)range
 {
+    NSInteger value = defaultValue;
+
+    NSNumber* val = [self valueForKey:key];  // value is an NSNumber
+
+    if (val != nil) {
+        value = [val integerValue];
+    }
 
-	NSInteger value = defaultValue;
-	
-	NSNumber* val = [self valueForKey:key];  //value is an NSNumber
-	if (val != nil) {
-		value = [val integerValue];
-	}
-	
-	// min, max checks
-	value = MAX(range.location, value);
-	value = MIN(range.length, value);
-	
-	return value;
+    // min, max checks
+    value = MAX(range.location, value);
+    value = MIN(range.length, value);
+
+    return value;
 }
-- (NSInteger) integerValueForKey:(NSString*)key  defaultValue:(NSInteger)defaultValue 
+
+- (NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue
 {
-    
-	NSInteger value = defaultValue;
-	
-	NSNumber* val = [self valueForKey:key];  //value is an NSNumber
-	if (val != nil) {
-		value = [val integerValue];
-	}
+    NSInteger value = defaultValue;
+
+    NSNumber* val = [self valueForKey:key];  // value is an NSNumber
+
+    if (val != nil) {
+        value = [val integerValue];
+    }
     return value;
 }
 
@@ -76,72 +77,83 @@
  *
  */
 
-- (BOOL) typeValueForKey:(NSString *)key isArray:(BOOL*)bArray isNull:(BOOL*)bNull isNumber:(BOOL*) bNumber isString:(BOOL*)bString   
+- (BOOL)typeValueForKey:(NSString*)key isArray:(BOOL*)bArray isNull:(BOOL*)bNull isNumber:(BOOL*)bNumber isString:(BOOL*)bString
 {
-	BOOL bExists = YES;
-	NSObject* value = [self objectForKey: key];
-	if (value) {
-		bExists = YES;
-		if (bString)
-			*bString = [value isKindOfClass: [NSString class]];
-		if (bNull)
-			*bNull = [value isKindOfClass: [NSNull class]];
-		if (bArray)
-			*bArray = [value isKindOfClass: [NSArray class]];
-		if (bNumber)
-			*bNumber = [value isKindOfClass:[NSNumber class]];
-	}
-	return bExists;
+    BOOL bExists = YES;
+    NSObject* value = [self objectForKey:key];
+
+    if (value) {
+        bExists = YES;
+        if (bString) {
+            *bString = [value isKindOfClass:[NSString class]];
+        }
+        if (bNull) {
+            *bNull = [value isKindOfClass:[NSNull class]];
+        }
+        if (bArray) {
+            *bArray = [value isKindOfClass:[NSArray class]];
+        }
+        if (bNumber) {
+            *bNumber = [value isKindOfClass:[NSNumber class]];
+        }
+    }
+    return bExists;
 }
-- (BOOL) valueForKeyIsArray:(NSString *)key
+
+- (BOOL)valueForKeyIsArray:(NSString*)key
 {
-	BOOL bArray = NO;
-	NSObject* value = [self objectForKey: key];
-	if (value) {
-		bArray = [value isKindOfClass: [NSArray class]];
-	}
-	return bArray;
+    BOOL bArray = NO;
+    NSObject* value = [self objectForKey:key];
+
+    if (value) {
+        bArray = [value isKindOfClass:[NSArray class]];
+    }
+    return bArray;
 }
-- (BOOL) valueForKeyIsNull:(NSString *)key
+
+- (BOOL)valueForKeyIsNull:(NSString*)key
 {
-	BOOL bNull = NO;
-	NSObject* value = [self objectForKey: key];
-	if (value) {
-		bNull = [value isKindOfClass: [NSNull class]];
-	}
-	return bNull;
+    BOOL bNull = NO;
+    NSObject* value = [self objectForKey:key];
+
+    if (value) {
+        bNull = [value isKindOfClass:[NSNull class]];
+    }
+    return bNull;
 }
-- (BOOL) valueForKeyIsString:(NSString *)key
+
+- (BOOL)valueForKeyIsString:(NSString*)key
 {
-	BOOL bString = NO;
-	NSObject* value = [self objectForKey: key];
-	if (value) {
-		bString = [value isKindOfClass: [NSString class]];
-	}
-	return bString;
+    BOOL bString = NO;
+    NSObject* value = [self objectForKey:key];
+
+    if (value) {
+        bString = [value isKindOfClass:[NSString class]];
+    }
+    return bString;
 }
-- (BOOL) valueForKeyIsNumber:(NSString *)key
+
+- (BOOL)valueForKeyIsNumber:(NSString*)key
 {
-	BOOL bNumber = NO;
-	NSObject* value = [self objectForKey: key];
-	if (value) {
-		bNumber = [value isKindOfClass: [NSNumber class]];
-	}
-	return bNumber;
+    BOOL bNumber = NO;
+    NSObject* value = [self objectForKey:key];
+
+    if (value) {
+        bNumber = [value isKindOfClass:[NSNumber class]];
+    }
+    return bNumber;
 }
-	
-- (NSDictionary*) dictionaryWithLowercaseKeys 
+
+- (NSDictionary*)dictionaryWithLowercaseKeys
 {
     NSMutableDictionary* result = [NSMutableDictionary dictionaryWithCapacity:self.count];
     NSString* key;
-    
+
     for (key in self) {
         [result setObject:[self objectForKey:key] forKey:[key lowercaseString]];
     }
-    
+
     return result;
 }
 
-
 @end
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/ecf289cc/CordovaLib/Classes/NSMutableArray+QueueAdditions.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/NSMutableArray+QueueAdditions.h b/CordovaLib/Classes/NSMutableArray+QueueAdditions.h
old mode 100755
new mode 100644
index e86632e..3194094
--- a/CordovaLib/Classes/NSMutableArray+QueueAdditions.h
+++ b/CordovaLib/Classes/NSMutableArray+QueueAdditions.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,12 +19,11 @@
 
 #import <Foundation/Foundation.h>
 
-
 @interface NSMutableArray (QueueAdditions)
 
-- (id) pop;
-- (id) queueHead;
-- (id) dequeue;
-- (void) enqueue:(id)obj;
+- (id)pop;
+- (id)queueHead;
+- (id)dequeue;
+- (void)enqueue:(id)obj;
 
 @end


Mime
View raw message