An implementation of reactive programming. For details, see the article on Cocoa with Love, CwlSignal, a library for reactive programming.
This project can be included in your projects in a number of different ways:
The standard restrictions for each of these approaches apply so you'll need to pick an approach based on your situation and preferences.
Minimum requirements are iOS 8 or macOS 10.10.
- In a subdirectory of your project's directory, run
git clone https://github.com/mattgallagher/CwlSignal.git
- Drag the "CwlSignal.xcodeproj" file from the Finder to somewhere your in own project's file tree in Xcode
- Drag the "CwlSignal.framework" and CwlUtils.framework" from the "Products" folder of the "CwlSignal" project to the "Copy Files (Frameworks)" build phases of any target that you want to include this module.
This approach generates two concatenated files (CwlUtils.swift, CwlSignal.swift) that can be added to another project – macOS or iOS – with no dynamic frameworks, libraries or other settings required.
- Get the latest version of CwlSignal by running
git clone https://github.com/mattgallagher/CwlSignal.git
on the command-line. - Open the CwlSignal.xcodeproj in Xcode and select the CwlSignalConcat scheme with a destination of "My Mac" (choose from the Scheme popup in the toolbar or from the "Product" → "Scheme" and "Product" → "Destination" menus in the menubar.
- Build the scheme (Command-B or "Product" → "Build")
- Open the "Products" folder by right-clicking (or Control-click) on the "Products" folder in the project's file tree in Xcode and select "Show in Finder" and open the "Debug" folder in the "Products" folder that this reveals.
Inside a folder located "Concat_internal" should be three files:
- CwlUtils_internal.swift
- CwlSignal_internal.swift
You can copy these files and include them in any of your own projects like any other files.
A folder named "Concat_public" should also be present. This version is almost identical to the "Concat_internal" version except that where the "Concat_internal" version strips public
and open
specifiers from files, the "Concat_public" version leaves these in-place. This allows the "Concat_public" version to be use in the "Sources" folder of Swift playgrounds or otherwise used where the features need to be exported from a module.
Add the following to the dependencies
array in your "Package.swift" file:
.Package(url: "https://github.com/mattgallagher/CwlSignal.git", majorVersion: 1),
Or, if you're using the swift-tools-version:4.0
package manager, add the following to the dependencies
array in your "Package.swift" file:
.package(url: "https://github.com/mattgallagher/CwlSignal.git", majorVersion: 1)
NOTE: even though this git repository includes its dependencies in the Dependencies folder, building via the Swift Package manager fetches and builds these dependencies independently.
Add the following lines to your target in your "Podfile":
pod 'CwlSignal', :git => 'https://github.com/mattgallagher/CwlSignal.git'
pod 'CwlUtils', :git => 'https://github.com/mattgallagher/CwlUtils.git'
Add the following line to your Cartfile:
git "https://github.com/mattgallagher/CwlSignal.git" "master"