How to structure a Xcode project with Frameworks, Extensions and CocoaPods

后端 未结 2 1123
野性不改
野性不改 2021-01-31 02:04

NB: Here is a more abstract and simplified sub-set of this question.

With the addition of Touch Frameworks, Extensions and the Apple Watch Xcode 6 projects and

2条回答
  •  别那么骄傲
    2021-01-31 02:42

    I really think that you can use Cocoapods to create your workspace in this case, because it really helps you out, and you can add the components you want to each one of your own frameworks.

    source 'https://github.com/CocoaPods/Specs.git'
    platform :ios, '8.0'
    use_frameworks!
    
    workspace ‘Project.xcworkspace'
    
    target 'Project.Models’ do
    xcodeproj ‘Project/Models.xcodeproj’
    pod 'Alamofire', '~> 2.0'
    pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
    
    end
    
    target 'Project.Business' do
    xcodeproj ‘ Project/Project.Business.xcodeproj’
    
    pod 'Alamofire', '~> 2.0'
    pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
    
    end
    

    For example here is one example in how I manage to handle multiple Frameworks with multiple dependencies and resolve it into one main workspace that has all the dependencies for 3rd party libraries for each one of my projects

    Hope this gives you a Hint or help you to resolve something.

提交回复
热议问题