Skip to content

Commit 72a43e2

Browse files
Add support for iPhone 17 models in UIScreenExtension (#25)
* Add support for iPhone 17 models in UIScreenExtension * Bump version to 1.0.4 in podspec * Bump version to 2.2.0 * Refactor iPhone model cases for clarity * Remove print statement in modelIdentifier * updated display_metrics_ios * bump display_metrics version (added Added Fall 2025 iOS devices support ) --------- Co-authored-by: nukeolay <nukeolay@gmail.com>
1 parent 5be2dcb commit 72a43e2

File tree

6 files changed

+26
-8
lines changed

6 files changed

+26
-8
lines changed

display_metrics/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 2.2.0
2+
* Added Fall 2025 iOS devices support (thanks @rotsen24154):
3+
* iPhone 17
4+
* iPhone 17 Pro
5+
* iPhone 17 Pro Max
6+
* iPhone 17 Air
7+
18
## 2.1.0
29
* WASM support
310

display_metrics/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: display_metrics
22
description: Flutter plugin to retrieve device display metrics (resolution, size, PPI, diagonal). Convert inches & mm to Flutter logical pixels.
33
homepage: https://github.com/nukeolay/display_metrics/tree/main/display_metrics
4-
version: 2.1.0
4+
version: 2.2.0
55

66
environment:
77
sdk: '>=3.1.2 <4.0.0'
@@ -12,7 +12,7 @@ dependencies:
1212
sdk: flutter
1313
display_metrics_platform_interface: ^1.1.0
1414
display_metrics_android: ^1.1.0
15-
display_metrics_ios: ^1.1.0
15+
display_metrics_ios: ^1.2.0
1616
display_metrics_windows: ^1.1.0
1717
display_metrics_macos: ^1.1.0
1818
display_metrics_web: ^0.2.0
@@ -44,4 +44,4 @@ topics:
4444
- ppi
4545
- size
4646
- resolution
47-
- pixels
47+
- pixel

display_metrics_ios/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 1.2.0
2+
* Added Fall 2025 iOS devices support (thanks @rotsen24154):
3+
* iPhone 17
4+
* iPhone 17 Pro
5+
* iPhone 17 Pro Max
6+
* iPhone 17 Air
7+
18
## 1.1.0
29
* Updated *display_metrics_platform_interface* dependency (1.1.0)
310

display_metrics_ios/ios/Classes/UIScreenExtension.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,18 @@ public extension UIScreen {
7777
case "iPhone17,5": // iPhone 16e
7878
return 6.1
7979

80-
case "iPhone17,1": // iPhone 16 Pro
80+
case "iPhone17,1": fallthrough // iPhone 16 Pro
81+
case "iPhone18,1": fallthrough // iPhone 17 Pro
82+
case "iPhone18,3": // iPhone 17
8183
return 6.3
8284

83-
case "iPhone17,2": // iPhone 16 Pro Max
85+
case "iPhone17,2": fallthrough // iPhone 16 Pro Max
86+
case "iPhone18,2": // iPhone 17 Pro Max
8487
return 6.9
8588

8689
case "iPhone11,4", "iPhone11,6": fallthrough // iPhone XS Max
87-
case "iPhone12,5": // iPhone 11 Pro Max
90+
case "iPhone12,5": fallthrough // iPhone 11 Pro Max
91+
case "iPhone18,4": // iPhone Air
8892
return 6.5
8993

9094
case "iPhone13,4": fallthrough // iPhone 12 Pro Max

display_metrics_ios/ios/display_metrics_ios.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
Pod::Spec.new do |s|
66
s.name = 'display_metrics_ios'
7-
s.version = '1.0.3'
7+
s.version = '1.0.4'
88
s.summary = 'Flutter plugin to retrieve device display metrics (resolution, size, PPI, diagonal). Convert inches & mm to Flutter logical pixels.'
99
s.description = <<-DESC
1010
A new Flutter plugin project.

display_metrics_ios/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: display_metrics_ios
22
description: iOS platform implementation of display_metrics plugin. This package will be automatically included in your app when you use display_metrics in iOS project
33
homepage: https://github.com/nukeolay/display_metrics/tree/main/display_metrics_ios
4-
version: 1.1.0
4+
version: 1.2.0
55

66
environment:
77
sdk: '>=3.1.2 <4.0.0'

0 commit comments

Comments
 (0)