target 'jryMobile' do
pod 'AFNetworking', '~> 2.6.3'
pod 'Mantle', '~> 1.5.7'
pod 'DateTools', '~> 1.7.0'
pod 'ReactiveCocoa', '~> 2.3.1'
pod 'CocoaAsyncSocket', '~> 7.4.1'
pod 'FMDB', '~> 2.5'
pod 'MWPhotoBrowser', '~> 1.4.1'
pod 'MZFormSheetController', '~> 2.3.6'
pod 'HMSegmentedControl', '~> 1.5.1'
pod 'UMengAnalytics', '~> 3.5.8'
pod 'UMengFeedback', '~> 2.3.4'
pod 'TSMessagesNW', '~> 0.9.15'
pod 'TPKeyboardAvoiding', '~> 1.2.9'
pod 'SDWebImage', '~> 3.7'
pod 'JHChainableAnimations', '~> 1.3.0'
pod 'BarrageRenderer', '~> 1.7.0'
pod 'MJRefresh', '~> 3.1.7'
pod 'YTXAnimations', '~> 1.2.4', :subspecs => ["AnimateCSS", "Transformer"]
pod 'YTXMediaIJKPlayer', '~> 0.2.1'
pod 'YTXTradeBusinessType', '~> 1.1.0'
pod 'YTXServerId', '~> 0.1.4'
pod 'YTXUtilCategory','~> 1.2.0'
pod 'YTXScreenShotManager', '~> 0.1.7'
pod 'YTXRequest', '~> 1.0.0'
pod 'YTXCommonSocket', '~> 0.1.9'
pod 'YTXChartSocket', '~> 0.5.1'
# 希望是二进制化的
pod 'YTXChart', '~> 0.17.0'
pod 'YTXRestfulModel', '~> 1.2.2', :subspecs => ["RACSupport", "YTXRequestRemoteSync", "FMDBSync", "UserDefaultStorageSync"]
pod 'YTXWebViewJavaScriptBridge', '~> 0.1.2'
pod 'YTXCheckForAppUpdates', '~> 1.0.0'
# pod 'YTXVideoAVPlayer', '~> 0.5.0'
pod 'YTXChatUI', '~> 0.3.2'
pod 'PNChart', '~>0.8.9'
#pod 'EaseMobSDKFull', :git => 'https://github.com/easemob/sdk-ios-cocoapods-integration.git', :tag => '2.2.0'
# EaseMobSDKFull 更新地址'https://github.com/easemob/sdk-ios-cocoapods-integration.git'
#pod 'AFgzipRequestSerializer', '~> 0.0.2'
pod 'AdhocSDK', '~> 2.2.1'
pod 'FLEX', '~> 2.0', :configurations => ['Debug']
pod 'React', :path => './ReactComponent/node_modules/react-native', :subspecs => [
'Core',
'RCTImage',
'RCTNetwork',
'RCTText',
'RCTWebSocket',
# 添加其他你想在工程中使用的依赖。
]
pod 'CodePush', :path => './ReactComponent/node_modules/react-native-code-push'
end
source 'http://gitlab.baidao.com/ios/ytx-pod-specs.git'
source 'https://github.com/CocoaPods/Specs.git'
target 'YTXChart_Example' do
pod "YTXChart", :path => "../"
pod 'ReactiveCocoa', '~> 2.5'
pod 'YTXChartSocket'
pod 'AFNetworking', '~> 2.0'
end
target 'YTXChartBinary' do
end
target 'YTXChart_Tests' do
pod "YTXChart", :path => "../"
pod 'Kiwi'
end
#
# Be sure to run `pod lib lint YTXChart.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 http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = "YTXChart"
s.version = "0.17.7"
s.summary = "YTXChart for pod"
# 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 = "银天下Chart, 依赖AFNetworking"
s.homepage = "http://gitlab.baidao.com/ios/YTXChart.git"
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
s.license = 'MIT'
s.author = { "caojun-mac" => "78612846@qq.com" }
s.source = { :git => "http://gitlab.baidao.com/ios/YTXChart.git", :tag => s.version }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.platform = :ios, '7.0'
s.requires_arc = true
if ENV['IS_SOURCE']
puts '-------------------------------------------------------------------'
puts 'Notice:YTXChart is source now'
puts '-------------------------------------------------------------------'
s.source_files = "Pod/Classes/painter/*.{h,m,mm}", "Pod/Classes/painterview/*.{h,m,mm}", "Pod/Classes/chart/*.{h,m,mm}", "Pod/Classes/core/*.{h,mm}", "Pod/Classes/core/**/*.{h,m,mm,inl}"
else
puts '-------------------------------------------------------------------'
puts 'Notice:YTXChart is binary now'
puts '-------------------------------------------------------------------'
s.source_files = 'Pod/Products/include/**'
s.public_header_files = 'Pod/Products/include/*.h'
s.ios.vendored_libraries = 'Pod/Products/lib/libYTXChart.a'
end
s.libraries = 'sqlite3', 'c++'
s.dependency 'YTXServerId'
s.dependency 'AFNetworking', '~> 2.0'
end
注意这段_if ENV['IS_SOURCE']_。我们的需求是优先使用二进制,偶尔才会切回源码。
删除Example/Pods目录。
执行_IS_SOURCE=1 pod install_。你会看到Example/Pods/YTXChart/里面都是源码
_输出_Notice:YTXChart Now is source
进一步跑起模拟器,因为是源码编译用了很长时间,模拟器起来,一切也是好的再试下_pod cache clean --all && IS_SOURCE=1 pod lib lint_也是好的再试下_pod cache clean --all && pod lib lint_也是好的现在我们通过_if else_简单地实现了本地Example App项目切换源码和二进制。