mirror of
https://github.com/apache/cordova-plugin-splashscreen.git
synced 2026-01-25 00:00:06 +08:00
breaking: remove ios platform code from plugin repo (#263)
* breaking: remove iOS platform code from plugin repo * chore: update README.md, remove iOS legacy SplashScreen information * chore: simplify local browser tests Note: Even though the implementation of the iOS SplashScreen is integrated into the core of cordova-ios, the documentation is left in this repo. This is because all of the SplashScreen documentation is grouped together on cordova.io and that documentation is pulled from this repo.
This commit is contained in:
13
.gitignore
vendored
13
.gitignore
vendored
@@ -12,17 +12,4 @@ Thumbs.db
|
||||
*.swp
|
||||
*.user
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
node_modules
|
||||
|
||||
/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcuserdata/
|
||||
|
||||
/tests/ios/CDVSplashScreenTest.xcworkspace/xcuserdata/
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
tests/ios
|
||||
20
.travis.yml
20
.travis.yml
@@ -21,10 +21,6 @@ node_js: 12
|
||||
|
||||
# yaml anchor/alias: https://medium.com/@tommyvn/travis-yml-dry-with-anchors-8b6a3ac1b027
|
||||
|
||||
_ios: &_ios
|
||||
os: osx
|
||||
osx_image: xcode10.3
|
||||
|
||||
_android: &_android
|
||||
language: android
|
||||
os: linux
|
||||
@@ -41,15 +37,9 @@ _android: &_android
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# additional `npm test` in directory
|
||||
- env: ADDITIONAL_TESTS_DIR=./tests/ios
|
||||
<<: *_ios
|
||||
|
||||
# one local test, without saucelabs
|
||||
- env: PLATFORM=local/browser
|
||||
<<: *_ios
|
||||
- env: PLATFORM=local/ios-10.0
|
||||
<<: *_ios
|
||||
os: osx
|
||||
|
||||
# many tests with saucelabs
|
||||
- env: PLATFORM=browser-chrome
|
||||
@@ -57,13 +47,6 @@ matrix:
|
||||
- env: PLATFORM=browser-safari
|
||||
- env: PLATFORM=browser-edge
|
||||
|
||||
- env: PLATFORM=ios-11.3
|
||||
<<: *_ios
|
||||
- env: PLATFORM=ios-12.0
|
||||
<<: *_ios
|
||||
- env: PLATFORM=ios-12.2
|
||||
<<: *_ios
|
||||
|
||||
- env: PLATFORM=android-5.1
|
||||
<<: *_android
|
||||
- env: PLATFORM=android-6.0
|
||||
@@ -84,7 +67,6 @@ before_install:
|
||||
- if [[ "$PLATFORM" =~ android ]]; then nvm install $TRAVIS_NODE_VERSION; fi
|
||||
- node --version
|
||||
- if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi
|
||||
- if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi
|
||||
- npm install -g cordova
|
||||
# install paramedic if not running on paramedic repo
|
||||
- if ! [[ "$TRAVIS_REPO_SLUG" =~ cordova-paramedic ]]; then npm install -g github:apache/cordova-paramedic; fi
|
||||
|
||||
147
README.md
147
README.md
@@ -29,22 +29,32 @@ description: Control the splash screen for your app.
|
||||
|
||||
This plugin displays and hides a splash screen while your web application is launching. Using its methods you can also show and hide the splash screen manually.
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Supported Platforms](#supported-platforms)
|
||||
- [Platform Splash Screen Image Configuration](#platform-splash-screen-image-configuration)
|
||||
* [Example Configuration](#example-configuration)
|
||||
* [iOS-specific Information](#ios-specific-information)
|
||||
* [Windows-specific Information](#windows-specific-information)
|
||||
- [Preferences](#preferences)
|
||||
* [config.xml](#configxml)
|
||||
* [Quirks](#quirks)
|
||||
+ [Android Quirks](#android-quirks)
|
||||
+ [Browser Quirks](#browser-quirks)
|
||||
+ [iOS Quirks](#ios-quirks)
|
||||
+ [Windows Quirks](#windows-quirks)
|
||||
- [Methods](#methods)
|
||||
* [splashscreen.hide](#splashscreenhide)
|
||||
* [splashscreen.show](#splashscreenshow)
|
||||
- [cordova-plugin-splashscreen](#cordova-plugin-splashscreen)
|
||||
- [Installation](#installation)
|
||||
- [Supported Platforms](#supported-platforms)
|
||||
- [Platform Splash Screen Image Configuration](#platform-splash-screen-image-configuration)
|
||||
- [Example Configuration](#example-configuration)
|
||||
- [iOS-specific Information](#ios-specific-information)
|
||||
- [Launch Storyboard Images](#launch-storyboard-images)
|
||||
- [Designing Launch Storyboard Images](#designing-launch-storyboard-images)
|
||||
- [Scale](#scale)
|
||||
- [Idioms](#idioms)
|
||||
- [Size classes](#size-classes)
|
||||
- [Single-image launch screen](#single-image-launch-screen)
|
||||
- [Multi-image launch screen](#multi-image-launch-screen)
|
||||
- [Quirks and Known Issues](#quirks-and-known-issues)
|
||||
- [Windows-specific Information](#windows-specific-information)
|
||||
- [Preferences](#preferences)
|
||||
- [config.xml](#configxml)
|
||||
- [Quirks](#quirks)
|
||||
- [Android Quirks](#android-quirks)
|
||||
- [Browser Quirks](#browser-quirks)
|
||||
- [iOS Quirks](#ios-quirks)
|
||||
- [Windows Quirks](#windows-quirks)
|
||||
- [Methods](#methods)
|
||||
- [splashscreen.hide](#splashscreenhide)
|
||||
- [iOS Quirk](#ios-quirk)
|
||||
- [splashscreen.show](#splashscreenshow)
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -107,22 +117,7 @@ projectRoot
|
||||
</platform>
|
||||
|
||||
<platform name="ios">
|
||||
<!-- There are two mechanisms for showing launch images.
|
||||
-- Legacy method (supports all devices except iPad Pro 12.9):
|
||||
-- Note: Images are determined by width and height. The following are supported -->
|
||||
<splash src="res/screen/ios/Default~iphone.png" width="320" height="480"/>
|
||||
<splash src="res/screen/ios/Default@2x~iphone.png" width="640" height="960"/>
|
||||
<splash src="res/screen/ios/Default-Portrait~ipad.png" width="768" height="1024"/>
|
||||
<splash src="res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
|
||||
<splash src="res/screen/ios/Default-Landscape~ipad.png" width="1024" height="768"/>
|
||||
<splash src="res/screen/ios/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
|
||||
<splash src="res/screen/ios/Default-568h@2x~iphone.png" width="640" height="1136"/>
|
||||
<splash src="res/screen/ios/Default-667h.png" width="750" height="1334"/>
|
||||
<splash src="res/screen/ios/Default-736h.png" width="1242" height="2208"/>
|
||||
<splash src="res/screen/ios/Default-Landscape-736h.png" width="2208" height="1242"/>
|
||||
<!-- Storyboard method (supports all devices):
|
||||
-- Important: If you use the storyboard method, legacy images are
|
||||
-- copied but ignored.
|
||||
<!-- Storyboard (supports all devices):
|
||||
-- Note: images are determined by scale, idiom, and size traits. The following
|
||||
-- are suggested based on current device form factors -->
|
||||
<splash src="res/screen/ios/Default@2x~universal~anyany.png" />
|
||||
@@ -151,81 +146,37 @@ projectRoot
|
||||
|
||||
### iOS-specific Information
|
||||
|
||||
There are two mechanisms for displaying a launch screen on iOS:
|
||||
Launch storyboard images are sized based on scale, idiom, and size classes. It supports all devices, and can be used with split-screen/slide-over multitasking.
|
||||
|
||||
1. Legacy launch images: images are sized exactly for the device's screen size. Does not support the iPad Pro 12.9's native resolution or split-screen/slide-over multitasking.
|
||||
There is no official support for providing a native-resolution launch image for the iPad Pro 12.9 or for providing launch images that work with split-screen multitasking or slide-over.
|
||||
|
||||
2. Launch storyboard images: Images are sized based on scale, idiom, and size classes. Supports all devices, and can be used with split-screen/slide-over multitasking.
|
||||
**Note:** Since iOS 11, for iPhone X devices and greater (with notch screen), make sure to add `viewport-fit=cover` to the viewport meta tag in your `index.html` file to display the app correctly like so: `<meta name="viewport" content="user-scalable=no, initial-scale=1, width=device-width, viewport-fit=cover">` and make some modification to your app style by adding: `padding: env(safe-area-inset-top)` to your `index.css` file to avoid the unsafe areas behind notches in the screen.
|
||||
|
||||
Apple is moving away from legacy launch images. There is no official support for providing a native-resolution launch image for the iPad Pro 12.9 or for providing launch images that work with split-screen multitasking or slide-over. If your app doesn't need to support these contexts, then you can continue to use legacy launch images for as long as you like.
|
||||
#### Launch Storyboard Images
|
||||
|
||||
The preferred method of providing launch images is to use a launch storyboard. For native app developers, the ideal launch storyboard is an unpopulated version of the app's user interface at launch. For non-native app developers who don't wish to learn Interface Builder, however, this plugin simulates the legacy launch image method as much as is feasible.
|
||||
To support newer form factors and split-screen/slide-over multitasking, launch storyboard images are used.
|
||||
|
||||
**Note:** Since iOS 11, for iPhone X devices and greater (with notch screen), you should switch to the new storyboard splash screens, taking into account to add `viewport-fit=cover` to the viewport meta tag in your `index.html` file to display the app correctly like so: `<meta name="viewport" content="user-scalable=no, initial-scale=1, width=device-width, viewport-fit=cover">` and make some modification to your app style by adding: `padding: env(safe-area-inset-top)` to your `index.css` file to avoid the unsafe areas behind notches in the screen.
|
||||
- images are not specific to a given device.
|
||||
- images are scaled to fill the available viewport (while maintaining the aspect ratio).
|
||||
- the outer edges of the images will be cropped, and the amount will vary based on device an viewport.
|
||||
- there is no need to provide an image for each possible device, viewport, and orientation; iOS will choose the best image for the situation automatically.
|
||||
|
||||
#### Legacy launch images
|
||||
|
||||
If you choose to use legacy launch images, you will use the following syntax in `config.xml`:
|
||||
|
||||
```
|
||||
<splash src="res/screen/ios/Default~iphone.png" width="320" height="480"/>
|
||||
<splash src="res/screen/ios/Default@2x~iphone.png" width="640" height="960"/>
|
||||
<splash src="res/screen/ios/Default-Portrait~ipad.png" width="768" height="1024"/>
|
||||
<splash src="res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
|
||||
<splash src="res/screen/ios/Default-Landscape~ipad.png" width="1024" height="768"/>
|
||||
<splash src="res/screen/ios/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
|
||||
<splash src="res/screen/ios/Default-568h@2x~iphone.png" width="640" height="1136"/>
|
||||
<splash src="res/screen/ios/Default-667h.png" width="750" height="1334"/>
|
||||
<splash src="res/screen/ios/Default-736h.png" width="1242" height="2208"/>
|
||||
```
|
||||
|
||||
Technically the filename for the `src` attribute can be anything you want; the filenames are used because they match what will be used when your project is compiled. The width and height attributes determine which launch images are displayed on which devices as follows:
|
||||
|
||||
| width | height | device (orientation) |
|
||||
|:-----------:|:------------:|:--------------------------------:|
|
||||
| 320 | 480 | All non-retina iPhones and iPods |
|
||||
| 640 | 960 | iPhone 4/4s (portrait) |
|
||||
| 640 | 1136 | iPhone 5/5s/SE (portrait) |
|
||||
| 750 | 1334 | iPhone 6/6s/7 (portrait) |
|
||||
| 1242 | 2208 | iPhone 6+/6s+/7+ (portrait) |
|
||||
| 2208 | 1242 | iPhone 6+/6s+/7+ (landscape) |
|
||||
| 768 | 1024 | All non-retina iPads (portrait) |
|
||||
| 1024 | 768 | All non-retina iPads (landscape) |
|
||||
| 1536 | 2048 | All retina iPads (portrait) |
|
||||
| 2048 | 1536 | All retina iPads (landscape) |
|
||||
|
||||
Note: It is vitally important that the source image actually matches the size specified in the `width` and `height` attributes. If it does not, the device may fail to render it properly, if at all.
|
||||
|
||||
#### Launch storyboard images
|
||||
|
||||
In order to support newer form factors and split-screen/slide-over multitasking, you should use launch storyboard images. These are similar to the legacy launch images above, but there are crucial differences:
|
||||
|
||||
- images are not specific to a given device.
|
||||
|
||||
- images are scaled to fill the available viewport (while maintaining the aspect ratio).
|
||||
|
||||
- the outer edges of the images will be cropped, and the amount will vary based on device an viewport.
|
||||
|
||||
- there is no need to provide an image for each possible device, viewport, and orientation; iOS will choose the best image for the situation automatically.
|
||||
|
||||
##### Designing launch storyboard images
|
||||
##### Designing Launch Storyboard Images
|
||||
|
||||
The key to designing a launch storyboard image is understanding that the edges of the image will almost certainly be cropped. Therefore, one should not place any important information near the edges of any images provided to the launch storyboard. Only the center is a safe area, and this all but guarantees that following Apple's advice of presenting an unpopulated user interface will not work well.
|
||||
|
||||
Instead, the following tips should enable you to create a launch image that works across a multitude of form factors, viewports, and orientations:
|
||||
|
||||
- Important graphics (logos, icons, titles) should be centered. The safe bounding region will vary, so you will need to test to ensure that the important graphics are never cropped. Better yet, don't supply any important graphics in the first place.
|
||||
- Important graphics (logos, icons, titles) should be centered. The safe bounding region will vary, so you will need to test to ensure that the important graphics are never cropped. Better yet, don't supply any important graphics in the first place.
|
||||
|
||||
- You _can_ fine-tune the placement and size of these graphics, but you don't have the same fine-grained control as you did with legacy launch images.
|
||||
- You _can_ fine-tune the placement and size of these graphics.
|
||||
|
||||
- Use a simple color wash. If you use two colors, you'll want one color to fill the top half of the image, and the second to fill the bottom half. If you use a gradient, you'll probably want to ensure that the middle of the gradient lines up with the center of the image.
|
||||
- Use a simple color wash. If you use two colors, you'll want one color to fill the top half of the image, and the second to fill the bottom half. If you use a gradient, you'll probably want to ensure that the middle of the gradient lines up with the center of the image.
|
||||
|
||||
- Don't worry about pixel perfection -- because the images are scaled, there's almost no chance the images will be perfectly fit to the pixel grid. Since all supported iOS devices use retina screens, users will be hard pressed to notice it anyway.
|
||||
- Don't worry about pixel perfection -- because the images are scaled, there's almost no chance the images will be perfectly fit to the pixel grid. Since all supported iOS devices use retina screens, users will be hard pressed to notice it anyway.
|
||||
|
||||
It is important to understand the concept of scale, idiom, and size class traits in order to use launch storyboard images effectively. Of the images supplied to the launch storyboard, iOS will choose the image that best matches the device and viewport and render that image. It is possible to supply only one launch image if so desired, but it is also possible to fine-tune the displayed launch image based on traits. When fine-tuning, one can ignore traits that aren't targeted or supported by the app.
|
||||
|
||||
> Note: If you are using launch storyboard images, there is no need to include legacy images. If you do, the legacy images will be copied, but not used.
|
||||
|
||||
##### Scale
|
||||
|
||||
| scale | devices |
|
||||
@@ -267,17 +218,15 @@ To see the complete list of size classes associated with devices and viewports,
|
||||
|
||||
If your launch image is simple, you may be able to avoid creating a lot of different launch images and supply only one. The launch image needs to meet the following requirements:
|
||||
|
||||
- the image should be square
|
||||
- the image should be square
|
||||
- the image should be large enough to fit on an iPad Pro 12.9": 2732x2732
|
||||
- anything important should fit within the center
|
||||
|
||||
- the image should be large enough to fit on an iPad Pro 12.9": 2732x2732
|
||||
|
||||
- anything important should fit within the center
|
||||
|
||||
Keep in mind that the image will be cropped, possibly quite severely, depending upon the viewport.
|
||||
Keep in mind that the image will be cropped, possibly quite severely, depending upon the viewport.
|
||||
|
||||
Once the image is created, you can include it in your project by adding the following to `config.xml`:
|
||||
|
||||
```
|
||||
```xml
|
||||
<splash src="res/screen/ios/Default@2x~universal~anyany.png" />
|
||||
```
|
||||
|
||||
@@ -304,7 +253,7 @@ If you don't need to target images to a specific idiom, you should create six im
|
||||
|
||||
The above looks like the following snippet when present in `config.xml`:
|
||||
|
||||
```
|
||||
```xml
|
||||
<splash src="res/screen/ios/Default@2x~universal~anyany.png" />
|
||||
<splash src="res/screen/ios/Default@2x~universal~comany.png" />
|
||||
<splash src="res/screen/ios/Default@2x~universal~comcom.png" />
|
||||
@@ -330,7 +279,7 @@ Should one need to further fine tune based upon device idiom, one can do so. Thi
|
||||
|
||||
The above looks like the following in `config.xml`:
|
||||
|
||||
```
|
||||
```xml
|
||||
<splash src="res/screen/ios/Default@2x~iphone~anyany.png" />
|
||||
<splash src="res/screen/ios/Default@2x~iphone~comany.png" />
|
||||
<splash src="res/screen/ios/Default@2x~iphone~comcom.png" />
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
"platforms": [
|
||||
"android",
|
||||
"ubuntu",
|
||||
"ios",
|
||||
"windows",
|
||||
"browser"
|
||||
]
|
||||
@@ -20,7 +19,6 @@
|
||||
"splashscreen",
|
||||
"ecosystem:cordova",
|
||||
"cordova-android",
|
||||
"cordova-ios",
|
||||
"cordova-windows"
|
||||
],
|
||||
"scripts": {
|
||||
@@ -36,9 +34,6 @@
|
||||
"cordova-android": ">=3.6.0",
|
||||
"cordova-windows": ">=4.4.0"
|
||||
},
|
||||
"<6.0.0": {
|
||||
"cordova-ios": "<6.0.0"
|
||||
},
|
||||
"6.0.0": {
|
||||
"cordova": ">100"
|
||||
}
|
||||
|
||||
18
plugin.xml
18
plugin.xml
@@ -30,7 +30,6 @@
|
||||
|
||||
<engines>
|
||||
<engine name="cordova-android" version=">=3.6.0" /><!-- Requires CordovaPlugin.preferences -->
|
||||
<engine name="cordova-ios" version="<6.0.0" />
|
||||
<engine name="cordova-windows" version=">=4.4.0" />
|
||||
</engines>
|
||||
|
||||
@@ -50,23 +49,6 @@
|
||||
<source-file src="src/android/SplashScreen.java" target-dir="src/org/apache/cordova/splashscreen" />
|
||||
</platform>
|
||||
|
||||
<!-- ios -->
|
||||
<platform name="ios">
|
||||
<config-file target="config.xml" parent="/*">
|
||||
<feature name="SplashScreen">
|
||||
<param name="ios-package" value="CDVSplashScreen"/>
|
||||
<param name="onload" value="true"/>
|
||||
</feature>
|
||||
</config-file>
|
||||
|
||||
<header-file src="src/ios/CDVSplashScreen.h" />
|
||||
<source-file src="src/ios/CDVSplashScreen.m" />
|
||||
<header-file src="src/ios/CDVViewController+SplashScreen.h" />
|
||||
<source-file src="src/ios/CDVViewController+SplashScreen.m" />
|
||||
|
||||
<framework src="CoreGraphics.framework" />
|
||||
</platform>
|
||||
|
||||
<!-- windows -->
|
||||
<platform name="windows">
|
||||
<js-module src="www/windows/SplashScreenProxy.js" name="SplashScreenProxy">
|
||||
|
||||
@@ -1,46 +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 <Cordova/CDVPlugin.h>
|
||||
|
||||
typedef struct {
|
||||
BOOL iPhone;
|
||||
BOOL iPad;
|
||||
BOOL iPhone4;
|
||||
BOOL iPhone5;
|
||||
BOOL iPhone6;
|
||||
BOOL iPhone6Plus;
|
||||
BOOL retina;
|
||||
BOOL iPhoneX;
|
||||
|
||||
} CDV_iOSDevice;
|
||||
|
||||
@interface CDVSplashScreen : CDVPlugin {
|
||||
UIActivityIndicatorView* _activityView;
|
||||
UIImageView* _imageView;
|
||||
NSString* _curImageName;
|
||||
BOOL _visible;
|
||||
BOOL _destroyed;
|
||||
}
|
||||
|
||||
- (void)show:(CDVInvokedUrlCommand*)command;
|
||||
- (void)hide:(CDVInvokedUrlCommand*)command;
|
||||
|
||||
@end
|
||||
@@ -1,514 +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"
|
||||
#import <Cordova/CDVViewController.h>
|
||||
#import <Cordova/CDVScreenOrientationDelegate.h>
|
||||
#import "CDVViewController+SplashScreen.h"
|
||||
|
||||
#define kSplashScreenDurationDefault 3000.0f
|
||||
#define kFadeDurationDefault 500.0f
|
||||
|
||||
|
||||
@implementation CDVSplashScreen
|
||||
|
||||
- (void)pluginInitialize
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad) name:CDVPageDidLoadNotification object:nil];
|
||||
|
||||
[self setVisible:YES];
|
||||
}
|
||||
|
||||
- (void)show:(CDVInvokedUrlCommand*)command
|
||||
{
|
||||
[self setVisible:YES];
|
||||
}
|
||||
|
||||
- (void)hide:(CDVInvokedUrlCommand*)command
|
||||
{
|
||||
[self setVisible:NO andForce:YES];
|
||||
}
|
||||
|
||||
- (void)pageDidLoad
|
||||
{
|
||||
id autoHideSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"AutoHideSplashScreen" lowercaseString]];
|
||||
|
||||
// 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
|
||||
*
|
||||
*/
|
||||
|
||||
// Determine whether rotation should be enabled for this device
|
||||
// Per iOS HIG, landscape is only supported on iPad and iPhone 6+
|
||||
CDV_iOSDevice device = [self getCurrentDevice];
|
||||
BOOL autorotateValue = (device.iPad || device.iPhone6Plus || device.iPhoneX) ?
|
||||
[(CDVViewController *)self.viewController shouldAutorotateDefaultValue] :
|
||||
NO;
|
||||
|
||||
[(CDVViewController *)self.viewController setEnabledAutorotation:autorotateValue];
|
||||
|
||||
NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:[@"TopActivityIndicator" lowercaseString]];
|
||||
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" lowercaseString]];
|
||||
// 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];
|
||||
_destroyed = NO;
|
||||
}
|
||||
|
||||
- (void)hideViews
|
||||
{
|
||||
[_imageView setAlpha:0];
|
||||
[_activityView setAlpha:0];
|
||||
}
|
||||
|
||||
- (void)destroyViews
|
||||
{
|
||||
_destroyed = YES;
|
||||
[(CDVViewController *)self.viewController setEnabledAutorotation:[(CDVViewController *)self.viewController shouldAutorotateDefaultValue]];
|
||||
|
||||
[_imageView removeFromSuperview];
|
||||
[_activityView removeFromSuperview];
|
||||
_imageView = nil;
|
||||
_activityView = nil;
|
||||
_curImageName = nil;
|
||||
|
||||
self.viewController.view.userInteractionEnabled = YES; // re-enable user interaction upon completion
|
||||
@try {
|
||||
[self.viewController.view removeObserver:self forKeyPath:@"frame"];
|
||||
[self.viewController.view removeObserver:self forKeyPath:@"bounds"];
|
||||
}
|
||||
@catch (NSException *exception) {
|
||||
// When reloading the page from a remotely connected Safari, there
|
||||
// are no observers, so the removeObserver method throws an exception,
|
||||
// that we can safely ignore.
|
||||
// Alternatively we can check whether there are observers before calling removeObserver
|
||||
}
|
||||
}
|
||||
|
||||
- (CDV_iOSDevice) getCurrentDevice
|
||||
{
|
||||
CDV_iOSDevice device;
|
||||
|
||||
UIScreen* mainScreen = [UIScreen mainScreen];
|
||||
CGFloat mainScreenHeight = mainScreen.bounds.size.height;
|
||||
CGFloat mainScreenWidth = mainScreen.bounds.size.width;
|
||||
|
||||
int limit = MAX(mainScreenHeight,mainScreenWidth);
|
||||
|
||||
device.iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad);
|
||||
device.iPhone = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone);
|
||||
device.retina = ([mainScreen scale] == 2.0);
|
||||
device.iPhone4 = (device.iPhone && limit == 480.0);
|
||||
device.iPhone5 = (device.iPhone && limit == 568.0);
|
||||
// note these below is not a true device detect, for example if you are on an
|
||||
// iPhone 6/6+ but the app is scaled it will prob set iPhone5 as true, but
|
||||
// this is appropriate for detecting the runtime screen environment
|
||||
device.iPhone6 = (device.iPhone && limit == 667.0);
|
||||
device.iPhone6Plus = (device.iPhone && limit == 736.0);
|
||||
device.iPhoneX = (device.iPhone && limit == 812.0);
|
||||
|
||||
return device;
|
||||
}
|
||||
|
||||
- (BOOL) isUsingCDVLaunchScreen {
|
||||
NSString* launchStoryboardName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchStoryboardName"];
|
||||
if (launchStoryboardName) {
|
||||
return ([launchStoryboardName isEqualToString:@"CDVLaunchScreen"]);
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device
|
||||
{
|
||||
// Use UILaunchImageFile if specified in plist. Otherwise, use Default.
|
||||
NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"];
|
||||
|
||||
// detect if we are using CB-9762 Launch Storyboard; if so, return the associated image instead
|
||||
if ([self isUsingCDVLaunchScreen]) {
|
||||
imageName = @"LaunchStoryboard";
|
||||
return imageName;
|
||||
}
|
||||
|
||||
NSUInteger supportedOrientations = [orientationDelegate supportedInterfaceOrientations];
|
||||
|
||||
// Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape
|
||||
BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape);
|
||||
BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown);
|
||||
// this means there are no mixed orientations in there
|
||||
BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape);
|
||||
|
||||
if (imageName)
|
||||
{
|
||||
imageName = [imageName stringByDeletingPathExtension];
|
||||
}
|
||||
else
|
||||
{
|
||||
imageName = @"Default";
|
||||
}
|
||||
|
||||
// Add Asset Catalog specific prefixes
|
||||
if ([imageName isEqualToString:@"LaunchImage"])
|
||||
{
|
||||
if (device.iPhone4 || device.iPhone5 || device.iPad) {
|
||||
imageName = [imageName stringByAppendingString:@"-700"];
|
||||
} else if(device.iPhone6) {
|
||||
imageName = [imageName stringByAppendingString:@"-800"];
|
||||
} else if(device.iPhone6Plus || device.iPhoneX ) {
|
||||
if(device.iPhone6Plus) {
|
||||
imageName = [imageName stringByAppendingString:@"-800"];
|
||||
} else {
|
||||
imageName = [imageName stringByAppendingString:@"-1100"];
|
||||
}
|
||||
if (currentOrientation == UIInterfaceOrientationPortrait || currentOrientation == UIInterfaceOrientationPortraitUpsideDown)
|
||||
{
|
||||
imageName = [imageName stringByAppendingString:@"-Portrait"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (device.iPhone5)
|
||||
{ // does not support landscape
|
||||
imageName = [imageName stringByAppendingString:@"-568h"];
|
||||
}
|
||||
else if (device.iPhone6)
|
||||
{ // does not support landscape
|
||||
imageName = [imageName stringByAppendingString:@"-667h"];
|
||||
}
|
||||
else if (device.iPhone6Plus || device.iPhoneX)
|
||||
{ // supports landscape
|
||||
if (isOrientationLocked)
|
||||
{
|
||||
imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"")];
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (currentOrientation)
|
||||
{
|
||||
case UIInterfaceOrientationLandscapeLeft:
|
||||
case UIInterfaceOrientationLandscapeRight:
|
||||
imageName = [imageName stringByAppendingString:@"-Landscape"];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (device.iPhoneX) {
|
||||
imageName = [imageName stringByAppendingString:@"-2436h"];
|
||||
} else {
|
||||
imageName = [imageName stringByAppendingString:@"-736h"];
|
||||
}
|
||||
}
|
||||
else if (device.iPad)
|
||||
{ // supports landscape
|
||||
if (isOrientationLocked)
|
||||
{
|
||||
imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")];
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (currentOrientation)
|
||||
{
|
||||
case UIInterfaceOrientationLandscapeLeft:
|
||||
case UIInterfaceOrientationLandscapeRight:
|
||||
imageName = [imageName stringByAppendingString:@"-Landscape"];
|
||||
break;
|
||||
|
||||
case UIInterfaceOrientationPortrait:
|
||||
case UIInterfaceOrientationPortraitUpsideDown:
|
||||
default:
|
||||
imageName = [imageName stringByAppendingString:@"-Portrait"];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return imageName;
|
||||
}
|
||||
|
||||
- (UIInterfaceOrientation)getCurrentOrientation
|
||||
{
|
||||
UIInterfaceOrientation iOrientation = [UIApplication sharedApplication].statusBarOrientation;
|
||||
UIDeviceOrientation dOrientation = [UIDevice currentDevice].orientation;
|
||||
|
||||
bool landscape;
|
||||
|
||||
if (dOrientation == UIDeviceOrientationUnknown || dOrientation == UIDeviceOrientationFaceUp || dOrientation == UIDeviceOrientationFaceDown) {
|
||||
// If the device is laying down, use the UIInterfaceOrientation based on the status bar.
|
||||
landscape = UIInterfaceOrientationIsLandscape(iOrientation);
|
||||
} else {
|
||||
// If the device is not laying down, use UIDeviceOrientation.
|
||||
landscape = UIDeviceOrientationIsLandscape(dOrientation);
|
||||
|
||||
// There's a bug in iOS!!!! http://openradar.appspot.com/7216046
|
||||
// So values needs to be reversed for landscape!
|
||||
if (dOrientation == UIDeviceOrientationLandscapeLeft)
|
||||
{
|
||||
iOrientation = UIInterfaceOrientationLandscapeRight;
|
||||
}
|
||||
else if (dOrientation == UIDeviceOrientationLandscapeRight)
|
||||
{
|
||||
iOrientation = UIInterfaceOrientationLandscapeLeft;
|
||||
}
|
||||
else if (dOrientation == UIDeviceOrientationPortrait)
|
||||
{
|
||||
iOrientation = UIInterfaceOrientationPortrait;
|
||||
}
|
||||
else if (dOrientation == UIDeviceOrientationPortraitUpsideDown)
|
||||
{
|
||||
iOrientation = UIInterfaceOrientationPortraitUpsideDown;
|
||||
}
|
||||
}
|
||||
|
||||
return iOrientation;
|
||||
}
|
||||
|
||||
// Sets the view's frame and image.
|
||||
- (void)updateImage
|
||||
{
|
||||
NSString* imageName = [self getImageName:[self getCurrentOrientation] delegate:(id<CDVScreenOrientationDelegate>)self.viewController device:[self getCurrentDevice]];
|
||||
|
||||
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
|
||||
{
|
||||
if ([self isUsingCDVLaunchScreen]) {
|
||||
// CB-9762's launch screen expects the image to fill the screen and be scaled using AspectFill.
|
||||
CGSize viewportSize = [UIApplication sharedApplication].delegate.window.bounds.size;
|
||||
_imageView.frame = CGRectMake(0, 0, viewportSize.width, viewportSize.height);
|
||||
_imageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
return;
|
||||
}
|
||||
|
||||
UIImage* img = _imageView.image;
|
||||
CGRect imgBounds = (img) ? CGRectMake(0, 0, img.size.width, img.size.height) : CGRectZero;
|
||||
|
||||
CGSize screenSize = [self.viewController.view convertRect:[UIScreen mainScreen].bounds fromView:nil].size;
|
||||
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
|
||||
CGAffineTransform imgTransform = CGAffineTransformIdentity;
|
||||
|
||||
/* If and only if an iPhone application is landscape-only as per
|
||||
* UISupportedInterfaceOrientations, the view controller's orientation is
|
||||
* landscape. In this case the image must be rotated in order to appear
|
||||
* correctly.
|
||||
*/
|
||||
CDV_iOSDevice device = [self getCurrentDevice];
|
||||
if (UIInterfaceOrientationIsLandscape(orientation) && !device.iPhone6Plus && !device.iPad && !device.iPhoneX)
|
||||
{
|
||||
imgTransform = CGAffineTransformMakeRotation(M_PI / 2);
|
||||
imgBounds.size = CGSizeMake(imgBounds.size.height, imgBounds.size.width);
|
||||
}
|
||||
|
||||
// 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];
|
||||
if (!(IsAtLeastiOSVersion(@"7.0")))
|
||||
{
|
||||
imgBounds.origin.y -= statusFrame.size.height;
|
||||
}
|
||||
}
|
||||
else if (imgBounds.size.width > 0)
|
||||
{
|
||||
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.transform = imgTransform;
|
||||
_imageView.frame = imgBounds;
|
||||
}
|
||||
|
||||
- (void)setVisible:(BOOL)visible
|
||||
{
|
||||
[self setVisible:visible andForce:NO];
|
||||
}
|
||||
|
||||
- (void)setVisible:(BOOL)visible andForce:(BOOL)force
|
||||
{
|
||||
if (visible != _visible || force)
|
||||
{
|
||||
_visible = visible;
|
||||
|
||||
id fadeSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreen" lowercaseString]];
|
||||
id fadeSplashScreenDuration = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreenDuration" lowercaseString]];
|
||||
|
||||
float fadeDuration = fadeSplashScreenDuration == nil ? kFadeDurationDefault : [fadeSplashScreenDuration floatValue];
|
||||
|
||||
id splashDurationString = [self.commandDelegate.settings objectForKey: [@"SplashScreenDelay" lowercaseString]];
|
||||
float splashDuration = splashDurationString == nil ? kSplashScreenDurationDefault : [splashDurationString floatValue];
|
||||
|
||||
id autoHideSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"AutoHideSplashScreen" lowercaseString]];
|
||||
BOOL autoHideSplashScreen = true;
|
||||
|
||||
if (autoHideSplashScreenValue != nil) {
|
||||
autoHideSplashScreen = [autoHideSplashScreenValue boolValue];
|
||||
}
|
||||
|
||||
if (!autoHideSplashScreen) {
|
||||
// CB-10412 SplashScreenDelay does not make sense if the splashscreen is hidden manually
|
||||
splashDuration = 0;
|
||||
}
|
||||
|
||||
|
||||
if (fadeSplashScreenValue == nil)
|
||||
{
|
||||
fadeSplashScreenValue = @"true";
|
||||
}
|
||||
|
||||
if (![fadeSplashScreenValue boolValue])
|
||||
{
|
||||
fadeDuration = 0;
|
||||
}
|
||||
else if (fadeDuration < 30)
|
||||
{
|
||||
// [CB-9750] This value used to be in decimal seconds, so we will assume that if someone specifies 10
|
||||
// they mean 10 seconds, and not the meaningless 10ms
|
||||
fadeDuration *= 1000;
|
||||
}
|
||||
|
||||
if (_visible)
|
||||
{
|
||||
if (_imageView == nil)
|
||||
{
|
||||
[self createViews];
|
||||
}
|
||||
}
|
||||
else if (fadeDuration == 0 && splashDuration == 0)
|
||||
{
|
||||
[self destroyViews];
|
||||
}
|
||||
else
|
||||
{
|
||||
__weak __typeof(self) weakSelf = self;
|
||||
float effectiveSplashDuration;
|
||||
|
||||
// [CB-10562] AutoHideSplashScreen may be "true" but we should still be able to hide the splashscreen manually.
|
||||
if (!autoHideSplashScreen || force) {
|
||||
effectiveSplashDuration = (fadeDuration) / 1000;
|
||||
} else {
|
||||
effectiveSplashDuration = (splashDuration - fadeDuration) / 1000;
|
||||
}
|
||||
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (uint64_t) effectiveSplashDuration * NSEC_PER_SEC), dispatch_get_main_queue(), CFBridgingRelease(CFBridgingRetain(^(void) {
|
||||
if (!_destroyed) {
|
||||
[UIView transitionWithView:self.viewController.view
|
||||
duration:(fadeDuration / 1000)
|
||||
options:UIViewAnimationOptionTransitionNone
|
||||
animations:^(void) {
|
||||
[weakSelf hideViews];
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
// Always destroy views, otherwise you could have an
|
||||
// invisible splashscreen that is overlayed over your active views
|
||||
// which causes that no touch events are passed
|
||||
if (!_destroyed) {
|
||||
[weakSelf destroyViews];
|
||||
// TODO: It might also be nice to have a js event happen here -jm
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
})));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
*/
|
||||
|
||||
#import <Cordova/CDVViewController.h>
|
||||
|
||||
@interface CDVViewController (SplashScreen)
|
||||
|
||||
@property (nonatomic, assign) BOOL enabledAutorotation;
|
||||
@property (nonatomic, readonly) BOOL shouldAutorotateDefaultValue;
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
*/
|
||||
|
||||
#import "CDVViewController+SplashScreen.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
@implementation CDVViewController (SplashScreen)
|
||||
|
||||
@dynamic enabledAutorotation;
|
||||
|
||||
- (void)setEnabledAutorotation:(BOOL)value
|
||||
{
|
||||
objc_setAssociatedObject(self,
|
||||
@selector(enabledAutorotation),
|
||||
[NSNumber numberWithBool:value],
|
||||
OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
||||
}
|
||||
|
||||
- (BOOL)enabledAutorotation
|
||||
{
|
||||
NSNumber *number = (NSNumber *)objc_getAssociatedObject(self, @selector(enabledAutorotation));
|
||||
|
||||
// Defaulting to YES to correspond parent CDVViewController behavior
|
||||
if (number == nil)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
return [number boolValue];
|
||||
}
|
||||
|
||||
+ (void)load
|
||||
{
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
Class class = [self class];
|
||||
|
||||
SEL originalSelector = @selector(shouldAutorotate);
|
||||
SEL swizzledSelector = @selector(splash_shouldAutorotate);
|
||||
|
||||
Method originalMethod = class_getInstanceMethod(class, originalSelector);
|
||||
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
|
||||
|
||||
BOOL didAddMethod = class_addMethod(class,
|
||||
originalSelector,
|
||||
method_getImplementation(swizzledMethod),
|
||||
method_getTypeEncoding(swizzledMethod));
|
||||
|
||||
if (didAddMethod) {
|
||||
class_replaceMethod(class,
|
||||
swizzledSelector,
|
||||
method_getImplementation(originalMethod),
|
||||
method_getTypeEncoding(originalMethod));
|
||||
} else {
|
||||
method_exchangeImplementations(originalMethod, swizzledMethod);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#pragma mark - Method Swizzling
|
||||
|
||||
- (BOOL)splash_shouldAutorotate
|
||||
{
|
||||
return self.enabledAutorotation;
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)shouldAutorotateDefaultValue
|
||||
{
|
||||
return [self splash_shouldAutorotate];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "container:CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>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>
|
||||
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0600"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D2AAC07D0554694100DB518D"
|
||||
BuildableName = "libCordova.a"
|
||||
BlueprintName = "CordovaLib"
|
||||
ReferencedContainer = "container:node_modules/cordova-ios/CordovaLib/CordovaLib.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D2AAC07D0554694100DB518D"
|
||||
BuildableName = "libCordova.a"
|
||||
BlueprintName = "CordovaLib"
|
||||
ReferencedContainer = "container:node_modules/cordova-ios/CordovaLib/CordovaLib.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D2AAC07D0554694100DB518D"
|
||||
BuildableName = "libCordova.a"
|
||||
BlueprintName = "CordovaLib"
|
||||
ReferencedContainer = "container:node_modules/cordova-ios/CordovaLib/CordovaLib.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
1
tests/ios/CDVSplashScreenTest/.gitignore
vendored
1
tests/ios/CDVSplashScreenTest/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
build
|
||||
@@ -1,702 +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 <UIKit/UIKit.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
#import <Cordova/CDVScreenOrientationDelegate.h>
|
||||
#import "CDVSplashScreen.h"
|
||||
#import "ImageNameTestDelegates.h"
|
||||
|
||||
const CDV_iOSDevice CDV_iOSDeviceZero = { 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
@interface ImageNameTest : XCTestCase
|
||||
|
||||
@property (nonatomic, strong) CDVSplashScreen* plugin;
|
||||
|
||||
@end
|
||||
|
||||
@interface CDVSplashScreen ()
|
||||
|
||||
// expose private interface
|
||||
- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device;
|
||||
|
||||
@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) orientationHelper:(id<CDVScreenOrientationDelegate>)delegate expectedImageNameDictionary:(NSDictionary*)expectedImageNameDictionary device:(CDV_iOSDevice)device{
|
||||
|
||||
NSString* name = nil;
|
||||
NSString* expectedImageName = nil;
|
||||
UIInterfaceOrientation currentOrientation;
|
||||
NSString* deviceName = device.iPad? @"iPad" : device.iPhone6Plus? @"iPhone6Plus": device.iPhone6? @"iPhone6": device.iPhone5? @"iPhone5" : @"iPhone";
|
||||
|
||||
// LandscapeLeft, should always return expectedImageName
|
||||
currentOrientation = UIInterfaceOrientationLandscapeLeft;
|
||||
name = [self.plugin getImageName:currentOrientation delegate:delegate device:device];
|
||||
expectedImageName = [expectedImageNameDictionary objectForKey:@"landscapeLeft"];
|
||||
XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Landscape", deviceName, name);
|
||||
|
||||
// LandscapeRight - should always return expectedImageName
|
||||
currentOrientation = UIInterfaceOrientationLandscapeRight;
|
||||
name = [self.plugin getImageName:currentOrientation delegate:delegate device:device];
|
||||
expectedImageName = [expectedImageNameDictionary objectForKey:@"landscapeRight"];
|
||||
XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Landscape", deviceName, name);
|
||||
|
||||
// Portrait - should always return expectedImageName
|
||||
currentOrientation = UIInterfaceOrientationPortrait;
|
||||
name = [self.plugin getImageName:currentOrientation delegate:delegate device:device];
|
||||
expectedImageName = [expectedImageNameDictionary objectForKey:@"portrait"];
|
||||
XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Portrait", deviceName, name);
|
||||
|
||||
// PortraitUpsideDown - should always return expectedImageName
|
||||
currentOrientation = UIInterfaceOrientationPortraitUpsideDown;
|
||||
name = [self.plugin getImageName:currentOrientation delegate:delegate device:device];
|
||||
expectedImageName = [expectedImageNameDictionary objectForKey:@"portraitUpsideDown"];
|
||||
XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Portrait", deviceName, name);
|
||||
}
|
||||
|
||||
- (void)testiPadOrientation {
|
||||
|
||||
CDV_iOSDevice device = CDV_iOSDeviceZero;
|
||||
device.iPad = YES;
|
||||
|
||||
// One orientation
|
||||
|
||||
PortraitOnly* delegate = [[PortraitOnly alloc] init];
|
||||
[self orientationHelper:delegate expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Portrait",
|
||||
@"landscapeRight" : @"Default-Portrait",
|
||||
@"portrait" : @"Default-Portrait",
|
||||
@"portraitUpsideDown" : @"Default-Portrait"
|
||||
}
|
||||
device:device];
|
||||
|
||||
PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
|
||||
[self orientationHelper:delegate2 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Portrait",
|
||||
@"landscapeRight" : @"Default-Portrait",
|
||||
@"portrait" : @"Default-Portrait",
|
||||
@"portraitUpsideDown" : @"Default-Portrait"
|
||||
}
|
||||
device:device];
|
||||
|
||||
LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate3 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape",
|
||||
@"landscapeRight" : @"Default-Landscape",
|
||||
@"portrait" : @"Default-Landscape",
|
||||
@"portraitUpsideDown" : @"Default-Landscape"
|
||||
}
|
||||
device:device];
|
||||
|
||||
LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate4 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape",
|
||||
@"landscapeRight" : @"Default-Landscape",
|
||||
@"portrait" : @"Default-Landscape",
|
||||
@"portraitUpsideDown" : @"Default-Landscape"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// All Portrait
|
||||
|
||||
AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
|
||||
[self orientationHelper:delegate5 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Portrait",
|
||||
@"landscapeRight" : @"Default-Portrait",
|
||||
@"portrait" : @"Default-Portrait",
|
||||
@"portraitUpsideDown" : @"Default-Portrait"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// All Landscape
|
||||
|
||||
AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
|
||||
[self orientationHelper:delegate6 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape",
|
||||
@"landscapeRight" : @"Default-Landscape",
|
||||
@"portrait" : @"Default-Landscape",
|
||||
@"portraitUpsideDown" : @"Default-Landscape"
|
||||
}
|
||||
device:device];
|
||||
|
||||
|
||||
// All orientations
|
||||
|
||||
AllOrientations* delegate7 = [[AllOrientations alloc] init];
|
||||
[self orientationHelper:delegate7 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape",
|
||||
@"landscapeRight" : @"Default-Landscape",
|
||||
@"portrait" : @"Default-Portrait",
|
||||
@"portraitUpsideDown" : @"Default-Portrait"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// Portrait and Landscape Left
|
||||
|
||||
PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate8 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape",
|
||||
@"landscapeRight" : @"Default-Landscape",
|
||||
@"portrait" : @"Default-Portrait",
|
||||
@"portraitUpsideDown" : @"Default-Portrait"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// Portrait and Landscape Right
|
||||
|
||||
PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate9 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape",
|
||||
@"landscapeRight" : @"Default-Landscape",
|
||||
@"portrait" : @"Default-Portrait",
|
||||
@"portraitUpsideDown" : @"Default-Portrait"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// PortraitUpsideDown and Landscape Left
|
||||
|
||||
PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate10 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape",
|
||||
@"landscapeRight" : @"Default-Landscape",
|
||||
@"portrait" : @"Default-Portrait",
|
||||
@"portraitUpsideDown" : @"Default-Portrait"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// PortraitUpsideDown and Landscape Right
|
||||
|
||||
PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate11 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape",
|
||||
@"landscapeRight" : @"Default-Landscape",
|
||||
@"portrait" : @"Default-Portrait",
|
||||
@"portraitUpsideDown" : @"Default-Portrait"
|
||||
}
|
||||
device:device];
|
||||
}
|
||||
|
||||
- (void)testiPhoneOrientation {
|
||||
|
||||
CDV_iOSDevice device = CDV_iOSDeviceZero;
|
||||
device.iPhone = YES;
|
||||
|
||||
// One orientation
|
||||
|
||||
PortraitOnly* delegate = [[PortraitOnly alloc] init];
|
||||
[self orientationHelper:delegate expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default",
|
||||
@"landscapeRight" : @"Default",
|
||||
@"portrait" : @"Default",
|
||||
@"portraitUpsideDown" : @"Default"
|
||||
}
|
||||
device:device];
|
||||
|
||||
PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
|
||||
[self orientationHelper:delegate2 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default",
|
||||
@"landscapeRight" : @"Default",
|
||||
@"portrait" : @"Default",
|
||||
@"portraitUpsideDown" : @"Default"
|
||||
}
|
||||
device:device];
|
||||
|
||||
LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate3 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default",
|
||||
@"landscapeRight" : @"Default",
|
||||
@"portrait" : @"Default",
|
||||
@"portraitUpsideDown" : @"Default"
|
||||
}
|
||||
device:device];
|
||||
|
||||
LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate4 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default",
|
||||
@"landscapeRight" : @"Default",
|
||||
@"portrait" : @"Default",
|
||||
@"portraitUpsideDown" : @"Default"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// All Portrait
|
||||
|
||||
AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
|
||||
[self orientationHelper:delegate5 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default",
|
||||
@"landscapeRight" : @"Default",
|
||||
@"portrait" : @"Default",
|
||||
@"portraitUpsideDown" : @"Default"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// All Landscape
|
||||
|
||||
AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
|
||||
[self orientationHelper:delegate6 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default",
|
||||
@"landscapeRight" : @"Default",
|
||||
@"portrait" : @"Default",
|
||||
@"portraitUpsideDown" : @"Default"
|
||||
}
|
||||
device:device];
|
||||
|
||||
|
||||
// All orientations
|
||||
|
||||
AllOrientations* delegate7 = [[AllOrientations alloc] init];
|
||||
[self orientationHelper:delegate7 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default",
|
||||
@"landscapeRight" : @"Default",
|
||||
@"portrait" : @"Default",
|
||||
@"portraitUpsideDown" : @"Default"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// Portrait and Landscape Left
|
||||
|
||||
PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate8 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default",
|
||||
@"landscapeRight" : @"Default",
|
||||
@"portrait" : @"Default",
|
||||
@"portraitUpsideDown" : @"Default"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// Portrait and Landscape Right
|
||||
|
||||
PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate9 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default",
|
||||
@"landscapeRight" : @"Default",
|
||||
@"portrait" : @"Default",
|
||||
@"portraitUpsideDown" : @"Default"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// PortraitUpsideDown and Landscape Left
|
||||
|
||||
PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate10 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default",
|
||||
@"landscapeRight" : @"Default",
|
||||
@"portrait" : @"Default",
|
||||
@"portraitUpsideDown" : @"Default"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// PortraitUpsideDown and Landscape Right
|
||||
|
||||
PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate11 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default",
|
||||
@"landscapeRight" : @"Default",
|
||||
@"portrait" : @"Default",
|
||||
@"portraitUpsideDown" : @"Default"
|
||||
}
|
||||
device:device];
|
||||
}
|
||||
|
||||
- (void)testiPhone5Orientation {
|
||||
|
||||
CDV_iOSDevice device = CDV_iOSDeviceZero;
|
||||
device.iPhone = YES;
|
||||
device.iPhone5 = YES;
|
||||
|
||||
// One orientation
|
||||
|
||||
PortraitOnly* delegate = [[PortraitOnly alloc] init];
|
||||
[self orientationHelper:delegate expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-568h",
|
||||
@"landscapeRight" : @"Default-568h",
|
||||
@"portrait" : @"Default-568h",
|
||||
@"portraitUpsideDown" : @"Default-568h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
|
||||
[self orientationHelper:delegate2 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-568h",
|
||||
@"landscapeRight" : @"Default-568h",
|
||||
@"portrait" : @"Default-568h",
|
||||
@"portraitUpsideDown" : @"Default-568h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate3 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-568h",
|
||||
@"landscapeRight" : @"Default-568h",
|
||||
@"portrait" : @"Default-568h",
|
||||
@"portraitUpsideDown" : @"Default-568h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate4 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-568h",
|
||||
@"landscapeRight" : @"Default-568h",
|
||||
@"portrait" : @"Default-568h",
|
||||
@"portraitUpsideDown" : @"Default-568h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// All Portrait
|
||||
|
||||
AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
|
||||
[self orientationHelper:delegate5 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-568h",
|
||||
@"landscapeRight" : @"Default-568h",
|
||||
@"portrait" : @"Default-568h",
|
||||
@"portraitUpsideDown" : @"Default-568h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// All Landscape
|
||||
|
||||
AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
|
||||
[self orientationHelper:delegate6 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-568h",
|
||||
@"landscapeRight" : @"Default-568h",
|
||||
@"portrait" : @"Default-568h",
|
||||
@"portraitUpsideDown" : @"Default-568h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
|
||||
// All orientations
|
||||
|
||||
AllOrientations* delegate7 = [[AllOrientations alloc] init];
|
||||
[self orientationHelper:delegate7 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-568h",
|
||||
@"landscapeRight" : @"Default-568h",
|
||||
@"portrait" : @"Default-568h",
|
||||
@"portraitUpsideDown" : @"Default-568h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// Portrait and Landscape Left
|
||||
|
||||
PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate8 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-568h",
|
||||
@"landscapeRight" : @"Default-568h",
|
||||
@"portrait" : @"Default-568h",
|
||||
@"portraitUpsideDown" : @"Default-568h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// Portrait and Landscape Right
|
||||
|
||||
PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate9 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-568h",
|
||||
@"landscapeRight" : @"Default-568h",
|
||||
@"portrait" : @"Default-568h",
|
||||
@"portraitUpsideDown" : @"Default-568h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// PortraitUpsideDown and Landscape Left
|
||||
|
||||
PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate10 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-568h",
|
||||
@"landscapeRight" : @"Default-568h",
|
||||
@"portrait" : @"Default-568h",
|
||||
@"portraitUpsideDown" : @"Default-568h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// PortraitUpsideDown and Landscape Right
|
||||
|
||||
PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate11 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-568h",
|
||||
@"landscapeRight" : @"Default-568h",
|
||||
@"portrait" : @"Default-568h",
|
||||
@"portraitUpsideDown" : @"Default-568h"
|
||||
}
|
||||
device:device];
|
||||
}
|
||||
|
||||
- (void)testiPhone6Orientation {
|
||||
|
||||
CDV_iOSDevice device = CDV_iOSDeviceZero;
|
||||
device.iPhone = YES;
|
||||
device.iPhone6 = YES;
|
||||
|
||||
// One orientation
|
||||
|
||||
PortraitOnly* delegate = [[PortraitOnly alloc] init];
|
||||
[self orientationHelper:delegate expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-667h",
|
||||
@"landscapeRight" : @"Default-667h",
|
||||
@"portrait" : @"Default-667h",
|
||||
@"portraitUpsideDown" : @"Default-667h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
|
||||
[self orientationHelper:delegate2 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-667h",
|
||||
@"landscapeRight" : @"Default-667h",
|
||||
@"portrait" : @"Default-667h",
|
||||
@"portraitUpsideDown" : @"Default-667h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate3 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-667h",
|
||||
@"landscapeRight" : @"Default-667h",
|
||||
@"portrait" : @"Default-667h",
|
||||
@"portraitUpsideDown" : @"Default-667h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate4 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-667h",
|
||||
@"landscapeRight" : @"Default-667h",
|
||||
@"portrait" : @"Default-667h",
|
||||
@"portraitUpsideDown" : @"Default-667h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// All Portrait
|
||||
|
||||
AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
|
||||
[self orientationHelper:delegate5 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-667h",
|
||||
@"landscapeRight" : @"Default-667h",
|
||||
@"portrait" : @"Default-667h",
|
||||
@"portraitUpsideDown" : @"Default-667h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// All Landscape
|
||||
|
||||
AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
|
||||
[self orientationHelper:delegate6 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-667h",
|
||||
@"landscapeRight" : @"Default-667h",
|
||||
@"portrait" : @"Default-667h",
|
||||
@"portraitUpsideDown" : @"Default-667h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
|
||||
// All orientations
|
||||
|
||||
AllOrientations* delegate7 = [[AllOrientations alloc] init];
|
||||
[self orientationHelper:delegate7 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-667h",
|
||||
@"landscapeRight" : @"Default-667h",
|
||||
@"portrait" : @"Default-667h",
|
||||
@"portraitUpsideDown" : @"Default-667h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// Portrait and Landscape Left
|
||||
|
||||
PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate8 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-667h",
|
||||
@"landscapeRight" : @"Default-667h",
|
||||
@"portrait" : @"Default-667h",
|
||||
@"portraitUpsideDown" : @"Default-667h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// Portrait and Landscape Right
|
||||
|
||||
PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate9 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-667h",
|
||||
@"landscapeRight" : @"Default-667h",
|
||||
@"portrait" : @"Default-667h",
|
||||
@"portraitUpsideDown" : @"Default-667h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// PortraitUpsideDown and Landscape Left
|
||||
|
||||
PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate10 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-667h",
|
||||
@"landscapeRight" : @"Default-667h",
|
||||
@"portrait" : @"Default-667h",
|
||||
@"portraitUpsideDown" : @"Default-667h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// PortraitUpsideDown and Landscape Right
|
||||
|
||||
PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate11 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-667h",
|
||||
@"landscapeRight" : @"Default-667h",
|
||||
@"portrait" : @"Default-667h",
|
||||
@"portraitUpsideDown" : @"Default-667h"
|
||||
}
|
||||
device:device];
|
||||
}
|
||||
|
||||
- (void)testiPhone6PlusOrientation {
|
||||
|
||||
CDV_iOSDevice device = CDV_iOSDeviceZero;
|
||||
device.iPhone = YES;
|
||||
device.iPhone6Plus = YES;
|
||||
|
||||
// One orientation
|
||||
|
||||
PortraitOnly* delegate = [[PortraitOnly alloc] init];
|
||||
[self orientationHelper:delegate expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-736h",
|
||||
@"landscapeRight" : @"Default-736h",
|
||||
@"portrait" : @"Default-736h",
|
||||
@"portraitUpsideDown" : @"Default-736h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
|
||||
[self orientationHelper:delegate2 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-736h",
|
||||
@"landscapeRight" : @"Default-736h",
|
||||
@"portrait" : @"Default-736h",
|
||||
@"portraitUpsideDown" : @"Default-736h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate3 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||
@"landscapeRight" : @"Default-Landscape-736h",
|
||||
@"portrait" : @"Default-Landscape-736h",
|
||||
@"portraitUpsideDown" : @"Default-Landscape-736h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate4 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||
@"landscapeRight" : @"Default-Landscape-736h",
|
||||
@"portrait" : @"Default-Landscape-736h",
|
||||
@"portraitUpsideDown" : @"Default-Landscape-736h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// All Portrait
|
||||
|
||||
AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
|
||||
[self orientationHelper:delegate5 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-736h",
|
||||
@"landscapeRight" : @"Default-736h",
|
||||
@"portrait" : @"Default-736h",
|
||||
@"portraitUpsideDown" : @"Default-736h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// All Landscape
|
||||
|
||||
AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
|
||||
[self orientationHelper:delegate6 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||
@"landscapeRight" : @"Default-Landscape-736h",
|
||||
@"portrait" : @"Default-Landscape-736h",
|
||||
@"portraitUpsideDown" : @"Default-Landscape-736h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
|
||||
// All orientations
|
||||
|
||||
AllOrientations* delegate7 = [[AllOrientations alloc] init];
|
||||
[self orientationHelper:delegate7 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||
@"landscapeRight" : @"Default-Landscape-736h",
|
||||
@"portrait" : @"Default-736h",
|
||||
@"portraitUpsideDown" : @"Default-736h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// Portrait and Landscape Left
|
||||
|
||||
PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate8 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||
@"landscapeRight" : @"Default-Landscape-736h",
|
||||
@"portrait" : @"Default-736h",
|
||||
@"portraitUpsideDown" : @"Default-736h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// Portrait and Landscape Right
|
||||
|
||||
PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate9 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||
@"landscapeRight" : @"Default-Landscape-736h",
|
||||
@"portrait" : @"Default-736h",
|
||||
@"portraitUpsideDown" : @"Default-736h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// PortraitUpsideDown and Landscape Left
|
||||
|
||||
PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
|
||||
[self orientationHelper:delegate10 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||
@"landscapeRight" : @"Default-Landscape-736h",
|
||||
@"portrait" : @"Default-736h",
|
||||
@"portraitUpsideDown" : @"Default-736h"
|
||||
}
|
||||
device:device];
|
||||
|
||||
// PortraitUpsideDown and Landscape Right
|
||||
|
||||
PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
|
||||
[self orientationHelper:delegate11 expectedImageNameDictionary:@{
|
||||
@"landscapeLeft" : @"Default-Landscape-736h",
|
||||
@"landscapeRight" : @"Default-Landscape-736h",
|
||||
@"portrait" : @"Default-736h",
|
||||
@"portraitUpsideDown" : @"Default-736h"
|
||||
}
|
||||
device:device];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
@@ -1,57 +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 <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
|
||||
|
||||
@@ -1,200 +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 <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
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!--
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
-->
|
||||
<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>
|
||||
@@ -1,505 +0,0 @@
|
||||
// !$*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 = SOURCE_ROOT; };
|
||||
7E9F51AA19DA10AE00DA31AC /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = ../../../src/ios/CDVSplashScreen.h; sourceTree = SOURCE_ROOT; };
|
||||
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 = SOURCE_ROOT;
|
||||
};
|
||||
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 */;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:CDVSplashScreenTest.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>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>
|
||||
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0600"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7E9F519419DA102000DA31AC"
|
||||
BuildableName = "libCDVSplashScreenLib.a"
|
||||
BlueprintName = "CDVSplashScreenLib"
|
||||
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7E9F519419DA102000DA31AC"
|
||||
BuildableName = "libCDVSplashScreenLib.a"
|
||||
BlueprintName = "CDVSplashScreenLib"
|
||||
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7E9F519419DA102000DA31AC"
|
||||
BuildableName = "libCDVSplashScreenLib.a"
|
||||
BlueprintName = "CDVSplashScreenLib"
|
||||
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0600"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "NO"
|
||||
buildForArchiving = "NO"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7E9F519E19DA102000DA31AC"
|
||||
BuildableName = "CDVSplashScreenLibTests.xctest"
|
||||
BlueprintName = "CDVSplashScreenLibTests"
|
||||
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7E9F519E19DA102000DA31AC"
|
||||
BuildableName = "CDVSplashScreenLibTests.xctest"
|
||||
BlueprintName = "CDVSplashScreenLibTests"
|
||||
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7E9F519E19DA102000DA31AC"
|
||||
BuildableName = "CDVSplashScreenLibTests.xctest"
|
||||
BlueprintName = "CDVSplashScreenLibTests"
|
||||
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7E9F519E19DA102000DA31AC"
|
||||
BuildableName = "CDVSplashScreenLibTests.xctest"
|
||||
BlueprintName = "CDVSplashScreenLibTests"
|
||||
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "7E9F519E19DA102000DA31AC"
|
||||
BuildableName = "CDVSplashScreenLibTests.xctest"
|
||||
BlueprintName = "CDVSplashScreenLibTests"
|
||||
ReferencedContainer = "container:CDVSplashScreenTest.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,40 +0,0 @@
|
||||
<!--
|
||||
# license: 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.
|
||||
-->
|
||||
|
||||
# iOS Tests for CDVSplashScreen
|
||||
|
||||
You need to install `node.js` to pull in `cordova-ios`.
|
||||
|
||||
First install cordova-ios:
|
||||
|
||||
npm install
|
||||
|
||||
... in the current folder.
|
||||
|
||||
|
||||
# Testing from Xcode
|
||||
|
||||
1. Launch the `CDVSplashScreenTest.xcworkspace` file.
|
||||
2. Choose "CDVSplashScreenLibTests" from the scheme drop-down menu
|
||||
3. Click and hold on the `Play` button, and choose the `Wrench` icon to run the tests
|
||||
|
||||
|
||||
# Testing from the command line
|
||||
|
||||
npm test
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"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": "^5.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xcodebuild test -workspace CDVSplashScreenTest.xcworkspace -scheme CDVSplashScreenLibTests -destination 'platform=iOS Simulator,name=iPhone 5' CONFIGURATION_BUILD_DIR='/tmp' HEADER_SEARCH_PATHS='$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include'"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user