Add Respresso sync to Xcode build
Before adding a Respresso sync task to your Xcode build, you should configure the sync.
Once you installed the Respresso CLI to your machine and created a proper respresso.json
configuration file,
you can easily execute a sync from your Xcode build.
To add Respresso sync to your build, you need to do the followings:
- Open your main target's settings at Project Navigator/Your workspace's name>/Targets/Your desired target (You can add it to as many targets you want, but ensure you don't run multiple syncs using the same config file.)
- Switch to the
Build Phases
tab and add a new Run Script Phase. - Type
respresso sync
in the Shell command input. You can pass additional options here, like the--only-project <name or token>
or the--no-file-locking
flag if you get a 'too many files open error'. - Make sure to set up the Run script section properly. To run the sync for each build, you need to deselect all the checkboxes, as shown on the screenshot.
- Drag the new Run Script to the top. (Must precede the 'Compile Sources' phase. Xcode won't let you drag it before the Dependencies phase.)
Legacy CLI for iOS
The previous version of the Respresso sync client had an iOS specific version.
We decided to go to a cross-platform direction instead of making multiple sync clients for each platform and implementing the same features multiple times. This is the reason we are deprecating the legacy iOS CLI. This also means, we can unify the sync experience of all platforms. Thanks to this, you won't need to learn and install multiple tools for different platforms.
We won't support the legacy iOS CLI, but you can still use it. You will find its usage instructions and documentation on GitHub.
Keep in mind, that the CLI may fail due to changes on the backend.
E.g.: internal converters contain breaking changes for the legacy iOS CLI.
New features won't be implemented, e.g. named versions will fail to sync using this client.
There might be workarounds to keep it working, but we highly recommend you to transition to the new v2 sync CLI.