1.ReactiveCocoa 5.0以后将 RAC 拆分为四个库
ReactiveCocoa github四个重要的库序号 | 库 | 适用范围 |
---|---|---|
1 | ReactiveCocoa | 纯Swift项目直接依赖 |
2 | ReactiveObjC | 纯OC项目直接依赖 |
3 | ReactiveSwift | OC和Swift混编时要依赖 |
4 | ReactiveObjCBridge | OC和Swift混编时要依赖 |
2.纯Swift项目直接依赖
podfile如下
platform :ios, '9.0'
project './ractest.xcodeproj'
target 'ractest' do
pod 'ReactiveCocoa'
end
执行pod install后发现安装了两个库ReactiveCocoa
和ReactiveSwift
Analyzing dependencies
Downloading dependencies
Installing ReactiveCocoa (10.1.0)
Installing ReactiveSwift (6.1.0)
Generating Pods project
Integrating client project
3.纯OC项目直接依赖
podfile如下
platform :ios, '9.0'
project './ractest.xcodeproj'
target 'ractest' do
pod 'ReactiveObjC'
end
执行pod install后发现安装了一个库ReactiveObjC
Analyzing dependencies
Downloading dependencies
Installing ReactiveObjC (3.1.1)
Generating Pods project
Integrating client project
3.OC和Swift混编项目
podfile如下
use_frameworks!
platform :ios, '9.0'
project './ractest.xcodeproj'
target 'ractest' do
pod 'ReactiveCocoa'
pod 'ReactiveObjC'
pod 'ReactiveObjCBridge'
end
执行pod install后发现安装了四个库ReactiveCocoa
,ReactiveSwift
,ReactiveObjC
,ReactiveObjCBridge
Analyzing dependencies
Downloading dependencies
Installing ReactiveCocoa (10.1.0)
Installing ReactiveObjCBridge (6.0.0)
Installing ReactiveSwift (6.1.0)
Generating Pods project
Integrating client project
网友评论