Skip to content

Commit

Permalink
Merge pull request #19 from detroit-labs/update-project
Browse files Browse the repository at this point in the history
Update project deployment target version
  • Loading branch information
nwdl committed Aug 31, 2023
2 parents 1463ca9 + 4a8629f commit b0033ff
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 131 deletions.
2 changes: 1 addition & 1 deletion .version
@@ -1 +1 @@
1.14.0
1.15.0
10 changes: 9 additions & 1 deletion CHANGELOG.md
@@ -1,10 +1,18 @@
# Orchard Change Log

## [1.15.0](https://github.com/Detroit-Labs/Orchard/releases/tag/1.15.0)
**Released:** 2023-08-30

### Updated
- Set minimum iOS deployment target to 12.0
- Set minimum tvOS deployment target to 12.0
- Set minimum watchOS deployment target to 4.0

## [1.14.0](https://github.com/Detroit-Labs/Orchard/releases/tag/1.14.0)
**Released:** 2023-08-30

### Added
- Support for Apple TV 4K (3nd Generation)
- Support for Apple TV 4K (3rd Generation)

### Updated
- Support for Apple TV 4K (2nd Generation)
Expand Down
6 changes: 3 additions & 3 deletions Common/GYBUtilities.py
Expand Up @@ -39,9 +39,9 @@ def longestEnumNameLength(deviceFamily = iOSDeviceFamily.IPHONE):
longest = length
return longest

iOSDeploymentTarget=os.getenv('IPHONEOS_DEPLOYMENT_TARGET', '9.0')
watchOSDeploymentTarget=os.getenv('WATCHOS_DEPLOYMENT_TARGET', '2.0')
tvOSDeploymentTarget=os.getenv('TVOS_DEPLOYMENT_TARGET', '9.0')
iOSDeploymentTarget=os.getenv('IPHONEOS_DEPLOYMENT_TARGET', '12.0')
watchOSDeploymentTarget=os.getenv('WATCHOS_DEPLOYMENT_TARGET', '4.0')
tvOSDeploymentTarget=os.getenv('TVOS_DEPLOYMENT_TARGET', '12.0')

def versiontuple(v):
return tuple(map(int, v.split('.')))
Expand Down
1 change: 1 addition & 0 deletions Gemfile.lock
Expand Up @@ -88,6 +88,7 @@ GEM
zeitwerk (2.5.4)

PLATFORMS
arm64-darwin-21
x86_64-darwin-21

