Skip to content

Commit 2b43271

Browse files
authored
Support for iPhone 16 models and Apple Watch Series 10. (#417)
* Initial support for iPhone 16 models and Apple Watch Series 10. * Version bump. (v5.5.0) * Add missing device identifiers for new September 2024 devices. * Fix unit tests after adding new devices.
1 parent 5757447 commit 2b43271

7 files changed

Lines changed: 173 additions & 33 deletions

File tree

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Changelog
22

3+
## Version 5.5.0
4+
5+
Releasedate: 2024-09-12
6+
7+
```ruby
8+
pod 'DeviceKit', '~> 5.5'
9+
```
10+
11+
### New September 2024 devices
12+
13+
This version adds support for the devices announced at the September 2024 Apple Event: ([#417](https://github.com/devicekit/DeviceKit/pull/417))
14+
15+
| Device | Case value |
16+
| --- | --- |
17+
| iPhone 16 | `Device.iPhone16` |
18+
| iPhone 16 Plus | `Device.iPhone16Plus` |
19+
| iPhone 16 Pro | `Device.iPhone16Pro` |
20+
| iPhone 16 Pro Max | `Device.iPhone16ProMax` |
21+
| Apple Watch Series 10 | `Device.appleWatchSeries10_42mm`, `Device.appleWatchSeries10_46mm` |
22+
23+
### Fixes
24+
25+
- Fix incorrect PPI for iPhone 14 Plus and iPhone 15 Plus. ([#418](https://github.com/devicekit/DeviceKit/pull/418))
26+
27+
### Contributors
28+
29+
Thanks to all the contributers of this release!
30+
- [arindamxd](https://github.com/arindamxd)
31+
332
## Version 5.4.0
433

534
Releasedate: 2024-05-30

DeviceKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'DeviceKit'
3-
s.version = '5.4.0'
3+
s.version = '5.5.0'
44
s.summary = 'DeviceKit is a µ-framework that provides a value-type replacement of UIDevice.'
55

66
s.description = <<-DESC

DeviceKit.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@
384384
"@executable_path/Frameworks",
385385
"@loader_path/Frameworks",
386386
);
387-
MARKETING_VERSION = 5.4.0;
387+
MARKETING_VERSION = 5.5.0;
388388
MERGEABLE_LIBRARY = YES;
389389
MTL_ENABLE_DEBUG_INFO = YES;
390390
PRODUCT_BUNDLE_IDENTIFIER = me.dennisweissmann.DeviceKit;
@@ -444,7 +444,7 @@
444444
"@executable_path/Frameworks",
445445
"@loader_path/Frameworks",
446446
);
447-
MARKETING_VERSION = 5.4.0;
447+
MARKETING_VERSION = 5.5.0;
448448
MERGEABLE_LIBRARY = YES;
449449
MTL_ENABLE_DEBUG_INFO = NO;
450450
PRODUCT_BUNDLE_IDENTIFIER = me.dennisweissmann.DeviceKit;

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
`DeviceKit` is a value-type replacement of [`UIDevice`](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/).
2020

21-
## Current version 5.4.0
21+
## Current version 5.5.0
2222
See our detailed [changelog](CHANGELOG.md) for the latest features, improvements and bug fixes.
2323

2424
## Features

Source/Device.generated.swift

Lines changed: 98 additions & 22 deletions
Large diffs are not rendered by default.

Source/Device.swift.gyb

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,14 @@ iPhones = [
8282
Device("iPhone14Plus", "Device is an [iPhone 14 Plus](https://support.apple.com/kb/SP874)", "https://support.apple.com/library/APPLE/APPLECARE_ALLGEOS/SP873/iphone-14_1_2x.png", ["iPhone14,8"], 6.7, (9, 19.5), "iPhone 14 Plus", "iPhone 14 Plus", 476, True, False, False, True, False, True, True, True, True, False, 0, False, 13, False, "a15Bionic", False, True),
8383
Device("iPhone14Pro", "Device is an [iPhone 14 Pro](https://support.apple.com/kb/SP875)", "https://support.apple.com/library/APPLE/APPLECARE_ALLGEOS/SP875/sp875-sp876-iphone14-pro-promax_2x.png", ["iPhone15,2"], 6.1, (9, 19.5), "iPhone 14 Pro", "iPhone 14 Pro", 460, False, False, True, True, False, True, True, True, True, True, 0, False, 123, True, "a16Bionic", False, True),
8484
Device("iPhone14ProMax", "Device is an [iPhone 14 Pro Max](https://support.apple.com/kb/SP876)", "https://support.apple.com/library/APPLE/APPLECARE_ALLGEOS/SP875/sp875-sp876-iphone14-pro-promax_2x.png", ["iPhone15,3"], 6.7, (9, 19.5), "iPhone 14 Pro Max", "iPhone 14 Pro Max", 458, True, False, True, True, False, True, True, True, True, True, 0, False, 123, True, "a16Bionic", False, True),
85-
Device("iPhone15", "Device is an [iPhone 15]()", "", ["iPhone15,4"], 6.1, (9, 19.5), "iPhone 15", "iPhone 15", 460, False, False, False, True, False, True, True, True, True, True, 0, False, 13, False, "a16Bionic", True, True),
86-
Device("iPhone15Plus", "Device is an [iPhone 15 Plus]()", "", ["iPhone15,5"], 6.7, (9, 19.5), "iPhone 15 Plus", "iPhone 15 Plus", 476, True, False, False, True, False, True, True, True, True, True, 0, False, 13, False, "a16Bionic", True, True),
87-
Device("iPhone15Pro", "Device is an [iPhone 15 Pro]()", "", ["iPhone16,1"], 6.1, (9, 19.5), "iPhone 15 Pro", "iPhone 15 Pro", 460, False, False, True, True, False, True, True, True, True, True, 0, False, 123, True, "a17Pro", True, True),
88-
Device("iPhone15ProMax", "Device is an [iPhone 15 Pro Max]()", "", ["iPhone16,2"], 6.7, (9, 19.5), "iPhone 15 Pro Max", "iPhone 15 Pro Max", 460, True, False, True, True, False, True, True, True, True, True, 0, False, 123, True, "a17Pro", True, True),
89-
85+
Device("iPhone15", "Device is an [iPhone 15](https://support.apple.com/en-us/111831)", "", ["iPhone15,4"], 6.1, (9, 19.5), "iPhone 15", "iPhone 15", 460, False, False, False, True, False, True, True, True, True, True, 0, False, 13, False, "a16Bionic", True, True),
86+
Device("iPhone15Plus", "Device is an [iPhone 15 Plus](https://support.apple.com/en-us/111830)", "", ["iPhone15,5"], 6.7, (9, 19.5), "iPhone 15 Plus", "iPhone 15 Plus", 476, True, False, False, True, False, True, True, True, True, True, 0, False, 13, False, "a16Bionic", True, True),
87+
Device("iPhone15Pro", "Device is an [iPhone 15 Pro](https://support.apple.com/en-us/111829)", "", ["iPhone16,1"], 6.1, (9, 19.5), "iPhone 15 Pro", "iPhone 15 Pro", 460, False, False, True, True, False, True, True, True, True, True, 0, False, 123, True, "a17Pro", True, True),
88+
Device("iPhone15ProMax", "Device is an [iPhone 15 Pro Max](https://support.apple.com/en-us/111828)", "", ["iPhone16,2"], 6.7, (9, 19.5), "iPhone 15 Pro Max", "iPhone 15 Pro Max", 460, True, False, True, True, False, True, True, True, True, True, 0, False, 123, True, "a17Pro", True, True),
89+
Device("iPhone16", "Device is an [iPhone 16]()", "", ["iPhone17,3"], 6.1, (9, 19.5), "iPhone 16", "iPhone 16", 460, False, False, False, True, False, True, True, True, True, True, 0, False, 13, False, "a18", True, True),
90+
Device("iPhone16Plus", "Device is an [iPhone 16 Plus]()", "", ["iPhone17,4"], 6.7, (9, 19.5), "iPhone 16 Plus", "iPhone 16 Plus", 476, True, False, False, True, False, True, True, True, True, True, 0, False, 13, False, "a18", True, True),
91+
Device("iPhone16Pro", "Device is an [iPhone 16 Pro]()", "", ["iPhone17,1"], 6.3, (9, 19.5), "iPhone 16 Pro", "iPhone 16 Pro", 460, False, False, True, True, False, True, True, True, True, True, 0, False, 123, True, "a18Pro", True, True),
92+
Device("iPhone16ProMax", "Device is an [iPhone 16 Pro Max]()", "", ["iPhone17,2"], 6.9, (9, 19.5), "iPhone 16 Pro Max", "iPhone 16 Pro Max", 460, True, False, True, True, False, True, True, True, True, True, 0, False, 123, True, "a18Pro", True, True),
9093
]
9194

9295
iPads = [
@@ -297,6 +300,17 @@ watches = [
297300
"",
298301
["Watch7,5"], 2.2, (4,5), "Apple Watch Ultra2", "Apple Watch Ultra2", 338, False, False, False, False, False, False, False, True, False, False, 0, False, 0, False, "s9", False, False),
299302

303+
Device(
304+
"appleWatchSeries10_42mm",
305+
"Device is an [Apple Watch Series 10]()",
306+
"",
307+
["Watch7,8", "Watch7,10"], 1.9, (374,446), "Apple Watch Series 10 42mm", "Apple Watch Series 10 42mm", 326, False, False, False, False, False, False, False, True, False, False, 0, False, 0, False, "s10", False, False),
308+
309+
Device(
310+
"appleWatchSeries10_46mm",
311+
"Device is an [Apple Watch Series 10]()",
312+
"",
313+
["Watch7,9", "Watch7,11"], 2.0, (416,496), "Apple Watch Series 10 46mm", "Apple Watch Series 10 46mm", 326, False, False, False, False, False, False, False, True, False, False, 0, False, 0, False, "s10", False, False),
300314

301315
]
302316

@@ -1475,6 +1489,8 @@ iOS_cpus = [
14751489
CPU("a15Bionic", "A15 Bionic"),
14761490
CPU("a16Bionic", "A16 Bionic"),
14771491
CPU("a17Pro" , "A17 Pro"),
1492+
CPU("a18" , "A18"),
1493+
CPU("a18Pro" , "A18 Pro"),
14781494
CPU("m1", "M1"),
14791495
CPU("m2", "M2"),
14801496
CPU("m3", "M3"),
@@ -1492,6 +1508,7 @@ watchOS_cpus = [
14921508
CPU("s7", "S7"),
14931509
CPU("s8", "S8"),
14941510
CPU("s9", "S9"),
1511+
CPU("s10", "S10"),
14951512
]
14961513
}%
14971514

Tests/Tests.swift

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,9 @@ class DeviceKitTests: XCTestCase {
455455
.iPhone14Plus,
456456
.iPhone14ProMax,
457457
.iPhone15Plus,
458-
.iPhone15ProMax
458+
.iPhone15ProMax,
459+
.iPhone16Plus,
460+
.iPhone16ProMax,
459461
])
460462
}
461463

@@ -471,6 +473,8 @@ class DeviceKitTests: XCTestCase {
471473
.iPhone14ProMax,
472474
.iPhone15Pro,
473475
.iPhone15ProMax,
476+
.iPhone16Pro,
477+
.iPhone16ProMax,
474478
.iPadPro9Inch,
475479
.iPadPro12Inch,
476480
.iPadPro12Inch2,
@@ -511,7 +515,11 @@ class DeviceKitTests: XCTestCase {
511515
.iPhone15,
512516
.iPhone15Plus,
513517
.iPhone15Pro,
514-
.iPhone15ProMax
518+
.iPhone15ProMax,
519+
.iPhone16,
520+
.iPhone16Plus,
521+
.iPhone16Pro,
522+
.iPhone16ProMax,
515523
]
516524
for device in Device.allRealDevices {
517525
XCTAssertTrue(device.hasDynamicIsland == device.isOneOf(dynamicIslandDevices), "testHasDynamicIsland failed for \(device.description)")
@@ -537,6 +545,10 @@ class DeviceKitTests: XCTestCase {
537545
.iPhone15Plus,
538546
.iPhone15Pro,
539547
.iPhone15ProMax,
548+
.iPhone16,
549+
.iPhone16Plus,
550+
.iPhone16Pro,
551+
.iPhone16ProMax,
540552
.iPad10,
541553
.iPadAir5,
542554
.iPadAir11M2,
@@ -624,6 +636,8 @@ class DeviceKitTests: XCTestCase {
624636
.iPhone14ProMax,
625637
.iPhone15Pro,
626638
.iPhone15ProMax,
639+
.iPhone16Pro,
640+
.iPhone16ProMax,
627641
.iPadPro11Inch2,
628642
.iPadPro12Inch4,
629643
.iPadPro11Inch3,
@@ -644,6 +658,10 @@ class DeviceKitTests: XCTestCase {
644658
.iPhone15Plus,
645659
.iPhone15Pro,
646660
.iPhone15ProMax,
661+
.iPhone16,
662+
.iPhone16Plus,
663+
.iPhone16Pro,
664+
.iPhone16ProMax,
647665
.iPad10,
648666
.iPadAir4,
649667
.iPadAir5,

0 commit comments

Comments
 (0)