The original address

This is my finishing the development of common Category can making connections with pod search TTCategory: https://github.com/yangyangFeng/TTCategory.git If you have any new categories that you can use, you can send them to me and I’ll keep updating them.

Create a github repository. 1 Go to github website www.github.com and log in to your account. 2 Create a new repository

3 Enter the warehouse information

Fill in warehouse information

sudo gem install cocoapods
Copy the code

After the update, we start registering the trunk:

Pod Trunk register [email protected] 'fengyangyang' --verbose Enter your email and set your nickname. You will then be sent a verification email.Copy the code

Please register your email address and user name. Username I used the username on Github. –verbose is used to output debugging information during registration. After executing the above statement, you will receive an email with a verification link, if not please check the trash, it may be blocked. Clicking on the link in the message completes the trunk registration process. To query your registration information from the trunk server, run the following command:

pod trunk me
Copy the code

If you output the following information, you will be registered successfully. You can proceed with the following process:

Add a podSpec description file to your code;

$ pod lib lint
Copy the code

Configure the PodSpec description file

This step is exactly the same as before replacing the Trunk mode. What is a PodSpec description file? CocoaPods is a file that lets the CocoaPods search engine know the author of your code, version number, source code address, dependency libraries, etc. Any open source code that supports CocoaPods must have podSpec files. CocoaPods uses a single repo on Github to manage all the open source code supporting CocoaPods: github.com/CocoaPods/S… . Podspec files are simple, but not easy to make for the first time. I recommend taking a look at cat claw blog click open link blog is very detailed, here also want to thank cat claw, for me to answer the problem. Once the PodSpec is set up, we need to verify that the podSpec passes the validation

$ pod lib lint
Copy the code

If all is well, the following output appears after this command is executed:

-> Your library name (1.0.0)Copy the code

Your library name is passed Validation.

At this point, POD validation is complete. If any warning or error message is printed during the POD verification command, the verification will fail. If the verification is abnormal, the printed information will be very detailed, you can make modifications according to the corresponding prompts. Git repository github repository run the following commands:

$git tag '1.0.0' $git push --tags $git push origin masterCopy the code

Now, if your PodSpec is verified, the code is pushed to Github and tagged, you are ready for the final step. Push the podSpec file through the trunk to the CocoaPods server (PS: if this part fails, you need to correct the error and repeat steps 5~8)

$pod Trunk push./ file name. Podspec If you don't get any errors or warnings next, congratulations! Your code is already uploaded to Cocoapod.Copy the code