Important note beforehand:
RXPromise is a pure Objective-C API. Even though it depends itself on the standard C++ library it does not affect (or "infect") your Objective-C sources in any way with C++.
The minimum deployment version for iOS is 8.0 and for Mac OS X it is 10.9. Since version 1.0.0 the project does not contain any static library targets anymore - but this can be added when desired.
There are two recommended ways to incorporate the library into your project:
- Using CocoaPods
- Using Carthage
Note:
RXPromise
version number system adheres to the rules of Semantic Versioning.
For reference, see CocoaPods.
As a minimum, add the following line to your Podfile in your project folder:
pod 'RXPromise'
The above declaration loads the most recent published version from Cocoapods.
You may specify a certain version or a certain range of available versions. For example:
pod 'RXPromise', '~> 1.0'
This automatically selects the most recent version in the repository in the range from 1.0.0 and up to 2.0, not including 2.0 and higher.
See more help here: Specifying pod versions.
Example Podfile:
# MyProject.Podfile
use_frameworks!
target 'MyTarget' do
pod 'RXPromise', '~> 1.0' # Version 1.0 and the versions up to 2.0, not including 2.0 and higher
end
After you edited the Podfile, open Terminal, cd to the directory where the Podfile is located and type the following command in the console:
$ pod install
Note: Carthage only supports dynamic frameworks which are supported in Mac OS X and iOS 8 and later. For further reference see Carthage.
- Follow the instructions Installing Carthage to install Carthage on your system.
- Follow the instructions Adding frameworks to an application. Then add
github "couchdeveloper/RXPromise"
to your Cartfile.