1

I am a developer trying to work in to releasing my first IOS app (Swift 3). So far, I have been using firebase and stripe API's . As I release, I want to create 3 projects. One is a release, (Aka all the live data). The second is test. and the third is development.

My question is, is there a way I can work on a development branch, which is connected to a 'developement' firebase project, and then push to a test branch, which connects with a 'test' firebase project, and then a live branch, connected to a 'live firebase project'?

I know I can do all this by hand, but is there a way with software to just know what branch I am on, and then move all the api keys?

Thank you!

Ryan B.
  • 99
  • 2
  • 14
  • 1
    Have a look at [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) – Jomoos Feb 16 '18 at 04:13
  • Git can definitely handle this, just maintain separate branches for each release. But if you're asking for a full explanation of how to do this, then your question is too broad. – Tim Biegeleisen Feb 16 '18 at 04:21
  • Just read it, Big help. But If I have a configuration to work with each database, i.e. "APIKEYFORDEVELOPEMENT" and "APiKEYFORRELEASE" in my configuration, Is there a way I can have those change with the branches? – Ryan B. Feb 16 '18 at 04:27

1 Answers1

1

But If I have a configuration to work with each database, i.e. "APIKEYFORDEVELOPEMENT" and "APiKEYFORRELEASE" in my configuration, Is there a way I can have those change with the branches?

One possible solution is to generate the right configuration file depending on the branch you have checked out.
For that, version config.dev and config.master, but use only the right one to generate a final config file with the right values.
See an example here.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250