cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [30/36] ios commit: removed splashscreen
Date Tue, 11 Jun 2013 00:51:44 GMT
removed splashscreen


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

Branch: refs/heads/3.0.0
Commit: 00c97c9212bea625a823d5c53d5674d0ad435f94
Parents: 69a53dc
Author: Steven Gill <stevengill97@gmail.com>
Authored: Tue May 21 13:03:38 2013 -0700
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Mon Jun 10 17:49:10 2013 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDV.h                        |   1 -
 CordovaLib/Classes/CDVSplashScreen.h            |  33 ---
 CordovaLib/Classes/CDVSplashScreen.m            | 230 -------------------
 CordovaLib/CordovaLib.xcodeproj/project.pbxproj |   8 -
 CordovaLib/cordova.js                           |  36 +--
 bin/templates/project/__TESTING__/config.xml    |   3 -
 6 files changed, 8 insertions(+), 303 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/00c97c92/CordovaLib/Classes/CDV.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDV.h b/CordovaLib/Classes/CDV.h
index 50fe28d..e9c8e16 100644
--- a/CordovaLib/Classes/CDV.h
+++ b/CordovaLib/Classes/CDV.h
@@ -37,7 +37,6 @@
 #import "CDVPluginResult.h"
 #import "CDVReachability.h"
 #import "CDVSound.h"
