diff --git a/README.md b/README.md index 9839cb4..9c0b1fb 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Snap +[![Build Status](https://travis-ci.org/Masonry/Snap.svg)](https://travis-ci.org/Masonry/Snap) + Snap is a light-weight layout framework which wraps AutoLayout with a nicer syntax. Snap has its own layout DSL which provides a chainable way of describing your NSLayoutConstraints which results in layout code that is more concise and readable. Snap supports both iOS and OS X. > Snap uses some Swift-only features like function overloading, so it cannot be used from Objective-C. Because of this we’ve chosen to swap prefixes from Masonry’s `mas_` to `snp_` so you can use both Masonry and Snap in the same project. @@ -9,19 +11,71 @@ Snap is a light-weight layout framework which wraps AutoLayout with a nicer synt * iOS 7.0+ / Mac OS X 10.9+ * Xcode 6.1 -## Installation Cocoapods +## Installation -1. Add Snap as a line in your Podfile `pod 'Snap'` -2. Run `pod install` -3. Add `import Snap` to your `AppDelegate.swift` +> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks.** -Cocoapods installations only work for iOS 8.0 and OS X 10.10 or higher deployment targets. +### CocoaPods -## Installation Carthage +[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. -Carthage is supported by adding `github 'Masonry/Snap'` to your Cartfile. +CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command: -Carthage installations only work for iOS 8.0 and OS X 10.10 or higher deployment targets. +```bash +$ gem install cocoapods +``` + +To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: + +```ruby +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '8.0' +use_frameworks! + +pod 'Snap', '~> 0.9.1' +``` + +Then, run the following command: + +```bash +$ pod install +``` + +### Carthage + +Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application. + +You can install Carthage with [Homebrew](http://brew.sh/) using the following command: + +```bash +$ brew update +$ brew install carthage +``` + +To integrate Snap into your Xcode project using Carthage, specify it in your `Cartfile`: + +```ogdl +github "Masonry/Snap" >= 0.9.1 +``` + +### Manually + +If you prefer not to use either of the aforementioned dependency managers, you can integrate Snap into your project manually. + +### Embedded Framework + +- Add Snap as a [submodule](http://git-scm.com/docs/git-submodule) by opening the Terminal, `cd`-ing into your top-level project directory, and entering the following command: + +```bash +$ git submodule add https://github.com/Masonry/Snap.git +``` + +- Open the `Snap` folder, and drag `Snap.xcodeproj` into the file navigator of your app project. +- In Xcode, navigate to the target configuration window by clicking on the blue project icon, and selecting the application target under the "Targets" heading in the sidebar. +- Ensure that the deployment target of Snap.framework matches that of the application target. +- In the tab bar at the top of that window, open the "Build Phases" panel. +- Expand the "Target Dependencies" group, and add `Snap.framework`. +- Click on the `+` button at the top left of the panel and select "New Copy Files Phase". Rename this new phase to "Copy Frameworks", set the "Destination" to "Frameworks", and add `Snap.framework`. ## What's wrong with NSLayoutConstraints? diff --git a/Snap.podspec b/Snap.podspec index 5359ed8..0141d8b 100644 --- a/Snap.podspec +++ b/Snap.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = 'Snap' - s.version = '0.9.0' + s.version = '0.9.1' s.license = 'MIT' s.summary = 'Harness the power of auto layout with a simplified, chainable, and compile time safe syntax.' s.homepage = 'https://github.com/Masonry/Snap' s.authors = { 'Robert Payne' => 'robertpayne@me.com' } s.social_media_url = 'http://twitter.com/robertjpayne' - s.source = { :git => 'https://github.com/Masonry/Snap.git', :tag => '0.9.0' } + s.source = { :git => 'https://github.com/Masonry/Snap.git', :tag => '0.9.1' } s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.9'