Tuesday, December 6, 2022
HomeiOS Developmentios - Xcode Construct script for conditional SPM dependencies

ios – Xcode Construct script for conditional SPM dependencies


I am migrating a undertaking from Cocoapods to SPM, however I am caught on a problem the place we solely want to make use of sure dependencies in conditional instances.

Cocoapods has a straightforward resolution for this:

if ENV['enabled'].to_i == 1
 pod 'Google'
finish 

So far as I do know, conditional dependencies are solely partially supported in SPM and it is is not sufficient for my drawback:
https://github.com/apple/swift-evolution/blob/fundamental/proposals/0273-swiftpm-conditional-target-dependencies.md

I used to be desirous about making a construct section script to manually embody the framework as a goal member based mostly on the environmental variable situation.

Need assistance getting began.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments