cocoabits / MASShortcut

Modern framework for managing global keyboard shortcuts compatible with Mac App Store. More details:
http://blog.shpakovski.com/2012/07/global-keyboard-shortcuts-in-cocoa.html
BSD 2-Clause "Simplified" License
1.52k stars 220 forks source link

Major refactoring for the 2.0 release #53

Closed zoul closed 9 years ago

zoul commented 9 years ago

This is a major, backwards-incompatible refactoring intended to simplify long-term maintenance. See pull request #42 for previous discussion – these are the same changes, only updated for the current master branch.

Vadim, we can review the changes once more and if everything looks fine, we’ll merge this into master? Before that, we can create a 1.x branch to keep the older codebase for people who don’t want to update to 2.0 for whatever reasons.

zoul commented 9 years ago

Sorry, I forgot to address your concern about CocoaPods:

I'm not sure how to start the second version for CocoaPods with your proposed changes. Any advise?

I’m no CocoaPods expert (I have just started using it), but I think we can continue releasing both 2.x (regular development) and 1.x (bugfixes on the old codebase). According to the CocoaPods Podfile Guide, you can use the ~> operator to smart-match release version numbers: for example ~> 1 should stick to the 1.x branch for people who want to.

shpakovski commented 9 years ago

Okay Tomáš, I reviewed all changes and shouldBypassis the only functionality I would like to restore. Could you please return those lines?

zoul commented 9 years ago

Great, thanks! I’m on the shouldBypass feature at the moment. You’re right, the recording should be cancelled by Cmd-W and Cmd-Q, but isn’t at the moment. I’ll document the possible cases and fix the Cmd-W/Q input.

zoul commented 9 years ago

Done. I have also created a maintenance-1.x branch to keep track of the development in the 1.x line. Now you can merge this into master, I’ll test the result in CocoaPods and if everything works, we can release the new version on CocoaPods. You can add me as a contributor if you want to, so that I can release updates to CocoaPods.

shpakovski commented 9 years ago

I already added you as a collaborator, so feel free to merge the pull request yourself.

P. S. Please check your Inbox for CocoaPods email verification.

shpakovski commented 9 years ago

Please check the Demo project launched for the first time with empty user defaults. In this case, Xcode 6.1 generates warnings, the app omits error -[__NSDictionaryM removeObjectForKey:]: key cannot be nil into Console, and Command-2 does not work. Thanks in advance!

zoul commented 9 years ago

The removeObjectForKey was a nice catch, fixed by an explicit nil-check. I have simplified the demo to the basic use case, now it works out of the box.