Add the following repository to your Packages:
https://github.com/e-sites/Natrium.git
⚠️ You have to use/Natrium.git
and not/natrium.git
Create .natrium.yml
in the root of your project (in the same folder as the .xcproject and .xcworkspace files).
Check the configuration parameters here.
Create a Pre-Action per scheme which runs the following script:
"${BUILD_DIR%Build/*}/SourcePackages/checkouts/Natrium/Natrium/natrium" Production
The final argument Production
is the actual environment you want to use for that specific scheme.
This way you can create different schemes per environment
Provide build settings from...
selectbox
Build your project (⌘ + B
or ⌘ + R
).
Then open the .natrium
directory from your project root and:
- Add the
Natrium.swift
file to your projects target. - Add all the
Natrium.*.xcconfig
files to your project and do NOT add them to your target(s).
This step can be skipped if you're not using the xcconfig
keys in the .natrium.yml
file
Select the xcconfig files you just added to your project in step 4 in your project settings:
This step is optional
Add the /.natrium
directory to your gitignore
file.
Since the entire contents of that directory will be generated once you run natrium.