How to setup CI to add generated code to project

Hello! I’m trying to get my app to build on CI without having to commit my “AppSecrets.swift” file similar to this thread:

I’m using Bitrise “Secrets” to store credentials and app keys then using Sourcery for code gen and build phase run scripts to generate AppSecrets.swift. I got the idea from this thread:

The problem is that I can’t figure out how to automate adding the generated file to the project!

Any help would be appreciated! Thank you!

How do you do it on your own Mac @bbpiepho? Do you add it manually every time after the file is generated?

Hi Viktor,

I figured it out, I just needed to change the order of my build phase scripts. Specifically, moving the code gen script to run before the source code was compiled.

1 Like

Glad to hear you managed to solve it @bbpiepho, and thanks for reporting! :wink:

If you’d have any questions just let us know, any time!
Happy Building! :slight_smile:

This topic was automatically closed after 13 days. New replies are no longer allowed.