Permalink
Browse files

Updated read me to reflect that DTFoundation is now a dependency as g…

…it submodule
  • Loading branch information...
odrobnik committed Sep 22, 2012
1 parent bddb9a9 commit 6d6085cf8d0a6df5aa2eb8fdaea8ab2c74423afd
Showing with 23 additions and 17 deletions.
  1. +23 −17 Readme.markdown
View
@@ -34,8 +34,8 @@ Documentation
Documentation can be [browsed online](http://cocoanetics.github.com/DTCoreText) or installed in your Xcode Organizer via the [Atom Feed URL](http://cocoanetics.github.com/DTCoreText/DTCoreText.atom).
-Usage
------
+Requirements
+------------
DTCoreText needs a minimum iOS deployment target of iOS 4.2 because of:
@@ -44,27 +44,39 @@ DTCoreText needs a minimum iOS deployment target of iOS 4.2 because of:
- Blocks
- ARC
-The best way to use DTCoreText with Xcode 4.2 is to add it in Xcode as a subproject of your project with the following steps.
+DTCoreText is designed to be included as static library from a subproject, it embeds several classes from the DTFoundation project. If you want to use DTFoundation as well in your project you need to use the "Static Library (no DTFoundation)" target to avoid duplicate symbols.
+
+Setup
+-----
+
+The best way to use DTCoreText is to add it in Xcode as a subproject of your project with the following steps.
+
+1. Clone DTCoreText into a subfolder of your project folder or make it a git submodule
-1. Download DTCoreText as a subfolder of your project folder
-2. Open the destination project and drag `DTCoreText.xcodeproj` as a subordinate item in the Project Navigator
-3. In your prefix.pch file add:
+ git clone https://github.com/Cocoanetics/DTCoreText.git Externals/DTCoreText
+
+2. DTCoreText uses DTHTMLParser and DTVersion from DTFoundation which is set up as a git submodule too in Core/Externals/DTFoundation, so you need to get these files as well
+
+ git submodule update --init --recursive
+
+3. Open the destination project and drag `DTCoreText.xcodeproj` as a subordinate item in the Project Navigator
+4. In your prefix.pch file add:
#import "DTCoreText.h"
-4. In your application target's Build Phases add the "Static Library" from the DTCoreText sub-project as a dependency.
+5. In your application target's Build Phases add the "Static Library" from the DTCoreText sub-project as a dependency.
-5. In your application target's Build Phases add all of the below to the Link Binary With Libraries phase (you can also do this from the Target's Summary view in the Linked Frameworks and Libraries):
+6. In your application target's Build Phases add all of the below to the Link Binary With Libraries phase (you can also do this from the Target's Summary view in the Linked Frameworks and Libraries):
The "Static Library" target from the DTCoreText sub-project
ImageIO.framework
QuartzCore.framework
libxml2.dylib
CoreText.framework (DOH!)
-6. Go to File: Project Settings… and change the derived data location to project-relative.
-7. Add the DerivedData folder to your git ignore.
-8. In your application's target Build Settings:
+7. Go to File: Project Settings… and change the derived data location to project-relative.
+8. Add the DerivedData folder to your git ignore.
+9. In your application's target Build Settings:
- Set the "User Header Search Paths" to the directory containing your project with recrusive set to YES.
- Set the Header Search Paths to /usr/include/libxml2.
- Set "Always Search User Paths" to YES.
@@ -78,12 +90,6 @@ LINKER SETTINGS:
- if you find that your app crashes with an unrecognized selector from one of this library's categories, you might also need the -all_load linker flag. Alternatively you can use -force-load with the full path to the static library. This causes the linker to load all categories from the static library.
- If your app does not use ARC yet (but DTCoreText does) then you also need the -fobjc-arc linker flag.
-*Other Options (only mentioned for completeness)*
-
-- Copy all classes and headers from the Core/Source folder to your project. Note for this you need to also generate and include the xxd'ed version of default.css.
-- Link your project against the libDTCoreText static library that you previously compiled. Note that the "Static Library" target does not produce a universal library. You will also need to add all header files contained in the Core/Source folder to your project.
-- Link your project against the universal static library produced from the "Static Framework".
-
Known Issues
------------

0 comments on commit 6d6085c

Please sign in to comment.