Skip to content

Commit e2cccba

Browse files
Bump minimum iOS version to 9 to silence Xcode 12 warning
Also removed devices from the list that do not support below iOS 9
1 parent 9f3d69a commit e2cccba

5 files changed

Lines changed: 1 addition & 52 deletions

File tree

Package.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import PackageDescription
55
let package = Package(
66
name: "UIDeviceModel",
77
platforms: [
8-
.iOS(.v8),
9-
.watchOS(.v2),
10-
.tvOS(.v9),
8+
.iOS(.v9),
119
],
1210
products: [
1311
.library(name: "UIDeviceModel", targets: [

Sources/UIDeviceModel/UIDeviceModel.swift

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import Foundation
1010

1111
public enum UIDeviceModel {
12-
case iPad
1312
case iPad2
1413
case iPad3
1514
case iPad4
@@ -32,10 +31,6 @@ public enum UIDeviceModel {
3231
case iPadMini4
3332
case iPadMini5
3433

35-
case iPhone // Also known as iPhone 2G
36-
case iPhone3G
37-
case iPhone3GS
38-
case iPhone4
3934
case iPhone4s
4035
case iPhone5
4136
case iPhone5c
@@ -58,10 +53,6 @@ public enum UIDeviceModel {
5853
case iPhone11ProMax
5954
case iPhoneSE2
6055

61-
case iPodTouch
62-
case iPodTouch2
63-
case iPodTouch3
64-
case iPodTouch4
6556
case iPodTouch5
6657
case iPodTouch6
6758
case iPodTouch7
@@ -105,7 +96,6 @@ extension UIDeviceModel {
10596

10697
private static func mapToDevice(identifier: String) -> UIDeviceModel {
10798
switch identifier {
108-
case "iPad1,1": return .iPad
10999
case "iPad2,1", "iPad2,2", "iPad2,3", "iPad2,4": return .iPad2
110100
case "iPad2,5", "iPad2,6", "iPad2,7": return .iPadMini
111101
case "iPad3,1", "iPad3,2", "iPad3,3": return .iPad3
@@ -128,10 +118,6 @@ extension UIDeviceModel {
128118
case "iPad11,1", "iPad11,2": return .iPadMini5
129119
case "iPad11,3", "iPad11,4": return .iPadAir3
130120

131-
case "iPhone1,1": return .iPhone
132-
case "iPhone1,2": return .iPhone3G
133-
case "iPhone2,1": return .iPhone3GS
134-
case "iPhone3,1", "iPhone3,2", "iPhone3,3": return .iPhone4
135121
case "iPhone4,1": return .iPhone4s
136122
case "iPhone5,1", "iPhone5,2": return .iPhone5
137123
case "iPhone5,3", "iPhone5,4": return .iPhone5c
@@ -154,10 +140,6 @@ extension UIDeviceModel {
154140
case "iPhone12,5": return .iPhone11ProMax
155141
case "iPhone12,8": return .iPhoneSE2
156142

157-
case "iPod1,1": return .iPodTouch
158-
case "iPod2,1": return .iPodTouch2
159-
case "iPod3,1": return .iPodTouch3
160-
case "iPod4,1": return .iPodTouch4
161143
case "iPod5,1": return .iPodTouch5
162144
case "iPod7,1": return .iPodTouch6
163145
case "iPod9,1": return .iPodTouch7

Tests/LinuxMain.swift

Lines changed: 0 additions & 7 deletions
This file was deleted.

Tests/UIDeviceModelTests/UIDeviceModelTests.swift

Lines changed: 0 additions & 15 deletions
This file was deleted.

Tests/UIDeviceModelTests/XCTestManifests.swift

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)