diff options
| author | Aral Balkan | 2015-01-13 17:21:27 +0000 | 
|---|---|---|
| committer | Aral Balkan | 2015-01-13 17:21:27 +0000 | 
| commit | 8dc86c9b62f1f2a4649bf9e09b9afe0a92de00c1 (patch) | |
| tree | 564330a7e3f2d77cdeedfdc96d8d0ebd22411747 | |
| parent | 62c142a7f5718fa1c7523d1bd6f6f22430c0329b (diff) | |
| download | MASShortcut-8dc86c9b62f1f2a4649bf9e09b9afe0a92de00c1.tar.bz2 | |
Added explicit instructions for use in Swift
The explicit Cocoa import had tripped me up. Would be good to save someone the same hassle.
| -rw-r--r-- | README.md | 8 | 
1 files changed, 8 insertions, 0 deletions
| @@ -95,6 +95,14 @@ _observableKeyPath = [@"values." stringByAppendingString:kPreferenceGlobalShortc                                                                  context:kGlobalShortcutContext];  ``` +# Using in Swift projects + +  1. Install as a Pod using the latest CocoaPods with Swift support. +  2. Create a bridging header file [using the instructions here](http://swiftalicio.us/2014/11/using-cocoapods-from-swift/) +  3. Your bridging header file should contain the following [two](https://github.com/shpakovski/MASShortcut/issues/36) imports: +        #import <Cocoa/Cocoa.h> +        #import <MASShortcut/Shortcut.h> +  # Non-ARC Version  If you like retain/release, please check out these forks: [heardrwt/MASShortcut](https://github.com/heardrwt/MASShortcut) and [chendo/MASShortcut](https://github.com/chendo/MASShortcut). However, the preferred way is to enable the `-fobjc-arc` in Xcode source options. | 
