From f9e2c0d5529579e636fbcd66060ee95694cadd8a Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 24 Jul 2016 09:13:12 -0700 Subject: [PATCH] Update installation.md --- _docs/installation.md | 101 ++++++++++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 38 deletions(-) diff --git a/_docs/installation.md b/_docs/installation.md index 92d9fa64..35563c5d 100644 --- a/_docs/installation.md +++ b/_docs/installation.md @@ -6,54 +6,79 @@ prevPage: resources.html nextPage: intelligent-preloading.html --- -### CocoaPods +AsyncDisplayKit may be added to your project via CocoaPods or Carthage (standard build). Do not forget to import the framework header -AsyncDisplayKit is available on CocoaPods. Add the following to your Podfile: +``` +#import +``` +or create a Objective-C bridging header (Swift). -
-Ruby +If you have any problems installing AsyncDisplayKit, please contact us on Github or Slack! -
-
-pod 'AsyncDisplayKit'
-	
-
+## CocoaPods + +AsyncDisplayKit is available on CocoaPods. Add the following to your Podfile: + +``` +target 'MyApp' do + pod "AsyncDisplayKit" +end +``` + +Quit Xcode completely before running + +``` +> pod install +``` + +in the project directory in Terminal. + +To update your version of AsyncDisplayKit, run + +``` +> pod update AsyncDisplayKit +``` + +in the project directory in Terminal. + +Don't forget to use the workspace `.xcworkspace` file, _not_ the project `.xcodeproj` file. + +## Carthage (standard build) + +
+The standard way to use Carthage is to have a Cartfile list the dependencies, and then run carthage update to download the dependenices into the Cathage/Checkouts folder and build each of those into frameworks located in the Carthage/Build folder, and finally the developer has to manually integrate in the project.
+AsyncDisplayKit is also available through Carthage. -### Carthage +Add the following to your Cartfile to get the **latest release** branch: -AsyncDisplayKit is also available through Carthage. Add the following to your Cartfile: - -
-Carthage -
-
+```
 github "facebook/AsyncDisplayKit"
-	
-
-
+``` -Run ‘carthage update’ in Terminal and to fetch and build the AsyncDisplayKit library. This will create a folder named Carthage in your app’s root folder. In that folder there will be a ‘Build’ folder from where you have to drag the frameworks you want to use into the “Linked Frameworks and Libraries” section in Xcode. +Or, to get the **master** branch: -### Static Library +``` +github "facebook/AsyncDisplayKit" "master" +``` -AsyncDisplayKit can also be used as a regular static library -
    -
  1. Copy the project to your codebase manually, adding `AsyncDisplayKit.xcodeproj` to your workspace.
  2. -
  3. In "Build Phases", add the AsyncDisplayKit Library to the list of "Target Dependencies".
  4. -
  5. In "Build Phases", add `libAsyncDisplayKit.a`, AssetsLibrary, and Photos to the "Link Binary With Libraries" list.
  6. -
  7. In "Build Settings", include `-lc++ -ObjC` in your project linker flags.
  8. -
+AsyncDisplayKit has its own Cartfile which lists its dependencies, so this is the only line you will need to include in your Cartfile. -###Importing AsyncDisplayKit -Import the framework header, or create an Objective-C bridging header if you're using **Swift**: +Run -
-Objective-C -
-
-#import <AsyncDisplayKit/AsyncDisplayKit.h>
-	
-
-
+``` +> carthage update +``` + +in Terminal. This will fetch dependencies into a `Carthage/Checkouts` folder, then build each one. + +Look for terminal output confirming `AsyncDisplayKit`, `PINRemoteImage (3.0.0-beta.2)` and `PINCache` are all fetched and built. The ASDK framework Cartfile should handle the dependencies correctly. + +In Xcode, on your application targets’ **“General”** settings tab, in the **“Linked Frameworks and Libraries”** section, drag and drop each framework you want to use from the `Carthage/Build` folder on disk. + +## Carthage (light) + +AsyncDisplayKit does not yet support the lighter way of using Carthage, in which you manually add the project files. This is because one of its dependencies, PINCache (a nested dependency of PINRemoteImage) does not yet have a project file. + +Without including PINRemoteImage and PINCache, you will not get AsyncDisplayKit's full image feature set.