CancelForPromiseKit Foundation Extensions
The CancelForPromiseKit Foundation Extensions add cancellable promises to PromiseKit’s Foundation extensions.
This project supports iOS, tvOS, watchOS, macOS, Swift 3.0, 3.1, 3.2, 4.0 and 4.1.
Here’s a link to the Jazzy generated API documentation.
CococaPods
pod "CancelForPromiseKit/Foundation", "~> 1.0"
The extensions are built into CancelForPromiseKit.framework
thus nothing else is needed.
Carthage
github "CancelForPromiseKit/Foundation" ~> 1.0
The extensions are built into their own framework:
// swift
import PromiseKit
import CancelForPromiseKit
import CPKFoundation
To build with Carthage on versions of Swift prior to 4.1, set the ‘Carthage’ flag in your target’s Build settings at the following location. This is necessary to properly import the PMKFoundation module, which is only defined for Carthage:
TARGETS -> [Your target name]:
'Swift Compiler - Custom Flags' -> 'Active Compilation Conditions' -> 'Debug'
'Swift Compiler - Custom Flags' -> 'Active Compilation Conditions' -> 'Release'
SwiftPM
let package = Package(
dependencies: [
.Package(url: "https://github.com/CancelForPromiseKit/Foundation.git", majorVersion: 1)
]
)