-#import "CDVSplashScreen.h"
 #import "CDVWhitelist.h"
 #import "CDVLocalStorage.h"
 #import "CDVScreenOrientationDelegate.h"

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/00c97c92/CordovaLib/Classes/CDVSplashScreen.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVSplashScreen.h b/CordovaLib/Classes/CDVSplashScreen.h
deleted file mode 100644
index 704ab43..0000000
--- a/CordovaLib/Classes/CDVSplashScreen.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Foundation/Foundation.h>
-#import "CDVPlugin.h"
-
-@interface CDVSplashScreen : CDVPlugin {
-    UIActivityIndicatorView* _activityView;
-    UIImageView* _imageView;
-    NSString* _curImageName;
-    BOOL _visible;
-}
-
-- (void)show:(CDVInvokedUrlCommand*)command;
-- (void)hide:(CDVInvokedUrlCommand*)command;
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/00c97c92/CordovaLib/Classes/CDVSplashScreen.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVSplashScreen.m b/CordovaLib/Classes/CDVSplashScreen.m
deleted file mode 100644
index fdb79fa..0000000
--- a/CordovaLib/Classes/CDVSplashScreen.m
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import "CDVSplashScreen.h"
-
-#define kSplashScreenDurationDefault 0.25f
-
-@implementation CDVSplashScreen
-
-- (void)pluginInitialize
-{
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad)
name:CDVPageDidLoadNotification object:self.webView];
-
-    [self setVisible:YES];
-}
-
-- (void)show:(CDVInvokedUrlCommand*)command
-{
-    [self setVisible:YES];
-}
-
-- (void)hide:(CDVInvokedUrlCommand*)command
-{
-    [self setVisible:NO];
-}
-
-- (void)pageDidLoad
-{
-    id autoHideSplashScreenValue = [self.commandDelegate.settings objectForKey:@"AutoHideSplashScreen"];
-
-    // if value is missing, default to yes
-    if ((autoHideSplashScreenValue == nil) || [autoHideSplashScreenValue boolValue]) {
-        [self setVisible:NO];
-    }
-}
-
-- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change
context:(void*)context
-{
-    [self updateImage];
-}
-
-- (void)createViews
-{
-    /*
-     * The Activity View is the top spinning throbber in the status/battery bar. We init
it with the default Grey Style.
-     *
-     *     whiteLarge = UIActivityIndicatorViewStyleWhiteLarge
-     *     white      = UIActivityIndicatorViewStyleWhite
-     *     gray       = UIActivityIndicatorViewStyleGray
-     *
-     */
-    NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:@"TopActivityIndicator"];
-    UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray;
-
-    if ([topActivityIndicator isEqualToString:@"whiteLarge"]) {
-        topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhiteLarge;
-    } else if ([topActivityIndicator isEqualToString:@"white"]) {
-        topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhite;
-    } else if ([topActivityIndicator isEqualToString:@"gray"]) {
-        topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray;
-    }
-
-    UIView* parentView = self.viewController.view;
-    parentView.userInteractionEnabled = NO;  // disable user interaction while splashscreen
is shown
-    _activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:topActivityIndicatorStyle];
-    _activityView.center = CGPointMake(parentView.bounds.size.width / 2, parentView.bounds.size.height
/ 2);
-    _activityView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin
-        | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin;
-    [_activityView startAnimating];
-
-    // Set the frame & image later.
-    _imageView = [[UIImageView alloc] init];
-    [parentView addSubview:_imageView];
-
-    id showSplashScreenSpinnerValue = [self.commandDelegate.settings objectForKey:@"ShowSplashScreenSpinner"];
-    // backwards compatibility - if key is missing, default to true
-    if ((showSplashScreenSpinnerValue == nil) || [showSplashScreenSpinnerValue boolValue])
{
-        [parentView addSubview:_activityView];
-    }
-
-    // Frame is required when launching in portrait mode.
-    // Bounds for landscape since it captures the rotation.
-    [parentView addObserver:self forKeyPath:@"frame" options:0 context:nil];
-    [parentView addObserver:self forKeyPath:@"bounds" options:0 context:nil];
-
-    [self updateImage];
-}
-
-- (void)destroyViews
-{
-    [_imageView removeFromSuperview];
-    [_activityView removeFromSuperview];
-    _imageView = nil;
-    _activityView = nil;
-    _curImageName = nil;
-
-    self.viewController.view.userInteractionEnabled = YES;  // re-enable user interaction
upon completion
-    [self.viewController.view removeObserver:self forKeyPath:@"frame"];
-    [self.viewController.view removeObserver:self forKeyPath:@"bounds"];
-}
-
-// Sets the view's frame and image.
-- (void)updateImage
-{
-    UIInterfaceOrientation orientation = self.viewController.interfaceOrientation;
-
-    // Use UILaunchImageFile if specified in plist.  Otherwise, use Default.
-    NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"];
-
-    if (imageName) {
-        imageName = [imageName stringByDeletingPathExtension];
-    } else {
-        imageName = @"Default";
-    }
-
-    if (CDV_IsIPhone5()) {
-        imageName = [imageName stringByAppendingString:@"-568h"];
-    } else if (CDV_IsIPad()) {
-        switch (orientation) {
-            case UIInterfaceOrientationLandscapeLeft:
-            case UIInterfaceOrientationLandscapeRight:
-                imageName = [imageName stringByAppendingString:@"-Landscape"];
-                break;
-
-            case UIInterfaceOrientationPortrait:
-            case UIInterfaceOrientationPortraitUpsideDown:
-            default:
-                imageName = [imageName stringByAppendingString:@"-Portrait"];
-                break;
-        }
-    }
-
-    if (![imageName isEqualToString:_curImageName]) {
-        UIImage* img = [UIImage imageNamed:imageName];
-        _imageView.image = img;
-        _curImageName = imageName;
-    }
-
-    // Check that splash screen's image exists before updating bounds
-    if (_imageView.image) {
-        [self updateBounds];
-    } else {
-        NSLog(@"WARNING: The splashscreen image named %@ was not found", imageName);
-    }
-}
-
-- (void)updateBounds
-{
-    UIImage* img = _imageView.image;
-    CGRect imgBounds = CGRectMake(0, 0, img.size.width, img.size.height);
-
-    CGSize screenSize = [self.viewController.view convertRect:[UIScreen mainScreen].bounds
fromView:nil].size;
-
-    // There's a special case when the image is the size of the screen.
-    if (CGSizeEqualToSize(screenSize, imgBounds.size)) {
-        CGRect statusFrame = [self.viewController.view convertRect:[UIApplication sharedApplication].statusBarFrame
fromView:nil];
-        imgBounds.origin.y -= statusFrame.size.height;
-    } else {
-        CGRect viewBounds = self.viewController.view.bounds;
-        CGFloat imgAspect = imgBounds.size.width / imgBounds.size.height;
-        CGFloat viewAspect = viewBounds.size.width / viewBounds.size.height;
-        // This matches the behaviour of the native splash screen.
-        CGFloat ratio;
-        if (viewAspect > imgAspect) {
-            ratio = viewBounds.size.width / imgBounds.size.width;
-        } else {
-            ratio = viewBounds.size.height / imgBounds.size.height;
-        }
-        imgBounds.size.height *= ratio;
-        imgBounds.size.width *= ratio;
-    }
-
-    _imageView.frame = imgBounds;
-}
-
-- (void)setVisible:(BOOL)visible
-{
-    if (visible == _visible) {
-        return;
-    }
-    _visible = visible;
-
-    id fadeSplashScreenValue = [self.commandDelegate.settings objectForKey:@"FadeSplashScreen"];
-    id fadeSplashScreenDuration = [self.commandDelegate.settings objectForKey:@"FadeSplashScreenDuration"];
-
-    float fadeDuration = fadeSplashScreenDuration == nil ? kSplashScreenDurationDefault :
[fadeSplashScreenDuration floatValue];
-
-    if ((fadeSplashScreenValue == nil) || ![fadeSplashScreenValue boolValue]) {
-        fadeDuration = 0;
-    }
-
-    // Never animate the showing of the splash screen.
-    if (visible) {
-        if (_imageView == nil) {
-            [self createViews];
-        }
-    } else if (fadeDuration == 0) {
-        [self destroyViews];
-    } else {
-        [UIView transitionWithView:self.viewController.view
-                          duration:fadeDuration
-                           options:UIViewAnimationOptionTransitionNone
-                        animations:^(void) {
-            [_imageView setAlpha:0];
-            [_activityView setAlpha:0];
-        }
-
-                        completion:^(BOOL finished) {
-            [self destroyViews];
-        }];
-    }
-}
-
-@end

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/00c97c92/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
index da4e2f0..4cd9dd9 100644
--- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -23,8 +23,6 @@
 		3073E9ED1656D51200957977 /* CDVScreenOrientationDelegate.h in Headers */ = {isa = PBXBuildFile;
fileRef = 3073E9EC1656D51200957977 /* CDVScreenOrientationDelegate.h */; settings = {ATTRIBUTES
= (Public, ); }; };
 		307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */ = {isa = PBXBuildFile; fileRef
= 307A8F9C1385A2EC00E43782 /* CDVConnection.h */; settings = {ATTRIBUTES = (Public, ); };
};
 		307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef
