Skip to content

Commit

Permalink
Remove NSObject+SPInvocationGrabbing.
Browse files Browse the repository at this point in the history
This file put a category on NSObject with non-namespaced method signatures, doesn't use ARC and isn’t really necessary since we can require blocks.

It also wasn't being included in any targets, triggering the exception documented in #172.
  • Loading branch information
nriley committed Apr 15, 2014
1 parent 8d1d8c7 commit 905214b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 174 deletions.
12 changes: 0 additions & 12 deletions Hermes.xcodeproj/project.pbxproj
Expand Up @@ -187,8 +187,6 @@
971CC3A01585DBD7004D75BA /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
9728D876158C3D1F00C078A4 /* SPMediaKeyTap.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SPMediaKeyTap.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9728D877158C3D1F00C078A4 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
9728D88C158C3D3100C078A4 /* NSObject+SPInvocationGrabbing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+SPInvocationGrabbing.h"; sourceTree = "<group>"; };
9728D88D158C3D3100C078A4 /* NSObject+SPInvocationGrabbing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+SPInvocationGrabbing.m"; sourceTree = "<group>"; };
9728D898158C3DA500C078A4 /* SPMediaKeyTap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPMediaKeyTap.h; sourceTree = "<group>"; };
9728D899158C3DA500C078A4 /* SPMediaKeyTap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPMediaKeyTap.m; sourceTree = "<group>"; };
9728D89C158C3E3C00C078A4 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -480,21 +478,11 @@
children = (
9728D898158C3DA500C078A4 /* SPMediaKeyTap.h */,
9728D899158C3DA500C078A4 /* SPMediaKeyTap.m */,
9728D888158C3D3100C078A4 /* SPInvocationGrabbing */,
);
name = SPMediaKeyTap;
path = ImportedSources/SPMediaKeyTap;
sourceTree = SOURCE_ROOT;
};
9728D888158C3D3100C078A4 /* SPInvocationGrabbing */ = {
isa = PBXGroup;
children = (
9728D88C158C3D3100C078A4 /* NSObject+SPInvocationGrabbing.h */,
9728D88D158C3D3100C078A4 /* NSObject+SPInvocationGrabbing.m */,
);
path = SPInvocationGrabbing;
sourceTree = "<group>";
};
FA0E55671478559200C36794 /* Integration */ = {
isa = PBXGroup;
children = (
Expand Down

This file was deleted.

This file was deleted.

8 changes: 3 additions & 5 deletions ImportedSources/SPMediaKeyTap/SPMediaKeyTap.m
@@ -1,6 +1,5 @@
// Copyright (c) 2010 Spotify AB
#import "SPMediaKeyTap.h"
#import "SPInvocationGrabbing/NSObject+SPInvocationGrabbing.h" // https://gist.github.com/511181, in submodule

@interface SPMediaKeyTap ()
-(BOOL)shouldInterceptMediaKeyEvents;
Expand Down Expand Up @@ -179,10 +178,9 @@ -(void)setShouldInterceptMediaKeyEvents:(BOOL)newSetting;
_shouldInterceptMediaKeyEvents = newSetting;
}
if(_tapThreadRL && oldSetting != newSetting) {
id grab = [self grab];
[grab pauseTapOnTapThread:newSetting];
NSTimer *timer = [NSTimer timerWithTimeInterval:0 invocation:[grab invocation] repeats:NO];
CFRunLoopAddTimer(_tapThreadRL, (CFRunLoopTimerRef)timer, kCFRunLoopCommonModes);
CFRunLoopPerformBlock(_tapThreadRL, kCFRunLoopCommonModes, ^{
[self pauseTapOnTapThread:newSetting];
});
}
}

Expand Down

0 comments on commit 905214b

Please sign in to comment.