Skip to content

Commit

Permalink
Merge pull request #24 from detroit-labs/iphone-se-2
Browse files Browse the repository at this point in the history
Add iPhone SE 2, iPad (12.9-inch, 4th Generation), and iPad (11-inch, 2nd Generation)
  • Loading branch information
SlaunchaMan authored Apr 15, 2020
2 parents b937f09 + abc775b commit 1e1e888
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.0
2.7.1
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# IRLSize Change Log

## [2.2.4](https://github.com/detroit-labs/IRLSize/releases/tag/2.2.4)
**Released:** 2020-04-15

### Added
- Support for iPad Pro (12.9-inch) (4th Generation).
- Support for iPad Pro (11-inch) (2nd Generation).
- Support for iPhone SE (2nd Generation).

## [2.2.3](https://github.com/detroit-labs/IRLSize/releases/tag/2.2.3)
**Released:** 2019-09-24

Expand Down
2 changes: 1 addition & 1 deletion Example/IRLSizeExample-Watch Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<key>NSExtensionAttributes</key>
<dict>
<key>WKAppBundleIdentifier</key>
<string>com.detroitlabs.demo.IRLSizeExample.watchkitapp</string>
<string>com.detroitlabs.IRLSizeExample.watchkitapp</string>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.watchkit</string>
Expand Down
2 changes: 1 addition & 1 deletion Example/IRLSizeExample-Watch/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>WKCompanionAppBundleIdentifier</key>
<string>com.detroitlabs.demo.IRLSizeExample</string>
<string>com.detroitlabs.IRLSizeExample</string>
<key>WKWatchKitApp</key>
<true/>
</dict>
Expand Down
20 changes: 10 additions & 10 deletions Example/IRLSizeExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@
IBSC_MODULE = IRLSizeExample_Watch_Extension;
INFOPLIST_FILE = "IRLSizeExample-Watch/Info.plist";
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.detroitlabs.demo.IRLSizeExample.watchkitapp;
PRODUCT_BUNDLE_IDENTIFIER = com.detroitlabs.IRLSizeExample.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -713,7 +713,7 @@
IBSC_MODULE = IRLSizeExample_Watch_Extension;
INFOPLIST_FILE = "IRLSizeExample-Watch/Info.plist";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.detroitlabs.demo.IRLSizeExample.watchkitapp;
PRODUCT_BUNDLE_IDENTIFIER = com.detroitlabs.IRLSizeExample.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -737,7 +737,7 @@
"@executable_path/../../Frameworks",
);
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.detroitlabs.demo.IRLSizeExample.watchkitapp.watchkitextension;
PRODUCT_BUNDLE_IDENTIFIER = com.detroitlabs.IRLSizeExample.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand All @@ -762,7 +762,7 @@
"@executable_path/../../Frameworks",
);
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.detroitlabs.demo.IRLSizeExample.watchkitapp.watchkitextension;
PRODUCT_BUNDLE_IDENTIFIER = com.detroitlabs.IRLSizeExample.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
SDKROOT = watchos;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -821,7 +821,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MARKETING_VERSION = 2.2.3;
MARKETING_VERSION = 2.2.4;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -873,7 +873,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MARKETING_VERSION = 2.2.3;
MARKETING_VERSION = 2.2.4;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
Expand All @@ -896,7 +896,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.detroitlabs.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_BUNDLE_IDENTIFIER = com.detroitlabs.IRLSizeExample;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_OBJC_BRIDGING_HEADER = "IRLSizeExample/IRLSizeExample-Bridging-Header.h";
Expand All @@ -919,7 +919,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.detroitlabs.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_BUNDLE_IDENTIFIER = com.detroitlabs.IRLSizeExample;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_COMPILATION_MODE = wholemodule;
Expand All @@ -945,7 +945,7 @@
"$(inherited)",
);
INFOPLIST_FILE = "../IRLSizeTests/IRLSizeTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "com.detroitlabs.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_BUNDLE_IDENTIFIER = "com.detroitlabs.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = xctest;
};
Expand All @@ -962,7 +962,7 @@
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
INFOPLIST_FILE = "../IRLSizeTests/IRLSizeTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "com.detroitlabs.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_BUNDLE_IDENTIFIER = "com.detroitlabs.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = xctest;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PODS:
- IRLSize (2.2.3):
- Orchard/ObjC (>= 1.3.0)
- Kiwi (3.0.0)
- Orchard/ObjC (1.3.0)
- Orchard/ObjC (1.6.0)

