Closed marcusleon closed 7 years ago
Hi Marcus :) does this post help at all? http://www.theappbusiness.com/blog/a-robust-multi-environment-build-setup
It's a great article it's what originally sold me on the idea. What I'm not clear on is how you set up the build step to invoke the script. Haven't seen this documented anywhere. It's probably simple - I'm new to Xcode.
Hey Marcus. Yeah we need to update the readme so we'll get that done soon!
To integrate it into Xcode, you need to set up an external build system by using File > New > Target > Other > External build system. In the build tool, call configen and add your parameters in the arguments box, e.g: Build tool: ./configen arguments: dev-config.plist Config.map Config Config
The configen tool needs to exist in the same folder as your Xcode project and you also need the output directory to exist.
In your schemes you can now add the build system to the targets list under 'Build'. Make sure 'parallelize builds' is disabled so you can run the relevant target first (e.g. test, dev, prod) to update the config file before your main app target runs.
Any problems let us know! You can find an example here - https://github.com/deanbrindley87/configen
Thanks and enjoy 👍
Thanks for the info. Can you consider adding this to Cocoapods, and instructions to the Readme?
R.swift, for example, has a similar structure and installation process: https://github.com/mac-cain13/R.swift
the README has now been updated with a lot more information, that should hopefully explain how to get up and running with this tool. if anyone thinks something is missing, please open a new issue to explain the specifics. thanks!
@jtbthethird i'll open a new issue for adding to CocoaPods and we can consider it. it wasn't originally considered because CocoaPods is typically used for frameworks/libraries that provide functionality that you use for development. This on the other hand is a code generation build tool.
Thanks for this script it sounds great. Are you able to provide more details on how to install the script in your project and configure the scheme external build script invocation? I'm not able to follow how to get this configured.