How to release your own open source framework to CocoaPods

Updated on technology 2024-03-06
1 answers
  1. Anonymous users2024-02-06

    Create a podspec profile for your own project.

    I'm going to walk you through a project called huphotobrowser.

    After the project is published to GitHub, it needs to be tagged. After that, we initialize a podspec file in the root directory of the project

    pod spec create huphotobrowser

    This command will produce a file in this directory. Open the file with a tool, and there is already a lot of documentation inside. Here's how to declare the ** directory and resource directory of a third-party library, as well as the iOS core framework and third-party libraries that the third-party library depends on.

    Here's my podspec file:

    Once the podspec file is ready, you can save the podspec file to the .The Cocoapods Repos Master Specs directory is for your own use only, or you can submit it to the Cocoapods Specs library. Let's save it to the machine first:

    Also in projects that rely on the HuphotoBrowser library, you can add the following to your project's podfile file.

    pod 'huphotobrowser', '~'

    Save the file and install the HuphotoBrowser library with pod install.

    Creating a pod repository through the steps above is still for your own use, and we will continue to explain how to submit it to the cocoapods specs repository so that others can install our open source repository via pod install.

    Cocoapods Trunk publishes its own pods

    After cocoapods use trunk, cocoapods needs the above version, use pod --version to check the version, if the version is low, it needs to be updated.

    Register a trunk

    pod trunk register 'orta therox' --description='macbook air'

    pod trunk me

    At this point, the whole process of making our own open source library is completed, and in the future, when there is a new version, we only need to modify the podspec file in the root directory of the project, and then re-execute the pod trunk push command.

Related questions
12 answers2024-03-06

Select Compress Sound in the Publish item.

21 answers2024-03-06

What is your education, major? It's good to have ambitions, but you have to be realistic, if you feel that you have a certain specialty, or are very interested in a certain major, and then have a goal to cultivate, don't blindly aspire.

11 answers2024-03-06

Hello, I'm Lan Zhixin, I'm happy to ask you questions.

I think you should look at this problem with a normal heart, the benevolent see the benevolent, the wise see the wise, since you love each other, each other's sincerity is the most important, sincerity for sincerity, love is home, there is a family is happy, a happy and perfect family is the best destination for women, is a safe harbor, men should take on the responsibility of the family, this is not only "responsibility is also an obligation", to give their own women a sense of security, for men, the most important thing is responsibility, more important is responsibility, emotional marriage life is happy or not, Rather, it is that the married life of the two should be based on mutual trust and understanding. As the saying goes, "a hundred years of repair in the same boat, a thousand years to repair the sleep together", feelings need two people to tolerate and understand each otherMarriage requires two people to take care of each other, this may be your "Past Life, Continuation in this Life"! >>>More

16 answers2024-03-06

A little brother at this age would be like this

There's no way to change when people hate you, and I know that even if I can please them, I can't. >>>More

9 answers2024-03-06

There is one called bump, you can understand it, I have been renting it for a long time. >>>More