diff --git a/Sources/DeviceModel.swift b/Sources/DeviceModel.swift index d0aa1a4..a4d25f2 100644 --- a/Sources/DeviceModel.swift +++ b/Sources/DeviceModel.swift @@ -42,7 +42,7 @@ public enum DeviceModel { case iPadPro9_7Inch, iPadPro10_5Inch, iPadPro11Inch, iPadPro12_9Inch, iPadPro12_9Inch_SecondGen, iPadPro12_9Inch_ThirdGen case iPodTouchFirstGen, iPodTouchSecondGen, iPodTouchThirdGen, - iPodTouchFourthGen, iPodTouchFifthGen, iPodTouchSixthGen + iPodTouchFourthGen, iPodTouchFifthGen, iPodTouchSixthGen, iPodTouchSeventhGen case unknown } @@ -154,6 +154,7 @@ extension DeviceModel { case (4, 1): return .iPodTouchFourthGen case (5, 1): return .iPodTouchFifthGen case (7, 1): return .iPodTouchSixthGen + case (9, 1): return .iPodTouchSeventhGen default: return .unknown } } diff --git a/Sources/Identifier.swift b/Sources/Identifier.swift index f2d2b67..5831cf0 100644 --- a/Sources/Identifier.swift +++ b/Sources/Identifier.swift @@ -170,6 +170,8 @@ extension Identifier: CustomStringConvertible { return "5th Gen iPod" case (7, 1): return "6th Gen iPod" + case (9, 1): + return "7th Gen iPod" default: return "unknown" } diff --git a/Tests/DeviceModelTests.swift b/Tests/DeviceModelTests.swift index 3080a64..228ec74 100644 --- a/Tests/DeviceModelTests.swift +++ b/Tests/DeviceModelTests.swift @@ -299,6 +299,10 @@ class DeviceModelTests: XCTestCase { let deviceModel = DeviceModel(identifier: Identifier("iPod7,1")) XCTAssert(deviceModel == .iPodTouchSixthGen , "DeviceModel - .iPodSixthGen is failing") } + func testDeviceModelIPodTouchSeventhGen() { + let deviceModel = DeviceModel(identifier: Identifier("iPod9,1")) + XCTAssert(deviceModel == .iPodTouchSeventhGen , "DeviceModel - .iPodSeventhGen is failing") + } // MARK: Simulator Test diff --git a/Tests/IdentifierTests.swift b/Tests/IdentifierTests.swift index 55e5d40..610a55c 100644 --- a/Tests/IdentifierTests.swift +++ b/Tests/IdentifierTests.swift @@ -224,6 +224,10 @@ class IdentifierTests: XCTestCase { // MARK: - iPod + + func testDisplayStringiPod9v1() { + XCTAssert(Identifier("iPod9,1").description == "7th Gen iPod", "iPod9,1 is failing to produce a common device model string") + } func testDisplayStringiPod7v1() { XCTAssert(Identifier("iPod7,1").description == "6th Gen iPod", "iPod7,1 is failing to produce a common device model string")