1.Xcode新建空白項(xiàng)目
1-ReactiveCocoaEmptyBlank.jpg
2.Terminal進(jìn)入項(xiàng)目根目錄
cd /Users/zhaoyingxin/Documents/solozyx/CocoaPods/ReactiveCocoaEmptyProject
執(zhí)行 pod init 命令
pod init
就在目錄 ReactiveCocoaEmptyProject
下生產(chǎn)了 Podfile
文件
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'ReactiveCocoaEmptyProject' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for ReactiveCocoaEmptyProject
target 'ReactiveCocoaEmptyProjectTests' do
inherit! :search_paths
# Pods for testing
end
target 'ReactiveCocoaEmptyProjectUITests' do
inherit! :search_paths
# Pods for testing
end
end
2-使用 pod init 生成的Podfile文件.jpg
修改 Podfile
文件內(nèi)容為
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'ReactiveCocoaEmptyProject' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for ReactiveCocoaEmptyProject
# target 'ReactiveCocoaEmptyProjectTests' do
# inherit! :search_paths
# Pods for testing
# end
# target 'ReactiveCocoaEmptyProjectUITests' do
# inherit! :search_paths
# Pods for testing
# end
pod 'ReactiveCocoa', '~>4.2.1'
end
3.導(dǎo)入RAC框架
pod install
3-成功導(dǎo)入RAC4.2.1框架.jpg
4-導(dǎo)入RAC后的項(xiàng)目結(jié)構(gòu).jpg
5-導(dǎo)入RAC頭文件項(xiàng)目編譯成功.jpg