Record the configuration of CocoaPods podfile file
- Specify Source
By default, sources specified at the global level will be searched in the order specified by dependency matches.
For specific dependencies, you can specify the dependency source separately:
pod 'PonyDebugger', :source => 'https://github.com/CocoaPods/Specs.git'
- Use Subspecs
When installing a Pod by its name, it will install all the defaults defined in thepodspec
filesubspecs
.
You can import specificsubspec
using the following method:
pod 'QueryKit/Attribute'
or
pod 'QueryKit', :subspecs => ['Attribute', 'QuerySet']
- Use local private libraries (local libraries created by yourself)
pod 'AFNetworking', :path => '~/Documents/AFNetworking'
Note that in the local private library,podspec
files must be in this folder.
- Make a branch or commit
Specify the source, the default is the master branch
pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git'
Specify other branches
pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :branch => 'dev'
Use tag
pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :tag => '0.7.0'
special commit
pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :commit => '082f8319af'
podspec
The file should be located in the root directory where cocopods is stored in the repository. If there is no podspec
file in the repository for this library, it can be obtained from other sources:
pod 'JSONKit', :podspec => 'https://example.com/JSONKit.podspec'