= 307A8F9D1385A2EC00E43782 /* CDVConnection.m */; };
-		30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */ = {isa = PBXBuildFile; fileRef
= 30B39EBC13D0268B0009682A /* CDVSplashScreen.h */; settings = {ATTRIBUTES = (Public, ); };
};
-		30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef
= 30B39EBD13D0268B0009682A /* CDVSplashScreen.m */; };
 		30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */ = {isa = PBXBuildFile; fileRef =
30C5F1DD15AF9E950052A00D /* CDVDevice.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef =
30C5F1DE15AF9E950052A00D /* CDVDevice.m */; };
 		30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef
= 30C6847E1406CB38004C1A8E /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -101,8 +99,6 @@
 		3073E9EC1656D51200957977 /* CDVScreenOrientationDelegate.h */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVScreenOrientationDelegate.h;
path = Classes/CDVScreenOrientationDelegate.h; sourceTree = "<group>"; };
 		307A8F9C1385A2EC00E43782 /* CDVConnection.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; name = CDVConnection.h; path = Classes/CDVConnection.h;
sourceTree = "<group>"; };
 		307A8F9D1385A2EC00E43782 /* CDVConnection.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; name = CDVConnection.m; path = Classes/CDVConnection.m;
sourceTree = "<group>"; };
-		30B39EBC13D0268B0009682A /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = Classes/CDVSplashScreen.h;
sourceTree = "<group>"; };
-		30B39EBD13D0268B0009682A /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding
= 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = Classes/CDVSplashScreen.m;
sourceTree = "<group>"; };
 		30C5F1DD15AF9E950052A00D /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4;
lastKnownFileType = sourcecode.c.h; name = CDVDevice.h; path = Classes/CDVDevice.h; sourceTree
= "<group>"; };
 		30C5F1DE15AF9E950052A00D /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4;
lastKnownFileType = sourcecode.c.objc; name = CDVDevice.m; path = Classes/CDVDevice.m; sourceTree
= "<group>"; };
 		30C6847E1406CB38004C1A8E /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding =
4; lastKnownFileType = sourcecode.c.h; name = CDVWhitelist.h; path = Classes/CDVWhitelist.h;
sourceTree = "<group>"; };
@@ -264,8 +260,6 @@
 				30C684931407044A004C1A8E /* CDVURLProtocol.m */,
 				30C6847E1406CB38004C1A8E /* CDVWhitelist.h */,
 				30C6847F1406CB38004C1A8E /* CDVWhitelist.m */,
