Wednesday, October 7, 2026
HomeiOS Developmentios - Xcode Construct script for conditional SPM dependencies

ios – Xcode Construct script for conditional SPM dependencies

[ad_1]

I am migrating a challenge 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 downside:
https://github.com/apple/swift-evolution/blob/important/proposals/0273-swiftpm-conditional-target-dependencies.md

I used to be excited about making a construct part script to manually embody the framework as a goal member primarily based on the environmental variable situation.

Need assistance getting began.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments