Experiment with ReactiveCocoa in a Playground, fer learnin'
There are lots of helpful docs over in the Reactive Cocoa repo, but sometimes that's not enough. Sometimes you wanna experiment in a playground! That's where this tool comes in.
- Clone the repo, and run
pod install
in the root directory to have Cocoapods install ReactiveCocoa. - Pop open the
.xcworkspace
file here, and check out the playgrounds.
Add a new playground file to the Xcode project (let's call it "Cool New Playground"). Then, open the file Podfile
and add the playground name, like so:
platform :ios, '9.0'
use_frameworks!
link_with 'ReactiveCocoa Playground', 'Hello World', 'Flatten Latest', 'Cool New Playground'
pod 'ReactiveCocoa', '~> 4.0'
Then, just run pod update
, and you'll be all set!
Make sure to import all these goodies in your playground; you'll probably want 'em:
import UIKit
import XCPlayground
import ReactiveCocoa
import enum Result.NoError
Little Bites of Cocoa | #138: Using CocoaPods in Xcode Playgrounds