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

[resign.sh] Add healthkit access entitlement to the blacklist and transfer list #13798

Merged
merged 1 commit into from
Jan 25, 2019

Conversation

Travolter
Copy link
Contributor

@Travolter Travolter commented Dec 3, 2018

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

com.apple.developer.healthkit is an entitlement that should also be taken from the App.
Before resigning:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>application-identifier</key>
        <string>application.identifier.healthkitswift</string>
        <key>aps-environment</key>
        <string>production</string>
        <key>beta-reports-active</key>
        <true/>
        <key>com.apple.developer.healthkit</key>
        <true/>
        <key>com.apple.developer.team-identifier</key>
        <string>TEAMID</string>
        <key>get-task-allow</key>
        <false/>
</dict>
</plist>.  

After running resign.sh HealthKit_sample.ipa XXXXX -p "Healthkitswift_test_distribution.mobileprovision" --use-app-entitlements fastlane_resigned.healthkit.ipa:

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>application-identifier</key>
        <string>application.identifier.healthkitswift</string>
        <key>aps-environment</key>
        <string>production</string>
        <key>beta-reports-active</key>
        <true/>
        <key>com.apple.developer.healthkit</key>
        <true/>
        <key>com.apple.developer.healthkit.access</key>
        <array>
                <string>health-records</string>
        </array>
        <key>com.apple.developer.team-identifier</key>
        <string>TEAMID</string>
        <key>get-task-allow</key>
        <false/>
</dict>
</plist>

This is obviously not correct, with this patch it's back to the original entitlements.

Description

Added the "com.apple.developer.healthkit.access" entitlements to the list of entitlements that should not be taken from the provisioning profile but from the app.

@googlebot

This comment has been minimized.

@Travolter

This comment has been minimized.

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels Dec 3, 2018
@Travolter Travolter changed the title Add healthkit access entitlement to the blacklist and transfer list [resign.sh] Add healthkit access entitlement to the blacklist and transfer list Dec 4, 2018
@lyndsey-ferguson
Copy link
Contributor

com.apple.developer.healthkit.access seems to be added by Apple as I saw comments in the Apple Dev forums. Does this code remove this entry if it does not appear in the App, but leaves it in if so. Not familiar with how the blacklist works

@Travolter
Copy link
Contributor Author

Travolter commented Dec 10, 2018

Yes, when you use the --use-app-entitlements flag (idk how this translate to the fastlane sigh command, it's slightly different there, with unerscores I think) then it will trigger this code path.

The blacklist will prevent the script from copying over the entitlement from the provisioning profile Which would by default contain the <string>health-records</string> entry. Because this entry in the provision profile means "This profile can sign entitlements that have this value". And the ENTITLEMENTS_TRANSFER_RULES will then be used to copy over from the app's entitlements instead. If it's not in the original app's entitlements, there is nothing to copy over ofcourse.

Copy link
Contributor

@lyndsey-ferguson lyndsey-ferguson left a comment

Choose a reason for hiding this comment

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

Looks good to me.

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 looks good to me! 👍

@joshdholtz joshdholtz merged commit b7be8b1 into fastlane:master Jan 25, 2019
@fastlane-bot
Copy link

Hey @Travolter 👋

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 🚀

@fastlane-bot
Copy link

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

@fastlane fastlane locked and limited conversation to collaborators Apr 1, 2019
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.

6 participants