Skip to content

Commit

Permalink
Merge pull request #4 from SlaunchaMan/iphone-se-2
Browse files Browse the repository at this point in the history
Add iPhone SE (2nd Generation).
  • Loading branch information
SlaunchaMan committed Apr 15, 2020
2 parents d621445 + ad04d66 commit cf8bb36
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Orchard Change Log

## [1.6.0](https://github.com/SlaunchaMan/Orchard/releases/tag/1.6.0)
**Released:** 2020-04-15

### Added
- Support for iPhone SE (2nd Generation).

## [1.5.1](https://github.com/SlaunchaMan/Orchard/releases/tag/1.5.1)
**Released:** 2020-03-39

Expand Down
1 change: 1 addition & 0 deletions Data/iPhones.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ iPhone XR 12.0 iPhone11,8
iPhone 11 13.0 iPhone12,1
iPhone 11 Pro 13.0 iPhone12,3
iPhone 11 Pro Max 13.0 iPhone12,5
iPhone SE (2nd Generation) 13.4 iPhone12,8
1 change: 1 addition & 0 deletions Orchard-ObjC/iOS/OrchardiOSDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ typedef NS_ENUM(NSUInteger, OrchardiOSDevice) {
OrchardiOSDeviceiPhone11 NS_ENUM_AVAILABLE_IOS(13.0) NS_SWIFT_NAME(iPhone11),
OrchardiOSDeviceiPhone11Pro NS_ENUM_AVAILABLE_IOS(13.0) NS_SWIFT_NAME(iPhone11Pro),
OrchardiOSDeviceiPhone11ProMax NS_ENUM_AVAILABLE_IOS(13.0) NS_SWIFT_NAME(iPhone11ProMax),
OrchardiOSDeviceiPhoneSE2 NS_ENUM_AVAILABLE_IOS(13.4) NS_SWIFT_NAME(iPhoneSE2),

// iPads
OrchardiOSDeviceiPad NS_ENUM_DEPRECATED_IOS(3.2, 6.0) NS_SWIFT_NAME(iPad),
Expand Down
7 changes: 7 additions & 0 deletions Orchard-ObjC/iOS/OrchardiOSDevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ OrchardiOSDevice OrchardiOSDeviceFromNSString(NSString * _Nonnull string) {
else if ([string isEqualToString:@"iPhone12,5"]) {
return OrchardiOSDeviceiPhone11ProMax;
}
else if ([string isEqualToString:@"iPhone12,8"]) {
return OrchardiOSDeviceiPhoneSE2;
}

#pragma mark - iPads

Expand Down Expand Up @@ -282,6 +285,7 @@ OrchardiOSDeviceFamily OrchardiOSDeviceFamilyForiOSDevice(OrchardiOSDevice devic
case OrchardiOSDeviceiPhone11:
case OrchardiOSDeviceiPhone11Pro:
case OrchardiOSDeviceiPhone11ProMax:
case OrchardiOSDeviceiPhoneSE2:
return OrchardiOSDeviceFamilyiPhone;

#pragma mark - iPads
Expand Down Expand Up @@ -419,6 +423,9 @@ OrchardiOSDeviceFamily OrchardiOSDeviceFamilyForiOSDevice(OrchardiOSDevice devic
case OrchardiOSDeviceiPhone11ProMax:
return @"iPhone 11 Pro Max";

case OrchardiOSDeviceiPhoneSE2:
return @"iPhone SE (2nd Generation)";

#pragma mark - iPads

case OrchardiOSDeviceiPad:
Expand Down
9 changes: 9 additions & 0 deletions Orchard-Swift/iOS/iPhones.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ public enum iPhones {
@available (iOS, introduced: 13.0)
case iPhone11ProMax

@available (iOS, introduced: 13.4)
case iPhoneSE2

case unknown

internal init(model: String) {
Expand Down Expand Up @@ -191,6 +194,11 @@ public enum iPhones {
self = .iPhone11ProMax
}

case "iPhone12,8":
if #available(iOS 13.4, *) {
self = .iPhoneSE2
}

default: break

}
Expand Down Expand Up @@ -222,6 +230,7 @@ public enum iPhones {
case .iPhone11: return "iPhone 11"
case .iPhone11Pro: return "iPhone 11 Pro"
case .iPhone11ProMax: return "iPhone 11 Pro Max"
case .iPhoneSE2: return "iPhone SE (2nd Generation)"

default: return nil
}
Expand Down
2 changes: 1 addition & 1 deletion Orchard.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|

spec.name = "Orchard"
spec.version = "1.5.1"
spec.version = "1.6.0"
spec.summary = "Device identification for iOS, watchOS, and tvOS."

spec.description = <<-DESC
Expand Down
4 changes: 2 additions & 2 deletions Orchard.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MARKETING_VERSION = 1.5.1;
MARKETING_VERSION = 1.6.0;
ONLY_ACTIVE_ARCH = YES;
RUN_CLANG_STATIC_ANALYZER = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos appletvsimulator appletvos";
Expand Down Expand Up @@ -615,7 +615,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MARKETING_VERSION = 1.5.1;
MARKETING_VERSION = 1.6.0;
RUN_CLANG_STATIC_ANALYZER = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos watchsimulator watchos appletvsimulator appletvos";
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down

0 comments on commit cf8bb36

Please sign in to comment.