DEPENDENCIES
Expand Down
4 changes: 1 addition & 3 deletions Orchard-ObjC/tvOS/OrchardtvOSDevice.m
Expand Up @@ -22,9 +22,7 @@ OrchardtvOSDevice OrchardtvOSDeviceFromNSString(NSString *string) {
return OrchardtvOSDeviceAppleTVHD;
}
else if ([string isEqualToString:@"AppleTV6,2"]) {
if (@available(tvOS 11.0, *)) {
return OrchardtvOSDeviceAppleTV4K;
}
return OrchardtvOSDeviceAppleTV4K;
}
else if ([string isEqualToString:@"AppleTV11,1"]) {
if (@available(tvOS 14.5, *)) {
Expand Down
24 changes: 6 additions & 18 deletions Orchard-ObjC/watchOS/OrchardwatchOSDevice.m
Expand Up @@ -27,36 +27,24 @@ OrchardwatchOSDevice OrchardwatchOSDeviceFromNSString(NSString *string) {
return OrchardwatchOSDeviceAppleWatch_42mm;
}
else if ([string isEqualToString:@"Watch2,6"]) {
if (@available(watchOS 3.0, *)) {
return OrchardwatchOSDeviceAppleWatchSeries1_38mm;
}
return OrchardwatchOSDeviceAppleWatchSeries1_38mm;
}
else if ([string isEqualToString:@"Watch2,7"]) {
if (@available(watchOS 3.0, *)) {
return OrchardwatchOSDeviceAppleWatchSeries1_42mm;
}
return OrchardwatchOSDeviceAppleWatchSeries1_42mm;
}
else if ([string isEqualToString:@"Watch2,3"]) {
if (@available(watchOS 3.0, *)) {
return OrchardwatchOSDeviceAppleWatchSeries2_38mm;
}
return OrchardwatchOSDeviceAppleWatchSeries2_38mm;
}
else if ([string isEqualToString:@"Watch2,4"]) {
if (@available(watchOS 3.0, *)) {
return OrchardwatchOSDeviceAppleWatchSeries2_42mm;
}
return OrchardwatchOSDeviceAppleWatchSeries2_42mm;
}
else if ([string orchard_isEqualToOneOfStrings:@[@"Watch3,1",
@"Watch3,3"]]) {
if (@available(watchOS 4.0, *)) {
return OrchardwatchOSDeviceAppleWatchSeries3_38mm;
}
return OrchardwatchOSDeviceAppleWatchSeries3_38mm;
}
else if ([string orchard_isEqualToOneOfStrings:@[@"Watch3,2",
@"Watch3,4"]]) {
if (@available(watchOS 4.0, *)) {
return OrchardwatchOSDeviceAppleWatchSeries3_42mm;
}
return OrchardwatchOSDeviceAppleWatchSeries3_42mm;
}
else if ([string orchard_isEqualToOneOfStrings:@[@"Watch4,1",
@"Watch4,3"]]) {
Expand Down
36 changes: 6 additions & 30 deletions Orchard-Swift/iOS/iPads.swift
Expand Up @@ -109,24 +109,11 @@ public enum iPads {
self = .unknown

switch model {
case "iPad2,1", "iPad2,2", "iPad2,3", "iPad2,4":
self = .iPad2

case "iPad3,1", "iPad3,2", "iPad3,3":
self = .iPad3

case "iPad3,4", "iPad3,5", "iPad3,6":
self = .iPad4

case "iPad6,11", "iPad6,12":
if #available(iOS 10.3, *) {
self = .iPad5
}
self = .iPad5

case "iPad7,5", "iPad7,6":
if #available(iOS 11.3, *) {
self = .iPad6
}
self = .iPad6

case "iPad7,11", "iPad7,12":
if #available(iOS 13.1, *) {
Expand All @@ -143,9 +130,6 @@ public enum iPads {
self = .iPad9
}

case "iPad2,5", "iPad2,6", "iPad2,7":
self = .iPadMini

case "iPad4,4", "iPad4,5", "iPad4,6":
self = .iPadMini2

Expand Down Expand Up @@ -187,24 +171,16 @@ public enum iPads {
}

case "iPad6,7", "iPad6,8":
if #available(iOS 9.1, *) {
self = .iPadPro12_9Inch
}
self = .iPadPro12_9Inch

case "iPad6,3", "iPad6,4":
if #available(iOS 9.3, *) {
self = .iPadPro9_7Inch
}
self = .iPadPro9_7Inch

case "iPad7,1", "iPad7,2":
if #available(iOS 10.3, *) {
self = .iPadPro12_9Inch2
}
self = .iPadPro12_9Inch2

case "iPad7,3", "iPad7,4":
if #available(iOS 10.3, *) {
self = .iPadPro10_5Inch
}
self = .iPadPro10_5Inch

case "iPad8,5", "iPad8,6", "iPad8,7", "iPad8,8":
if #available(iOS 12.1, *) {
Expand Down
45 changes: 9 additions & 36 deletions Orchard-Swift/iOS/iPhones.swift
Expand Up @@ -133,15 +133,6 @@ public enum iPhones {
self = .unknown

switch model {
case "iPhone4,1":
self = .iPhone4S

case "iPhone5,1", "iPhone5,2":
self = .iPhone5

case "iPhone5,3", "iPhone5,4":
self = .iPhone5c

case "iPhone6,1", "iPhone6,2":
self = .iPhone5s

Expand All @@ -158,49 +149,31 @@ public enum iPhones {
self = .iPhone6sPlus

case "iPhone8,4":
if #available(iOS 9.3, *) {
self = .iPhoneSE
}
self = .iPhoneSE

case "iPhone9,1", "iPhone9,3":
if #available(iOS 10.0, *) {
self = .iPhone7
}
self = .iPhone7

case "iPhone9,2", "iPhone9,4":
if #available(iOS 10.0, *) {
self = .iPhone7Plus
}
self = .iPhone7Plus

