Cocoapod Common Commands

Source: Internet
Author: User

# cocoapod Common Commands

# # Introduction

* CocoaPods is a very popular class library management tool for IOS
* As an IOS programmer, mastering CocoaPods's Common terminal commands is essential for basic skills

# # # Integrated Framework Commands

"' Bash
# Create a default Podfile
$ pod Init

# Use the installation framework for the first time
$ pod Install

# Install the framework, do not update the local index, fast, but do not upgrade the local code base
$ pod Install--no-repo-update

# upgrade, add, and delete frames in the future
$ pod Update

# update frame, do not update local index, fast
# You can install new frames or remove unused frames, but do not upgrade the frames that the project has already installed
$ pod Update--no-repo-update

# to see which frames have newer versions, this command is especially important if you are accustomed to using the '--no-repo-update ' parameter.
$ pod Outdated

# Search Framework
#-Space Next page
#-Q exit
#-/Search
$ pod Search afnetworking

# search only the frame of the compound name, which is especially useful for very long search results
$ pod Search afnetworking--simple

# Help
$ pod--help
```

# # # Podfile Format description

"' Bash
# Minimum Supported IOS version
Platform:ios, ' 8.0 '


# Swift projects need to use ' frameworks '
# OC and Swift mixed projects also need to use ' frameworks '
# If you use ' framework ', OC files need to use ' @import xxx; ' format when importing header files
use_frameworks!


# Demoproject installed framework list, Cocoapod 1.0 version must have target
Target ' Demoproject ' do

# ~> The number behind is 3.0.4 version, if omitted, install or upgrade the latest version
Pod ' afnetworking ', ' ~> 3.0.4 '

End


# demoprojecttests List of installed frames
Target ' demoprojecttests ' do

End

# demoprojectuitests List of installed frames
Target ' demoprojectuitests ' do

End
```

# # # Homemade Frame

```
Registration & Activation
Pod trunk register [email protected] "Fan Liu"
Query Pod registration information
$ pod Trunk Me

Generate Spec File
$ pod Spec Create Https://github.com/liufan321/SwiftQRCode.git

Hit label
$ git tag-a 1.0.0-m "tag release 1.0.0"
Push label
$ git push--tags
Editing a spec file
$ vim Swiftqrcode.podspec

Verifying the Spec file
$ pod Spec Lint Swiftqrcode.podspec--verbose
```

For the specific format of ' Podspec ', you can refer to other third-party frameworks to write the format

Cocoapod Common Commands

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.