More docs updates!

This commit is contained in:
Robert Payne 2015-09-22 19:54:45 +12:00
parent 82f79f6c1b
commit f4002d3d41
3 changed files with 22 additions and 2 deletions

View File

@ -9,7 +9,7 @@ id: docs
* Swift 2.0
* Xcode 7.0+
> While SnapKit supports iOS 7.0, frameworks are not supported for iOS 7.0 so you must manually embed the framework for non app store apps or integrate the source files directly. Please see the [Legacy Platforms](https://github.com/SnapKit/SnapKit/blob/develop/LEGACY_PLATFORMS.md) readme.
> While SnapKit supports iOS 7.0 and OS X 10.9 these are considered legacy platforms, so you must manually integrate the source files directly. Please see the [Legacy Platforms](/legacy-platforms) documentation for more information and steps.
## Installing

2
faq.md
View File

@ -7,7 +7,7 @@ permalink: /faq/
#### CocoaPods won't let me install SnapKit into my iOS 7.0 project?
SnapKit doesn't use any iOS 8.0 specific APIs, but since Xcode does not support integrating Swift code without dynamic frameworks it cannot be integrated via a framework for iOS 7.0 deployments. You should instead embed the source code directly into your application.
SnapKit doesn't use any iOS 8.0 specific APIs, but since Xcode does not support integrating Swift code without dynamic frameworks it cannot be integrated via a framework for iOS 7.0 deployments. You should instead embed the source code directly into your application. See the [Legacy Platforms](/legacy-platforms) documentation.
#### Do you have any examples?

20
legacy-platforms.md Normal file
View File

@ -0,0 +1,20 @@
---
layout: default
id: legacy-platforms
permalink: /legacy-platforms/
---
## Legacy Platforms
If you want to use SnapKit with iOS 7.0 or OS X 10.9 you need to do a few things differently, and unfortunately manually.
#### Step 1. Integrate source code
Integrate all the `*.swift` source files in the repo into your project. We recommend using a submodule to keep the source files in sync and then dragging them into your Xcode Project.
#### Step 2. Add build setting
You must add `-DSNAPKIT_DEPLOYMENT_LEGACY` to your `OTHER_SWIFT_FLAGS` in your targets Build Settings. We require this because we couldn't find another way to allow warning free compilation on both legacy platforms that don't support frameworks and modern platforms that do.
#### Step 3. Use SnapKit
You should now be able to use `snp_makeConstraints` on any of your views. You do not need to add the `import SnapKit` statement since the source is directly integrated into your target.