Skip to content

Commit

Permalink
feat: support model name for iPhone 15 series (#37)
Browse files Browse the repository at this point in the history
Co-authored-by: xiaoweii <xiaoweii@amazom.com>
  • Loading branch information
zhu-xiaowei and xiaoweii authored Sep 25, 2023
1 parent b3570db commit ea9885b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ class SystemInfo {
case "iPhone14,8": return "iPhone 14 Plus"
case "iPhone15,2": return "iPhone 14 Pro"
case "iPhone15,3": return "iPhone 14 Pro Max"
case "iPhone15,4": return "iPhone 15"
case "iPhone15,5": return "iPhone 15 Plus"
case "iPhone16,1": return "iPhone 15 Pro"
case "iPhone16,2": return "iPhone 15 Pro Max"
case "iPad5,3", "iPad5,4": return "iPad Air 2"
case "iPad6,11", "iPad6,12": return "iPad (5th generation)"
case "iPad7,5", "iPad7,6": return "iPad (6th generation)"
Expand Down
4 changes: 4 additions & 0 deletions Tests/ClickstreamTests/Clickstream/SystemInfoTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class SystemInfoTest: XCTestCase {
XCTAssertEqual("iPhone 14 Plus", SystemInfo.getModel(identifier: "iPhone14,8"))
XCTAssertEqual("iPhone 14 Pro", SystemInfo.getModel(identifier: "iPhone15,2"))
XCTAssertEqual("iPhone 14 Pro Max", SystemInfo.getModel(identifier: "iPhone15,3"))
XCTAssertEqual("iPhone 15", SystemInfo.getModel(identifier: "iPhone15,4"))
XCTAssertEqual("iPhone 15 Plus", SystemInfo.getModel(identifier: "iPhone15,5"))
XCTAssertEqual("iPhone 15 Pro", SystemInfo.getModel(identifier: "iPhone16,1"))
XCTAssertEqual("iPhone 15 Pro Max", SystemInfo.getModel(identifier: "iPhone16,2"))
}

func testGetModelFor_iPad() {
Expand Down

0 comments on commit ea9885b

Please sign in to comment.