https://www.aliyun.com/之前一直看cocoachina,简书,CSDN,发现原来这个叫阿里云的也很牛,好多教程指南
SVN 集成cocoapods
此处主要参考:https://www.aliyun.com/jiaocheng/354045.html
1.sudo gem install cocoapods-repo-svn
2.pod repo-svn add MyRepoA http://vip2.svnspot.com/215206318.TestPrivateRepo/MyRepoA
这一步提示连接失败,需要使用svn命令输入密码,比如svn检出代码命令(参考http://code.svnspot.com/215206318/TestPrivateRepo)
3.pod repo
4.pod lib create MyCodeA
5.pod repo-svn push MyRepoA CRGoodsDetail.podspec
pod lib lint MyCodeA.podspec
pod spec lint --sources='http://vip2.svnspot.com/215206318.TestPrivateRepo/MyRepoA'
有依赖关系的库使用pod repo-svn lint MyRepoA
pod install --verbose --no-repo-update
或者
pod update --verbose --no-repo-update
———————————————————————————————————
https://192.168.70.249/svn/MDLeTalk/code/ios/LeTalkRepo
https://192.168.70.249/svn/MDLeTalk/code/ios/LeTalkModules
pod repo-svn add LeTalkRepo https://192.168.70.249/svn/MDLeTalk/code/ios/LeTalkRepo
pod lib lint CKLib.podspec
pod repo-svn push LeTalkRepo CKLib.podspec
pod spec lint --sources='https://192.168.70.249/svn/MDLeTalk/code/ios/LeTalkRepo'
.podspec文件内容
#
# Be sure to run `pod lib lint MyTestCode.podspec' to ensure this is a# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'MyTestCode'
s.version = '0.1.0'
s.summary = 'A short description of MyTestCode.'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
TODO: Add long description of the pod here.
DESC
s.homepage = ''
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { '' ' }
s.source = { :svn => 'http://vip2.svnspot.com/william123.MyTestRepo/MyTestCode', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '8.0'
s.source_files = 'MyTestCode/Classes/**/*'
# s.resource_bundles = {
# 'MyTestCode' => ['MyTestCode/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
end
s.source = { :svn => 'http://vip2.svnspot.com/william123.MyTestRepo/MyTestCode', :tag => s.version.to_s }
s.source_files = 'MyTestCode/Classes/**/*'
这是查询的具体路径,已经要保证路径的正确性,便于导入库正确,SVNtag要正确,且保证有classes文件,可以生成的lib工程直接拖入目录中
期间出现错误
CocoaPod [!] Unable to find a pod with name, author, summary, or description matching `AFNetworking`
使用rm ~/Library/Caches/CocoaPods/search_index.json解决
查找文档:https://blog.csdn.net/win_mary/article/details/75097593platform:ios, '8.0'
pod file
target 'TessOC' do
plugin 'cocoapods-repo-svn', :sources => [
'http://vip2.svnspot.com/215206318.TestPrivateRepo/MyRepoA'
]
use_frameworks!
pod 'MyCodeA'
end