Commit 0e54d58a authored by Aral Balkan's avatar Aral Balkan

Update readme

parent f4aaa892
......@@ -2,36 +2,35 @@
Handle is an easy-to-use, expressive Swift micro-library for handling notifications.
**This is the master branch (Swift 3).**
The following, branches are also available but have been deprecated as of Xcode 8 GM:
* [Swift 2.2](https://source.ind.ie/project/handle/tree/swift-2.2)
* [Swift 2.3](https://source.ind.ie/project/handle/tree/swift-2.3)
**Supported on:** Xcode 8 GM+
## Installation
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
Latest version; Swift 3 (and non-breaking updates) – recommended.
```
git "git@source.ind.ie:project/handle.git"
git "git@source.ind.ie:project/handle.git" ~> 4.0
```
To include the Swift 2.3 or 2.2 versions, make sure you specify the branch in your Cartfile. e.g.:
For Swift 2.3:
```
git "git@source.ind.ie:project/handle.git" "swift-2.3"
```
The Handle demonstration apps do not have any dependencies, just open up the Delay.xcworkspace in Xcode and build and run the iOS and OS X demos.
To stay on Swift 2.2:
```
git "git@source.ind.ie:project/handle.git" ~> 3.0.1
```
The Handle demonstration apps do not have any dependencies, just open up the Handle.xcworkspace in Xcode and build and run the iOS and macOS demos.
See the [detailed installation instructions](#detailed-installation-instructions), below, for instructions on how to add Delay to your own apps.
See the [detailed installation instructions](#detailed-installation-instructions), below, for instructions on how to add Handle to your own apps.
## Getting started
Run the `./dev` script and play with the iOS and OS X demo apps.
Run the `./dev` script and play with the iOS and macOS demo apps.
## Usage
......@@ -46,7 +45,7 @@ public enum MyNotification:String
{
case AwesomeNotification
public static func named(notification: MyNotification) -> String
public static func named(_ notification: MyNotification) -> String
{
return notification.rawValue
}
......@@ -100,33 +99,15 @@ Note that Handle is optimised for ease of authoring, beauty of interface and cla
1. Add the framework to your `Cartfile`. e.g.,
```git "git@source.ind.ie:project/handle.git" ~> 2.0```
```git "git@source.ind.ie:project/handle.git" ~> 4.0```
2. [Follow the instructions on Carthage’s readme](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application).
### Manual
#### iOS
This requires hacking the Xcode project file but it’s still the most elegant way of doing things. If you want a better way, [dupe this radar for seamless support of fat frameworks in Xcode](http://openradar.appspot.com/radar?id=4951631992979456).
1. Build the framework target.
2. In Xcode, add the framework to the Embedded Binaries section.
3. Edit the `project.pbxproj` (in the <your-project>.xcodeproj folder) file and replace the line that reads something like:
```A79882251C259F730043754A /* Handle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Handle.framework; path = "../../path/in/DerivedData/to/Handle.framework"; sourceTree = "<group>"; };```
With:
```A79882251C259F730043754A /* Handle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Handle.framework; path = "$(CONFIGURATION_BUILD_DIR)/Handle.framework"; sourceTree = "<group>"; };```
(In other words, you’re replacing the hardcoded path to the framework within your particular Derived Data folder with a generic one. This means that anyone else who checks out your project will get the correct framework.)
#### OS X
#### macOS
1. Just drag the framework into the Linked Frameworks and Binaries section of your project (under General).
(For an example of manually adding the framework, see the iOS and OS X demo apps that ship with this framework.)
(For an example of manually adding the framework, see the iOS and macOS demo apps that ship with this framework.)
## Credits
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment