Skip to content

Commit 45b10e2

Browse files
mokagioclaude
andcommitted
Explain the red DerivedSecrets.swift reference
The reference points into `$(DERIVED_FILE_DIR)`, so Xcode draws it red and `Open Quickly` cannot find it — it reads as a dead reference someone should clean up, and deleting it stops the apps compiling. The `Derived Sources` group is repointed from `Classes` to a new `Generated` directory to give the README somewhere to live. Its `path` was vestigial: the only child overrides it with `sourceTree = DERIVED_FILE_DIR`, so nothing resolved through it, and a README added under the old path would have landed loose in the app's main source directory. --- Generated with the help of Claude Code, https://claude.com/claude-code Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7892741 commit 45b10e2

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

WordPress/Generated/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Derived Sources
2+
3+
`DerivedSecrets.swift` is shown in red in Xcode and `Open Quickly` cannot find it.
4+
That is expected: it does not exist in the repository.
5+
6+
The `Generate Credentials` build phase writes it into the building target's `$(DERIVED_FILE_DIR)` on every build, from the secrets under `~/.configure/wordpress-ios/secrets`, or, failing those, from `WordPress/Credentials/Secrets-example.swift`.
7+
See `Scripts/BuildPhases/GenerateCredentials.sh`.
8+
9+
Each target gets its own copy, so `WordPress`, `Jetpack` and `Reader` cannot overwrite each other's secrets.
10+
11+
Do not delete the red reference. The apps will not compile without it!

WordPress/WordPress.xcodeproj/project.pbxproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@
523523
24350E7C264DB76E009BB2B6 /* Jetpack.debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Jetpack.debug.xcconfig; sourceTree = "<group>"; };
524524
24351059264DC1E2009BB2B6 /* Jetpack.release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Jetpack.release.xcconfig; sourceTree = "<group>"; };
525525
24351253264DCA08009BB2B6 /* DerivedSecrets.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DerivedSecrets.swift; sourceTree = DERIVED_FILE_DIR; };
526+
24AE9EF6264B3D8E00AC7F15 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
526527
2439B1DB264ECBDF00239130 /* Jetpack.alpha.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Jetpack.alpha.xcconfig; sourceTree = "<group>"; };
527528
24AE9E66264B34E500AC7F15 /* Secrets-example.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Secrets-example.swift"; sourceTree = "<group>"; };
528529
24B54FAE2624F8430041B18E /* JetpackRelease-Alpha.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "JetpackRelease-Alpha.entitlements"; sourceTree = "<group>"; };
@@ -1214,10 +1215,11 @@
12141215
24AE9EF5264B3D8E00AC7F15 /* Derived Sources */ = {
12151216
isa = PBXGroup;
12161217
children = (
1218+
24AE9EF6264B3D8E00AC7F15 /* README.md */,
12171219
24351253264DCA08009BB2B6 /* DerivedSecrets.swift */,
12181220
);
12191221
name = "Derived Sources";
1220-
path = Classes;
1222+
path = Generated;
12211223
sourceTree = "<group>";
12221224
};
12231225
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {

0 commit comments

Comments
 (0)