Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Scripts/BuildPhases/GenerateCredentials.xcfilelist
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ ${SRCROOT}/Credentials/Secrets-example.swift

# Add the script that uses this file as a source, so that, if the script
# changes, Xcode will run it again on the next build.
${SRCROOT}/../Scripts/BuildPhases/ApplyConfiguration.sh
${SRCROOT}/../Scripts/BuildPhases/GenerateCredentials.sh

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a leftover update that we never noticed. Thanks Claude!

5 changes: 3 additions & 2 deletions Scripts/BuildPhases/LintAppLocalizedStringsUsage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ extension Xcodeproj {
return object.path.map { groupURL.appendingPathComponent($0) } ?? groupURL
case .projectRoot:
return object.path.map { URL(fileURLWithPath: $0, relativeTo: projectDirectory) } ?? projectDirectory
case .buildProductsDir, .devDir, .sdkDir:
case .buildProductsDir, .derivedFileDir, .devDir, .sdkDir:
print("\(self.projectURL.path): warning: Reference \(objectUUID) is relative to \(object.sourceTree.rawValue), which is not supported by the linter")
return nil
}
Expand Down Expand Up @@ -206,6 +206,7 @@ extension Xcodeproj {
case group = "<group>"
case projectRoot = "SOURCE_ROOT"
case buildProductsDir = "BUILT_PRODUCTS_DIR"
case derivedFileDir = "DERIVED_FILE_DIR"
case devDir = "DEVELOPER_DIR"
case sdkDir = "SDKROOT"
var description: String { rawValue }
Expand Down Expand Up @@ -321,7 +322,7 @@ do {
print("Done! \(violationsFound) violation(s) found.")
exit(violationsFound > 0 ? 1 : 0)
} catch let error {
print("\(projectPath): error: Error while parsing the project file \(projectPath): \(error.localizedDescription)")
print("\(projectPath): error: Error while parsing the project file \(projectPath): \(error)")
exit(2)
}

11 changes: 11 additions & 0 deletions WordPress/Generated/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Derived Sources

`DerivedSecrets.swift` is shown in red in Xcode and `Open Quickly` cannot find it.
That is expected: it does not exist in the repository.

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`.
See `Scripts/BuildPhases/GenerateCredentials.sh`.

Each target gets its own copy, so `WordPress`, `Jetpack` and `Reader` cannot overwrite each other's secrets.

Do not delete the red reference. The apps will not compile without it!
Loading