DEPENDENCIES:
- IRLSize (from `..`)
Expand All @@ -20,8 +20,8 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
IRLSize: 7caa2bf6cbcc9ff97ecbd061ff0cdd1fe7d5ec56
Kiwi: fbeafef0f00e4d8f7dcb3420a4930afe70af77f7
Orchard: 45d204888d5885742596f6d90c1a54914781422c
Orchard: 19cccd1a11d77d538342aa79c246db0527bd4d51

PODFILE CHECKSUM: 7b5ae95324616426449c462f5879b03a2b9bb671

COCOAPODS: 1.9.0
COCOAPODS: 1.9.1
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ GEM
json (>= 1.5.1)
atomos (0.1.3)
claide (1.0.3)
cocoapods (1.9.0)
cocoapods (1.9.1)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.9.0)
cocoapods-core (= 1.9.1)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -31,7 +31,7 @@ GEM
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.14.0, < 2.0)
cocoapods-core (1.9.0)
cocoapods-core (1.9.1)
activesupport (>= 4.0.2, < 6)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
Expand Down Expand Up @@ -71,9 +71,9 @@ GEM
thread_safe (0.3.6)
typhoeus (1.3.1)
ethon (>= 0.9.0)
tzinfo (1.2.6)
tzinfo (1.2.7)
thread_safe (~> 0.1)
xcodeproj (1.15.0)
xcodeproj (1.16.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -87,4 +87,4 @@ DEPENDENCIES
cocoapods

BUNDLED WITH
2.1.2
2.1.4
2 changes: 1 addition & 1 deletion IRLSize.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "IRLSize"
s.version = "2.2.3"
s.version = "2.2.4"
s.summary = "A library for determining the actual physical size of pixels on an iOS or watchOS device."
s.description = <<-DESC
IRLSize is used to determine the physical size of the device
Expand Down
5 changes: 4 additions & 1 deletion IRLSizeTests/IRLSizeTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
KNOWN_DEVICE_TEST("iPhone 11", iPhone11, 13.0)
KNOWN_DEVICE_TEST("iPhone 11 Pro", iPhone11Pro, 13.0)
KNOWN_DEVICE_TEST("iPhone 11 Pro Max", iPhone11ProMax, 13.0)
KNOWN_DEVICE_TEST("iPhone SE (2nd Generation)", iPhoneSE2, 13.4)

KNOWN_DEVICE_TEST("iPad (4th Generation)", iPad4, 6.0)
KNOWN_DEVICE_TEST("iPad mini", iPadMini, 6.0)
Expand All @@ -102,11 +103,13 @@
KNOWN_DEVICE_TEST("iPad Pro (12.9\", 2nd Generation)", iPadPro12_9Inch2, 10.3)
KNOWN_DEVICE_TEST("iPad Pro (10.5\")", iPadPro10_5Inch, 10.3)
KNOWN_DEVICE_TEST("iPad (6th Generation)", iPad6, 11.3)
KNOWN_DEVICE_TEST("iPad Pro (12.9\", 3nd Generation)", iPadPro12_9Inch3, 12.1)
KNOWN_DEVICE_TEST("iPad Pro (12.9\", 3rd Generation)", iPadPro12_9Inch3, 12.1)
KNOWN_DEVICE_TEST("iPad Pro (11\")", iPadPro11Inch, 12.1)
KNOWN_DEVICE_TEST("iPad mini (5th Generation))", iPadMini5, 12.2)
KNOWN_DEVICE_TEST("iPad Air (3rd Generation)", iPadAir3, 12.2)
KNOWN_DEVICE_TEST("iPad (7th Generation)", iPad7, 13.1)
KNOWN_DEVICE_TEST("iPad Pro (12.9\", 4th Generation)", iPadPro12_9Inch4, 13.4)
KNOWN_DEVICE_TEST("iPad Pro (11\", 2nd Generation)", iPadPro11Inch2, 13.4)

KNOWN_DEVICE_TEST("iPod touch (5th Generation)", iPodTouch5, 6.0)
KNOWN_DEVICE_TEST("iPod touch (6th Generation)", iPodTouch6, 8.4)
Expand Down
5 changes: 4 additions & 1 deletion Pod/Classes/iOS/UIDevice+IRLSize.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ - (IRLRawDimensions)irl_rawPhysicalScreenSize
IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPhone11)
IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPhone11Pro)
IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPhone11ProMax)
IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPhoneSE2)

IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPad4)
IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPadMini)
Expand All @@ -147,7 +148,9 @@ - (IRLRawDimensions)irl_rawPhysicalScreenSize
IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPadMini5)
IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPadAir3)
IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPad7)

IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPadPro12_9Inch4)
IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPadPro11Inch2)

IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPodTouch5)
IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPodTouch6)
IRL_KNOWN_DEVICE_DIMENSIONS_MATCHING(OrchardiOSDevice, iPodTouch7)
Expand Down
16 changes: 14 additions & 2 deletions Pod/Classes/iOS/iOSDeviceConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ static const IRLRawMillimeters kiPhone11ProScreenWidth = 62.33;
static const IRLRawMillimeters kiPhone11ProMaxScreenHeight = 148.91;
static const IRLRawMillimeters kiPhone11ProMaxScreenWidth = 68.81;

// iPhone SE (2nd Generation)
static const IRLRawMillimeters kiPhoneSE2ScreenHeight = 104.05;
static const IRLRawMillimeters kiPhoneSE2ScreenWidth = 58.50;


///////////
// iPads //
Expand Down Expand Up @@ -174,6 +178,14 @@ static const IRLRawMillimeters kiPadAir3ScreenWidth = 160.13;
static const IRLRawMillimeters kiPad7ScreenHeight = 207.36;
static const IRLRawMillimeters kiPad7ScreenWidth = 155.52;

// iPad Pro (12.9 Inch, 4th Generation)
static const IRLRawMillimeters kiPadPro12_9Inch4ScreenHeight = 262.27;
static const IRLRawMillimeters kiPadPro12_9Inch4ScreenWidth = 196.61;

// iPad Pro (11 Inch, 2nd Generation)
static const IRLRawMillimeters kiPadPro11Inch2ScreenHeight = 230.25;
static const IRLRawMillimeters kiPadPro11Inch2ScreenWidth = 161.13;


/////////////////
// iPods touch //
Expand Down Expand Up @@ -211,8 +223,8 @@ static const IRLRawMillimeters kiPhone4_0InchScreenHeight = kiPhoneSEScreenHeigh
static const IRLRawMillimeters kiPhone4_0InchScreenWidth = kiPhoneSEScreenWidth;

// 4.7"
static const IRLRawMillimeters kiPhone4_7InchScreenHeight = kiPhone8ScreenHeight;
static const IRLRawMillimeters kiPhone4_7InchScreenWidth = kiPhone8ScreenWidth;
static const IRLRawMillimeters kiPhone4_7InchScreenHeight = kiPhoneSE2ScreenHeight;
static const IRLRawMillimeters kiPhone4_7InchScreenWidth = kiPhoneSE2ScreenWidth;

// 5.5"
static const IRLRawMillimeters kiPhone5_5InchScreenHeight = kiPhone8PlusScreenHeight;
Expand Down

0 comments on commit 1e1e888

Please sign in to comment.