You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2014/09/30 02:33:31 UTC
git commit: CB-7663 - iOS unit tests for splash screen
Repository: cordova-plugin-splashscreen
Updated Branches:
refs/heads/master fcd628ffc -> d85c6a935
CB-7663 - iOS unit tests for splash screen
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/commit/d85c6a93
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/tree/d85c6a93
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/diff/d85c6a93
Branch: refs/heads/master
Commit: d85c6a935949a7aa7493725e8b1e4f40aedff910
Parents: fcd628f
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Sep 29 17:33:50 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Sep 29 17:33:50 2014 -0700
----------------------------------------------------------------------
.gitignore | 9 +-
src/ios/CDVSplashScreen.m | 19 +-
.../contents.xcworkspacedata | 7 +
.../xcshareddata/CDVSplashScreenTest.xccheckout | 41 ++
.../CDVSplashScreenLibTests/ImageNameTest.m | 175 +++++++
.../ImageNameTestDelegates.h | 57 +++
.../ImageNameTestDelegates.m | 200 ++++++++
.../CDVSplashScreenLibTests/Info.plist | 24 +
.../project.pbxproj | 505 +++++++++++++++++++
.../contents.xcworkspacedata | 7 +
.../xcshareddata/CDVSplashScreenTest.xccheckout | 41 ++
tests/ios/README.md | 11 +
tests/ios/package.json | 10 +
13 files changed, 1094 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 52b558e..7d3b1ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-#If ignorance is bliss, then somebody knock the smile off my face
+#If ignorance is bliss, then somebody knock the smile off my face
*.csproj.user
*.suo
@@ -20,4 +20,9 @@ Thumbs.db
-
\ No newline at end of file
+
+node_modules
+
+/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcuserdata/
+
+/tests/ios/CDVSplashScreenTest.xcworkspace/xcuserdata/
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/src/ios/CDVSplashScreen.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVSplashScreen.m b/src/ios/CDVSplashScreen.m
index 15c665d..53e3688 100644
--- a/src/ios/CDVSplashScreen.m
+++ b/src/ios/CDVSplashScreen.m
@@ -117,17 +117,16 @@
[self.viewController.view removeObserver:self forKeyPath:@"bounds"];
}
-- (NSString*)getImageName:(id<CDVScreenOrientationDelegate>)screenOrientationDelegate
+- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate isIPad:(BOOL)isIPad isIPhone5:(BOOL)isIPhone5
{
- UIInterfaceOrientation orientation = self.viewController.interfaceOrientation;
-
// Use UILaunchImageFile if specified in plist. Otherwise, use Default.
NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"];
+ NSUInteger supportedOrientations = [orientationDelegate supportedInterfaceOrientations];
+
// Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape
- CDVViewController* vc = (CDVViewController*)self.viewController;
- BOOL supportsLandscape = [vc supportsOrientation:UIInterfaceOrientationLandscapeLeft] || [vc supportsOrientation:UIInterfaceOrientationLandscapeRight];
- BOOL supportsPortrait = [vc supportsOrientation:UIInterfaceOrientationPortrait] || [vc supportsOrientation:UIInterfaceOrientationPortraitUpsideDown];
+ BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape);
+ BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown);
BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape);
if (imageName) {
@@ -136,13 +135,13 @@
imageName = @"Default";
}
- if (CDV_IsIPhone5()) {
+ if (isIPhone5) {
imageName = [imageName stringByAppendingString:@"-568h"];
- } else if (CDV_IsIPad()) {
+ } else if (isIPad) {
if (isOrientationLocked) {
imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")];
} else {
- switch (orientation) {
+ switch (currentOrientation) {
case UIInterfaceOrientationLandscapeLeft:
case UIInterfaceOrientationLandscapeRight:
imageName = [imageName stringByAppendingString:@"-Landscape"];
@@ -163,7 +162,7 @@
// Sets the view's frame and image.
- (void)updateImage
{
- NSString* imageName = [self getImageName:(id<CDVScreenOrientationDelegate>)self.viewController];
+ NSString* imageName = [self getImageName:self.viewController.interfaceOrientation delegate:(id<CDVScreenOrientationDelegate>)self.viewController isIPad:CDV_IsIPad() isIPhone5:CDV_IsIPhone5()];
if (![imageName isEqualToString:_curImageName]) {
UIImage* img = [UIImage imageNamed:imageName];
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata
----------------------------------------------------------------------
diff --git a/tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata b/tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..2dd325a
--- /dev/null
+++ b/tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "container:CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj">
+ </FileRef>
+</Workspace>
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout
----------------------------------------------------------------------
diff --git a/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout b/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout
new file mode 100644
index 0000000..7e4cdb9
--- /dev/null
+++ b/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IDESourceControlProjectFavoriteDictionaryKey</key>
+ <false/>
+ <key>IDESourceControlProjectIdentifier</key>
+ <string>6BE9AD73-1B9F-4362-98D7-DC631BEC6185</string>
+ <key>IDESourceControlProjectName</key>
+ <string>CDVSplashScreenTest</string>
+ <key>IDESourceControlProjectOriginsDictionary</key>
+ <dict>
+ <key>BEF5A5D0FF64801E558286389440357A9233D7DB</key>
+ <string>https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git</string>
+ </dict>
+ <key>IDESourceControlProjectPath</key>
+ <string>tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj</string>
+ <key>IDESourceControlProjectRelativeInstallPathDictionary</key>
+ <dict>
+ <key>BEF5A5D0FF64801E558286389440357A9233D7DB</key>
+ <string>../../../../..</string>
+ </dict>
+ <key>IDESourceControlProjectURL</key>
+ <string>https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git</string>
+ <key>IDESourceControlProjectVersion</key>
+ <integer>111</integer>
+ <key>IDESourceControlProjectWCCIdentifier</key>
+ <string>BEF5A5D0FF64801E558286389440357A9233D7DB</string>
+ <key>IDESourceControlProjectWCConfigurations</key>
+ <array>
+ <dict>
+ <key>IDESourceControlRepositoryExtensionIdentifierKey</key>
+ <string>public.vcs.git</string>
+ <key>IDESourceControlWCCIdentifierKey</key>
+ <string>BEF5A5D0FF64801E558286389440357A9233D7DB</string>
+ <key>IDESourceControlWCCName</key>
+ <string>cordova-plugin-splashscreen</string>
+ </dict>
+ </array>
+</dict>
+</plist>
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m
----------------------------------------------------------------------
diff --git a/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m
new file mode 100644
index 0000000..7bb9e96
--- /dev/null
+++ b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m
@@ -0,0 +1,175 @@
+/*
+ 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 <UIKit/UIKit.h>
+#import <XCTest/XCTest.h>
+#import <Cordova/CDVScreenOrientationDelegate.h>
+#import "CDVSplashScreen.h"
+#import "ImageNameTestDelegates.h"
+
+@interface ImageNameTest : XCTestCase
+
+@property (nonatomic, strong) CDVSplashScreen* plugin;
+
+@end
+
+@interface CDVSplashScreen ()
+
+// expose private interface
+- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate isIPad:(BOOL)isIPad isIPhone5:(BOOL)isIPhone5;
+
+@end
+
+@implementation ImageNameTest
+
+- (void)setUp {
+ [super setUp];
+ // Put setup code here. This method is called before the invocation of each test method in the class.
+
+ self.plugin = [[CDVSplashScreen alloc] init];
+}
+
+- (void)tearDown {
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
+ [super tearDown];
+}
+
+- (void) portraitHelper:(UIInterfaceOrientation)initialOrientation delegate:(id<CDVScreenOrientationDelegate>)delegate
+{
+ NSString* name = nil;
+
+ // Portrait, non-iPad, non-iPhone5
+ name = [self.plugin getImageName:initialOrientation delegate:delegate isIPad:NO isIPhone5:NO];
+ XCTAssertTrue([@"Default" isEqualToString:name], @"Portrait - 3.5\" iPhone failed (%@)", name);
+
+ // Portrait, iPad, non-iPhone5
+ name = [self.plugin getImageName:initialOrientation delegate:delegate isIPad:YES isIPhone5:NO];
+ XCTAssertTrue([@"Default-Portrait" isEqualToString:name], @"Portrait - iPad failed (%@)", name);
+
+ // Portrait, non-iPad, iPhone5
+ name = [self.plugin getImageName:initialOrientation delegate:delegate isIPad:NO isIPhone5:YES];
+ XCTAssertTrue([@"Default-568h" isEqualToString:name], @"Portrait - iPhone 5 failed (%@)", name);
+}
+
+- (void) landscapeHelper:(UIInterfaceOrientation)initialOrientation delegate:(id<CDVScreenOrientationDelegate>)delegate
+{
+ NSString* name = nil;
+
+ // Landscape, non-iPad, non-iPhone5 (does NOT support landscape)
+ name = [self.plugin getImageName:initialOrientation delegate:delegate isIPad:NO isIPhone5:NO];
+ XCTAssertTrue([@"Default" isEqualToString:name], @"Landscape - 3.5\" iPhone failed (%@)", name );
+
+ // Landscape, iPad, non-iPhone5 (supports landscape)
+ name = [self.plugin getImageName:initialOrientation delegate:delegate isIPad:YES isIPhone5:NO];
+ XCTAssertTrue([@"Default-Landscape" isEqualToString:name], @"Landscape - iPad failed (%@)", name);
+
+ // Landscape, non-iPad, iPhone5 (does NOT support landscape)
+ name = [self.plugin getImageName:initialOrientation delegate:delegate isIPad:NO isIPhone5:YES];
+ XCTAssertTrue([@"Default-568h" isEqualToString:name], @"Landscape - iPhone5 failed (%@)", name);
+}
+
+- (void)testPortraitOnly {
+
+ PortraitOnly* delegate = [[PortraitOnly alloc] init];
+ [self portraitHelper:UIInterfaceOrientationPortrait delegate:delegate];
+}
+
+- (void)testPortraitUpsideDownOnly {
+
+ PortraitUpsideDownOnly* delegate = [[PortraitUpsideDownOnly alloc] init];
+ [self portraitHelper:UIInterfaceOrientationPortraitUpsideDown delegate:delegate];
+}
+
+- (void)testAllPortraitOnly {
+
+ AllPortraitOnly* delegate = [[AllPortraitOnly alloc] init];
+ [self portraitHelper:UIInterfaceOrientationPortrait delegate:delegate];
+ [self portraitHelper:UIInterfaceOrientationPortraitUpsideDown delegate:delegate];
+}
+
+- (void)testLandscapeLeftOnly {
+
+ LandscapeLeftOnly* delegate = [[LandscapeLeftOnly alloc] init];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeLeft delegate:delegate];
+}
+
+- (void)testLandscapeRightOnly {
+
+ LandscapeRightOnly* delegate = [[LandscapeRightOnly alloc] init];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeRight delegate:delegate];
+}
+
+- (void)testAllLandscapeOnly {
+
+ AllLandscapeOnly* delegate = [[AllLandscapeOnly alloc] init];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeLeft delegate:delegate];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeRight delegate:delegate];
+}
+
+- (void)testAllOrientations {
+
+ AllOrientations* delegate = [[AllOrientations alloc] init];
+ // try all orientations
+ [self portraitHelper:UIInterfaceOrientationPortrait delegate:delegate];
+ [self portraitHelper:UIInterfaceOrientationPortraitUpsideDown delegate:delegate];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeLeft delegate:delegate];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeRight delegate:delegate];
+}
+
+- (void)testPortraitAndLandscapeLeft {
+
+ PortraitAndLandscapeLeftOnly* delegate = [[PortraitAndLandscapeLeftOnly alloc] init];
+ // try all orientations
+ [self portraitHelper:UIInterfaceOrientationPortrait delegate:delegate];
+ [self portraitHelper:UIInterfaceOrientationPortraitUpsideDown delegate:delegate];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeLeft delegate:delegate];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeRight delegate:delegate];
+}
+
+- (void)testPortraitAndLandscapeRight {
+
+ PortraitAndLandscapeRightOnly* delegate = [[PortraitAndLandscapeRightOnly alloc] init];
+ // try all orientations
+ [self portraitHelper:UIInterfaceOrientationPortrait delegate:delegate];
+ [self portraitHelper:UIInterfaceOrientationPortraitUpsideDown delegate:delegate];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeLeft delegate:delegate];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeRight delegate:delegate];
+}
+
+- (void)testPortraitUpsideDownAndLandscapeLeft {
+
+ PortraitUpsideDownAndLandscapeLeftOnly* delegate = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
+ // try all orientations
+ [self portraitHelper:UIInterfaceOrientationPortrait delegate:delegate];
+ [self portraitHelper:UIInterfaceOrientationPortraitUpsideDown delegate:delegate];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeLeft delegate:delegate];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeRight delegate:delegate];
+}
+
+- (void)testPortraitUpsideDownAndLandscapeRight {
+
+ PortraitUpsideDownAndLandscapeRightOnly* delegate = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
+ // try all orientations
+ [self portraitHelper:UIInterfaceOrientationPortrait delegate:delegate];
+ [self portraitHelper:UIInterfaceOrientationPortraitUpsideDown delegate:delegate];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeLeft delegate:delegate];
+ [self landscapeHelper:UIInterfaceOrientationLandscapeRight delegate:delegate];
+}
+
+@end
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h
----------------------------------------------------------------------
diff --git a/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h
new file mode 100644
index 0000000..be4a788
--- /dev/null
+++ b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h
@@ -0,0 +1,57 @@
+/*
+ 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 <Cordova/CDVScreenOrientationDelegate.h>
+
+@interface PortraitOnly : NSObject <CDVScreenOrientationDelegate>
+@end
+
+@interface PortraitUpsideDownOnly : NSObject <CDVScreenOrientationDelegate>
+@end
+
+@interface AllPortraitOnly : NSObject <CDVScreenOrientationDelegate>
+@end
+
+
+@interface LandscapeLeftOnly : NSObject <CDVScreenOrientationDelegate>
+@end
+
+@interface LandscapeRightOnly : NSObject <CDVScreenOrientationDelegate>
+@end
+
+@interface AllLandscapeOnly : NSObject <CDVScreenOrientationDelegate>
+@end
+
+
+@interface AllOrientations : NSObject <CDVScreenOrientationDelegate>
+@end
+
+@interface PortraitAndLandscapeLeftOnly : NSObject <CDVScreenOrientationDelegate>
+@end
+
+@interface PortraitAndLandscapeRightOnly : NSObject <CDVScreenOrientationDelegate>
+@end
+
+@interface PortraitUpsideDownAndLandscapeLeftOnly : NSObject <CDVScreenOrientationDelegate>
+@end
+
+@interface PortraitUpsideDownAndLandscapeRightOnly : NSObject <CDVScreenOrientationDelegate>
+@end
+
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.m
----------------------------------------------------------------------
diff --git a/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.m b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.m
new file mode 100644
index 0000000..b5a1b23
--- /dev/null
+++ b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.m
@@ -0,0 +1,200 @@
+/*
+ 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 <UIKit/UIKit.h>
+#import "ImageNameTestDelegates.h"
+
+@implementation PortraitOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortrait;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation PortraitUpsideDownOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortraitUpsideDown;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation AllPortraitOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+
+@implementation LandscapeLeftOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskLandscapeLeft;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation LandscapeRightOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskLandscapeRight;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation AllLandscapeOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+
+@implementation AllOrientations
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation PortraitAndLandscapeLeftOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation PortraitAndLandscapeRightOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeRight;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation PortraitUpsideDownAndLandscapeLeftOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortraitUpsideDown | UIInterfaceOrientationMaskLandscapeLeft;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation PortraitUpsideDownAndLandscapeRightOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortraitUpsideDown | UIInterfaceOrientationMaskLandscapeRight;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/Info.plist
----------------------------------------------------------------------
diff --git a/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/Info.plist b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/Info.plist
new file mode 100644
index 0000000..a949946
--- /dev/null
+++ b/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/Info.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>$(EXECUTABLE_NAME)</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.apache.cordova.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>$(PRODUCT_NAME)</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.pbxproj b/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..080e69a
--- /dev/null
+++ b/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.pbxproj
@@ -0,0 +1,505 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 7E9F51AB19DA10AE00DA31AC /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */; };
+ 7E9F51B119DA114400DA31AC /* ImageNameTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51B019DA114400DA31AC /* ImageNameTest.m */; };
+ 7E9F51B319DA116500DA31AC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F51B219DA116500DA31AC /* Foundation.framework */; };
+ 7E9F51B519DA127E00DA31AC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F51B419DA127E00DA31AC /* UIKit.framework */; };
+ 7E9F51B819DA14FD00DA31AC /* ImageNameTestDelegates.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */; };
+ 7E9F51B919DA1B1600DA31AC /* libCDVSplashScreenLib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */; };
+ 7E9F51BA19DA1B2000DA31AC /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F519019DA0F8300DA31AC /* libCordova.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 7E9F518F19DA0F8300DA31AC /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 68A32D7114102E1C006B237C;
+ remoteInfo = CordovaLib;
+ };
+ 7E9F51AC19DA10DE00DA31AC /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 7E9F517219DA09CE00DA31AC /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 7E9F519419DA102000DA31AC;
+ remoteInfo = CDVSplashScreenLib;
+ };
+ 7E9F51AE19DA10E100DA31AC /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */;
+ proxyType = 1;
+ remoteGlobalIDString = D2AAC07D0554694100DB518D;
+ remoteInfo = CordovaLib;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 7E9F519319DA102000DA31AC /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "include/$(PRODUCT_NAME)";
+ dstSubfolderSpec = 16;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = "../node_modules/cordova-ios/CordovaLib/CordovaLib.xcodeproj"; sourceTree = "<group>"; };
+ 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCDVSplashScreenLib.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CDVSplashScreenLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7E9F51A219DA102000DA31AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = ../../../../src/ios/CDVSplashScreen.m; sourceTree = "<group>"; };
+ 7E9F51AA19DA10AE00DA31AC /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = ../../../../src/ios/CDVSplashScreen.h; sourceTree = "<group>"; };
+ 7E9F51B019DA114400DA31AC /* ImageNameTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageNameTest.m; sourceTree = "<group>"; };
+ 7E9F51B219DA116500DA31AC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
+ 7E9F51B419DA127E00DA31AC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
+ 7E9F51B619DA12C600DA31AC /* ImageNameTestDelegates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageNameTestDelegates.h; sourceTree = "<group>"; };
+ 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageNameTestDelegates.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 7E9F519219DA102000DA31AC /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 7E9F519C19DA102000DA31AC /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7E9F51BA19DA1B2000DA31AC /* libCordova.a in Frameworks */,
+ 7E9F51B919DA1B1600DA31AC /* libCDVSplashScreenLib.a in Frameworks */,
+ 7E9F51B519DA127E00DA31AC /* UIKit.framework in Frameworks */,
+ 7E9F51B319DA116500DA31AC /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 7E9F517119DA09CE00DA31AC = {
+ isa = PBXGroup;
+ children = (
+ 7E9F51B419DA127E00DA31AC /* UIKit.framework */,
+ 7E9F51B219DA116500DA31AC /* Foundation.framework */,
+ 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */,
+ 7E9F519619DA102000DA31AC /* CDVSplashScreenLib */,
+ 7E9F51A019DA102000DA31AC /* CDVSplashScreenLibTests */,
+ 7E9F517D19DA0A0A00DA31AC /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 7E9F517D19DA0A0A00DA31AC /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */,
+ 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 7E9F518C19DA0F8300DA31AC /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 7E9F519019DA0F8300DA31AC /* libCordova.a */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 7E9F519619DA102000DA31AC /* CDVSplashScreenLib */ = {
+ isa = PBXGroup;
+ children = (
+ 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */,
+ 7E9F51AA19DA10AE00DA31AC /* CDVSplashScreen.h */,
+ );
+ path = CDVSplashScreenLib;
+ sourceTree = "<group>";
+ };
+ 7E9F51A019DA102000DA31AC /* CDVSplashScreenLibTests */ = {
+ isa = PBXGroup;
+ children = (
+ 7E9F51A119DA102000DA31AC /* Supporting Files */,
+ 7E9F51B019DA114400DA31AC /* ImageNameTest.m */,
+ 7E9F51B619DA12C600DA31AC /* ImageNameTestDelegates.h */,
+ 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */,
+ );
+ path = CDVSplashScreenLibTests;
+ sourceTree = "<group>";
+ };
+ 7E9F51A119DA102000DA31AC /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 7E9F51A219DA102000DA31AC /* Info.plist */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 7E9F51A319DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLib" */;
+ buildPhases = (
+ 7E9F519119DA102000DA31AC /* Sources */,
+ 7E9F519219DA102000DA31AC /* Frameworks */,
+ 7E9F519319DA102000DA31AC /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = CDVSplashScreenLib;
+ productName = CDVSplashScreenLib;
+ productReference = 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ 7E9F519E19DA102000DA31AC /* CDVSplashScreenLibTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 7E9F51A619DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLibTests" */;
+ buildPhases = (
+ 7E9F519B19DA102000DA31AC /* Sources */,
+ 7E9F519C19DA102000DA31AC /* Frameworks */,
+ 7E9F519D19DA102000DA31AC /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 7E9F51AF19DA10E100DA31AC /* PBXTargetDependency */,
+ 7E9F51AD19DA10DE00DA31AC /* PBXTargetDependency */,
+ );
+ name = CDVSplashScreenLibTests;
+ productName = CDVSplashScreenLibTests;
+ productReference = 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 7E9F517219DA09CE00DA31AC /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0600;
+ TargetAttributes = {
+ 7E9F519419DA102000DA31AC = {
+ CreatedOnToolsVersion = 6.0;
+ };
+ 7E9F519E19DA102000DA31AC = {
+ CreatedOnToolsVersion = 6.0;
+ };
+ };
+ };
+ buildConfigurationList = 7E9F517519DA09CE00DA31AC /* Build configuration list for PBXProject "CDVSplashScreenTest" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 7E9F517119DA09CE00DA31AC;
+ productRefGroup = 7E9F517D19DA0A0A00DA31AC /* Products */;
+ projectDirPath = "";
+ projectReferences = (
+ {
+ ProductGroup = 7E9F518C19DA0F8300DA31AC /* Products */;
+ ProjectRef = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */;
+ },
+ );
+ projectRoot = "";
+ targets = (
+ 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */,
+ 7E9F519E19DA102000DA31AC /* CDVSplashScreenLibTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+ 7E9F519019DA0F8300DA31AC /* libCordova.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libCordova.a;
+ remoteRef = 7E9F518F19DA0F8300DA31AC /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 7E9F519D19DA102000DA31AC /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 7E9F519119DA102000DA31AC /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7E9F51AB19DA10AE00DA31AC /* CDVSplashScreen.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 7E9F519B19DA102000DA31AC /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7E9F51B119DA114400DA31AC /* ImageNameTest.m in Sources */,
+ 7E9F51B819DA14FD00DA31AC /* ImageNameTestDelegates.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 7E9F51AD19DA10DE00DA31AC /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */;
+ targetProxy = 7E9F51AC19DA10DE00DA31AC /* PBXContainerItemProxy */;
+ };
+ 7E9F51AF19DA10E100DA31AC /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ name = CordovaLib;
+ targetProxy = 7E9F51AE19DA10E100DA31AC /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ 7E9F517619DA09CE00DA31AC /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ };
+ name = Debug;
+ };
+ 7E9F517719DA09CE00DA31AC /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ };
+ name = Release;
+ };
+ 7E9F51A419DA102000DA31AC /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
+ "\"$(OBJROOT)/UninstalledProducts/include\"",
+ "\"$(BUILT_PRODUCTS_DIR)\"",
+ );
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ 7E9F51A519DA102000DA31AC /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = YES;
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
+ "\n\"$(OBJROOT)/UninstalledProducts/include\"\n\"$(BUILT_PRODUCTS_DIR)\"",
+ );
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ SKIP_INSTALL = YES;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 7E9F51A719DA102000DA31AC /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ );
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ INFOPLIST_FILE = CDVSplashScreenLibTests/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ 7E9F51A819DA102000DA31AC /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = YES;
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ );
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ INFOPLIST_FILE = CDVSplashScreenLibTests/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ MTL_ENABLE_DEBUG_INFO = NO;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 7E9F517519DA09CE00DA31AC /* Build configuration list for PBXProject "CDVSplashScreenTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7E9F517619DA09CE00DA31AC /* Debug */,
+ 7E9F517719DA09CE00DA31AC /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 7E9F51A319DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLib" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7E9F51A419DA102000DA31AC /* Debug */,
+ 7E9F51A519DA102000DA31AC /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 7E9F51A619DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLibTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7E9F51A719DA102000DA31AC /* Debug */,
+ 7E9F51A819DA102000DA31AC /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 7E9F517219DA09CE00DA31AC /* Project object */;
+}
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
----------------------------------------------------------------------
diff --git a/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..8f91278
--- /dev/null
+++ b/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:CDVSplashScreenTest.xcodeproj">
+ </FileRef>
+</Workspace>
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout
----------------------------------------------------------------------
diff --git a/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout b/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout
new file mode 100644
index 0000000..7e4cdb9
--- /dev/null
+++ b/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IDESourceControlProjectFavoriteDictionaryKey</key>
+ <false/>
+ <key>IDESourceControlProjectIdentifier</key>
+ <string>6BE9AD73-1B9F-4362-98D7-DC631BEC6185</string>
+ <key>IDESourceControlProjectName</key>
+ <string>CDVSplashScreenTest</string>
+ <key>IDESourceControlProjectOriginsDictionary</key>
+ <dict>
+ <key>BEF5A5D0FF64801E558286389440357A9233D7DB</key>
+ <string>https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git</string>
+ </dict>
+ <key>IDESourceControlProjectPath</key>
+ <string>tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj</string>
+ <key>IDESourceControlProjectRelativeInstallPathDictionary</key>
+ <dict>
+ <key>BEF5A5D0FF64801E558286389440357A9233D7DB</key>
+ <string>../../../../..</string>
+ </dict>
+ <key>IDESourceControlProjectURL</key>
+ <string>https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git</string>
+ <key>IDESourceControlProjectVersion</key>
+ <integer>111</integer>
+ <key>IDESourceControlProjectWCCIdentifier</key>
+ <string>BEF5A5D0FF64801E558286389440357A9233D7DB</string>
+ <key>IDESourceControlProjectWCConfigurations</key>
+ <array>
+ <dict>
+ <key>IDESourceControlRepositoryExtensionIdentifierKey</key>
+ <string>public.vcs.git</string>
+ <key>IDESourceControlWCCIdentifierKey</key>
+ <string>BEF5A5D0FF64801E558286389440357A9233D7DB</string>
+ <key>IDESourceControlWCCName</key>
+ <string>cordova-plugin-splashscreen</string>
+ </dict>
+ </array>
+</dict>
+</plist>
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/tests/ios/README.md
----------------------------------------------------------------------
diff --git a/tests/ios/README.md b/tests/ios/README.md
new file mode 100644
index 0000000..3be61c4
--- /dev/null
+++ b/tests/ios/README.md
@@ -0,0 +1,11 @@
+# iOS Tests for CDVSplashScreen
+
+You need to install `node.js` to pull in `cordova-ios`.
+
+To install cordova-ios:
+
+ npm install
+
+... in the current folder.
+
+Then launch the `CDVSplashScreenTest.xcworkspace` file.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen/blob/d85c6a93/tests/ios/package.json
----------------------------------------------------------------------
diff --git a/tests/ios/package.json b/tests/ios/package.json
new file mode 100644
index 0000000..642484b
--- /dev/null
+++ b/tests/ios/package.json
@@ -0,0 +1,10 @@
+{
+ "name": "cordova-plugin-splashscreen-test-ios",
+ "version": "1.0.0",
+ "description": "iOS Unit Tests for Splashscreen Plugin",
+ "author": "Apache Software Foundation",
+ "license": "Apache Version 2.0",
+ "dependencies": {
+ "cordova-ios": "^3.6.0"
+ }
+}
\ No newline at end of file