Create library with Cocopads

Create library with Cocopads

2019, Feb 14    

Install Cocoapods

https://cocoapods.org/

Create Lib

$ pod spec create Peanut
$ edit Peanut.podspec
$ pod spec lint Peanut.podspec

Folder Struture

Example/Demo
    MyLibDemo
        Mylib.xcodeworkspace
        Podfile
MyLib.xcodeproj
MyLib.podspec
  1. Demo is designed to test or use the Mylib
  2. Demo uses path: “../../” to refer the MyLib project

MyLib.podspec defines all related files