Skip to content

Preserve customized Xcode asset catalogs across regeneration - #713

Merged
danoli3 merged 1 commit into
masterfrom
fix/xcode-preserve-assets-xcassets
Nov 19, 2026
Merged

danoli3 merged 1 commit into
masterfrom
fix/xcode-preserve-assets-xcassets

Conversation

@danoli3

@danoli3 danoli3 commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Allow template xcassets to copy and not override custom xcassets when icons are set

Folder-reference assets (Assets.xcassets on macOS, mediaAssets on iOS/
tvOS/visionOS/catOS) were being copied with a bare !exists guard. That
blocked a template bugfix from reaching projects that had never been
touched, and if the guard were loosened to always copy we'd wipe out
every user's own icons and media.

Factor the folder-copy into copyTemplateFolderIfUnchanged and make the
decision three-state:

  CopyFresh    destination missing, copy the template in.
  CopyRefresh  destination exists and is byte-identical to the template
               (relative paths match, each file's bytes match, dotfiles
               ignored) -- refresh in place so template bugfixes reach
               untouched projects.
  KeepCustom   destination differs in any way (file added, removed, or
               edited) -- leave the whole catalog alone, all-or-nothing,
               never merge.

No sentinel files, no mtime checks, no hash manifests -- the compare is
strictly template-on-disk vs project-on-disk at regen time, so the
heuristic stays invisible to users and can't be committed by accident.

Apply the helper to both the macOS Assets.xcassets copy (new) and the
iOS/tvOS/visionOS mediaAssets copy (switched over). The macOS copy
no-ops cleanly when the template ships no Assets.xcassets, so this is
safe to land ahead of the openFrameworks template change.

GUI 0.125.0, CLI 0.130.0.
@danoli3
danoli3 merged commit adaa2a7 into master Nov 19, 2026
11 checks passed
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