Skip to content
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

[deliver] fix iPad 12.9" 3rd gen screenshot identifier for App Store Connect API #17364

Merged
merged 8 commits into from
Oct 19, 2021

Conversation

rogerluan
Copy link
Member

@rogerluan rogerluan commented Oct 2, 2020

🔑

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

Resolves #16975
Resolves #18045
More context in this comment of mine: #16975 (comment)

Description

It appears that since the App Store Connect API, the name of screenshots downloaded from App Store Connect of the iPad 12.9" 3rd gen was changed to %d_APP_IPAD_PRO_3GEN_129_%d.
Since there's no logic to handle that identifier out of the box (i.e. if you download the screenshots using deliver and try to re-upload them, it won't work unless you rename the iPad 12.9" 3rd gen screenshots according to the docs), this PR fixes that, maintaining the old name identifiers, but also adding support to IPAD_PRO_3GEN_129.
This PR also improves some copy and documentation in general, that helps people better understand this caveat of the iPad screenshots.

Testing Steps

This issue could be reproduced by downloading your screenshots from App Store Connect using deliver, and try re-uploading them. fastlane doesn't know that it has to upload those screenshots and assign them to the iPad 12.9" 3rd gen, so it will attempt to upload them as regular iPad 12.9" 2nd gen screenshots, which isn't accepted by Apple during review time (it could potentially get metadata rejected - I've witnessed this).

To test this branch, modify your Gemfile as:

gem "fastlane", :git => "https://github.com/rogerluan/fastlane.git", :branch => "fix-ipad-screenshot-naming"

@rogerluan
Copy link
Member Author

I can't see what failed the build on CI above ☝️ but what's failing locally is something related to the Google Play Store, which is also present in master 😬 not sure how to proceed

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

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

One small question about the txt to md rename 😇

@niyaoyao
Copy link

Does this request has been merged? I have faced with same issue.

@rogerluan
Copy link
Member Author

Does this request has been merged? I have faced with same issue.

Not yet, @niyaoyao ! If you're looking for a temporary workaround, check my comment here #16975 (comment) - hope it helps you!

I believe this PR will be merged soon, though. 🙏

@rogerluan rogerluan requested a review from ainame February 19, 2021 03:57
Copy link
Contributor

@ainame ainame left a comment

Choose a reason for hiding this comment

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

LGTM👍 I just wanted you to update the document to follow up on the latest change you made 🙂

@rogerluan rogerluan requested a review from ainame February 23, 2021 04:50
Copy link
Contributor

@ainame ainame left a comment

Choose a reason for hiding this comment

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

🚀

@rogerluan
Copy link
Member Author

@joshdholtz could you take a look at this one? 🤗 It's been causing new issues to be open e.g. #18045

@joshdholtz
Copy link
Member

On it!

@rogerluan
Copy link
Member Author

Ping @joshdholtz 🤗

Copy link

@cltnschlosser cltnschlosser left a comment

Choose a reason for hiding this comment

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

Just hit this bug today and had to manually delete and reupload all the iPad screenshots for 33 languages. This would have saved me a lot of time!

@rogerluan
Copy link
Member Author

Another friendly ping 🙈 @joshdholtz

@dinsen
Copy link
Contributor

dinsen commented Aug 12, 2021

@rogerluan could you fix the conflicts so we hopefully soon can get this out?

# Conflicts:
#	deliver/lib/deliver/app_screenshot.rb
c
"iPad Pro (12.9-inch) (3rd generation)", # default simulator name has this
"iPad Pro (12.9-inch) (4th generation)", # default simulator name has this
"ipadPro129", # downloaded screenshots name has this,
"3GEN" # downloaded screenshots name from App Store Connect API has this
Copy link
Member Author

@rogerluan rogerluan Aug 13, 2021

Choose a reason for hiding this comment

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

I'm replacing 3GEN (introduced here) by IPAD_PRO_3GEN_129 since it's the full name. No strong preference, though. cc @ainame maybe you had a reason to use 3GEN instead? 😊

Copy link
Member Author

Choose a reason for hiding this comment

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

Nevermind, I just saw that this change was added by @joshdholtz 😁 29598bc

I think it's safe to include the entire identifier IPAD_PRO_3GEN_129 🙏 but I don't mind keeping just 3GEN either

@rogerluan
Copy link
Member Author

Done @dinsen 💪

@rogerluan
Copy link
Member Author

Friendly ping @joshdholtz 🤗

@rogerluan
Copy link
Member Author

Ping @joshdholtz ? 🙈

@joshdholtz
Copy link
Member

Wait what... this never got merged?!

@rogerluan
Copy link
Member Author

The root issue actually got fixed by another PR a few months ago 😬 so this PR now just adds a unit test to cover that case, and documents the change @joshdholtz 🙇

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

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

🔥🔥🔥🔥🔥🔥🔥🔥

Thank you for these tests and docs 🙌 You my hero ❤️

@joshdholtz joshdholtz merged commit 62af236 into fastlane:master Oct 19, 2021
@fastlane-bot
Copy link

Hey @rogerluan 👋

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 week, 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 🚀

Copy link

@fastlane-bot fastlane-bot left a comment

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.197.0 🚀

@fastlane fastlane locked and limited conversation to collaborators Dec 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
8 participants