How to set up the pods of the multi-engineering binder

Source: Internet
Author: User

How to set up the pods of the multi-engineering binder(2014-07-17 13:57:10) reproduced
Tags: united Multi-Project Category: iOS development
Today, Cocoapods is used more and more, and almost every project will be used. Sometimes our project may be composed of several modules, each module can be used as a separate project, and then all the works are for the main project use, this is the multi-engineering, how to use the pods podfile to achieve this function, the following will provide you with this case Podfile writing:

Workspace ' Myworkspace '

Xcodeproj ' Myapp/myapp.xcodeproj '
Xcodeproj ' Mysdk1/mysdk1.xcodeproj '
Xcodeproj ' Mysdk2/mysdk2.xcodeproj '

Target:myapp do
Platform:ios, ' 6.0 '
Pod ' afnetworking ', ' ~> 2.1.0 '
Pod ' sdwebimage ', ' ~> 3.4 '
Pod ' flurrysdk ', ' ~> 5.0.0 '
Xcodeproj ' Myapp/myapp.xcodeproj '
End

Target:mysdk1 do
Platform:ios, ' 6.0 '
Pod ' afnetworking ', ' ~> 2.1.0 '
Pod ' sdwebimage ', ' ~> 3.4 '
Pod ' flurrysdk ', ' ~> 5.0.0 '
Xcodeproj ' Mysdk1/mysdk1.xcodeproj '
End

TARGET:MYSDK2 do
Platform:ios, ' 6.0 '
Pod ' afnetworking ', ' ~> 2.1.0 '
Pod ' sdwebimage ', ' ~> 3.4 '
Xcodeproj ' Mysdk2/mysdk2.xcodeproj '
End

1. Specify the workspace file name
2. Declare the relative path of the project files that need to be included in all projects
3. Specify which target in the project needs to use the PODS function. A project may have multiple target, not all target requires pods third-party libraries, so choose as needed.
4. Specify iOS version, need to import third-party library (there are many ways to write here, not detailed here, you can go here to see, more detailed:http://guides.cocoapods.org/syntax/podfile.html#xcodeproj)


The premise is that in a directory, the need to build the project, and then in each project peer directory built podfile, finally into the Podfile directory, execute pod install, pods will help us generate Myworkspace file, Open the Myworkspace file with Xcode, all the projects have been imported, set up the reference relationship between the projects, you can start to develop.

Directory structure:
MyApp
Myworkspace.xcworkspace
MyApp
MySDK1
MySDK2
Pods
Podfile
Podfile.lock

How to set up the pods of the multi-engineering binder

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.