Skip to content

Commit ea9885b

Browse files
zhu-xiaoweixiaoweii
andauthored
feat: support model name for iPhone 15 series (#37)
Co-authored-by: xiaoweii <xiaoweii@amazom.com>
1 parent b3570db commit ea9885b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Sources/Clickstream/Dependency/Clickstream/System/SystemInfo.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ class SystemInfo {
104104
case "iPhone14,8": return "iPhone 14 Plus"
105105
case "iPhone15,2": return "iPhone 14 Pro"
106106
case "iPhone15,3": return "iPhone 14 Pro Max"
107+
case "iPhone15,4": return "iPhone 15"
108+
case "iPhone15,5": return "iPhone 15 Plus"
109+
case "iPhone16,1": return "iPhone 15 Pro"
110+
case "iPhone16,2": return "iPhone 15 Pro Max"
107111
case "iPad5,3", "iPad5,4": return "iPad Air 2"
108112
case "iPad6,11", "iPad6,12": return "iPad (5th generation)"
109113
case "iPad7,5", "iPad7,6": return "iPad (6th generation)"

Tests/ClickstreamTests/Clickstream/SystemInfoTest.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ class SystemInfoTest: XCTestCase {
4848
XCTAssertEqual("iPhone 14 Plus", SystemInfo.getModel(identifier: "iPhone14,8"))
4949
XCTAssertEqual("iPhone 14 Pro", SystemInfo.getModel(identifier: "iPhone15,2"))
5050
XCTAssertEqual("iPhone 14 Pro Max", SystemInfo.getModel(identifier: "iPhone15,3"))
51+
XCTAssertEqual("iPhone 15", SystemInfo.getModel(identifier: "iPhone15,4"))
52+
XCTAssertEqual("iPhone 15 Plus", SystemInfo.getModel(identifier: "iPhone15,5"))
53+
XCTAssertEqual("iPhone 15 Pro", SystemInfo.getModel(identifier: "iPhone16,1"))
54+
XCTAssertEqual("iPhone 15 Pro Max", SystemInfo.getModel(identifier: "iPhone16,2"))
5155
}
5256

5357
func testGetModelFor_iPad() {

0 commit comments

Comments
 (0)