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

Generate entitlements as a build step #249

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kieran-osgood-shopify
Copy link

@kieran-osgood-shopify kieran-osgood-shopify commented Nov 27, 2024

What changes are you making?

Following #239 work to add a script to generate the entitlements file, this PR aims to add a build phase step to automate the process.

  • Consumers dont have to do a manual step in order to run the app
  • Prevents compilation if you haven't populated your Storefront.xcconfig (which would be a runtime error otherwise)

Status

This is currently sat in draft whilst I consider how to fix an issue, the script runs after the files are analysed in the prior build step, meaning that if the file doesn't exist it will fail the build, we want to generate prior to this or leave a stubbed file there, without git tracking being an issue during development.

How to test

If you run the following commands from the root of the repo first

rm /Samples/MobileBuyIntegration/MobileBuyIntegration/MobileBuyIntegration.entitlements

Then kick off a build in xcode - you should observe that the build succeeds
Things to note that should be present, the first run you should see something similar to:

Success: Entitlements file generated at MobileBuyIntegration/MobileBuyIntegration.entitlements with domain tiago-santoss-store.myshopify.com
image

Subsequent builds will indicate the fact it doesn't regenerate the file
image


Before you merge

Important


Checklist for releasing a new version
  • I have bumped the version number in the podspec file.
  • I have bumped the version number in the README.
  • I have added a Changelog entry.

Tip

See the Contributing documentation for instructions on how to publish a new version of the library.

@kieran-osgood-shopify kieran-osgood-shopify self-assigned this Nov 27, 2024
@kieran-osgood-shopify kieran-osgood-shopify changed the title refactor: automate entitlements generation during builds Generate entitlements as a build step Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant