Skip to content

Replace ID gen with Xcode-faithful PBXObjectID format#50

Open
EvanBacon wants to merge 1 commit intomainfrom
evanbacon/xcode-faithful-id-gen
Open

Replace ID gen with Xcode-faithful PBXObjectID format#50
EvanBacon wants to merge 1 commit intomainfrom
evanbacon/xcode-faithful-id-gen

Conversation

@EvanBacon
Copy link
Copy Markdown
Owner

Summary

  • Replaces the old MD5 content-hash uuidForPath() with XcodeIDGenerator that replicates Xcode's actual PBXObjectID algorithm, reverse-engineered from DevToolsCore/DevToolsSupport frameworks
  • IDs now use the real 12-byte structured format: [userHash][pid][counter][timestamp][0x00][random] — matching what Xcode itself produces
  • Exports xcodeUserHash() which replicates Xcode's NSUserName XOR-fold through the 128-byte lookup table from DevToolsSupport's __TEXT,__const segment

Test plan

  • All existing tests pass (90/90 — 24 pre-existing failures from missing optional deps)
  • Verify generated IDs are accepted by Xcode when opening modified projects
  • Verify no ID collisions in large projects with many generated objects

🤖 Generated with Claude Code

…rmat

Replaces the old MD5-based `uuidForPath()` with `XcodeIDGenerator` that
replicates Xcode's actual PBXObjectID algorithm reverse-engineered from
DevToolsCore/DevToolsSupport frameworks. IDs now use the real 12-byte
structured format: [userHash][pid][counter][timestamp][0x00][random].

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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