Skip to content

iOS 7 support

Evgenii Neumerzhitckii edited this page May 27, 2016 · 11 revisions

Use the following setup instruction if you need to support iOS 7. The version of the library for iOS 7 is implemented in the ios-7-support branch.

Add source (iOS 7+)

Simply add CosmosDistrib.swift file into your Xcode project.

Setup with Carthage (iOS 8+)

Alternatively, add github "marketplacer/Cosmos" "ios-7-support" to your Cartfile and run carthage update.

Setup with CocoaPods (iOS 8+)

If you are using CocoaPods add this text to your Podfile and run pod install.

use_frameworks!

target "UsingCosmos" do
  pod 'Cosmos', :git => 'https://github.com/marketplacer/Cosmos.git', :branch => 'ios-7-support'
end

Why we use separate setup for iOS 7

The reason iOS 7 support is not included in the main setup methods is because the if #available(iOS 8.0, *) statement generates a warning in apps with a target greater than iOS 7.

CosmosView.swift:368:8: warning: unnecessary check for 'iOS'; minimum deployment target ensures guard will always be true.

Clone this wiki locally