Created
February 7, 2013 02:46
-
-
Save mhaylock/4727993 to your computer and use it in GitHub Desktop.
Revisions
-
mhaylock created this gist
Feb 7, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,60 @@ # Existing project details This document uses a project named "Example" that has an existing target "ExampleApp". This is the target you will host you tests in. # Adding Cedar as a submodule and installed templates into Xcode: ```bash $ mkdir Externals $ git submodule add git://github.com/pivotal/cedar.git Externals/Cedar $ cd Externals/Cedar/; ./installCodeSnippetsAndTemplates; cd -; ``` # Setup Cedar and CocoaPods: Including Cedar from a submodule for access to all the Cedar files, but using CocoaPods to pull it into the project. Set this up by: 1) Add a new target of type "iOS Cedar Testing Bundle": ``` (File > New > Target… > Cedar > iOS Cedar Testing Bundle): Product Name: ExampleSpecs Organization Name: Mark Haylock Company Identifier: com.resolvedigital Bundle Identifier: com.resolvedigital.ExampleSpecs Test Target: AStoryUnfolds Bundle Loader: $(BUILT_PRODUCTS_DIR)/Example.app/Example Other Settings: ✔ Use Automatic Reference Counting Project: Example ``` 2) Edit the scheme for "Example" and add "ExampleSpecs" to the "Test" tab. 3) Install CocoaPods using these commands: ```bash $ gem install cocoapods $ pod setup ``` 4) Add ./Podfile with custom exclusive "test" target to link with "ExampleSpecs": ```ruby platform :ios, '6.0' target :test, :exclusive => true do link_with 'ExampleSpecs' pod 'Cedar', :local => 'Externals/Cedar', :podspec => 'https://raw.github.com/CocoaPods/Specs/master/Cedar/0.9.0/Cedar.podspec' end ``` 5) Run: ```bash $ pod install ``` 6) Removed `OTHER_LDFLAGS` from the build settings for "ExampleSpecs" so that CocoaPods controls this instead. 7) From now on opening generated ./Example.xcworkspace instead of ./Example.xcodeproj so that CocoaPods "Pods" project is included. 8) Add ./Pods folder to .gitignore as CocoaPods can regenerate the contents of the folder (and you don't overwhelm your git history with all those dependency files).