Skip to content

[frameit] Add iPhone 16 and iPhone 17 device frame support#29921

Merged
iBotPeaches merged 5 commits into
fastlane:masterfrom
Events-Mate-Apps:robinkment/frameit-iphone16-17-support
Apr 29, 2026
Merged

[frameit] Add iPhone 16 and iPhone 17 device frame support#29921
iBotPeaches merged 5 commits into
fastlane:masterfrom
Events-Mate-Apps:robinkment/frameit-iphone16-17-support

Conversation

@Events-Mate-Apps

@Events-Mate-Apps Events-Mate-Apps commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #29920

Adds device definitions for iPhone 16 and iPhone 17 series to frameit so screenshots with these resolutions are correctly detected and framed.

Code changes (this PR):

  • Add device entries for iPhone 16, 16 Plus, 16 Pro, 16 Pro Max (priority 13) and iPhone 17, 17 Pro, 17 Pro Max (priority 14)
  • Add new Color constants: Teal, Ultramarine, Black/Desert/Natural/White Titanium, Cosmic Orange, Deep Blue, Mist Blue, Sage, Lavender
  • Extend rounded corner support to iPhone 16 and 17 series
  • Add tests for device detection and template lookup

Frame PNGs (separate update needed):

The actual frame images and offsets need to be added to the frameit-frames repo. I have the Apple Design Resources bezels ready for upload — happy to submit a PR there as well.

Screen resolutions:

Device Resolution Display Type
iPhone 16 1179×2556
iPhone 16 Plus 1290×2796
iPhone 16 Pro 1206×2622 APP_IPHONE_61
iPhone 16 Pro Max 1320×2868 APP_IPHONE_67
iPhone 17 1206×2622 APP_IPHONE_61
iPhone 17 Pro 1206×2622 APP_IPHONE_61
iPhone 17 Pro Max 1320×2868 APP_IPHONE_67

Test plan

  • bundle exec rspec frameit/spec/ — 58 examples, 0 failures
  • bundle exec rubocop -a frameit/ — 26 files, 0 offenses
  • iPhone 16 detected by resolution (1179×2556, 1290×2796)
  • iPhone 16 Pro detected by filename over base model
  • iPhone 17 Pro preferred over iPhone 16 Pro at same resolution (priority 14 > 13)
  • iPhone 17 Pro Max detected by resolution (1320×2868)
  • Force device type by ID, name, and display type string

- Add embedded frame PNGs for iPhone 16, 16 Plus, 16 Pro, 16 Pro Max,
  iPhone 17, 17 Pro, and 17 Pro Max directly in the repo
- Add new Color constants: Teal, Ultramarine, Black Titanium, Desert
  Titanium, Natural Titanium, White Titanium, Cosmic Orange, Deep Blue,
  Mist Blue, Sage, Lavender
- Add device entries with correct screen resolutions and priorities
- Update TemplateFinder and Offsets to fall back to embedded assets
- Extend rounded corner support to iPhone 16 and 17 series
- Add tests for device detection and template lookup
The fastlane gem has a 1.5 MB size limit. Frame PNGs must be hosted
on the separate frameit-frames repo and downloaded at runtime via
`fastlane frameit download_frames`.

Reverts the embedded frames fallback in TemplateFinder and Offsets.
Keeps device definitions, color constants, editor changes, and tests.
@Events-Mate-Apps

Copy link
Copy Markdown
Contributor Author

Companion PR for the frame images and offsets: fastlane/frameit-frames#40

@iBotPeaches

Copy link
Copy Markdown
Member

Thanks! Let me read up on how the frames repo works with this. Unsure if I need to version/cut a release of frames or it somehow is referenced purely via code.

@Events-Mate-Apps

Copy link
Copy Markdown
Contributor Author

Yeah my main goal was to have Orange 17 Pro :D And im kinda happy with the result but im not sure about fetching it from the frameit or where to define the custom git url for the frames
iPhone 17 Pro-00_Event_Overview_framed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds iPhone 16 and iPhone 17 series support to frameit so newer screenshot resolutions can be detected and mapped to the correct device/frame templates, with accompanying tests and minor supporting updates.

Changes:

  • Added new Frameit::Devices entries for iPhone 16/16 Plus/16 Pro/16 Pro Max and iPhone 17/17 Pro/17 Pro Max, plus additional Frameit::Color constants.
  • Extended rounded-corner masking logic to include iPhone 16 and 17 series.
  • Added/updated specs covering device detection, forced device selection, and template naming.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
snapshot/lib/snapshot/reports_generator.rb Adds new simulator device-name mappings for iPhone 16/17 in Snapshot HTML report generation.
frameit/lib/frameit/device_types.rb Introduces new iPhone 16/17 device definitions and new color constants used by frame selection.
frameit/lib/frameit/editor.rb Expands rounded-corner masking eligibility to include iPhone 16/17 series.
frameit/spec/device_spec.rb Adds RSpec coverage for detection/forcing behavior for iPhone 16/17 devices.
frameit/spec/template_finder_spec.rb Adds a template-finder expectation for iPhone 17 Pro naming.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread snapshot/lib/snapshot/reports_generator.rb
Comment thread frameit/lib/frameit/editor.rb Outdated
Comment thread frameit/lib/frameit/device_types.rb
Comment thread frameit/spec/device_spec.rb Outdated
@brightsider

This comment was marked as low quality.

Events-Mate-Apps and others added 2 commits April 24, 2026 08:09
- snapshot: add missing base "iPhone 17" report mapping
- frameit: drop shared APP_IPHONE_61 deliver_screen_id from IPHONE_17
  so "iOS-6.1-in" deterministically resolves to IPHONE_17_PRO (matches
  iPhone 16 convention where only the Pro variant owns the display id)
- frameit: clarify rounded-corner comment to match 14/16/17 allowlist
- frameit/spec: fix misleading test descriptions and update forced
  display-type expectation

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@Events-Mate-Apps

Copy link
Copy Markdown
Contributor Author

@iBotPeaches Could you please take a look now? I addressed all the comments from the Copilot. You might want to run it once more. Otherwise i think we are golden to merge. Thanks

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@iBotPeaches iBotPeaches merged commit c50a664 into fastlane:master Apr 29, 2026
13 checks passed

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Events-Mate-Apps 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a month, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀"

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations! 🎉 This was released as part of fastlane 2.234.0 🚀

@vanniktech

Copy link
Copy Markdown
Contributor

With iPad Pro 13-inch (M5) the naming in the HTML is still wrong though. Fastlane output:

+-------------------------------+
|       snapshot results        |
+-----------------------+-------+
| Device                | en-US |
+-----------------------+-------+
| iPhone 17 Pro Max     |  💚   |
| iPad Pro 13-inch (M5) |  💚   |
+-----------------------+-------+

but then it still says 12.9 in the generated HTML:

Screenshot 2026-05-11 at 07 06 28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[frameit] Add iPhone 16 and iPhone 17 device frame support

5 participants