Quantcast
Viewing latest article 17
Browse Latest Browse All 166

How to use swiftPM manager different framework and core framework in a Multi-Target Xcode project

I have a multi-target Xcode Project where different targets depend on both a Core Framework and their own target-specific SDK Frameworks. How should I handle migrating from CocoaPods to SwiftPM for dependency management in this scenario。
The following is the PodFile format:

def opensource_core_dependencies
    pod 'xxx'
end

def debug_dependencies
  pod 'xxx'
end

def opensource_swift_dependencies
  pod 'xxx'
end

targetArray = ['TargetA', 'TargetB', 'TargetC', 'TargetD']
targetArray.each do |t|
  target t do
    opensource_core_dependencies
    opensource_swift_dependencies
  end
end

targetArray = ['DebugTargetA', 'DebugTargetB']
targetArray.each do |t|
  target t do
    opensource_core_dependencies
    debug_dependencies
  end
end

1 post - 1 participant

Read full topic


Viewing latest article 17
Browse Latest Browse All 166

Trending Articles