feat(targets): write generated.entitlements to ios/ instead of source#192
Open
lars-deploy-bot wants to merge 1 commit intoEvanBacon:mainfrom
Conversation
When the user defines `entitlements` in `expo-target.config`, the `generated.entitlements` file is now written to `ios/<productName>/generated.entitlements` instead of the target's source directory. `CODE_SIGN_ENTITLEMENTS` is pointed at the new location inside `configureTargetWithEntitlements`, which prefers the generated file under `ios/` and falls back to a hand-written `*.entitlements` file in the source target directory if no generated one exists. Result: targets that drive entitlements from the config no longer leave a derived artifact in the git-tracked source folder. Existing flows that hand-write a `*.entitlements` file (without using the config field) continue to work unchanged. If both a hand-written file and a config `entitlements` block are present, the config wins and the source file is left untouched (with a log line) instead of being overwritten as before. README updated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
I thought this would be nicer. I use env variables in my config file so the entitlements file kept changing in the tracked git commits. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the
entitlementsfield is set in anexpo-target.config, thegenerated.entitlementsfile is now written toios/<productName>/generated.entitlements(the prebuild output) instead of the target's source directory.CODE_SIGN_ENTITLEMENTSis pointed at that location insideconfigureTargetWithEntitlements.This keeps the target's source folder free of derived artifacts that previously needed to be either committed or
.gitignore-d. The same approach was applied toInfo.plistin #189.Behavior matrix
entitlements*.entitlementsin sourceios/<productName>/generated.entitlements, source dir untouchedios/<productName>/generated.entitlements. Source file is now left untouched (previously it was overwritten) — log line tells the user it's safe to deleteCODE_SIGN_ENTITLEMENTSremoved (unchanged)configureTargetWithEntitlementschecks forios/<productName>/generated.entitlementsfirst and falls back to globbing the source target directory, so the hand-written-only flow still works.Files
ios/folder; log instead of overwriting any hand-written fileTest plan
🤖 Generated with Claude Code