iOS component (i): Create a local private library

Source: Internet
Author: User

1. Create a test project, create a testlib, add the person class

2.git Init

3. Submit your Code

4. Create a project's Podspec file

5. Modify the Podspec file to save
s.name         = "TestLib"s.version      = "0.0.1"s.summary      = "TestLib"s.description  = "TestLib测试"s.homepage     = "http://EXAMPLE/TestLib"s.license      = "MIT"s.source       = { :git => "", :tag => "#{s.version}" }  #本地的git不用填

Note: The content of s.summary must be shorter than the content of S.description
S.homepage Local private library does not need to change, if it is remote, you need to modify

6. Create a Podfile file under the test folder


7. Modify the Podfile file, then pod install

8. Error:


Error reason: The above writing will be found in the remote repository, our testlib is local, of course, cannot find

9. Modify the Podfile file so that it finds it locally

10. Re-pod install, installation successful

Open the project, you can see the testlib in the development Pods (local inventory placement), in the test project #import <Person.h> can be used

11. If the person class has changed, you need to resubmit the code, the CD to the Testlib directory to submit

12. If you create a new file: Create two new files in classes

CD to test directory, pod install

iOS component (i): Create a local private library

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.