From 8dc86c9b62f1f2a4649bf9e09b9afe0a92de00c1 Mon Sep 17 00:00:00 2001 From: Aral Balkan Date: Tue, 13 Jan 2015 17:21:27 +0000 Subject: Added explicit instructions for use in Swift The explicit Cocoa import had tripped me up. Would be good to save someone the same hassle.--- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) 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 + #import + # 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. -- cgit v1.2.3