Updated README for new instructions using #import <OHHTTPStubs/OHHTTPStubs.h> (and removed the "Header Search Path" no longer needed)

This commit is contained in:
Olivier Halligon 2013-01-18 02:19:36 +01:00
Родитель 9ee82dbcb3
Коммит 9a251b280e
2 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -47,6 +47,8 @@
09793598161B62C0006DB5D5 /* OHHTTPStubs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OHHTTPStubs.m; sourceTree = "<group>"; };
09793599161B62C0006DB5D5 /* OHHTTPStubsResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OHHTTPStubsResponse.h; sourceTree = "<group>"; };
0979359A161B62C0006DB5D5 /* OHHTTPStubsResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OHHTTPStubsResponse.m; sourceTree = "<group>"; };
09804E5116A8D98900ADC660 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
09804E5216A8D98900ADC660 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = "<group>"; };
098368CE168FC7920082B1A4 /* UnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
098368CF168FC7920082B1A4 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
098368D6168FC7920082B1A4 /* UnitTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UnitTests-Info.plist"; sourceTree = "<group>"; };
@ -89,6 +91,8 @@
0979356E161B6251006DB5D5 = {
isa = PBXGroup;
children = (
09804E5216A8D98900ADC660 /* README.md */,
09804E5116A8D98900ADC660 /* LICENSE */,
0979357E161B6251006DB5D5 /* OHHTTPStubs */,
098368D4168FC7920082B1A4 /* UnitTests */,
0979357B161B6251006DB5D5 /* Frameworks */,

Просмотреть файл

@ -234,21 +234,20 @@ For a complete Xcode projet, see the `OHHTTPStubsDemo.xcworkspace` project in th
The `OHHTTPStubs` project is provided as a Xcode project that generates a static library, to easily integrate it with your project.
You simply need to add its xcodeproj to your workspace, link your app against the `libOHHTTPStubs.a` library it produced, and fill the "Header Search Path" of your application project correctly.
You simply need to add its xcodeproj to your workspace and link your app against the `libOHHTTPStubs.a` library.
### Detailed integration instructions
1. Add the `OHHTTPStubs.xcodeproj` project to your application workspace, next to your application project
2. Build the library once for the "iOS Device" destination _(if you skipt this, you will likely have the Xcode4 bug described below)_
3. Link `libOHHTTPStubs.a` with your application project:
3. Link `libOHHTTPStubs.a` with your application project. To do this:
* Select your application project in the Project Navigator, then select your target in which you want to use `OHHTTPStubs`
(for example **your Tests target** if you will only use `OHHTTPStubs` in your Unit Tests)
* Go to the "Build Phase" tab and open the "Link Binary With Libraries" phase
* Use the "+" button to add the `libOHHTTPStubs.a` library to the libraries linked with your project
4. Select the `libOHHTTPStubs.a` file reference that has been added to your application projet, and change the "Location" dropdown
(in the "File Inspector" pane) to "Relative to Build Products" if it is not already.
5. Add the relative path to `OHHTTPStubs` headers (something like `"../OHHTTPStubs"` probably) to your "Header Search Path" Build Settings
6. When you need to use `OHHTTPStubs` classes, import the headers as usual, using `#import "OHHTTPStubs.h"`
6. When you need to use `OHHTTPStubs` classes, import the headers using `#import <OHHTTPStubs/OHHTTPStubs.h>`
### Xcode4 Dependencies bug