QLC Chain and DYXnet signed LOI

QLC Chain and DYXnet signed a letter of intent to build decentralized privacy management infrastructure for enterprise adoption in Hong Kong. QLC Chain has developed Confidant, a decentralized…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Working with CocoaPods Lib Locally

You already have a Lib created and want to install it in other Projects via CocoaPods, but still wants to work locally with both Lib and the other projects.

To do that, you will need to create the Podspec file. This file is where it will contain all the information about your Lib (Version, name, description, dependencies, author etc).

It will only be possible to place this Lib in other projects using CocoaPods if the Podspec file and with all required fields filled in.

There is a command to create your automatic Podsepc with all fields being reported to fill.

Before telling you which command there are extremely important details.

The name of Podsepc should be the same as the project, if not, when trying installed by the pod install on the other libs, it will not be found.

To create Podspec you should be inside the Project folder (your lib)

Note: If you use the git url. You should pay attention to the name of the project there.

Eg.:

After adding all necessary Podspec information you should register a local repository

After you add your repository, you’ll need to push it. It will be necessary to be within the project.

Now your Lib is ready to be used in any other project.

In the other project Podfile just add the following line:

Added the Lib line in Podfile, just run the pod install command and your Lib will be installed.

Thanks!

Add a comment

Related posts:

Groceries

The man is neatly dressed in khaki slacks and a beige polo shirt and stands quietly in line at the supermarket. He glances over the manager’s cubicle to his right, at a calendar on the wall…