mirror of
https://github.com/zhigang1992/CocoaPods.git
synced 2026-04-30 10:22:26 +08:00
Add examples on how to install a library from a spec repo, upstream repo, :podspec, and inline spec.
This commit is contained in:
@@ -1,4 +1,34 @@
|
||||
platform :ios
|
||||
|
||||
dependency 'SSToolkit'
|
||||
dependency 'AFNetworking'
|
||||
|
||||
# From a spec repo
|
||||
#dependency 'SSToolkit'
|
||||
|
||||
# Directly from the Pod’s repo
|
||||
#dependency 'SSToolkit', :git => 'https://github.com/samsoffes/sstoolkit.git'
|
||||
|
||||
# Directly from the Pod’s repo with a specific commit (or tag)
|
||||
#dependency 'SSToolkit', :git => 'https://github.com/samsoffes/sstoolkit.git',
|
||||
# :commit => '2adcd0f81740d6b0cd4589af98790eee3bd1ae7b'
|
||||
|
||||
# From a podspec that's outside a spec repo and the library’s repo
|
||||
#dependency 'SSToolkit', :podspec => 'https://raw.github.com/gist/1353347/ef1800da9c5f5d267a642b8d3950b41174f2a6d7/SSToolkit-0.1.1.podspec'
|
||||
|
||||
# If no podspec is available anywhere, you can define one right in your Podfile
|
||||
dependency do |s|
|
||||
s.name = 'SSToolkit'
|
||||
s.version = '0.1.3'
|
||||
s.platform = :ios
|
||||
s.source = { :git => 'https://github.com/samsoffes/sstoolkit.git', :commit => '2adcd0f81740d6b0cd4589af98790eee3bd1ae7b' }
|
||||
s.resources = 'Resources'
|
||||
s.source_files = 'SSToolkit/**/*.{h,m}'
|
||||
s.frameworks = 'QuartzCore', 'CoreGraphics'
|
||||
|
||||
def s.post_install(target)
|
||||
prefix_header = config.project_pods_root + target.prefix_header_filename
|
||||
prefix_header.open('a') do |file|
|
||||
file.puts(%{#ifdef __OBJC__\n#import "SSToolkitDefines.h"\n#endif})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user