Open AlexisQapa opened 5 years ago
There’s no built in helpers for this at the moment. I could imagine the carthage script using the new xc file lists that get referenced depending on the configuration. For other types of dependencies not sure. Would require some custom scripts.
How do you achieve this manually in your project?
Well until now I was on Cocoapods which as a flag for this : pod "DBDebugToolkit", :configurations => ['Debug', 'Testing']
You can continue to use Cocoapods as well
This will make using Cocoapods easier https://github.com/yonaskolb/XcodeGen/issues/479
Yeah but we moved to Carthage and are happy with it so now I'm trying to figure out a solution to this.
If you find a good manual solution using carthage, you can post it here and we can see if we can generate it
I did not found a way directly with Carthage thought I don't have an extensive knowledge of it.
I found a solution by weakly linking the framework and in my scheme I use a post build script to remove the framework from the bundle :
if [[ $CONFIGURATION == 'Release' ]] || [[ $CONFIGURATION == 'Profile' ]]; then APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}" rm -Rf "$APP_PATH/Frameworks/DBDebugToolkit.framework" echo "Debug only frameworks ✅ Removed successfully"; fi
As I only had one dependency to remove, I din't bother writing something more flexible. The script could easily support inputs file to select which dependencies to remove. I've been quite busy on other subjects but I intend to file a bug / question on Carthage as I didn't found a clean way to do it for now.
Hi, is there a way to have per configuration dependencies ? we'd like to have some additional / different dependencies for debug etc..