CocoaPod 私有库Spec编辑注意事项
CocoaPod 私有库Spec依赖.a写法
PodSpec详细描述如下,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
| Pod::Spec.new do |s|
s.name = 'AudioRecorder' s.version = '0.1.0' s.summary = 'AudioRecorder提供iOS录音和录音播放功能'
s.description = <<-DESC AudioRecorder提供iOS录音和录音播放功能 DESC s.homepage = 'https://github.com/xxx' s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = { 'MorganWang' => 'xxx@163.com' }
s.ios.deployment_target = "10.0"
s.source = { :git => 'xxx.git', :tag => s.version.to_s }
s.source_files = 'AudioRecorder/Classes/**/*' s.vendored_libraries = 'AudioRecorder/Classes/lame/*.a'
s.frameworks = 'UIKit', 'Foundation', 'AVFoundation' s.dependency 'Masonry', '~> 1.1.0' end
|
库校验
1 2 3
| pod lib lint --allow-warnings
|
使用
使用tag或者使用分支,通常使用tag,因为tag代表功能的完整性。如果使用分支,随后在分支上继续开发,然后再次update依赖时,可能会出现新开发的内容未验证就被更新了或者不兼容的情况
1 2 3 4
| pod 'xxx',:git=>'xxx.git',:tag=>'0.7.0' pod 'yyy',:git =>'yyy.git',:branch=> 'develop'
|