Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include ReactiveCocoa 3.0 in Xcode 7 project

Tags:

git

xcode

swift2

I have a swift 2.0 project in xcode 7 beta 5 and want to use ReactiveCocoa 3.0.

I have been able to setup a project for xcode 6.3 and swift 1.2 but can not figure out how to do it for xcode 7 and swift2

There is a swift2 branch but every method I've found just calls in the main branch.

Clear step by step instructions would be really great.

like image 659
Jim T Avatar asked Aug 12 '15 23:08

Jim T


1 Answers

Edit
IMPORTANT: you need carthage 0.8.0 at least!!! And don't forget to choose Xcode 7 build tools via xcode-select


  1. Install carthage via brew install carthage
  2. If homebrew is not installed look at http://brew.sh
  3. Create a file called Cartfile in the directory where your Xcode project file lives
  4. As content of the Cartfile add the following line:
    github "ReactiveCocoa/ReactiveCocoa" "swift2"

  5. Launch Terminal.app. cd into this folder and run:
    carthage update
    This will build .framework files in a Carthage/Build folder

  6. Inside the build folder you will find two frameworks: ReactiveCocoa.framework and Result.framework (inside iOS/OSX/WatchOS folder)
  7. Drag both of these files into the Embedded Binaries section of your Xcode Project file's General tab
  8. Build and run!
like image 141
Fab1n Avatar answered Nov 07 '22 07:11

Fab1n