发布于 2013-02-09 05:44:02
这并不是很难做到。看看其他一些podspecs,看看它是如何工作的。
https://github.com/CocoaPods/Specs
还有一种格式的文档:https://github.com/CocoaPods/CocoaPods/wiki/The-podspec-format
同样,一旦你让它工作,你可以提交你的podspec,这样每个人都可以使用它。主页http://cocoapods.org/上提供了有关如何执行此操作的信息
发布于 2014-02-22 18:14:12
当然,很多人都这样做过。这就是实现这一点的方法:
Pod::Spec.new do |s|
s.name = 'MyPod'
s.version = '1.0'
s.authors = {'Your Name Here' => 'you@example.com'}
s.homepage = 'http://www.example.com'
s.summary = 'My pod is awesome'
s.source = {:git => 'https://git.example.com/MyPodRepo', :revision => '1e16eee5c4e2'}
s.platform = :ios
s.source_files = 'MyPodSubdir/**/*.{h,m}'
s.frameworks = 'QuartzCore'
s.ios.preserve_paths = 'MyPodSubdir/Externals/*.framework'
s.ios.vendored_frameworks = 'MyPodSubdir/Externals/CrashReporter.framework'
s.ios.resource = 'MyPodSubdir/Externals/CrashReporter.framework'
s.ios.xcconfig = { 'LD_RUNPATH_SEARCH_PATHS' => '"$(PODS_ROOT)/MyPod/MyPodSubdir/Externals"' }
endpod规范中的最后4行允许您拥有一个使用PLCrashReporter的pod。
在此blog entry中找到有关PLCrashReporter和CocoaPods的信息。
https://stackoverflow.com/questions/14781418
复制相似问题