-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[frameit] add iPhone 14 device lineup and new device colors #21648
Conversation
IMHO the current device size for an iPhone 14 Pro is not correct in the current master of https://github.com/fastlane/frameit-frames/ Therefore I've created a pull-request with the correct frame size Maybe you can try follow fastlane-branch that links to a corresponding frame-it/frames repo that matches the correct iPhone 14 Pro size If you are fine with the implementation we can close all other pull requests and hopefully it's getting merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR @mrvincenzo! 🙏
Just left some minor comments, could you take a look? 🙇
This reverts commit 9b6a825.
# Conflicts: # frameit/lib/frameit/device_types.rb
IPHONE_14_PRO ||= Frameit::Device.new("iphone-14-pro", "Apple iPhone 14 Pro", 12, [[1178, 2556], [2556, 1178]], 460, Color::PURPLE, Platform::IOS) | ||
IPHONE_14_PRO_MAX ||= Frameit::Device.new("iphone14-pro-max", "Apple iPhone 14 Pro Max", 12, [[1290, 2796], [2796, 1290]], 458, Color::PURPLE, Platform::IOS) | ||
IPHONE_14_PLUS ||= Frameit::Device.new("iphone14-plus", "Apple iPhone 14 Plus", 12, [[1284, 2778], [2778, 1284]], 458, Color::MIDNIGHT, Platform::IOS) | ||
IPHONE_14_PRO ||= Frameit::Device.new("iphone-14-pro", "Apple iPhone 14 Pro", 12, [[1179, 2556], [2556, 1179]], 460, Color::PURPLE, Platform::IOS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resolution in master
is incorrect. This is the correct resolution [1179, 2556]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrvincenzo the resolution on master is correct! I‘ve tested it and generated all production screens with it.
Generate a screenshot wirh snapshot and check yourseelf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sathoeni what your are saying is inaccurate - iPhone 14 Pro and iPhone 14 Pro Max resolutions in master
are incorrect. The fact that it works, doesn't make it correct.
iPhone 14 Pro and Pro Max spec
iPhone 14 Pro
The resolution should be 2556x1179
and not 2556x1178
like in master
.
You can also take a screenshot of the iPhone 14 Simulator and check its size. You will discover it is 2556x1179
.
iPhone 14 Pro Max
The DPI should be 460 and not 458 like in master
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mrvincenzo for the screenshots. Looks like our CI and my local machine produces somehow screenshots with another resolution.
Can you also adapt the size of the screen in the following repo?
https://github.com/fastlane/frameit-frames
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR to frameit-frames: fastlane/frameit-frames#34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrvincenzo
I found the issue regarding the screensize
When you take a manual screenshot from the simulator the width of the iPhone 14 Pro is 1179. When you take a screenshot with an UITest (XCUIScreen.main.screenshot()) then it's width is 1178.
I assume it's an XCode bug, I will open a ticket for apple.
We should reopen your issue, I'm sure @getaaron can merge it later, after the issue is fixed in xcode. In the meantime we should keep 1178, so it's works when using fastlane snapshot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've opened FB13569779.
with following text:
When using XCUIScreen.main.screenshot() or XCUIApplication().screenshot for generating screenshots for the iPhone 14 Pro the screensize is different (and according to documentation) not correct, compared the taking screenshots manually from the simulator CTRL+S When I take a screenshot manually from the simulator the screensize is 1179 × 2556 pixels When I take a screenshot with XCUIScreen.main.screenshot() the screensize is 1178 × 2556 pixels According to the documentation the screenshot size should be 1179 × 2556! https://developer.apple.com/help/app-store-connect/reference/screenshot-specifications
and following evidence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should separate these 2 issues:
- Adding iPhone 14 device lineup + new device colors, which is mostly what this PR is doing
- Fixing the size of the image of the iPhone 14 Pro, which apparently requires other changes (e.g. sathoeni@c5b57b2) plus perhaps changes in the frames in https://github.com/fastlane/frameit-frames (uncertain, to me)
If we proceed with this PR as is, it looks like it will cause regressions if we don't address the other co-related changes simultaneously? Looks like we'd be falling into scope creep, no?
What do you guys think? @getaaron @mrvincenzo @sathoeni
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we merge only this PR we will cause a regression, because the frame dimensions in the file
devices_types.rb
correlate to the dimensions in the offset.json
in the frameit-frames repo (https://github.com/fastlane/frameit-frames).
If these don't match it's not possible to add a frame to the corresponding screenshot.
The screen dimensions on master of fastlane
and `fastlane/frameit-frames' are currently matching and already support the iPhone14 (Pro) series.
Unfortunately it only works when creating screenshots using XCUITest and the fastlane SnapshotHelper.swift
. It does not work when taking screenshots manually and running frameit-frames
. The reason is a Bug in XCode 15.x that creates wrong screenshots dimensions for the iPhone 14 series.
Currently the master
branch uses also the "wrong" dimensions that's why everything works fine with XCode 15.x but not with previous XCode version.
So we already have a regressions issue here.
The long and the short of it:
If we want to fix the current regressions we need to take all of the following changes:
- This PR [frameit] add iPhone 14 device lineup and new device colors #21648
- sathoeni@c5b57b2
- iPhone 14 Pro Frame Width frameit-frames#35
Sorry it's kind of complicated.. I hope you can follow my explanation.
What do you think @rogerluan?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rogerluan What do you think? Can we proceed on this one?
@rogerluan, I addressed all comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks for this, @mrvincenzo !
Can someone with write access permission merge this pull request? |
The PR was opened on November 18th and has remained inactive for two months, regardless of the reasons. Time is a valuable resource, including mine. Since I don't see any particular interest in merging this PR, I am closing it. That would be my first and last PR to this repo. |
@mrvincenzo Can you please reopen this Pull-Request I've implemented a workaround for the weird screenshot behaviour in XCode 15.x Can you confirm that only the iPhone 14 Pro Size was incorrect? |
@mrvincenzo we'd still like to get this merged. Unfortunately we are generally very slow to merge things as most maintainers also only have minimal time to work on fastlane. Please do not see it as a reflection on you or your contribution, we appreciate both very much even if we are slow to react |
@sathoeni i think this looks good to merge as-is, do you have any concerns with it before I merge it? |
It also looks good to me. If you can cherry-pick my commit and apply it, it would be awesome. |
Left a comment here: #21648 (comment) |
What is currently getting in the way of this being merged? |
@rogerluan Can we move on here? Any feedback on my suggesstion? |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
Description
Testing Steps