Repository navigation
fix(build): generate GoogleService-Info.plist into the app bundle - #1067
Merged
Merged
Conversation
The Generate Google phase wrote the populated plist over the tracked template in Flipcash/Supporting Files, so every build left that file modified. It now runs after Resources and writes straight to $TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH, and the template is gone. The template has to go rather than stay as a placeholder: the Flipcash folder is a synchronized group, so Resources would copy it to the same bundle path the script now declares as output. The path is also in .gitignore and the target's membership exceptions, so a stale copy left in an existing checkout is neither listed as untracked nor bundled. The pre-commit blocklist now skips deletions, which it rejected along with additions; removing a file cannot leak its contents.
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.
Every build of the Flipcash scheme left
Flipcash/Supporting Files/GoogleService-Info.plistmodified. The Generate Google phase wrote the populated plist fromsecrets.xcconfigover the tracked, empty template.The phase now runs after Resources and writes to
$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/GoogleService-Info.plist, which is also its declared output (script sandboxing needs that). The tracked template is deleted. It can't stay as a placeholder:Flipcash/is a synchronized group, so Resources would copy it to the same bundle path and the build fails with "Multiple commands produce".An existing checkout still has the old file on disk. The path is in
.gitignoreand the Flipcash target's membership exceptions, so that copy isn't listed as untracked and isn't bundled.The pre-commit secret blocklist rejected the template's deletion along with additions. It now passes deletions (
--diff-filter=d); removing a file can't leak its contents.After merging: a checkout with the plist modified will refuse
git pulluntil the change is discarded: