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

[sigh] Resign OnDemandResources #16669

Merged
merged 2 commits into from Jul 6, 2020
Merged

Conversation

sjmh
Copy link
Contributor

@sjmh sjmh commented Jun 24, 2020

Allows sigh to resign OnDemandResource assetpacks

fixes #16668

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

We have teams that create/sign IPAs with development provisioning profiles and then we centrally sign with fastlane before deploying to the store. They would like to start using ODR's, however, when we resign, these ODR's are not being (re)signed.

Description

Detects if an ODR folder is within the Payload folder, if so, removes any codesignature's from each pack and resigns each pack.

Testing Steps

Modified a local installation of fastlane with these changes and ran an IPA with ODR through it. IPA came out successfully signed.

@googlebot

This comment has been minimized.

@sjmh

This comment has been minimized.

@googlebot

This comment has been minimized.

Allows sigh to resign OnDemandResource assetpacks

fixes fastlane#16668
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

Copy link
Member

@janpio janpio left a comment

Choose a reason for hiding this comment

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

Looks safe enough to approve without actually understanding what exactly it does ;)

@janpio janpio requested a review from joshdholtz June 28, 2020 08:13
@sjmh
Copy link
Contributor Author

sjmh commented Jun 29, 2020

Thanks @janpio - I probably should have explained better.

Apple allows you to push certain assets to OnDemandResources ( https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/On_Demand_Resources_Guide/index.html ).

Normally during your dev cycles, you can either host these extra resources on your own local web servers, or embed them directly in the app. When you embed, it puts them in the Payload/(app name)/OnDemandResources, but that's really only for debug purposes.. In those instances though, fastlane signs them because it finds them in the app directory.

However, when you deploy to the AppStore, the AppStore must host the resources, but when you build the IPA for the AppStore, it actually creates the OnDemandResources folder in Payload, rather than the Payload/(app name). sigh currently doesn't detect that however, so the resources don't get signed/resigned.

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.

@sjmh Thanks for adding this! Can you add a changelog to the top of the file? There should be a format you can follow up there 😇

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.

@sjmh Thanks for adding this! Can you add a changelog to the top of the file? There should be a format you can follow up there 😇

@sjmh
Copy link
Contributor Author

sjmh commented Jun 29, 2020

Oops, of course!

Added changelog message for changes to ODR signing
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.

This seems good to me! Thanks for adding this ❤️

@joshdholtz joshdholtz merged commit 8e6919c into fastlane:master Jul 6, 2020
@fastlane-bot
Copy link

Hey @sjmh 👋

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

minuscorp pushed a commit to minuscorp/fastlane that referenced this pull request Jul 18, 2020
* [sigh] Resign OnDemandResources
Allows sigh to resign OnDemandResource assetpacks

fixes fastlane#16668

* Add changelog message

Added changelog message for changes to ODR signing
@fastlane fastlane locked and limited conversation to collaborators Sep 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resign should also resign OnDemandResources
5 participants