aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAral Balkan2015-01-13 17:21:27 +0000
committerAral Balkan2015-01-13 17:21:27 +0000
commit8dc86c9b62f1f2a4649bf9e09b9afe0a92de00c1 (patch)
tree564330a7e3f2d77cdeedfdc96d8d0ebd22411747
parent62c142a7f5718fa1c7523d1bd6f6f22430c0329b (diff)
downloadMASShortcut-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.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9a98ddb..17815c5 100644
--- a/README.md
+++ b/README.md
@@ -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.