Add Reactivecocoa to your project

Source: Internet
Author: User

This is a supplement to the official tutorials.

To add RAC to your application:

  1. Add the Reactivecocoa repository as a submodule of your application ' s repository.
    1. First you have to have a git to create a git for your project.
    2.   
      $ git submodule add https://github.com/ReactiveCocoa/ReactiveCocoa.git external/ReactiveCocoa$ git add .gitmodules external/ReactiveCocoa$ git commit -m "Add ReactiveCocoa as a submodule"
  2. Run from script/bootstrap within the Reactivecocoa folder.
    1. You need to enter SH here (just type "sh" in the terminal)
    2. CD to the directory where the script is located, type the script file name
  3. Drag and drop into ReactiveCocoaFramework/ReactiveCocoa.xcodeproj your application ' s Xcode project or workspace.
  4. On the ' Build phases ' tab of your application target, add RAC to the ' Link Binary with Libraries ' phase.
    • On IOS, add libReactiveCocoa-iOS.a . (I didn't find this thing, so I added reactivecocoa.framework)
    • On OS X, add ReactiveCocoa.framework . RAC must also is added to any "Copy frameworks" build phase. If you don ' t already has one, simply add a "Copy Files" build phase and target the "frameworks" destination.
  5. Add "$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include" $(inherited) to the ' Header Search Paths ' build setting (this was only necessary for archive builds and it has no negative eff ECT otherwise).
  6. For IOS targets, add to -ObjC the ' other Linker Flags ' build setting.
  7. If you added RAC-to-a project (not a workspace), you'll also need to add the appropriate RAC target to the "Tar Get Dependencies "of your application.

If you would prefer to use CocoaPods, there is some Reactivecocoa podspecs that has been generously contributed by third Parties. (originally thought oneself has cocoapods will be very convenient, got a half-day not fix, had to press the above steps)

To see a project already set up with RAC, check out C-41 or grocerylist, which is real IOS apps written using Reactivecoc Oa.

Add Reactivecocoa to your project

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.