Compare commits

..

10 Commits

Author SHA1 Message Date
Suraj Pindoria
09e1f06fb0 CB-13826 Updated version and RELEASENOTES.md for release 5.0.2 2018-01-25 11:41:07 -08:00
jcesarmobile
9a6ff27008 Merge pull request #147 from jcesarmobile/CB-13750
CB-13750: Add build-tools-26.0.2 to travis
2018-01-09 23:33:21 +01:00
Julio César
cadc68f75b CB-13750: Add build-tools-26.0.2 to travis 2018-01-09 20:23:26 +01:00
jcesarmobile
be8be330ac Merge pull request #146 from jcesarmobile/CB-13737
CB-13737 (iOS): fix Splash screen images for iPhone X
2018-01-09 20:00:00 +01:00
Julio César
4ffaaa2952 CB-13737 (iOS): fix Splash screen images for iPhone X 2018-01-07 17:30:23 +01:00
jcesarmobile
b5e0c786c5 Fix release notes (#145) 2017-12-30 00:54:06 -05:00
Simon MacDonald
5197c664c3 Set VERSION to 5.0.2-dev (via coho) 2017-12-27 19:13:50 -05:00
Simon MacDonald
fb606fec6a CB-13714 Updated version and RELEASENOTES.md for release 5.0.1 (via coho) 2017-12-27 19:13:36 -05:00
jcesarmobile
57b553a68e CB-13709: Fix to allow 5.0.0 version install (#144) 2017-12-27 10:50:30 -05:00
Steve Gill
031afc5056 Set VERSION to 5.0.1-dev (via coho) 2017-12-15 17:26:45 -08:00
7 changed files with 31 additions and 11 deletions

View File

@@ -48,6 +48,7 @@ matrix:
components:
- tools
- extra-android-m2repository
- build-tools-26.0.2
- env: PLATFORM=android-5.1
os: linux
language: android
@@ -56,6 +57,7 @@ matrix:
components:
- tools
- extra-android-m2repository
- build-tools-26.0.2
- env: PLATFORM=android-6.0
os: linux
language: android
@@ -64,6 +66,7 @@ matrix:
components:
- tools
- extra-android-m2repository
- build-tools-26.0.2
- env: PLATFORM=android-7.0
os: linux
language: android
@@ -72,6 +75,7 @@ matrix:
components:
- tools
- extra-android-m2repository
- build-tools-26.0.2
before_install:
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm
&& git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm

View File

@@ -20,6 +20,13 @@
-->
# Release Notes
### 5.0.2 (Jan 24, 2018)
* [CB-13750](https://issues.apache.org/jira/browse/CB-13750) Add build-tools-26.0.2 to travis
* [CB-13737](https://issues.apache.org/jira/browse/CB-13737) (iOS): fix Splash screen images for iPhone X
### 5.0.1 (Dec 27, 2017)
* [CB-13709](https://issues.apache.org/jira/browse/CB-13709) Fix to allow 5.0.0 version install (#144)
### 5.0.0 (Dec 15, 2017)
* [CB-13677](https://issues.apache.org/jira/browse/CB-13677) Remove deprecated platforms

View File

@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-splashscreen",
"version": "5.0.0",
"version": "5.0.2",
"description": "Cordova Splashscreen Plugin",
"types": "./types/index.d.ts",
"cordova": {
@@ -41,7 +41,7 @@
"cordova-android": ">=3.6.0",
"cordova-windows": ">=4.4.0"
},
"5.0.0": {
"6.0.0": {
"cordova": ">100"
}
}

View File

@@ -20,7 +20,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-splashscreen"
version="5.0.0">
version="5.0.2">
<name>Splashscreen</name>
<description>Cordova Splashscreen Plugin</description>
<license>Apache 2.0</license>

View File

@@ -28,6 +28,7 @@ typedef struct {
BOOL iPhone6;
BOOL iPhone6Plus;
BOOL retina;
BOOL iPhoneX;
} CDV_iOSDevice;

View File

@@ -74,7 +74,7 @@
// 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) ?
BOOL autorotateValue = (device.iPad || device.iPhone6Plus || device.iPhoneX) ?
[(CDVViewController *)self.viewController shouldAutorotateDefaultValue] :
NO;
@@ -174,6 +174,7 @@
// 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;
}
@@ -222,8 +223,12 @@
imageName = [imageName stringByAppendingString:@"-700"];
} else if(device.iPhone6) {
imageName = [imageName stringByAppendingString:@"-800"];
} else if(device.iPhone6Plus) {
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"];
@@ -239,7 +244,7 @@
{ // does not support landscape
imageName = [imageName stringByAppendingString:@"-667h"];
}
else if (device.iPhone6Plus)
else if (device.iPhone6Plus || device.iPhoneX)
{ // supports landscape
if (isOrientationLocked)
{
@@ -257,8 +262,11 @@
break;
}
}
imageName = [imageName stringByAppendingString:@"-736h"];
if (device.iPhoneX) {
imageName = [imageName stringByAppendingString:@"-2436h"];
} else {
imageName = [imageName stringByAppendingString:@"-736h"];
}
}
else if (device.iPad)
{ // supports landscape
@@ -370,7 +378,7 @@
* correctly.
*/
CDV_iOSDevice device = [self getCurrentDevice];
if (UIInterfaceOrientationIsLandscape(orientation) && !device.iPhone6Plus && !device.iPad)
if (UIInterfaceOrientationIsLandscape(orientation) && !device.iPhone6Plus && !device.iPad && !device.iPhoneX)
{
imgTransform = CGAffineTransformMakeRotation(M_PI / 2);
imgBounds.size = CGSizeMake(imgBounds.size.height, imgBounds.size.width);

View File

@@ -20,7 +20,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-splashscreen-tests"
version="5.0.0">
version="5.0.2">
<name>Cordova Splashscreen Plugin Tests</name>
<license>Apache 2.0</license>