Installing
Operations is a Swift 2.0 framework for iOS 8+, Mac OS X 10.10+, watchOS 2+ and tvOS 9+. It has no 3rd party dependencies and builds directly from source.
Extension API Compatibility
The project contains two Xcode projects, Operations.xcodeproj
builds frameworks suitable for embedding into an application. Operations_ExtensionCompatible.xcodeproj
builds extension API compatible frameworks for iOS, tvOS and OS X. These builds are missing some functionality however which cannot be made compatible.
Importing
All platforms and flavors have the same module name, which can be imported into your Swift code like this:
import Operations
CocoaPods
Operations is available via CocoaPods. Add the following to your Podfile
:
use_frameworks!
pod 'Operations'
By default, CocoaPods will install a framework suitable for usage in an application. If building an app extension, use the Extension subspec like this:
use_frameworks!
pod 'Operations/Extension'
If your app is health focused, you may find the HealthCapability
useful. This type imports HealthKit and so is not included by default. It is available via a subspec instead:
use_frameworks!
pod 'Operations/+Health'
If your app supports iOS 8, and you wise to perform operations using the ABAddressBook framework, such as adding people to group, or even creating groups, there is a subspec for you. This subspec also includes operations for use with the Contacts framework. Unfortunately at the moment it has not been possible to unite these two under one type system.
use_frameworks!
pod 'Operations/+AddressBook'
Carthage
Carthage can be used to fetch and download the Operations framework. Add the following to your Cartfile
:
github 'danthorpe/Operations'
Unfortunately at the moment, it is only possible to fetch & build the standard application framework. If you need the extension API compatible version, you will need to resort to other methods such as CocoaPods.
Updated less than a minute ago