case "iPhone10,1", "iPhone10,4":
if #available(iOS 11.0, *) {
self = .iPhone8
}
self = .iPhone8

case "iPhone10,2", "iPhone10,5":
if #available(iOS 11.0, *) {
self = .iPhone8Plus
}
self = .iPhone8Plus

case "iPhone10,3", "iPhone10,6":
if #available(iOS 11.0, *) {
self = .iPhoneX
}
self = .iPhoneX

case "iPhone11,2":
if #available(iOS 12.0, *) {
self = .iPhoneXS
}
self = .iPhoneXS

case "iPhone11,4", "iPhone11,6":
if #available(iOS 12.0, *) {
self = .iPhoneXSMax
}
self = .iPhoneXSMax

case "iPhone11,8":
if #available(iOS 12.0, *) {
self = .iPhoneXR
}
self = .iPhoneXR

case "iPhone12,1":
if #available(iOS 13.0, *) {
Expand Down
3 changes: 0 additions & 3 deletions Orchard-Swift/iOS/iPods.swift
Expand Up @@ -40,9 +40,6 @@ public enum iPods {
self = .unknown

switch model {
case "iPod5,1":
self = .iPodTouch5

case "iPod7,1":
self = .iPodTouch6

Expand Down
4 changes: 1 addition & 3 deletions Orchard-Swift/tvOS/TVs.swift
Expand Up @@ -35,9 +35,7 @@ public enum TVs {
self = .AppleTVHD

case "AppleTV6,2":
if #available(tvOS 11.0, *) {
self = .AppleTV4K
}
self = .AppleTV4K

case "AppleTV11,1":
if #available(tvOS 14.5, *) {
Expand Down
24 changes: 6 additions & 18 deletions Orchard-Swift/watchOS/Watches.swift
Expand Up @@ -95,34 +95,22 @@ public enum Watches {
self = .AppleWatch_42mm

case "Watch2,6":
if #available(watchOS 3.0, *) {
self = .AppleWatchSeries1_38mm
}
self = .AppleWatchSeries1_38mm

case "Watch2,7":
if #available(watchOS 3.0, *) {
self = .AppleWatchSeries1_42mm
}
self = .AppleWatchSeries1_42mm

case "Watch2,3":
if #available(watchOS 3.0, *) {
self = .AppleWatchSeries2_38mm
}
self = .AppleWatchSeries2_38mm

case "Watch2,4":
if #available(watchOS 3.0, *) {
self = .AppleWatchSeries2_42mm
}
self = .AppleWatchSeries2_42mm

case "Watch3,1", "Watch3,3":
if #available(watchOS 4.0, *) {
self = .AppleWatchSeries3_38mm
}
self = .AppleWatchSeries3_38mm

case "Watch3,2", "Watch3,4":
if #available(watchOS 4.0, *) {
self = .AppleWatchSeries3_42mm
}
self = .AppleWatchSeries3_42mm

case "Watch4,1", "Watch4,3":
if #available(watchOS 5.0, *) {
Expand Down
8 changes: 4 additions & 4 deletions Orchard.podspec
@@ -1,7 +1,7 @@
Pod::Spec.new do |spec|

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

spec.description = <<-DESC
Expand All @@ -16,9 +16,9 @@ make decisions based on that.

spec.author = { "Jeff Kelley" => "SlaunchaMan@gmail.com" }

spec.ios.deployment_target = "9.0"
spec.watchos.deployment_target = "2.0"
spec.tvos.deployment_target = "9.0"
spec.ios.deployment_target = "12.0"
spec.watchos.deployment_target = "4.0"
spec.tvos.deployment_target = "12.0"

spec.source = { :git => "https://github.com/Detroit-Labs/Orchard.git",
:tag => "#{spec.version}" }
Expand Down

0 comments on commit b0033ff

Please sign in to comment.