-				30B39EBC13D0268B0009682A /* CDVSplashScreen.h */,
-				30B39EBD13D0268B0009682A /* CDVSplashScreen.m */,
 				30E33AF013A7E24B00594D64 /* CDVPlugin.h */,
 				30E33AF113A7E24B00594D64 /* CDVPlugin.m */,
 				307A8F9C1385A2EC00E43782 /* CDVConnection.h */,
@@ -362,7 +356,6 @@
 				1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */,
 				30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */,
 				302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */,
-				30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */,
 				30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */,
 				30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */,
 				30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */,
@@ -456,7 +449,6 @@
 				307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */,
 				1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */,
 				30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */,
-				30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */,
 				30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */,
 				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,
 				30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/00c97c92/CordovaLib/cordova.js
----------------------------------------------------------------------
diff --git a/CordovaLib/cordova.js b/CordovaLib/cordova.js
index eb17a61..d4a7758 100644
--- a/CordovaLib/cordova.js
+++ b/CordovaLib/cordova.js
@@ -1,6 +1,7 @@
 // Platform: ios
 <<<<<<< HEAD
 <<<<<<< HEAD
+<<<<<<< HEAD
 // 2.8.0-0-g6208c95
 =======
 // 2.7.0rc1-80-geda98d1
@@ -8,6 +9,9 @@
 =======
 // 2.7.0rc1-81-gc09114e
 >>>>>>> removed battery code
+=======
+// 2.7.0rc1-82-g32587e6
+>>>>>>> removed splashscreen
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -29,6 +33,7 @@
 ;(function() {
 <<<<<<< HEAD
 <<<<<<< HEAD
+<<<<<<< HEAD
 var CORDOVA_JS_BUILD_LABEL = '2.8.0-0-g6208c95';
 =======
 var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-80-geda98d1';
@@ -36,6 +41,9 @@ var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-80-geda98d1';
 =======
 var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-81-gc09114e';
 >>>>>>> removed battery code
+=======
+var CORDOVA_JS_BUILD_LABEL = '2.7.0rc1-82-g32587e6';
+>>>>>>> removed splashscreen
 // file: lib/scripts/require.js
 
 var require,
@@ -5844,34 +5852,6 @@ module.exports = function(uri, successCallback, errorCallback) {
 
 });
 
-// file: lib/common/plugin/splashscreen.js
-define("cordova/plugin/splashscreen", function(require, exports, module) {
-
-var exec = require('cordova/exec');
-
-var splashscreen = {
-    show:function() {
-        exec(null, null, "SplashScreen", "show", []);
-    },
-    hide:function() {
-        exec(null, null, "SplashScreen", "hide", []);
-    }
-};
-
-module.exports = splashscreen;
-
-});
-
-// file: lib/common/plugin/splashscreen/symbols.js
-define("cordova/plugin/splashscreen/symbols", function(require, exports, module) {
-
-
-var modulemapper = require('cordova/modulemapper');
-
-modulemapper.clobbers('cordova/plugin/splashscreen', 'navigator.splashscreen');
-
-});
-
 // file: lib/common/symbols.js
 define("cordova/symbols", function(require, exports, module) {
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/00c97c92/bin/templates/project/__TESTING__/config.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__/config.xml b/bin/templates/project/__TESTING__/config.xml
index dbe25bb..832ef9e 100644
--- a/bin/templates/project/__TESTING__/config.xml
+++ b/bin/templates/project/__TESTING__/config.xml
@@ -77,9 +77,6 @@
     <feature name="Capture">
       <param name="ios-package" value="CDVCapture"/>
     </feature>
-    <feature name="SplashScreen">
-      <param name="ios-package" value="CDVSplashScreen"/>
-    </feature>
     <feature name="Echo">
       <param name="ios-package" value="CDVEcho"/>
     </feature>


Mime
View raw message