Load Calabash dylibs in Debug configuration at runtime #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This PR demonstrates how to load the Calabash dylibs into your app at runtime.
The Calabash dylibs are added to the app bundle using a Run Script Build Phase. The dylibs are only installed for builds using the
Debug
and the code that loads the dylibs will only be compiled in when theLOAD_CALABASH_DYLIB
pre-processor macro is defined. This means your production app will not contain any Calabash related code.This is an alternative to creating a separate -cal target and linking it with the calabash.framework.
Works on the XTC.
Try it out.
Updating to the latest Calabash version.
Implementing this in your own project.
1. Add the dylibs to your project.
2. Add a Run Script Build Phase in Xcode
3. Create the Install Script
Create the script in your favorite editor.
4. Add
LOAD_CALABASH_DYLIB
Preprocessor Macro5. Add Dylib Loading Code to the App Delegate.