From f4002d3d41cff92febf064e374a6b7813a14ae31 Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Tue, 22 Sep 2015 19:54:45 +1200 Subject: [PATCH] More docs updates! --- docs.md | 2 +- faq.md | 2 +- legacy-platforms.md | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 legacy-platforms.md diff --git a/docs.md b/docs.md index fa1e45a..c8e16c0 100644 --- a/docs.md +++ b/docs.md @@ -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 diff --git a/faq.md b/faq.md index e6a301f..6db6969 100644 --- a/faq.md +++ b/faq.md @@ -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? diff --git a/legacy-platforms.md b/legacy-platforms.md new file mode 100644 index 0000000..6b8f821 --- /dev/null +++ b/legacy-platforms.md @@ -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. \ No newline at end of file