Create a Build Phase script that allows Xcode to generate the Secrets.swift file if it isn't present. If the file is already present, no changes should be made to it.
Testing Steps
Removeo the Secrets file and regenerate
Delete any existing Secrets.swift file, then use Xcode to build the Demo app.
[ ] Observe that the Secrets.swift file is recreated
[ ] Look in the build log and confirm that "Run custom shell script 'Generate Secrets.swift' is present under Build target Gravatar-Demo
Modify the Secrets.swift file and verify changes are not overwritten
Leave the existing Secrets.swift in place
Build the Gravatar-Demo app
Use Xcode to build the Demo app.
[ ] Verify that the changes you made to the Secrets.swift file were not overwritten
Build and test via command line
Delete the Secrets.swift file and run make test.
[ ] Observe that the Secrets.swift file is recreated
[ ] Observe that the Gravatar-Demo app builds and that all tests run and pass
Build and test via Xcode
Delete the Secrets.swift file and run unit tests from within Xcode`.
[ ] Observe that the Secrets.swift file is recreated
[ ] Observe that the Gravatar-Demo app builds and that all tests run and pass
Closes #
Description
Create a Build Phase script that allows Xcode to generate the
Secrets.swift
file if it isn't present. If the file is already present, no changes should be made to it.Testing Steps
Removeo the Secrets file and regenerate
Secrets.swift
file, then use Xcode to build the Demo app.Secrets.swift
file is recreatedBuild target Gravatar-Demo
Modify the Secrets.swift file and verify changes are not overwritten
Secrets.swift
in placeBuild and test via command line
Secrets.swift
file and runmake test
.Secrets.swift
file is recreatedBuild and test via Xcode
Secrets.swift
file and run unit tests from within Xcode`.Secrets.swift
file is recreated