├── SpotlightBridgeFramework
├── SPBResponse.m
├── SPKResponse+SPBResponse.h
├── SPBResultSection+SFMutableResultSection.h
├── SPBResponse.h
├── SPBPreviewController.m
├── SPBQuery.h
├── SPBResponse+Spotlight.h
├── SPBPlaceholderPreviewController.h
├── SPBPreviewController.h
├── SPBResultSection.h
├── SPKResponse+SPBResponse.m
├── SPBSearchResult.h
├── SpotlightBridge.h
├── SPBPlaceholderPreviewController.m
├── SPBBridgingSearchResult.h
├── Info.plist
├── Headers
│ ├── 10.15
│ │ ├── Spotlight
│ │ │ ├── PRSCalculatorResult.h
│ │ │ ├── SPPreviewController.h
│ │ │ ├── SPKQuery.h
│ │ │ └── SPKResponse.h
│ │ ├── SearchFoundation
│ │ │ ├── SFMutableResultSection.h
│ │ │ ├── SFResultSection.h
│ │ │ └── SFSearchResult.h
│ │ └── SpotlightServices
│ │ │ └── SFSearchResult_SpotlightExtras.h
│ └── 10.14
│ │ ├── PRSCalculatorResult.h
│ │ ├── PRSPreviewController.h
│ │ └── PRSResult.h
├── SPBResponse+Spotlight.m
├── SPBSearchResult.m
├── SPBResultSection+SFMutableResultSection.m
├── SPBResultSection.m
├── SPBQuery.m
├── SPBBridgingSearchResult.m
└── SPBPlaceholderPreviewController.xib
├── SpotlightBridgeTests
├── SPBTestExtension.bundle
│ └── Contents
│ │ ├── MacOS
│ │ └── SPBTestExtension
│ │ ├── Info.plist
│ │ └── _CodeSignature
│ │ └── CodeResources
├── SPBStandardSearchResult.m
├── SPBTestSearchResult.m
├── SPBSectionRankingManager.m
├── SPBTestExtensionManager.h
├── SPBStandardSearchResult.h
├── SPBTestSearchResult.h
├── SPBTestExtensionManager.m
├── Info.plist
├── SPBExtensionManagerTests.m
└── SPBRankingManagerTests.m
├── SpotlightBridge.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
├── xcshareddata
│ └── xcschemes
│ │ ├── SpotlightBridgeFramework.xcscheme
│ │ └── SpotlightBridge.xcscheme
└── project.pbxproj
├── SpotlightBridge
├── SPBSectionRankingManager.h
├── PrefixHeader.pch
├── SPBSpotlightBridge.h
├── SPBValidator.h
├── SPBManager.h
├── SPBExtensionManager.h
├── SPBRankingManager.h
├── SPBValidator.m
├── Info.plist
├── SPBManager.m
├── SPBSectionRankingManager.m
├── PRSRankingManager.h
├── SPBExtensionManager.m
├── SPBSpotlightBridge.m
├── SPBRankingManager.m
└── ZKSwizzle
│ ├── ZKSwizzle.h
│ └── ZKSwizzle.m
├── SpotlightBridgeFrameworkTests
├── SPBTestPreviewController.h
├── SPBTestPreviewController.m
├── Info.plist
├── SPBPreviewControllerTests.m
├── SpotlightBridgeFrameworkTests.m
└── SPBResultSection.m
├── README.md
└── .gitignore
/SpotlightBridgeFramework/SPBResponse.m:
--------------------------------------------------------------------------------
1 | #import "SPBResponse.h"
2 |
3 | @implementation SPBResponse
4 |
5 | @end
6 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/SPBTestExtension.bundle/Contents/MacOS/SPBTestExtension:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BennyKJohnson/SpotlightBridge/HEAD/SpotlightBridgeTests/SPBTestExtension.bundle/Contents/MacOS/SPBTestExtension
--------------------------------------------------------------------------------
/SpotlightBridge.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPKResponse+SPBResponse.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | NS_ASSUME_NONNULL_BEGIN
4 |
5 | @interface SPKResponse (SPBResponse)
6 |
7 | -(instancetype)initWithBridgedResponse: (SPBResponse*)response;
8 |
9 | @end
10 |
11 | NS_ASSUME_NONNULL_END
12 |
--------------------------------------------------------------------------------
/SpotlightBridge.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SpotlightBridge.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBResultSection+SFMutableResultSection.h:
--------------------------------------------------------------------------------
1 | #import "SPBResultSection.h"
2 |
3 | //@class SFMutableResultSection;
4 | NS_ASSUME_NONNULL_BEGIN
5 |
6 | @interface SPBResultSection (SPBResultSection_SFMutableResultSection)
7 |
8 | -(id)createSpotlightResultSection;
9 |
10 | @end
11 |
12 | NS_ASSUME_NONNULL_END
13 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/SPBStandardSearchResult.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBStandardSearchResult.m
3 | // SpotlightBridgeTests
4 | //
5 | // Created by Benjamin Johnson on 19/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBStandardSearchResult.h"
10 |
11 | @implementation SPBStandardSearchResult
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/SpotlightBridge/SPBSectionRankingManager.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | NS_ASSUME_NONNULL_BEGIN
4 |
5 | @interface SPBSectionRankingManager : NSObject
6 |
7 | + (NSArray *) mergeSpotlightBridgeSectionsFromBundleIdToSectionMapping:(NSDictionary *)bundleIdToSectionMap withRankedSections:(NSArray *)rankedSections;
8 |
9 | @end
10 |
11 | NS_ASSUME_NONNULL_END
12 |
--------------------------------------------------------------------------------
/SpotlightBridge/PrefixHeader.pch:
--------------------------------------------------------------------------------
1 | //
2 | // PrefixHeader.pch
3 | // SpotlightBridge
4 | //
5 | // Created by Benjamin Johnson on 26/7/20.
6 | //Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #ifndef SpotlightBridge_PrefixHeader_pch
10 | #define SpotlightBridge_PrefixHeader_pch
11 |
12 | #import
13 | #import "ZKSwizzle.h"
14 |
15 | #endif
16 |
17 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBResponse.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "SPKResponse.h"
3 |
4 | NS_ASSUME_NONNULL_BEGIN
5 |
6 | @interface SPBResponse : NSObject
7 |
8 | @property (nonatomic) BOOL topHitIsIn;
9 |
10 | @property (nonatomic) unsigned long long queryId;
11 |
12 | @property (nonatomic, strong) NSArray *sections;
13 |
14 | @end
15 |
16 | NS_ASSUME_NONNULL_END
17 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/SPBTestSearchResult.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBTestSearchResult.m
3 | // SpotlightBridgeTests
4 | //
5 | // Created by Benjamin Johnson on 17/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBTestSearchResult.h"
10 |
11 | @implementation SPBTestSearchResult
12 |
13 | -(BOOL)isTopHit {
14 | return self.topHit;
15 | }
16 | @end
17 |
--------------------------------------------------------------------------------
/SpotlightBridge/SPBSpotlightBridge.h:
--------------------------------------------------------------------------------
1 | //
2 | // SPBSpotlightBridge.h
3 | // SpotlightBridge
4 | //
5 | // Created by Benjamin Johnson on 11/7/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SPBSpotlightBridge : NSObject
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/SpotlightBridge/SPBValidator.h:
--------------------------------------------------------------------------------
1 | //
2 | // SPBValidator.h
3 | // SpotlightBridge
4 | //
5 | // Created by Benjamin Johnson on 26/7/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SPBValidator : NSObject
14 |
15 | +(BOOL)performRealityCheck;
16 |
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/SPBSectionRankingManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBSectionRankingManager.m
3 | // SpotlightBridgeTests
4 | //
5 | // Created by Benjamin Johnson on 22/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SPBSectionRankingManager : XCTestCase
12 |
13 | @end
14 |
15 | @implementation SPBSectionRankingManager
16 |
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/SPBTestExtensionManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // SPBTestExtensionManager.h
3 | // SpotlightBridgeTests
4 | //
5 | // Created by Benjamin Johnson on 15/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBExtensionManager.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SPBTestExtensionManager : SPBExtensionManager
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBPreviewController.m:
--------------------------------------------------------------------------------
1 |
2 | #import "SPBPreviewController.h"
3 | #import "SPBBridgingSearchResult.h"
4 |
5 | @interface SPBPreviewController ()
6 |
7 | @end
8 |
9 | @implementation SPBPreviewController
10 |
11 | -(void)setRepresentedObject:(SPBBridgingSearchResult*)representedObject {
12 | [self displayResult:representedObject.searchResult];
13 | }
14 |
15 | - (void)displayResult:(SPBSearchResult *)result {}
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/SpotlightBridge/SPBManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // SPBManager.h
3 | // SpotlightBridge
4 | //
5 | // Created by Benjamin Johnson on 11/7/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "SPBExtensionManager.h"
11 |
12 | @interface SPBManager : NSObject
13 |
14 | + (instancetype)sharedInstance;
15 |
16 | @property (nonatomic, strong) SPBExtensionManager *extensionManager;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/SPBStandardSearchResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // SPBStandardSearchResult.h
3 | // SpotlightBridgeTests
4 | //
5 | // Created by Benjamin Johnson on 19/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "PRSCalculatorResult.h"
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface SPBStandardSearchResult : PRSCalculatorResult
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBQuery.h:
--------------------------------------------------------------------------------
1 |
2 | #import
3 | #import "SPKQuery.h"
4 | #import "SPBResponse.h"
5 |
6 | @interface SPBQuery : SPKQuery
7 | +(BOOL) isQuerySupported:(NSString *)query;
8 | -(id) initWithUserQuery:(NSString *)arg2 queryGroupId:(unsigned long long)arg3 options:(unsigned long long)arg4 keyboardLanguage:(id)arg5;
9 | -(void) performQuery:(NSString *)userQueryString withCompletionHandler:(void (^)(SPBResponse *response))completionHandler;
10 |
11 | @end
12 |
13 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBResponse+Spotlight.h:
--------------------------------------------------------------------------------
1 | //
2 | // SPBResponse+Spotlight.h
3 | // SpotlightBridgeFramework
4 | //
5 | // Created by Benjamin Johnson on 20/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SPBResponse (Spotlight)
14 |
15 | -(NSArray *)spotlightResults;
16 | -(NSArray *)spotlightResultSections;
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/SpotlightBridgeFrameworkTests/SPBTestPreviewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SPBTestPreviewController.h
3 | // SpotlightBridgeFrameworkTests
4 | //
5 | // Created by Benjamin Johnson on 15/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SPBTestPreviewController : SPBPreviewController
14 |
15 | @property (nonatomic, strong) id lastResult;
16 |
17 | @end
18 |
19 | NS_ASSUME_NONNULL_END
20 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/SPBTestSearchResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // SPBTestSearchResult.h
3 | // SpotlightBridgeTests
4 | //
5 | // Created by Benjamin Johnson on 17/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SPBTestSearchResult : SPBSearchResult
14 |
15 | @property (nonatomic) float score;
16 |
17 | @property (nonatomic) BOOL topHit;
18 |
19 |
20 | @end
21 |
22 | NS_ASSUME_NONNULL_END
23 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBPlaceholderPreviewController.h:
--------------------------------------------------------------------------------
1 |
2 | #import
3 | #include
4 |
5 | #import "SPBPreviewController.h"
6 |
7 | #import "SPBSearchResult.h"
8 |
9 | NS_ASSUME_NONNULL_BEGIN
10 |
11 | @interface SPBPlaceholderPreviewController : SPBPreviewController
12 |
13 | @property (weak) IBOutlet NSTextField *titleTextLabel;
14 |
15 | +(SPBPreviewController*) shared;
16 |
17 | @property (strong, nonatomic) SPBSearchResult *searchResult;
18 |
19 | @end
20 |
21 | NS_ASSUME_NONNULL_END
22 |
--------------------------------------------------------------------------------
/SpotlightBridgeFrameworkTests/SPBTestPreviewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBTestPreviewController.m
3 | // SpotlightBridgeFrameworkTests
4 | //
5 | // Created by Benjamin Johnson on 15/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBTestPreviewController.h"
10 |
11 | @interface SPBTestPreviewController ()
12 |
13 | @end
14 |
15 | @implementation SPBTestPreviewController
16 |
17 | - (void)displayResult:(SPBSearchResult *)result {
18 | self.lastResult = result;
19 | }
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBPreviewController.h:
--------------------------------------------------------------------------------
1 |
2 | #import
3 | #include
4 |
5 | #ifdef __MAC_10_15
6 | #import "SPPreviewController.h"
7 |
8 | #endif
9 | #ifdef __MAC_10_14
10 | #import "PRSPreviewController.h"
11 | #define SPPreviewController PRSPreviewController
12 | #endif
13 |
14 | #import "SPBSearchResult.h"
15 |
16 | NS_ASSUME_NONNULL_BEGIN
17 |
18 | @interface SPBPreviewController : SPPreviewController
19 |
20 | -(void)displayResult: (SPBSearchResult *)result;
21 |
22 | @end
23 |
24 | NS_ASSUME_NONNULL_END
25 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/SPBTestExtensionManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBTestExtensionManager.m
3 | // SpotlightBridgeTests
4 | //
5 | // Created by Benjamin Johnson on 15/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBTestExtensionManager.h"
10 |
11 | @implementation SPBTestExtensionManager
12 |
13 | -(NSMutableArray *) extensionBundlePaths {
14 | NSString *testExtensionPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"SPBTestExtension" ofType:@"bundle"];
15 | return [NSMutableArray arrayWithArray:@[testExtensionPath]];
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBResultSection.h:
--------------------------------------------------------------------------------
1 |
2 | #import
3 | #import "SPBSearchResult.h"
4 |
5 | extern int const SPBResultSectionDomain;
6 | extern int const SPBResultSectionGroupID;
7 |
8 | NS_ASSUME_NONNULL_BEGIN
9 |
10 | @interface SPBResultSection : NSObject
11 |
12 | @property (nonatomic, strong) NSString *title;
13 |
14 | @property (nonatomic, strong) NSArray *results;
15 |
16 | @property (nonatomic) BOOL pinToTop;
17 |
18 | @property (nonatomic, strong) NSString *bundleIdentifier;
19 |
20 | -(instancetype) initWithTitle: (NSString *)title;
21 |
22 | -(NSArray*)spotlightResults;
23 |
24 | @end
25 |
26 | NS_ASSUME_NONNULL_END
27 |
--------------------------------------------------------------------------------
/SpotlightBridge/SPBExtensionManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // SPBExtensionManager.h
3 | // SpotlightBridge
4 | //
5 | // Created by Benjamin Johnson on 25/7/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SPBExtensionManager : NSObject
14 |
15 | -(instancetype)initWithApplicationSupportSubPath:(NSString *)subpath;
16 |
17 | -(void) loadExtensions;
18 |
19 | - (Class) loadExtensionWithPath: (NSString *)path;
20 |
21 | @property (nonatomic, strong) NSString *applicationSupportSubPath;
22 |
23 | @property (nonatomic, strong) NSArray *extensions;
24 |
25 | @end
26 |
27 | NS_ASSUME_NONNULL_END
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Spotlight Bridge
2 |
3 | The missing extension API for macOS Spotlight.
4 |
5 | ## Goals
6 | - Allow users to customise Spotlight for better integration into their workflow
7 | - Empower developers through a simple but featured API to allow them to write powerful third party integrations for Spotlight
8 |
9 | ## Architecture
10 |
11 | ### Spotlight Bridge (Injector)
12 | The main bundle that it is injected into Spotlight to add additional capabilities that enable third party extensions
13 |
14 | ### Spotlight Bridge Framework
15 | The framework that provides the interface to Spotlight Bridge. Developers add this framework to their extension to allow them to respond to user queries from Spotlight.
16 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPKResponse+SPBResponse.m:
--------------------------------------------------------------------------------
1 | #import "SPKResponse+SPBResponse.h"
2 | #import "SPBResponse+Spotlight.h"
3 |
4 | #include
5 |
6 | int SPKResponseKind = 2;
7 |
8 | @implementation SPKResponse (SPBResponse)
9 |
10 | -(instancetype)initWithBridgedResponse: (SPBResponse*)response {
11 | #ifdef __MAC_10_15
12 | self = [[SPKResponse alloc] initWithQueryID:[self queryId] kind: SPKResponseKind sections:[response spotlightResultSections]];
13 | #else
14 | self = [[SPKResponse alloc]initWithQueryID:[self queryId] kind: SPKResponseKind results:[response spotlightResults]];
15 | #endif
16 |
17 | if (self) {
18 | [self setTopHitIsIn:YES];
19 | }
20 |
21 | return self;
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBSearchResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // SPBSearchResult.h
3 | // SpotlightBridgeFramework
4 | //
5 | // Created by Benjamin Johnson on 14/7/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SPBSearchResult: NSObject
14 |
15 | -(instancetype) initWithDisplayName: (NSString*)displayName;
16 |
17 | -(BOOL)openWithSearchString: (NSString *)searchString;
18 |
19 | -(NSImage*)iconImage;
20 |
21 | -(NSImage*)iconImageForApplication;
22 |
23 | @property (nonatomic, strong) NSString* displayName;
24 |
25 | -(BOOL)isTopHit;
26 |
27 | -(NSViewController*) previewViewController;
28 |
29 | -(float) maxScore;
30 |
31 | -(float) score;
32 |
33 | @end
34 |
35 | NS_ASSUME_NONNULL_END
36 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SpotlightBridge.h:
--------------------------------------------------------------------------------
1 | //
2 | // SpotlightBridgeFramework.h
3 | // SpotlightBridgeFramework
4 | //
5 | // Created by Benjamin Johnson on 26/7/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for SpotlightBridgeFramework.
12 | FOUNDATION_EXPORT double SpotlightBridgeFrameworkVersionNumber;
13 |
14 | //! Project version string for SpotlightBridgeFramework.
15 | FOUNDATION_EXPORT const unsigned char SpotlightBridgeFrameworkVersionString[];
16 |
17 | #import
18 | #import
19 | #import
20 | #import
21 | #import
22 |
23 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBPlaceholderPreviewController.m:
--------------------------------------------------------------------------------
1 |
2 | #import "SPBPlaceholderPreviewController.h"
3 | #import "SPBSearchResult.h"
4 |
5 | @interface SPBPlaceholderPreviewController ()
6 |
7 | @end
8 |
9 | @implementation SPBPlaceholderPreviewController
10 |
11 | - (instancetype)init
12 | {
13 | self = [super initWithNibName:@"SPBPlaceholderPreviewController" bundle: [NSBundle bundleWithIdentifier:@"benjamin.spotlightbridge.SpotlightBridgeFramework"]];
14 | if (self) {
15 |
16 | }
17 | return self;
18 | }
19 |
20 | +(SPBPlaceholderPreviewController*) shared {
21 | return [[SPBPlaceholderPreviewController alloc] init];
22 | }
23 |
24 | - (void)displayResult:(SPBSearchResult *)result {
25 | [self.titleTextLabel setStringValue:[result displayName]];
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/SpotlightBridgeFrameworkTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/SpotlightBridge/SPBRankingManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // SPBRankingManager.h
3 | // SpotlightBridge
4 | //
5 | // Created by Benjamin Johnson on 11/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface SPBRankingManager : NSObject
14 |
15 | + (NSMutableDictionary*)mergeBridgeResultsWithRankedAndPrunedResults: (NSMutableDictionary*)rankedAndPrunedResults resultsByGroupName: (NSMutableDictionary*)resultsByGroupName;
16 |
17 | +(void)insertSpotlightBridgeCategoriesFromGroupedResults: (NSDictionary*)groupedResults intoRankedCategories:(NSMutableArray*)categories;
18 |
19 | +(NSArray*)chooseTopHits: (NSArray *)topHits sortedResults: (id)results;
20 |
21 | +(float)getMaxScoreForResults:(NSArray*)results;
22 |
23 | @end
24 |
25 | NS_ASSUME_NONNULL_END
26 |
--------------------------------------------------------------------------------
/SpotlightBridge/SPBValidator.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBValidator.m
3 | // SpotlightBridge
4 | //
5 | // Created by Benjamin Johnson on 26/7/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBValidator.h"
10 |
11 | @implementation SPBValidator
12 |
13 | +(BOOL)performRealityCheck
14 | {
15 | Class spotlighQueryClass = NSClassFromString(@"SPKQuery");
16 | if (!spotlighQueryClass) {
17 | return NO;
18 | }
19 |
20 | if (![spotlighQueryClass respondsToSelector: NSSelectorFromString(@"isQuerySupported:")]) {
21 | return NO;
22 | }
23 |
24 | Class spotlightQueryTask = NSClassFromString(@"SPQueryTask");
25 | if (!spotlightQueryTask) {
26 | return NO;
27 | }
28 |
29 | if (![spotlightQueryTask respondsToSelector:NSSelectorFromString(@"queryClasses")]) {
30 | return NO;
31 | }
32 |
33 | return YES;
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBBridgingSearchResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // SPBBridgingSearchResult.h
3 | // SpotlightBridgeFramework
4 | //
5 | // Created by Benjamin Johnson on 1/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #include
12 |
13 | #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
14 | #import "Headers/10.15/Spotlight/PRSCalculatorResult.h"
15 | #else
16 | #import "Headers/10.14/PRSCalculatorResult.h"
17 | #endif
18 |
19 | #import "SPBSearchResult.h"
20 |
21 |
22 | NS_ASSUME_NONNULL_BEGIN
23 |
24 | @interface SPBBridgingSearchResult : PRSCalculatorResult
25 |
26 | @property (nonatomic, strong) SPBSearchResult *searchResult;
27 |
28 | @property (nonatomic, strong) NSString *sectionName;
29 |
30 | -(instancetype) initWithSearchResult: (SPBSearchResult*)searchResult;
31 |
32 | -(NSImage*)iconImage;
33 |
34 | @end
35 |
36 | NS_ASSUME_NONNULL_END
37 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSHumanReadableCopyright
22 | Copyright © 2020 Benjamin Johnson. All rights reserved.
23 |
24 |
25 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/Headers/10.15/Spotlight/PRSCalculatorResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import "SFSearchResult_SpotlightExtras.h"
8 |
9 | @class NSString;
10 |
11 | @interface PRSCalculatorResult : SFSearchResult_SpotlightExtras
12 | {
13 | NSString *_inputString;
14 | }
15 |
16 | @property(readonly) NSString *inputString; // @synthesize inputString=_inputString;
17 | - (int)type;
18 | - (BOOL)isCalculation;
19 | - (id)groupName;
20 | - (id)category;
21 | - (BOOL)isEqual:(id)arg1;
22 | - (BOOL)isCurrency;
23 | - (BOOL)isConversion;
24 | - (id)initWithDisplayName:(id)arg1 inputString:(id)arg2;
25 |
26 | // Remaining properties
27 | @property(readonly, copy) NSString *debugDescription;
28 | @property(readonly, copy) NSString *description;
29 | @property(readonly) unsigned long long hash;
30 | @property(readonly) Class superclass;
31 |
32 | @end
33 |
34 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/Headers/10.15/Spotlight/SPPreviewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 |
8 | //@class NSObject, NSObject;
9 |
10 | @interface SPPreviewController : NSViewController
11 | {
12 | NSObject *_delegate;
13 | NSObject *_punchoutDelegate;
14 | id _resultsSelectionDelegate;
15 | }
16 |
17 | @property __weak id resultsSelectionDelegate; // @synthesize resultsSelectionDelegate=_resultsSelectionDelegate;
18 | @property __weak NSObject *punchoutDelegate; // @synthesize punchoutDelegate=_punchoutDelegate;
19 | @property __weak NSObject *delegate; // @synthesize delegate=_delegate;
20 | - (void)awakeFromNib;
21 | - (void)mouseUp:(id)arg1;
22 | - (id)urlToOpen;
23 | - (void)clearPreheatCache:(int)arg1;
24 | - (void)preheat:(id)arg1 row:(int)arg2 generation:(int)arg3;
25 | - (id)initWithNibName:(id)arg1 bundle:(id)arg2;
26 |
27 | @end
28 |
29 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/Headers/10.14/PRSCalculatorResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 9 2015 22:53:21).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard.
5 | //
6 |
7 | #import "PRSResult.h"
8 | @class NSString;
9 |
10 | @interface PRSCalculatorResult: PRSResult
11 | {
12 | NSString *_inputString;
13 | }
14 |
15 | @property(readonly) NSString *inputString; // @synthesize inputString=_inputString;
16 | - (id)type;
17 | - (BOOL)isCalculation;
18 | - (unsigned long long)rank;
19 | - (unsigned long long)score;
20 | - (id)groupName;
21 | - (id)category;
22 | - (BOOL)isEqual:(id)arg1;
23 | - (BOOL)isCurrency;
24 | - (BOOL)isConversion;
25 | - (id)initWithDisplayName:(id)arg1 inputString:(id)arg2;
26 |
27 | // Remaining properties
28 | @property(readonly, copy) NSString *debugDescription;
29 | @property(readonly, copy) NSString *description;
30 | @property(readonly) unsigned long long hash;
31 | @property(readonly) Class superclass;
32 |
33 | @end
34 |
35 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/Headers/10.14/PRSPreviewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | //#import "NSViewController.h"
8 |
9 | //@class NSObject, NSObject;
10 |
11 | @interface PRSPreviewController : NSViewController
12 | {
13 | NSObject*_delegate;
14 | NSObject *_punchoutDelegate;
15 | id _resultsSelectionDelegate;
16 | }
17 |
18 | @property __weak id resultsSelectionDelegate; // @synthesize resultsSelectionDelegate=_resultsSelectionDelegate;
19 | @property __weak NSObject *punchoutDelegate; // @synthesize punchoutDelegate=_punchoutDelegate;
20 | @property __weak NSObject *delegate; // @synthesize delegate=_delegate;
21 | - (void)awakeFromNib;
22 | - (void)mouseUp:(id)arg1;
23 | - (id)urlToOpen;
24 | - (void)clearPreheatCache:(int)arg1;
25 | - (void)preheat:(id)arg1 row:(int)arg2 generation:(int)arg3;
26 | - (id)initWithNibName:(id)arg1 bundle:(id)arg2;
27 |
28 | @end
29 |
30 |
--------------------------------------------------------------------------------
/SpotlightBridgeFrameworkTests/SPBPreviewControllerTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBPreviewController.m
3 | // SpotlightBridgeFrameworkTests
4 | //
5 | // Created by Benjamin Johnson on 15/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "SPBTestPreviewController.h"
11 | #import "SPBBridgingSearchResult.h"
12 |
13 | @interface SPBPreviewControllerTests : XCTestCase
14 |
15 | @end
16 |
17 | @implementation SPBPreviewControllerTests
18 |
19 | -(void)testDisplayResultIsCalledWithSearchResultWhenSettingRepresentedObject {
20 | SPBTestPreviewController *controller = [[SPBTestPreviewController alloc]init];
21 | SPBSearchResult *searchResult = [[SPBSearchResult alloc] init];
22 | SPBBridgingSearchResult *bridgingSearchResult = [[SPBBridgingSearchResult alloc] initWithSearchResult: searchResult];
23 |
24 | XCTAssertNil(controller.lastResult);
25 | controller.representedObject = bridgingSearchResult;
26 | XCTAssertEqual(controller.lastResult, bridgingSearchResult.searchResult);
27 |
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBResponse+Spotlight.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBResponse+Spotlight.m
3 | // SpotlightBridgeFramework
4 | //
5 | // Created by Benjamin Johnson on 20/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBResponse+Spotlight.h"
10 | #import "SPBResultSection+SFMutableResultSection.h"
11 | #import "SFMutableResultSection.h"
12 |
13 | @implementation SPBResponse (Spotlight)
14 |
15 | -(NSArray *)spotlightResultSections {
16 | NSMutableArray *spotlightResultSections = [NSMutableArray array];
17 | for (SPBResultSection *section in self.sections) {
18 | SFMutableResultSection *sfResultSection = [section createSpotlightResultSection];
19 | [spotlightResultSections addObject:sfResultSection];
20 | }
21 |
22 | return [spotlightResultSections copy];
23 | }
24 |
25 | -(NSArray *)spotlightResults {
26 | NSMutableArray *results = [NSMutableArray array];
27 | for (SPBResultSection *section in self.sections) {
28 | [results addObjectsFromArray:[section spotlightResults]];
29 | }
30 |
31 | return [results copy];
32 | }
33 |
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/SpotlightBridgeFrameworkTests/SpotlightBridgeFrameworkTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // SpotlightBridgeFrameworkTests.m
3 | // SpotlightBridgeFrameworkTests
4 | //
5 | // Created by Benjamin Johnson on 15/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SpotlightBridgeFrameworkTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation SpotlightBridgeFrameworkTests
16 |
17 | - (void)setUp {
18 | // Put setup code here. This method is called before the invocation of each test method in the class.
19 | }
20 |
21 | - (void)tearDown {
22 | // Put teardown code here. This method is called after the invocation of each test method in the class.
23 | }
24 |
25 | - (void)testExample {
26 | // This is an example of a functional test case.
27 | // Use XCTAssert and related functions to verify your tests produce the correct results.
28 | }
29 |
30 | - (void)testPerformanceExample {
31 | // This is an example of a performance test case.
32 | [self measureBlock:^{
33 | // Put the code you want to measure the time of here.
34 | }];
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # General
2 | .DS_Store
3 | .AppleDouble
4 | .LSOverride
5 |
6 | # Icon must end with two \r
7 | Icon
8 |
9 | # Thumbnails
10 | ._*
11 |
12 | # Files that might appear in the root of a volume
13 | .DocumentRevisions-V100
14 | .fseventsd
15 | .Spotlight-V100
16 | .TemporaryItems
17 | .Trashes
18 | .VolumeIcon.icns
19 | .com.apple.timemachine.donotpresent
20 |
21 | # Directories potentially created on remote AFP share
22 | .AppleDB
23 | .AppleDesktop
24 | Network Trash Folder
25 | Temporary Items
26 | .apdisk
27 |
28 |
29 | # Xcode
30 | #
31 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
32 |
33 | ## User settings
34 | xcuserdata/
35 |
36 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
37 | *.xcscmblueprint
38 | *.xccheckout
39 |
40 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
41 | build/
42 | DerivedData/
43 | *.moved-aside
44 | *.pbxuser
45 | !default.pbxuser
46 | *.mode1v3
47 | !default.mode1v3
48 | *.mode2v3
49 | !default.mode2v3
50 | *.perspectivev3
51 | !default.perspectivev3
52 |
53 | ## Gcc Patch
54 | /*.gcno
55 |
56 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBSearchResult.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBSearchResult.m
3 | // SpotlightBridgeFramework
4 | //
5 | // Created by Benjamin Johnson on 14/7/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBSearchResult.h"
10 | #import "SPBPlaceholderPreviewController.h"
11 |
12 | @implementation SPBSearchResult
13 |
14 | -(instancetype) initWithDisplayName: (NSString*)displayName {
15 | self = [super init];
16 | if (self) {
17 | self.displayName = displayName;
18 | }
19 |
20 | return self;
21 | }
22 |
23 | -(BOOL)openWithSearchString: (NSString *)searchString {
24 | return YES;
25 | }
26 |
27 | -(NSImage *)iconImage {
28 | return [[NSWorkspace sharedWorkspace] iconForFile:@"/System/Library/CoreServices/Spotlight.app"];
29 | }
30 |
31 | -(NSImage*)iconImageForApplication {
32 | return [self iconImage];
33 | }
34 |
35 | -(NSViewController*) previewViewController {
36 | return [SPBPlaceholderPreviewController shared];
37 | }
38 |
39 | -(BOOL)isTopHit {
40 | return NO;
41 | }
42 |
43 | -(float) maxScore {
44 | return 100;
45 | }
46 |
47 | -(float) score {
48 | return 50;
49 | }
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBResultSection+SFMutableResultSection.m:
--------------------------------------------------------------------------------
1 | #import "SPBResultSection+SFMutableResultSection.h"
2 | #include
3 |
4 | #ifdef __MAC_10_15
5 | #import "SFMutableResultSection.h"
6 | #import "SPBBridgingSearchResult.h"
7 |
8 | @implementation SPBResultSection (SPBResultSection_SFMutableResultSection)
9 |
10 | -(SFMutableResultSection*)createSpotlightResultSection {
11 | if (![SFMutableResultSection class]) {
12 | return NULL;
13 | }
14 |
15 | SFMutableResultSection *section = [[SFMutableResultSection alloc]init];
16 | NSArray *spotlightResults = [self spotlightResults];
17 |
18 | [section addResultsFromArray:spotlightResults];
19 | [section setGroupId:[NSNumber numberWithInt:SPBResultSectionGroupID]];
20 | [section setGroupName:[self title]];
21 | [section setDomain: SPBResultSectionDomain];
22 |
23 | NSString *bundleIdentifier = self.bundleIdentifier ? self.bundleIdentifier : @"com.spotlightbridge.plugin";
24 | [section setBundleIdentifier: bundleIdentifier];
25 | [section setTitle: @"SPBBridge"];
26 | [section setPinToTop:[self pinToTop]];
27 |
28 | return section;
29 | }
30 |
31 |
32 | @end
33 | #endif
34 |
--------------------------------------------------------------------------------
/SpotlightBridge/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | BNDL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | NSPrincipalClass
26 | SPBManager
27 | SIMBLTargetApplications
28 |
29 |
30 | BundleIdentifier
31 | com.apple.Spotlight
32 | MaxBundleVersion
33 | 999999999
34 | MinBundleVersion
35 | 0
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBResultSection.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBResultSection.m
3 | // SpotlightBridgeFramework
4 | //
5 | // Created by Benjamin Johnson on 25/7/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBResultSection.h"
10 | #import "SPBSearchResult.h"
11 | #import "SPBBridgingSearchResult.h"
12 |
13 | const int SPBResultSectionDomain = 1000;
14 | const int SPBResultSectionGroupID = 8080;
15 |
16 | @implementation SPBResultSection
17 |
18 | -(instancetype) initWithTitle: (NSString *)title {
19 | self = [super init];
20 | if (self) {
21 | [self setTitle:title];
22 | [self setPinToTop:NO];
23 | }
24 |
25 | return self;
26 | }
27 |
28 | - (NSArray *)spotlightResults {
29 | NSMutableArray *spotlightResults = [NSMutableArray array];
30 |
31 | for (SPBSearchResult *result in self.results) {
32 | [spotlightResults addObject:[self prepareBridgingSearchResultForResult:result]];
33 | }
34 |
35 | return [spotlightResults copy];
36 | }
37 |
38 | -(SPBBridgingSearchResult*)prepareBridgingSearchResultForResult: (SPBSearchResult*)result {
39 | SPBBridgingSearchResult *spotlightResult = [[SPBBridgingSearchResult alloc]initWithSearchResult:result];
40 | spotlightResult.sectionName = self.title;
41 | return spotlightResult;
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBQuery.m:
--------------------------------------------------------------------------------
1 |
2 | #import "SPBQuery.h"
3 | #import "SPBSearchResult.h"
4 | #import "SPBResponse.h"
5 | #import "SPBResultSection.h"
6 | #import "SPKResponse+SPBResponse.h"
7 |
8 | @implementation SPBQuery
9 |
10 | -(id) initWithUserQuery:(NSString *)arg2 queryGroupId:(unsigned long long)arg3 options:(unsigned long long)arg4 keyboardLanguage:(id)arg5 {
11 | NSString *copyOfQuery = [arg2 copy];
12 |
13 | self = [super initWithUserQuery:copyOfQuery queryGroupId:arg3 options:arg4 keyboardLanguage:arg5];
14 |
15 | return self;
16 | }
17 |
18 | +(BOOL) isQuerySupported:(NSString *)query {
19 | return YES;
20 | }
21 |
22 | -(void) start {
23 | [super start];
24 |
25 | [self performQuery:self.userQueryString withCompletionHandler:^(SPBResponse * response) {
26 | [self handleQueryResponse:response];
27 | }];
28 | }
29 |
30 | -(void) handleQueryResponse: (SPBResponse*)response {
31 | if (response) {
32 | SPKResponse *convertedResponse = [[SPKResponse alloc] initWithBridgedResponse:response];
33 | self.responseHandler(convertedResponse);
34 | } else {
35 | self.responseHandler(NULL);
36 | }
37 | }
38 |
39 | -(void) performQuery:(NSString *)userQueryString withCompletionHandler:(void (^)(SPBResponse *response))completionHandler {
40 | NSLog(@"SpotlightBridge performQuery should be overridden in subclass");
41 | completionHandler(NULL);
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/SPBTestExtension.bundle/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildMachineOSBuild
6 | 19F101
7 | CFBundleDevelopmentRegion
8 | en
9 | CFBundleExecutable
10 | SPBTestExtension
11 | CFBundleIdentifier
12 | benjamin.spotlightbridge.SPBTestExtension
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | SPBTestExtension
17 | CFBundlePackageType
18 | BNDL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSupportedPlatforms
22 |
23 | MacOSX
24 |
25 | CFBundleVersion
26 | 1
27 | DTCompiler
28 | com.apple.compilers.llvm.clang.1_0
29 | DTPlatformBuild
30 | 11E708
31 | DTPlatformVersion
32 | GM
33 | DTSDKBuild
34 | 19G68
35 | DTSDKName
36 | macosx10.15
37 | DTXcode
38 | 1160
39 | DTXcodeBuild
40 | 11E708
41 | LSMinimumSystemVersion
42 | 10.15
43 | NSHumanReadableCopyright
44 | Copyright © 2020 Benjamin Johnson. All rights reserved.
45 |
46 |
47 |
--------------------------------------------------------------------------------
/SpotlightBridge/SPBManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBManager.m
3 | // SpotlightBridge
4 | //
5 | // Created by Benjamin Johnson on 11/7/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 | @import AppKit;
9 |
10 | #import "SPBManager.h"
11 | #import "SPBSearchResult.h"
12 | #import "SPBExtensionManager.h"
13 | #import "SPBValidator.h"
14 |
15 | @interface SPBManager()
16 |
17 | @end
18 |
19 | @implementation SPBManager
20 |
21 | - (instancetype)init
22 | {
23 | self = [super init];
24 | if (self) {
25 | // self.localizedGroupNameByGroupName = [NSMutableDictionary dictionary];
26 | }
27 | return self;
28 | }
29 |
30 | /**
31 | * @return the single static instance of the plugin object
32 | */
33 | + (instancetype)sharedInstance
34 | {
35 | static SPBManager *plugin = nil;
36 | @synchronized(self) {
37 | if (!plugin) {
38 | plugin = [[self alloc] init];
39 | }
40 | }
41 | return plugin;
42 | }
43 |
44 | /**
45 | * A special method called by SIMBL once the application has started and all classes are initialized.
46 | */
47 | + (void)load
48 | {
49 | SPBManager *spotlightBridge = [SPBManager sharedInstance];
50 |
51 | NSUInteger osx_ver = [[NSProcessInfo processInfo] operatingSystemVersion].minorVersion;
52 | NSLog(@"SpotlightBridge loaded into %@ on macOS 10.%ld", [[NSBundle mainBundle] bundleIdentifier], (long)osx_ver);
53 |
54 | BOOL realityCheckResult = [SPBValidator performRealityCheck];
55 | if (!realityCheckResult) {
56 | NSLog(@"SpotlightBridge failed validation");
57 | }
58 |
59 | spotlightBridge.extensionManager = [[SPBExtensionManager alloc] initWithApplicationSupportSubPath:@"Application Support/SpotlightBridge"];
60 | [spotlightBridge.extensionManager loadExtensions];
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/Headers/10.15/SearchFoundation/SFMutableResultSection.h:
--------------------------------------------------------------------------------
1 | #import "SFResultSection.h"
2 |
3 | @class NSMutableOrderedSet, NSNumber, NSString, SFResultSection;
4 |
5 | @interface SFMutableResultSection : SFResultSection
6 | {
7 | BOOL _doNotFold;
8 | BOOL _pinToTop;
9 | unsigned int _domain;
10 | NSString *_groupName;
11 | NSNumber *_groupId;
12 | NSMutableOrderedSet *_resultSet;
13 | }
14 |
15 | + (BOOL)supportsSecureCoding;
16 | @property BOOL pinToTop; // @synthesize pinToTop=_pinToTop;
17 | @property(nonatomic) unsigned int domain; // @synthesize domain=_domain;
18 | @property BOOL doNotFold; // @synthesize doNotFold=_doNotFold;
19 | @property(retain, nonatomic) NSMutableOrderedSet *resultSet; // @synthesize resultSet=_resultSet;
20 | @property(retain, nonatomic) NSNumber *groupId; // @synthesize groupId=_groupId;
21 | @property(retain, nonatomic) NSString *groupName; // @synthesize groupName=_groupName;
22 | - (void)sortUsingComparator:(id)arg1;
23 | - (void)replaceResultsAtIndex:(unsigned long long)arg1 withResults:(id)arg2;
24 | - (void)removeResultsInArray:(id)arg1;
25 | - (void)removeResultsInRange:(struct _NSRange)arg1;
26 | - (void)removeResults:(id)arg1;
27 | - (void)removeResultsAtIndex:(unsigned long long)arg1;
28 | - (id)resultsAtIndex:(unsigned long long)arg1;
29 | - (unsigned long long)indexOfResult:(id)arg1;
30 | - (unsigned long long)resultsCount;
31 | - (void)addResults:(id)arg1 atIndex:(unsigned long long)arg2;
32 | - (void)addResults:(id)arg1;
33 | - (void)addResultsFromArray:(id)arg1;
34 | - (void)clearResults;
35 | - (id)results;
36 | - (void)setResults:(id)arg1;
37 | - (void)setTitle:(id)arg1;
38 |
39 | - (void)encodeWithCoder:(id)arg1;
40 | - (id)initWithCoder:(id)arg1;
41 | - (id)copy;
42 | - (id)copyWithZone:(struct _NSZone *)arg1;
43 | - (id)mutableDeepCopy;
44 | - (id)description;
45 | - (id)initWithPrototype:(id)arg1;
46 | - (id)initWithSection:(id)arg1;
47 |
48 | @end
49 |
50 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/Headers/10.15/SearchFoundation/SFResultSection.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | //#import "NSObject.h"
8 | //
9 | //#import "NSCopying.h"
10 | //#import "NSSecureCoding.h"
11 | //#import "SFJSONSerializable.h"
12 | #import
13 |
14 | @class NSArray, NSData, NSDictionary, NSString;
15 |
16 | @interface SFResultSection : NSObject
17 | {
18 | NSArray *_results;
19 | unsigned long long _maxInitiallyVisibleResults;
20 | NSString *_identifier;
21 | NSString *_bundleIdentifier;
22 | NSString *_title;
23 | NSString *_moreText;
24 | double _rankingScore;
25 | }
26 |
27 | + (BOOL)supportsSecureCoding;
28 | @property(nonatomic) double rankingScore; // @synthesize rankingScore=_rankingScore;
29 | @property(copy, nonatomic) NSString *moreText; // @synthesize moreText=_moreText;
30 | @property(copy, nonatomic) NSString *title; // @synthesize title=_title;
31 | @property(copy, nonatomic) NSString *bundleIdentifier; // @synthesize bundleIdentifier=_bundleIdentifier;
32 | @property(copy, nonatomic) NSString *identifier; // @synthesize identifier=_identifier;
33 | @property(nonatomic) unsigned long long maxInitiallyVisibleResults; // @synthesize maxInitiallyVisibleResults=_maxInitiallyVisibleResults;
34 | @property(retain, nonatomic) NSArray *results; // @synthesize results=_results;
35 | - (id)copyWithZone:(struct _NSZone *)arg1;
36 | - (void)encodeWithCoder:(id)arg1;
37 | - (id)initWithCoder:(id)arg1;
38 | - (id)init;
39 | @property(readonly, nonatomic) NSData *jsonData;
40 | @property(readonly, nonatomic) NSDictionary *dictionaryRepresentation;
41 |
42 | // Remaining properties
43 | @property(readonly, copy) NSString *debugDescription;
44 | @property(readonly, copy) NSString *description;
45 | @property(readonly) unsigned long long hash;
46 | @property(readonly) Class superclass;
47 |
48 | @end
49 |
50 |
--------------------------------------------------------------------------------
/SpotlightBridge/SPBSectionRankingManager.m:
--------------------------------------------------------------------------------
1 | #import "SPBSectionRankingManager.h"
2 | #import "SFMutableResultSection.h"
3 | #import "SPBResultSection.h"
4 | #import "SPBRankingManager.h"
5 |
6 | @implementation SPBSectionRankingManager
7 |
8 | + (NSArray *)mergeSpotlightBridgeSectionsFromBundleIdToSectionMapping:(NSDictionary *)bundleIdToSectionMap withRankedSections:(NSArray *)rankedSections
9 | {
10 | NSArray *spbSections = [self filterSPBSectionsFromResultSections: [bundleIdToSectionMap allValues]];
11 | if (![spbSections count]) {
12 | return rankedSections;
13 | }
14 |
15 | NSArray *spbRankedSections = [self rankSpotlightBridgeSections:spbSections];
16 |
17 | return [spbRankedSections arrayByAddingObjectsFromArray:rankedSections];
18 | }
19 |
20 | + (NSArray *)filterSPBSectionsFromResultSections:(NSArray *)sections {
21 | NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(SFMutableResultSection *object, NSDictionary *bindings) {
22 | return [object domain] == SPBResultSectionDomain;
23 | }];
24 |
25 | return [sections filteredArrayUsingPredicate:predicate];
26 | }
27 |
28 | +(NSArray *)rankSpotlightBridgeSections: (NSArray *)sections {
29 | NSMutableDictionary *scoreMap = [self scoreMapForSections:sections];
30 |
31 | return [sections sortedArrayUsingComparator:^NSComparisonResult(SFMutableResultSection *a, SFMutableResultSection *b) {
32 | NSNumber *firstSectionScore = scoreMap[a.bundleIdentifier];
33 | NSNumber *secondSectionScore = scoreMap[b.bundleIdentifier];
34 |
35 | return [secondSectionScore compare: firstSectionScore];
36 | }];
37 | }
38 |
39 | +(NSMutableDictionary*)scoreMapForSections: (NSArray *)sections {
40 | NSMutableDictionary *scoreMap = [NSMutableDictionary dictionary];
41 | for (SFMutableResultSection *section in sections) {
42 | float score = [SPBRankingManager getMaxScoreForResults:section.results];
43 | scoreMap[section.bundleIdentifier] = [NSNumber numberWithFloat: score];
44 | }
45 |
46 | return scoreMap;
47 | }
48 |
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBBridgingSearchResult.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBBridgingSearchResult.m
3 | // SpotlightBridgeFramework
4 | //
5 | // Created by Benjamin Johnson on 1/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBBridgingSearchResult.h"
10 | #include
11 |
12 | @implementation SPBBridgingSearchResult
13 |
14 | -(instancetype) initWithSearchResult: (SPBSearchResult*)searchResult {
15 | self = [super initWithContentType:nil displayName:searchResult.displayName];
16 | if (self) {
17 | self.searchResult = searchResult;
18 |
19 | #ifdef __MAC_10_15
20 | if ([self respondsToSelector:@selector(setIdentifier:)]) {
21 | NSString *identifier = [[[NSUUID alloc] init] UUIDString];
22 | self.identifier = identifier;
23 | }
24 |
25 | if ([self respondsToSelector:@selector(setSectionBundleIdentifier:)]) {
26 | NSString *calculatorBundleIdentifier = @"com.apple.calculator";
27 | self.sectionBundleIdentifier = calculatorBundleIdentifier;
28 | }
29 |
30 | self.isLocalApplicationResult = true;
31 | if ([searchResult isTopHit]) {
32 | const int SpotlightTopHitValue = 2;
33 | self.topHit = SpotlightTopHitValue;
34 | }
35 | #endif
36 | }
37 |
38 | return self;
39 | }
40 |
41 | -(unsigned long long)rank {
42 | return 0xffffffffffffffff;
43 | }
44 |
45 | -(NSString*)groupName {
46 | return self.sectionName;
47 | }
48 |
49 | -(NSString *)category {
50 | return self.sectionName;
51 | }
52 |
53 | -(id)sharedCustomPreviewController {
54 | return [self.searchResult previewViewController];
55 | }
56 |
57 | -(NSImage*)iconImage {
58 | return [self.searchResult iconImage];
59 | }
60 |
61 | -(NSImage*)iconImageForApplication {
62 | return [self.searchResult iconImageForApplication];
63 | }
64 |
65 | -(BOOL)openWithSearchString:(NSString*)searchString block:(void *)arg3 {
66 | return [self.searchResult openWithSearchString:searchString];
67 | }
68 |
69 | - (BOOL)isLocalResult {
70 | return YES;
71 | }
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/SpotlightBridgeFrameworkTests/SPBResultSection.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBResultSection.m
3 | // SpotlightBridgeFrameworkTests
4 | //
5 | // Created by Benjamin Johnson on 15/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "SPBResultSection+SFMutableResultSection.h"
12 | #import "SFMutableResultSection.h"
13 | #import "SPBBridgingSearchResult.h"
14 |
15 | @interface SPBResultSectionTests : XCTestCase
16 |
17 | @end
18 |
19 | @implementation SPBResultSectionTests
20 |
21 | -(void)testCreateSpotlightResultSection {
22 | SPBResultSection *section = [[SPBResultSection alloc]initWithTitle:@"my title"];
23 | section.pinToTop = NO;
24 | section.bundleIdentifier = @"com.test";
25 |
26 | SFMutableResultSection *sfResultSection = [section createSpotlightResultSection];
27 |
28 | XCTAssertTrue([sfResultSection.groupName isEqualToString: @"my title"]);
29 | XCTAssertTrue([sfResultSection.bundleIdentifier isEqualToString:@"com.test"]);
30 | XCTAssertTrue([sfResultSection.groupId isEqualToNumber:[NSNumber numberWithInt:SPBResultSectionGroupID]]);
31 | XCTAssertTrue([sfResultSection.title isEqualToString:@"SPBBridge"]);
32 | XCTAssertFalse(sfResultSection.pinToTop);
33 | }
34 |
35 | -(void)testCreateSpotlightResultSectionWithResults {
36 | SPBResultSection *section = [[SPBResultSection alloc]initWithTitle:@"my title"];
37 | SPBSearchResult *dogSearchResult = [[SPBSearchResult alloc] initWithDisplayName:@"dog"];
38 | SPBSearchResult *catSearchResult = [[SPBSearchResult alloc] initWithDisplayName:@"cat"];
39 | NSArray *searchResults = @[dogSearchResult, catSearchResult];
40 | section.results = searchResults;
41 |
42 | SFMutableResultSection *sfResultSection = [section createSpotlightResultSection];
43 | XCTAssertEqual([sfResultSection.results count], [searchResults count]);
44 |
45 | for (int i = 0; i < [section.results count]; i++) {
46 | SPBSearchResult *searchResult = searchResults[i];
47 | SPBBridgingSearchResult *bridgingSearchResult = sfResultSection.results[i];
48 |
49 | XCTAssertEqual(bridgingSearchResult.searchResult, searchResult);
50 | }
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/SPBExtensionManagerTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBExtensionManagerTests.m
3 | // SpotlightBridgeTests
4 | //
5 | // Created by Benjamin Johnson on 15/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "SPBExtensionManager.h"
11 | #import "SPBTestExtensionManager.h"
12 |
13 | @interface SPBExtensionManagerTests : XCTestCase
14 |
15 | @end
16 |
17 | @implementation SPBExtensionManagerTests
18 |
19 | -(void)testInitWithApplicationSupportSubPath {
20 | NSString *applicationSupportSubPath = @"Application Support/SpotlightBridge";
21 |
22 | SPBExtensionManager *extensionManager = [[SPBExtensionManager alloc] initWithApplicationSupportSubPath:applicationSupportSubPath];
23 |
24 | XCTAssertNotNil(extensionManager);
25 | XCTAssertTrue([extensionManager.applicationSupportSubPath isEqualToString:applicationSupportSubPath]);
26 | }
27 |
28 | -(void)testLoadExtensionWithInvalidPath {
29 | SPBExtensionManager *extensionManager = [[SPBExtensionManager alloc] initWithApplicationSupportSubPath:@"Application Support/SpotlightBridge"];
30 |
31 | Class extensionClass = [extensionManager loadExtensionWithPath:@"/Fakepath/fake.bundle"];
32 | XCTAssertNil(extensionClass);
33 | }
34 |
35 | -(void)testLoadExtensionWithValidPath {
36 | SPBExtensionManager *extensionManager = [[SPBExtensionManager alloc] initWithApplicationSupportSubPath:@"Application Support/SpotlightBridge"];
37 |
38 | NSString *testExtensionPath = [[NSBundle bundleForClass:[self class]] pathForResource:@"SPBTestExtension" ofType:@"bundle"];
39 |
40 | Class extensionClass = [extensionManager loadExtensionWithPath:testExtensionPath];
41 |
42 | XCTAssertNotNil(extensionClass);
43 | XCTAssertTrue([[extensionClass className] isEqualToString:@"SPBTestQuery"]);
44 | }
45 |
46 | -(void)testLoadExtensions {
47 | SPBTestExtensionManager *extensionManager = [[SPBTestExtensionManager alloc] initWithApplicationSupportSubPath:@"Application Support/SpotlightBridge"];
48 | [extensionManager loadExtensions];
49 |
50 | XCTAssertEqual([extensionManager.extensions count], 1);
51 | XCTAssertTrue([[extensionManager.extensions[0] className] isEqualToString:@"SPBTestQuery"]);
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/SpotlightBridge/PRSRankingManager.h:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #ifdef __MAC_10_14
4 | #import
5 |
6 | @interface PRSRankingManager : NSObject
7 | {
8 | NSDictionary *_groupedResults;
9 | NSDictionary *_shortcutsDict;
10 | NSArray *_preferredTopHitGroups;
11 | NSMutableDictionary *_combinedTopScoreOrder;
12 | NSMutableDictionary *_combinedBottomScoreOrder;
13 | }
14 |
15 | + (id)getCoreDuetValues;
16 | + (id)getCoreDuetValuesWhilePossiblyBlocking;
17 | + (void)fetchDuetValues;
18 | + (id)quickGlanceBundleIds;
19 | + (void)addToGlanceCategories:(id)arg1;
20 | @property(retain) NSMutableDictionary *combinedBottomScoreOrder; // @synthesize combinedBottomScoreOrder=_combinedBottomScoreOrder;
21 | @property(retain) NSMutableDictionary *combinedTopScoreOrder; // @synthesize combinedTopScoreOrder=_combinedTopScoreOrder;
22 | @property(retain, nonatomic) NSArray *preferredTopHitGroups; // @synthesize preferredTopHitGroups=_preferredTopHitGroups;
23 | @property(retain, nonatomic) NSDictionary *shortcutsDict; // @synthesize shortcutsDict=_shortcutsDict;
24 | @property(retain, nonatomic) NSDictionary *groupedResults; // @synthesize groupedResults=_groupedResults;
25 | - (void)getRankedCategoriesForQuery:(id)arg1 meanScores:(id)arg2 maxScores:(id)arg3 standardDeviation:(id)arg4 sectionHeaderToBundleIdMapping:(id)arg5 bundleIdToSectionHeaderMapping:(id)arg6 rankingConfiguration:(id)arg7 placements:(id)arg8 topCategories:(id *)arg9 bottomCategories:(id *)arg10 blacklistedCategories:(id *)arg11 sessionIdentifier:(unsigned long long)arg12 logString:(id)arg13 cepsUsed:(id)arg14 poorTextMatchCategories:(id)arg15;
26 | - (void)adjustScoresUsingCategoryEngagement:(id)arg1 forTopScores:(id)arg2 forBottomScores:(id)arg3 query:(id)arg4 logInfo:(id)arg5 usingRankingKnobs:(id)arg6;
27 | - (id)getTopHitsBasedOnCategoryOrder:(id)arg1 groupedResults:(id)arg2 CEPTopHitThreshold:(double)arg3 CEPProbabilityFactor:(double)arg4 topHitCountLimit:(long long)arg5;
28 | - (id)reRankCategories:(id)arg1 groupedResults:(id)arg2;
29 | - (id)chooseTopHitsWithMaxCount:(unsigned long long)arg1 disabledGroups:(id)arg2 topHit:(id)arg3 queryString:(id)arg4 cumulativeTopHitSet:(id)arg5 sortedResults:(id)arg6;
30 | - (BOOL)rankIsMeaningfulForTopHit:(unsigned long long)arg1;
31 | - (id)initWithGroupedResult:(id)arg1 preferredTopHitGroups:(id)arg2 shortcuts:(id)arg3;
32 | - (id)init;
33 |
34 | @end
35 |
36 | #endif
37 |
38 |
--------------------------------------------------------------------------------
/SpotlightBridge.xcodeproj/xcshareddata/xcschemes/SpotlightBridgeFramework.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
57 |
58 |
59 |
60 |
62 |
63 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/SPBPlaceholderPreviewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/SPBTestExtension.bundle/Contents/_CodeSignature/CodeResources:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | files
6 |
7 | files2
8 |
9 | rules
10 |
11 | ^Resources/
12 |
13 | ^Resources/.*\.lproj/
14 |
15 | optional
16 |
17 | weight
18 | 1000
19 |
20 | ^Resources/.*\.lproj/locversion.plist$
21 |
22 | omit
23 |
24 | weight
25 | 1100
26 |
27 | ^Resources/Base\.lproj/
28 |
29 | weight
30 | 1010
31 |
32 | ^version.plist$
33 |
34 |
35 | rules2
36 |
37 | .*\.dSYM($|/)
38 |
39 | weight
40 | 11
41 |
42 | ^(.*/)?\.DS_Store$
43 |
44 | omit
45 |
46 | weight
47 | 2000
48 |
49 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
50 |
51 | nested
52 |
53 | weight
54 | 10
55 |
56 | ^.*
57 |
58 | ^Info\.plist$
59 |
60 | omit
61 |
62 | weight
63 | 20
64 |
65 | ^PkgInfo$
66 |
67 | omit
68 |
69 | weight
70 | 20
71 |
72 | ^Resources/
73 |
74 | weight
75 | 20
76 |
77 | ^Resources/.*\.lproj/
78 |
79 | optional
80 |
81 | weight
82 | 1000
83 |
84 | ^Resources/.*\.lproj/locversion.plist$
85 |
86 | omit
87 |
88 | weight
89 | 1100
90 |
91 | ^Resources/Base\.lproj/
92 |
93 | weight
94 | 1010
95 |
96 | ^[^/]+$
97 |
98 | nested
99 |
100 | weight
101 | 10
102 |
103 | ^embedded\.provisionprofile$
104 |
105 | weight
106 | 20
107 |
108 | ^version\.plist$
109 |
110 | weight
111 | 20
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/Headers/10.15/Spotlight/SPKQuery.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | //#import "NSObject.h"
8 |
9 | @class SPKQueryDelegate, NSArray, NSMutableArray, NSString, SPKResponse;
10 |
11 | @interface SPKQuery : NSObject
12 | {
13 | NSMutableArray *_childQueries;
14 | double _startTime;
15 | int _queryState;
16 | unsigned long long _queryOptions;
17 | unsigned long long _queryId;
18 | unsigned long long _queryGroupId;
19 | NSString *_userQueryString;
20 | NSObject *_delegate;
21 | SPKQuery *_parentQuery;
22 | double _queryStartTime;
23 | NSString *_keyboardLanguage;
24 | id _clientResponseHandler;
25 | NSString *_internalUnmodifiedUserQueryString;
26 | }
27 |
28 | + (BOOL)isQuerySupported:(unsigned long long)arg1;
29 | + (void)initialize;
30 | @property(retain) NSString *internalUnmodifiedUserQueryString; // @synthesize internalUnmodifiedUserQueryString=_internalUnmodifiedUserQueryString;
31 | @property(copy) id clientResponseHandler; // @synthesize clientResponseHandler=_clientResponseHandler;
32 | @property int queryState; // @synthesize queryState=_queryState;
33 | @property(retain) NSString *keyboardLanguage; // @synthesize keyboardLanguage=_keyboardLanguage;
34 | @property double queryStartTime; // @synthesize queryStartTime=_queryStartTime;
35 | @property __weak SPKQuery *parentQuery; // @synthesize parentQuery=_parentQuery;
36 | @property(nonatomic) __weak NSObject *delegate; // @synthesize delegate=_delegate;
37 | @property(readonly) NSString *userQueryString; // @synthesize userQueryString=_userQueryString;
38 | @property(readonly) unsigned long long queryGroupId; // @synthesize queryGroupId=_queryGroupId;
39 | @property(readonly) unsigned long long queryId; // @synthesize queryId=_queryId;
40 | @property unsigned long long queryOptions; // @synthesize queryOptions=_queryOptions;
41 | @property(readonly, getter=isDictionaryQuery) BOOL dictionaryQuery;
42 | @property(readonly) BOOL supportsRefinement;
43 | @property(readonly, getter=isExtensionQuery) BOOL extensionQuery;
44 | @property(readonly, getter=isCalculatorQuery) BOOL calculatorQuery;
45 | @property(readonly, getter=isApplicationQuery) BOOL applicationQuery;
46 | @property(readonly, getter=isDocumentQuery) BOOL documentQuery;
47 | @property(readonly, getter=isRemoteQuery) BOOL remoteQuery;
48 | @property(readonly, getter=isParsecQuery) BOOL parsecQuery;
49 | - (void)_queryDidComplete;
50 | - (void)_queryWillStart;
51 | - (double)startTime;
52 | - (void)cancel;
53 | - (void)start;
54 | - (BOOL)isFinished;
55 | - (BOOL)isCanceled;
56 | - (BOOL)isCompleted;
57 | - (BOOL)isStarted;
58 | - (void)addChildQuery:(id)arg1;
59 | @property(readonly) NSArray *childQueries;
60 | @property(readonly) void (^responseHandler)(SPKResponse*);
61 | @property(retain) NSString *unmodifiedUserQueryString;
62 | - (id)description;
63 | - (BOOL)updateUserQueryString:(id)arg1;
64 | - (id)initWithUserQuery:(id)arg1 queryGroupId:(unsigned long long)arg2 options:(unsigned long long)arg3 keyboardLanguage:(id)arg4;
65 | - (id)initWithUserQuery:(id)arg1 options:(unsigned long long)arg2;
66 | - (id)initWithUserQuery:(id)arg1;
67 | - (id)initWithUserQuery:(id)arg1 queryGroupId:(unsigned long long)arg2;
68 | - (BOOL)needsIO;
69 | - (void)setRankingQueries:(id)arg1;
70 |
71 | @end
72 |
73 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/Headers/10.15/Spotlight/SPKResponse.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | @class NSArray, NSDictionary, NSError, NSString, PRSRankingConfiguration;
8 |
9 | @interface SPKResponse : NSObject
10 | {
11 | BOOL _topHitIsIn;
12 | BOOL _noChangeInResultsSinceLastResponse;
13 | BOOL _parsecFinished;
14 | BOOL _metadataFinished;
15 | BOOL _corespotlightFinished;
16 | BOOL _isRewrite;
17 | int _kind;
18 | PRSRankingConfiguration *_rankingConfiguration;
19 | unsigned long long _queryId;
20 | NSError *_error;
21 | NSArray *_sections;
22 | NSDictionary *_groupedResults;
23 | NSString *_fbq;
24 | NSString *_userQueryString;
25 | NSString *_correctedQuery;
26 | NSArray *_suggestions;
27 | NSArray *_added;
28 | NSArray *_changed;
29 | NSArray *_removed;
30 | }
31 |
32 | @property(readonly) NSArray *removed; // @synthesize removed=_removed;
33 | @property(readonly) NSArray *changed; // @synthesize changed=_changed;
34 | @property(readonly) NSArray *added; // @synthesize added=_added;
35 | @property(retain) NSArray *suggestions; // @synthesize suggestions=_suggestions;
36 | @property(retain) NSString *correctedQuery; // @synthesize correctedQuery=_correctedQuery;
37 | @property BOOL isRewrite; // @synthesize isRewrite=_isRewrite;
38 | @property(retain) NSString *userQueryString; // @synthesize userQueryString=_userQueryString;
39 | @property(retain) NSString *fbq; // @synthesize fbq=_fbq;
40 | @property BOOL corespotlightFinished; // @synthesize corespotlightFinished=_corespotlightFinished;
41 | @property BOOL metadataFinished; // @synthesize metadataFinished=_metadataFinished;
42 | @property BOOL parsecFinished; // @synthesize parsecFinished=_parsecFinished;
43 | @property BOOL noChangeInResultsSinceLastResponse; // @synthesize noChangeInResultsSinceLastResponse=_noChangeInResultsSinceLastResponse;
44 | @property BOOL topHitIsIn; // @synthesize topHitIsIn=_topHitIsIn;
45 | @property(readonly) NSDictionary *groupedResults; // @synthesize groupedResults=_groupedResults;
46 | @property(readonly) NSArray *sections; // @synthesize sections=_sections;
47 | @property(readonly) NSError *error; // @synthesize error=_error;
48 | @property(readonly) unsigned long long queryId; // @synthesize queryId=_queryId;
49 | @property(readonly) int kind; // @synthesize kind=_kind;
50 | @property(retain) PRSRankingConfiguration *rankingConfiguration; // @synthesize rankingConfiguration=_rankingConfiguration;
51 | - (id)description;
52 | - (id)initWithQueryID:(unsigned long long)arg1 error:(id)arg2;
53 | - (id)initWithQueryID:(unsigned long long)arg1 sections:(id)arg2;
54 | - (id)initWithQueryID:(unsigned long long)arg1 kind:(int)arg2 sections:(id)arg3;
55 | - (id)initWithQueryID:(unsigned long long)arg1 kind:(int)arg2 sections:(id)arg3 groupedResults:(id)arg4;
56 | - (id)initWithQueryID:(unsigned long long)arg1 kind:(int)arg2 sections:(id)arg3 groupedResults:(id)arg4 error:(id)arg5;
57 |
58 | //Mojave 10.14
59 | - (id)initWithQueryID:(unsigned long long)arg1 results:(id)arg2;
60 | - (id)initWithQueryID:(unsigned long long)arg1 kind:(int)arg2 results:(id)arg3;
61 | - (id)initWithQueryID:(unsigned long long)arg1 kind:(int)arg2 results:(id)arg3 groupedResults:(id)arg4;
62 | - (id)initWithQueryID:(unsigned long long)arg1 kind:(int)arg2 results:(id)arg3 groupedResults:(id)arg4 error:(id)arg5;
63 |
64 | @end
65 |
66 |
--------------------------------------------------------------------------------
/SpotlightBridge.xcodeproj/xcshareddata/xcschemes/SpotlightBridge.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
46 |
49 |
50 |
51 |
57 |
58 |
59 |
60 |
61 |
62 |
68 |
69 |
75 |
76 |
77 |
78 |
80 |
81 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/SpotlightBridge/SPBExtensionManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBExtensionManager.m
3 | // SpotlightBridge
4 | //
5 | // Created by Benjamin Johnson on 25/7/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBExtensionManager.h"
10 | #import "SPBQuery.h"
11 | #import
12 |
13 | @implementation SPBExtensionManager
14 |
15 | -(instancetype)initWithApplicationSupportSubPath:(NSString *)subpath {
16 | self = [super init];
17 | if (self) {
18 | self.applicationSupportSubPath = subpath;
19 | }
20 |
21 | return self;
22 | }
23 |
24 | -(void) loadExtensions {
25 | NSMutableArray *extensionBundlePaths = [self extensionBundlePaths];
26 | NSMutableArray *extensions = [NSMutableArray array];
27 |
28 | for (NSString *extensionBundlePath in extensionBundlePaths) {
29 | id extension = [self loadExtensionWithPath:extensionBundlePath];
30 | if (extension) {
31 | [extensions addObject:extension];
32 | }
33 | }
34 |
35 | self.extensions = [extensions copy];
36 | }
37 |
38 | - (Class) loadExtensionWithPath: (NSString *)path {
39 | NSBundle *extensionBundle = [NSBundle bundleWithPath:path];
40 | if (!extensionBundle || ![extensionBundle load]) {
41 | NSLog(@"SpotlightBridge failed to load extension at path %@", path);
42 | return NULL;
43 | }
44 |
45 | Class extensionPrincipalClass = [extensionBundle principalClass];
46 | if (extensionPrincipalClass && [self validateExtension:extensionPrincipalClass]) {
47 | return extensionPrincipalClass;
48 | } else {
49 | NSLog(@"SpotlightBridge failed to load extension %@", [extensionBundle bundleIdentifier]);
50 | return NULL;
51 | }
52 | }
53 |
54 | -(NSMutableArray *) extensionBundlePaths {
55 | NSArray *bundleSearchPaths = [self bundleSearchPaths];
56 | NSEnumerator *searchPathEnumerator = [bundleSearchPaths objectEnumerator];
57 | NSMutableArray *bundlePaths = [NSMutableArray array];
58 |
59 | NSString *currentPath;
60 | while (currentPath = [searchPathEnumerator nextObject]) {
61 | [bundlePaths addObjectsFromArray:[self bundlePathsForSearchPath:currentPath]];
62 | }
63 |
64 | return bundlePaths;
65 | }
66 |
67 | -(NSArray *)bundleSearchPaths {
68 | NSMutableArray *bundleSearchPaths = [NSMutableArray array];
69 |
70 | // Find Library directories in all domains except /System
71 | NSArray *librarySearchPaths = NSSearchPathForDirectoriesInDomains(
72 | NSLibraryDirectory, NSAllDomainsMask - NSSystemDomainMask, YES);
73 |
74 | for (NSString *currentPath in librarySearchPaths) {
75 | [bundleSearchPaths addObject:
76 | [currentPath stringByAppendingPathComponent:self.applicationSupportSubPath]];
77 | }
78 |
79 | return [bundleSearchPaths copy];
80 | }
81 |
82 | -(NSMutableArray *)bundlePathsForSearchPath:(NSString*)searchPath {
83 | NSMutableArray *bundlePaths = [NSMutableArray array];
84 | NSDirectoryEnumerator *bundleEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:searchPath];
85 |
86 | if (!bundleEnumerator) {
87 | return bundlePaths;
88 | }
89 |
90 | NSString *currentBundlePath;
91 | while (currentBundlePath = [bundleEnumerator nextObject]) {
92 | if ([[currentBundlePath pathExtension] isEqualToString:@"bundle"]) {
93 | [bundlePaths addObject:[searchPath stringByAppendingPathComponent:currentBundlePath]];
94 | }
95 | }
96 |
97 | return bundlePaths;
98 | }
99 |
100 | -(BOOL) validateExtension: (Class) extensionPrincipalClass {
101 | return [extensionPrincipalClass isSubclassOfClass:[SPBQuery class]];
102 | }
103 |
104 | @end
105 |
--------------------------------------------------------------------------------
/SpotlightBridge/SPBSpotlightBridge.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBSpotlightBridge.m
3 | // SpotlightBridge
4 | //
5 | // Created by Benjamin Johnson on 11/7/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBSpotlightBridge.h"
10 | #import "ZKSwizzle.h"
11 | #import "SPBManager.h"
12 | #import "SPBRankingManager.h"
13 | #import "PRSRankingManager.h"
14 | #import "SPBSectionRankingManager.h"
15 | #include
16 |
17 | #pragma mark - Swizzles
18 | #pragma mark - SPAppDelegate
19 |
20 | hook(SPQueryTask)
21 | /*
22 | Injects the query classes for each loaded extensions into the query classes return value. When included, Spotlight will alloc and init them and proceed to call the query method on the instances of the query classes. This is the main entry point that makes Spotlight Bridge possible.
23 | */
24 | +(NSArray*)queryClasses {
25 | NSArray *extensionQueryClasses = [[[SPBManager sharedInstance] extensionManager] extensions];
26 | return [ZKOrig(NSArray*) arrayByAddingObjectsFromArray:extensionQueryClasses];
27 | }
28 |
29 | endhook
30 |
31 | #pragma mark Hooks for Catalina
32 | #ifdef __MAC_10_15
33 |
34 | hook(SSRankingManager)
35 | /* Inserts the Spotlight Bridge sections with the default spotlight sections in the desired ordering */
36 | - (id)rankSectionsUsingBundleIDToSectionMapping:(NSDictionary*)arg1 withRanker:(id)arg2 isPeopleSearch:(BOOL)arg3 isScopedAppSearch:(BOOL)arg4 queryId:(unsigned long long)arg5 isCJK:(BOOL)arg6 {
37 | NSArray *rankedSections = ZKOrig(id, arg1, arg2, arg3, arg4, arg5, arg6);
38 | return [SPBSectionRankingManager mergeSpotlightBridgeSectionsFromBundleIdToSectionMapping:arg1 withRankedSections:rankedSections];
39 | }
40 |
41 | endhook
42 |
43 | #endif
44 |
45 | #pragma mark Hooks for Mojave
46 | #ifdef __MAC_10_14
47 |
48 | hook(SPQueryTask)
49 |
50 | -(id)rankAndPrune:(NSMutableDictionary*)resultsByGroupName maxResults:(unsigned long long)arg3 parsecResultCategories:(id)arg4 topHitCategory:(id)arg5 totalResultCount:(long long *)arg6 query:(id)arg7 {
51 | NSMutableDictionary *result = ZKOrig(id, resultsByGroupName, arg3, arg4, arg5,arg6,arg7);
52 | return [SPBRankingManager mergeBridgeResultsWithRankedAndPrunedResults:result resultsByGroupName:resultsByGroupName];
53 | }
54 |
55 | endhook
56 |
57 | hook(PRSRankingManager)
58 |
59 | /* Required to ensure the Spotlight Bridge grouped results will be included with the final results in the preferred arrangement */
60 | - (void)getRankedCategoriesForQuery:(id)arg1 meanScores:(id)meanScores maxScores:(id)arg3 standardDeviation:(id)arg4 sectionHeaderToBundleIdMapping:(id)arg5 bundleIdToSectionHeaderMapping:(id)arg6 rankingConfiguration:(id)arg7 placements:(id)arg8 topCategories:(id *)topCategoriesPtr bottomCategories:(id *)arg10 blacklistedCategories:(id *)arg11 sessionIdentifier:(unsigned long long)arg12 logString:(id)arg13 cepsUsed:(id)arg14 poorTextMatchCategories:(id)arg15 {
61 | ZKOrig(void, arg1, meanScores, arg3, arg4, arg5, arg6, arg7, arg8, topCategoriesPtr, arg10, arg11, arg12, arg13, arg14, arg15);
62 |
63 | PRSRankingManager *rankingManager = (PRSRankingManager *)self;
64 |
65 | NSMutableArray *topCategories = *topCategoriesPtr;
66 | NSDictionary *groupedResults = [rankingManager groupedResults];
67 |
68 | [SPBRankingManager insertSpotlightBridgeCategoriesFromGroupedResults:groupedResults intoRankedCategories:topCategories];
69 | }
70 |
71 | /* Ensures that Spotlight respects the top hit setting on the spotlight bridge result */
72 | - (id)chooseTopHitsWithMaxCount:(unsigned long long)arg1 disabledGroups:(id)arg2 topHit:(id)arg3 queryString:(id)arg4 cumulativeTopHitSet:(id)arg5 sortedResults:(id)arg6 {
73 | NSArray *topHits = ZKOrig(id, arg1, arg2, arg3, arg4, arg5, arg6);
74 | return [SPBRankingManager chooseTopHits:topHits sortedResults:arg6];
75 | }
76 |
77 | endhook
78 |
79 | #endif
80 |
81 | @implementation SPBSpotlightBridge
82 |
83 | @end
84 |
--------------------------------------------------------------------------------
/SpotlightBridgeTests/SPBRankingManagerTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBRankingManagerTests.m
3 | // SpotlightBridgeTests
4 | //
5 | // Created by Benjamin Johnson on 17/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "SPBBridgingSearchResult.h"
11 | #import "SPBTestSearchResult.h"
12 | #import "SPBRankingManager.h"
13 | #import "SPBStandardSearchResult.h"
14 |
15 | @interface SPBRankingManagerTests : XCTestCase
16 |
17 | @end
18 |
19 | @implementation SPBRankingManagerTests
20 |
21 | -(void)testInsertSpotlightBridgeCategoriesFromGroupedResultsIntoRankedCategories {
22 | NSDictionary *groupedResults = @{
23 | @"SPBLOWESTSCORE": @[
24 | [self createBridgingSearchResultWithScore:50],
25 | ],
26 | @"SPBTOPSCORE": @[
27 | [self createBridgingSearchResultWithScore:70],
28 | ],
29 | @"SPBMIDRANGESCORE": @[
30 | [self createBridgingSearchResultWithScore:50],
31 | [self createBridgingSearchResultWithScore:60],
32 | ]
33 | };
34 |
35 | NSMutableArray *rankedCategories = [NSMutableArray arrayWithArray:@[@"APPLICATIONS", @"DICTIONARY"]];
36 |
37 | [SPBRankingManager insertSpotlightBridgeCategoriesFromGroupedResults:groupedResults intoRankedCategories: rankedCategories];
38 | NSArray *expectedCategories = @[
39 | @"SPBTOPSCORE",
40 | @"SPBMIDRANGESCORE",
41 | @"SPBLOWESTSCORE",
42 | @"APPLICATIONS",
43 | @"DICTIONARY"
44 | ];
45 |
46 | XCTAssertTrue([rankedCategories isEqualToArray:expectedCategories]);
47 | }
48 |
49 | -(void)testInsertSpotlightBridgeCategoriesFromGroupedResultsIntoRankedCategoriesWithoutSPBResults {
50 | NSDictionary *groupedResults = @{
51 | @"NONSPBRESULTS": @[@{}],
52 | };
53 |
54 | NSMutableArray *rankedCategories = [NSMutableArray arrayWithArray:@[@"APPLICATIONS", @"DICTIONARY"]];
55 | [SPBRankingManager insertSpotlightBridgeCategoriesFromGroupedResults:groupedResults intoRankedCategories: rankedCategories];
56 | NSArray *expectedArray = @[@"APPLICATIONS", @"DICTIONARY"];
57 | XCTAssertTrue([rankedCategories isEqualToArray: expectedArray]);
58 | }
59 |
60 | -(void)testChooseTopHitsSortedResults {
61 | SPBBridgingSearchResult *falseNegativeTopHitResult = [self createBridgingSearchResultWithTopHit:YES];
62 | SPBBridgingSearchResult *falsePositiveTopHitResult = [self createBridgingSearchResultWithTopHit:NO];
63 | SPBStandardSearchResult *spotlightSearchResult = [[SPBStandardSearchResult alloc] initWithContentType:NULL displayName:@""];
64 |
65 | NSArray *originalTopHits = @[
66 | spotlightSearchResult,
67 | falsePositiveTopHitResult
68 | ];
69 |
70 | NSArray *topHits = [SPBRankingManager chooseTopHits:originalTopHits sortedResults:@[ falseNegativeTopHitResult ]];
71 | NSArray *expectedTopHits = @[spotlightSearchResult, falseNegativeTopHitResult];
72 | XCTAssertTrue([topHits isEqualToArray:expectedTopHits]);
73 | }
74 |
75 | -(void)testMergeBridgedResultsWithRankedAndPrunedResults
76 | {
77 | NSMutableDictionary *rankedAndPrunedResults = [NSMutableDictionary dictionary];
78 | NSMutableDictionary *resultsByGroupName = [NSMutableDictionary dictionary];
79 | SPBBridgingSearchResult *result = [self createBridgedSearchResult];
80 | resultsByGroupName[@"BridgedResults"] = @[
81 | result
82 | ];
83 | [SPBRankingManager mergeBridgeResultsWithRankedAndPrunedResults:rankedAndPrunedResults resultsByGroupName:resultsByGroupName];
84 |
85 | XCTAssertTrue([rankedAndPrunedResults[@"BridgedResults"] isEqualToArray:@[result]]);
86 | }
87 |
88 | -(SPBBridgingSearchResult*)createBridgingSearchResultWithScore: (float)score {
89 | SPBTestSearchResult *searchResult = [[SPBTestSearchResult alloc] initWithDisplayName:@""];
90 | searchResult.score = score;
91 |
92 | return [[SPBBridgingSearchResult alloc] initWithSearchResult:searchResult];
93 | }
94 |
95 | -(SPBBridgingSearchResult*)createBridgedSearchResult {
96 | SPBTestSearchResult *searchResult = [[SPBTestSearchResult alloc] initWithDisplayName:@""];
97 | return [[SPBBridgingSearchResult alloc] initWithSearchResult:searchResult];
98 |
99 | }
100 |
101 | -(SPBBridgingSearchResult *)createBridgingSearchResultWithTopHit: (BOOL)topHit {
102 | SPBTestSearchResult *searchResult = [[SPBTestSearchResult alloc] initWithDisplayName:@""];
103 | searchResult.topHit = topHit;
104 | return [[SPBBridgingSearchResult alloc] initWithSearchResult:searchResult];
105 | }
106 |
107 | @end
108 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/Headers/10.15/SpotlightServices/SFSearchResult_SpotlightExtras.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | //#import "QLSeamlessOpenerDelegate.h"
10 | #import "SFSearchResult.h"
11 |
12 | @class LSApplicationProxy, NSArray, NSDate, NSNumber, NSString, NSURL, PRSRankingItem;
13 |
14 | @interface SFSearchResult_SpotlightExtras : SFSearchResult
15 | {
16 | unsigned long long _matchBits;
17 | BOOL _lastRestrictionStatus;
18 | BOOL _needsPreviewUpdate;
19 | BOOL _autoLaunch;
20 | BOOL _isFirstTopHit;
21 | BOOL _isAnyTopHit;
22 | BOOL _isShowAllInFinder;
23 | BOOL _isSynthetic;
24 | BOOL _isFolderQuery;
25 | BOOL _supportsSubView;
26 | BOOL _isUsed;
27 | BOOL _hasUsage;
28 | float _l2score;
29 | NSNumber *_groupId;
30 | NSString *_groupName;
31 | PRSRankingItem *_rankingItem;
32 | NSString *_relatedIdentifier;
33 | NSString *_uniqueIdentifier;
34 | NSNumber *_documentIdentifier;
35 | NSString *_displayName;
36 | NSURL *_fastLaunchURL;
37 | NSArray *_otherTypes;
38 | NSArray *_otherNames;
39 | NSDate *_lastUsedDate;
40 | NSString *_distinguishPathString;
41 | NSURL *_altPath;
42 | long long _dpos;
43 | NSString *_NLPConfidence;
44 | NSString *_NLPCategory;
45 | double _cep;
46 | long long _feedbackBlockId;
47 | // Error parsing type: T, name: _rank
48 | }
49 |
50 | + (void)initialize;
51 | @property BOOL hasUsage; // @synthesize hasUsage=_hasUsage;
52 | @property(nonatomic) long long feedbackBlockId; // @synthesize feedbackBlockId=_feedbackBlockId;
53 | @property BOOL isUsed; // @synthesize isUsed=_isUsed;
54 | @property(nonatomic) double cep; // @synthesize cep=_cep;
55 | @property(retain) NSString *NLPCategory; // @synthesize NLPCategory=_NLPCategory;
56 | @property(retain) NSString *NLPConfidence; // @synthesize NLPConfidence=_NLPConfidence;
57 | @property(nonatomic) long long dpos; // @synthesize dpos=_dpos;
58 | @property(retain) NSURL *altPath; // @synthesize altPath=_altPath;
59 | @property BOOL supportsSubView; // @synthesize supportsSubView=_supportsSubView;
60 | @property(nonatomic) float l2score; // @synthesize l2score=_l2score;
61 | // Error parsing type for property rank:
62 | // Property attributes: TT,N,V_rank
63 |
64 | @property(retain) NSString *distinguishPathString; // @synthesize distinguishPathString=_distinguishPathString;
65 | @property BOOL isFolderQuery; // @synthesize isFolderQuery=_isFolderQuery;
66 | @property(readonly) NSDate *lastUsedDate; // @synthesize lastUsedDate=_lastUsedDate;
67 | @property(readonly) NSArray *otherNames; // @synthesize otherNames=_otherNames;
68 | @property(readonly) NSArray *otherTypes; // @synthesize otherTypes=_otherTypes;
69 | @property(nonatomic) BOOL isSynthetic; // @synthesize isSynthetic=_isSynthetic;
70 | @property(nonatomic) BOOL isShowAllInFinder; // @synthesize isShowAllInFinder=_isShowAllInFinder;
71 | @property(nonatomic) BOOL isAnyTopHit; // @synthesize isAnyTopHit=_isAnyTopHit;
72 | @property(nonatomic) BOOL isFirstTopHit; // @synthesize isFirstTopHit=_isFirstTopHit;
73 | @property(getter=isAutoLaunch) BOOL autoLaunch; // @synthesize autoLaunch=_autoLaunch;
74 | @property(readonly) NSURL *fastLaunchURL; // @synthesize fastLaunchURL=_fastLaunchURL;
75 | @property(retain, nonatomic) NSString *displayName; // @synthesize displayName=_displayName;
76 | @property(readonly) NSNumber *documentIdentifier; // @synthesize documentIdentifier=_documentIdentifier;
77 | @property(readonly) NSString *uniqueIdentifier; // @synthesize uniqueIdentifier=_uniqueIdentifier;
78 | @property(readonly) NSString *relatedIdentifier; // @synthesize relatedIdentifier=_relatedIdentifier;
79 | @property(retain, nonatomic) PRSRankingItem *rankingItem; // @synthesize rankingItem=_rankingItem;
80 | - (void)prepareIcons;
81 | - (void)setCategory:(id)arg1;
82 | @property(readonly) NSString *category;
83 | - (id)valueForAttribute:(id)arg1;
84 | // Error parsing type for property score:
85 | // Property attributes: TT,N
86 |
87 | - (unsigned long long)matchQuality;
88 | @property(readonly) BOOL isExactMatch;
89 | @property(readonly) BOOL isPrefixMatch;
90 | @property(retain, nonatomic) NSString *groupName; // @synthesize groupName=_groupName;
91 | @property(retain, nonatomic) NSNumber *groupId; // @synthesize groupId=_groupId;
92 | - (void)updateRenderOrEngagementCountsForKey:(id)arg1 date:(id)arg2;
93 | @property(readonly) unsigned long long hash;
94 | - (BOOL)isEqualToResult:(id)arg1;
95 | - (BOOL)isEqual:(id)arg1;
96 | @property(readonly, copy) NSString *description;
97 | @property(readonly) BOOL allowsCPRecording;
98 | - (void)cacheImage:(id)arg1 forKey:(id)arg2;
99 | - (id)cachedImageForKey:(id)arg1;
100 | - (void)prepare;
101 | - (id)copyWithZone:(struct _NSZone *)arg1;
102 | - (id)initWithFastLaunchURL:(id)arg1 contentType:(id)arg2 displayName:(id)arg3 groupId:(id)arg4;
103 | - (id)initWithFastLaunchURL:(id)arg1 contentType:(id)arg2 displayName:(id)arg3;
104 | - (id)initWithContentType:(id)arg1 displayName:(id)arg2;
105 | - (id)initWithContentType:(id)arg1 displayName:(id)arg2 groupId:(id)arg3;
106 | - (id)initWithResult:(id)arg1;
107 | - (id)initWithResult:(id)arg1 groupId:(id)arg2;
108 | @property(readonly, nonatomic) id pasteboardObject;
109 | @property(readonly, nonatomic) NSURL *URL;
110 | - (id)fastURL;
111 | @property(readonly) NSString *filePath;
112 | @property(readonly) LSApplicationProxy *appProxy;
113 | @property(readonly) BOOL isLocalResult;
114 |
115 | // Remaining properties
116 | @property(readonly, copy) NSString *debugDescription;
117 | @property(readonly) Class superclass;
118 |
119 | @end
120 |
121 |
--------------------------------------------------------------------------------
/SpotlightBridge/SPBRankingManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // SPBRankingManager.m
3 | // SpotlightBridge
4 | //
5 | // Created by Benjamin Johnson on 11/8/20.
6 | // Copyright © 2020 Benjamin Johnson. All rights reserved.
7 | //
8 |
9 | #import "SPBRankingManager.h"
10 | #import "SPBBridgingSearchResult.h"
11 |
12 | @implementation SPBRankingManager
13 |
14 | // Required for Mojave. Remove this method once it is known why bridged results are thrown out in the rankAndPrune method
15 | + (NSMutableDictionary*)mergeBridgeResultsWithRankedAndPrunedResults: (NSMutableDictionary*)rankedAndPrunedResults resultsByGroupName: (NSMutableDictionary*)resultsByGroupName {
16 | NSArray *bridgedGroupNames = [self bridgedGroupNamesForResultsByGroupName:resultsByGroupName];
17 | NSDictionary *prunedBridgedGroupResults = [self pruneGroupedResults:resultsByGroupName forGroupNames:bridgedGroupNames];
18 |
19 | [rankedAndPrunedResults addEntriesFromDictionary:prunedBridgedGroupResults];
20 |
21 | return rankedAndPrunedResults;
22 | }
23 |
24 | +(NSArray *)bridgedGroupNamesForResultsByGroupName:(NSMutableDictionary*)resultsByGroupName {
25 | NSMutableArray *spotlightBridgeGroupKeys = [NSMutableArray array];
26 |
27 | for (NSString * groupName in [resultsByGroupName allKeys]) {
28 | if ([self isFirstObjectABridgedResult:resultsByGroupName[groupName]]) {
29 | [spotlightBridgeGroupKeys addObject:groupName];
30 | }
31 | }
32 |
33 | return spotlightBridgeGroupKeys;
34 | }
35 |
36 | +(NSDictionary*)pruneGroupedResults: (NSMutableDictionary*)resultsByGroupName forGroupNames: (NSArray*)groupNames {
37 | NSMutableDictionary *bridgedResults = [NSMutableDictionary dictionary];
38 |
39 | for (NSString *groupName in groupNames) {
40 | NSArray *results = resultsByGroupName[groupName];
41 |
42 | int maximumNumberOfResultsPerGroup = 5;
43 | int numberOfItemsToInclude = MIN((int)[results count], maximumNumberOfResultsPerGroup);
44 | bridgedResults[groupName] = [results subarrayWithRange:NSMakeRange(0, numberOfItemsToInclude)];
45 | }
46 |
47 | return bridgedResults;
48 | }
49 |
50 | +(BOOL)isFirstObjectABridgedResult: (NSArray*)results {
51 | return results.count && [results[0] isKindOfClass:[SPBBridgingSearchResult class]];
52 | }
53 |
54 | +(void)insertSpotlightBridgeCategoriesFromGroupedResults: (NSDictionary*)groupedResults intoRankedCategories:(NSMutableArray*)categories {
55 | NSMutableArray *spbCategories = [self getSortedSpotlightBridgeCategoriesFromGroupResults:groupedResults];
56 |
57 | [categories removeObjectsInArray:spbCategories];
58 | NSIndexSet *insertAtStartIndexSet = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [spbCategories count])];
59 | [categories insertObjects:spbCategories atIndexes:insertAtStartIndexSet];
60 | }
61 |
62 | +(NSArray*)chooseTopHits: (NSArray *)topHits sortedResults: (id)results {
63 | NSMutableArray *newTopHits = [NSMutableArray arrayWithArray:topHits];
64 | [self removeMisclassifiedBridgedResultsFromTopHits:newTopHits];
65 | [self insertTopHitBridgedResultsFromResults:results intoTopHits:newTopHits];
66 |
67 | return [newTopHits copy];
68 | }
69 |
70 | +(void)removeMisclassifiedBridgedResultsFromTopHits:(NSMutableArray*)topHits {
71 | NSMutableArray *unsuitableResultsForTopHits = [NSMutableArray array];
72 | for (id result in topHits) {
73 | if ([result isKindOfClass: [SPBBridgingSearchResult class]]) {
74 | SPBBridgingSearchResult *spbResult = (SPBBridgingSearchResult*)result;
75 | if (![spbResult.searchResult isTopHit]) {
76 | [unsuitableResultsForTopHits addObject: spbResult];
77 | }
78 | }
79 | }
80 |
81 | [topHits removeObjectsInArray:unsuitableResultsForTopHits];
82 | }
83 |
84 | +(void)insertTopHitBridgedResultsFromResults: (NSArray*)sortedResults intoTopHits: (NSMutableArray *)topHits {
85 | NSMutableArray *bridgedTopHits = [NSMutableArray array];
86 | for (id result in sortedResults) {
87 | if ([result isKindOfClass:[SPBBridgingSearchResult class]]) {
88 | SPBBridgingSearchResult *bridgedResult = (SPBBridgingSearchResult*)result;
89 | if (bridgedResult.searchResult.isTopHit && ![topHits containsObject:bridgedResult]) {
90 | [bridgedTopHits addObject:bridgedResult];
91 | }
92 | }
93 | }
94 |
95 | [topHits addObjectsFromArray:bridgedTopHits];
96 | }
97 |
98 | +(NSMutableArray*)getSortedSpotlightBridgeCategoriesFromGroupResults: (NSDictionary*)groupedResults {
99 | NSDictionary *spotlightBridgeGroupedResults = [self filterSpotbridgeResultsFromGroupedResults: groupedResults];
100 | NSMutableArray *spotlightBridgeCategories = [NSMutableArray arrayWithArray:[spotlightBridgeGroupedResults allKeys]];
101 |
102 | NSMutableDictionary *scoreMap = [self scoreMapForGroupedResults:spotlightBridgeGroupedResults];
103 | [spotlightBridgeCategories sortUsingComparator:^NSComparisonResult(id _Nonnull first, id _Nonnull second) {
104 | return [scoreMap[second] compare: scoreMap[first]];
105 | }];
106 |
107 | return spotlightBridgeCategories;
108 | }
109 |
110 | +(NSDictionary*)filterSpotbridgeResultsFromGroupedResults: (NSDictionary *)groupedResults {
111 | NSMutableDictionary *spotlightBridgeGroupedResults = [NSMutableDictionary dictionary];
112 | for (NSString *category in [groupedResults allKeys]) {
113 | if ([groupedResults[category] count]) {
114 | id result = [groupedResults[category] firstObject];
115 | if ([result isKindOfClass:[SPBBridgingSearchResult class]]) {
116 | spotlightBridgeGroupedResults[category] = groupedResults[category];
117 | }
118 | }
119 | }
120 |
121 | return [spotlightBridgeGroupedResults copy];
122 | }
123 |
124 | +(NSMutableDictionary*)scoreMapForGroupedResults: (NSDictionary*)groupedResults {
125 | NSMutableDictionary *scoreMap = [NSMutableDictionary dictionary];
126 | for(NSString *category in [groupedResults allKeys]) {
127 | float score = [self getMaxScoreForResults:groupedResults[category]];
128 | scoreMap[category] = [NSNumber numberWithFloat:score];
129 | }
130 |
131 | return scoreMap;
132 | }
133 |
134 | +(float)getMaxScoreForResults:(NSArray*)results {
135 | float maxScore = 0;
136 | for (SPBBridgingSearchResult *result in results) {
137 | if ([result.searchResult score] > maxScore) {
138 | maxScore = [result.searchResult score] / [result.searchResult maxScore];
139 | }
140 | }
141 |
142 | return maxScore;
143 | }
144 |
145 | @end
146 |
--------------------------------------------------------------------------------
/SpotlightBridge/ZKSwizzle/ZKSwizzle.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZKSwizzle.h
3 | // ZKSwizzle
4 | //
5 | // Created by Alexander S Zielenski on 7/24/14.
6 | // Copyright (c) 2014 Alexander S Zielenski. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | // This is a class for streamlining swizzling. Simply create a new class of any name you want and
14 | // Example:
15 | /*
16 | @interface ZKHookClass : NSObject
17 | - (NSString *)description; // hooks -description on NSObject
18 | - (void)addedMethod; // all subclasses of NSObject now respond to -addedMethod
19 | @end
20 |
21 | @implementation ZKHookClass
22 | ...
23 | @end
24 |
25 | [ZKSwizzle swizzleClass:ZKClass(ZKHookClass) forClass:ZKClass(destination)];
26 | */
27 |
28 | #ifndef ZKSWIZZLE_DEFS
29 | #define ZKSWIZZLE_DEFS
30 |
31 | // CRAZY MACROS FOR DYNAMIC PROTOTYPE CREATION
32 | #define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(0, ## __VA_ARGS__, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5 ,4 ,3 ,2, 1, 0)
33 | #define VA_NUM_ARGS_IMPL(_0, _1,_2,_3,_4,_5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20 ,N,...) N
34 |
35 | #define WRAP0()
36 | #define WRAP1(VARIABLE) , typeof ( VARIABLE )
37 | #define WRAP2(VARIABLE, ...) WRAP1(VARIABLE) WRAP1(__VA_ARGS__)
38 | #define WRAP3(VARIABLE, ...) WRAP1(VARIABLE) WRAP2(__VA_ARGS__)
39 | #define WRAP4(VARIABLE, ...) WRAP1(VARIABLE) WRAP3(__VA_ARGS__)
40 | #define WRAP5(VARIABLE, ...) WRAP1(VARIABLE) WRAP4(__VA_ARGS__)
41 | #define WRAP6(VARIABLE, ...) WRAP1(VARIABLE) WRAP5(__VA_ARGS__)
42 | #define WRAP7(VARIABLE, ...) WRAP1(VARIABLE) WRAP6(__VA_ARGS__)
43 | #define WRAP8(VARIABLE, ...) WRAP1(VARIABLE) WRAP7(__VA_ARGS__)
44 | #define WRAP9(VARIABLE, ...) WRAP1(VARIABLE) WRAP8(__VA_ARGS__)
45 | #define WRAP10(VARIABLE, ...) WRAP1(VARIABLE) WRAP9(__VA_ARGS__)
46 | #define WRAP11(VARIABLE, ...) WRAP1(VARIABLE) WRAP10(__VA_ARGS__)
47 | #define WRAP12(VARIABLE, ...) WRAP1(VARIABLE) WRAP11(__VA_ARGS__)
48 | #define WRAP13(VARIABLE, ...) WRAP1(VARIABLE) WRAP12(__VA_ARGS__)
49 | #define WRAP14(VARIABLE, ...) WRAP1(VARIABLE) WRAP13(__VA_ARGS__)
50 | #define WRAP15(VARIABLE, ...) WRAP1(VARIABLE) WRAP14(__VA_ARGS__)
51 | #define WRAP16(VARIABLE, ...) WRAP1(VARIABLE) WRAP15(__VA_ARGS__)
52 | #define WRAP17(VARIABLE, ...) WRAP1(VARIABLE) WRAP16(__VA_ARGS__)
53 | #define WRAP18(VARIABLE, ...) WRAP1(VARIABLE) WRAP17(__VA_ARGS__)
54 | #define WRAP19(VARIABLE, ...) WRAP1(VARIABLE) WRAP18(__VA_ARGS__)
55 | #define WRAP20(VARIABLE, ...) WRAP1(VARIABLE) WRAP19(__VA_ARGS__)
56 |
57 | #define CAT(A, B) A ## B
58 | #define INVOKE(MACRO, NUMBER, ...) CAT(MACRO, NUMBER)(__VA_ARGS__)
59 | #define WRAP_LIST(...) INVOKE(WRAP, VA_NUM_ARGS(__VA_ARGS__), __VA_ARGS__)
60 |
61 | // Gets the a class with the name CLASS
62 | #define ZKClass(CLASS) objc_getClass(#CLASS)
63 |
64 | // returns the value of an instance variable.
65 | #if !__has_feature(objc_arc)
66 | #define ZKHookIvar(OBJECT, TYPE, NAME) (*(TYPE *)ZKIvarPointer(OBJECT, NAME))
67 | #else
68 | #define ZKHookIvar(OBJECT, TYPE, NAME) \
69 | _Pragma("clang diagnostic push") \
70 | _Pragma("clang diagnostic ignored \"-Wignored-attributes\"") \
71 | (*(__unsafe_unretained TYPE *)ZKIvarPointer(OBJECT, NAME)) \
72 | _Pragma("clang diagnostic pop")
73 | #endif
74 |
75 | ////////////////////////////////////////////////////////////////////////////////
76 | //// Core Macros (For fine-tuned Use)
77 | ////////////////////////////////////////////////////////////////////////////////
78 | // returns the original implementation of the swizzled function or null or not found
79 | #define ZKOrig(TYPE, ...) ((TYPE (*)(id, SEL WRAP_LIST(__VA_ARGS__)))(ZKOriginalImplementation(self, _cmd, __PRETTY_FUNCTION__)))(self, _cmd, ##__VA_ARGS__)
80 |
81 | // returns the original implementation of the superclass of the object swizzled
82 | #define ZKSuper(TYPE, ...) ((TYPE (*)(id, SEL WRAP_LIST(__VA_ARGS__)))(ZKSuperImplementation(self, _cmd, __PRETTY_FUNCTION__)))(self, _cmd, ##__VA_ARGS__)
83 |
84 | #define _ZKSwizzleInterfaceConditionally(CLASS_NAME, TARGET_CLASS, SUPERCLASS, GROUP, IMMEDIATELY) \
85 | @interface _$ ## CLASS_NAME : SUPERCLASS @end\
86 | @implementation _$ ## CLASS_NAME\
87 | + (void)initialize {}\
88 | @end\
89 | @interface CLASS_NAME : _$ ## CLASS_NAME @end\
90 | @implementation CLASS_NAME (ZKSWIZZLE)\
91 | + (void)load {\
92 | if (IMMEDIATELY) {\
93 | [self _ZK_unconditionallySwizzle];\
94 | } else {\
95 | _$ZKRegisterInterface(self, #GROUP);\
96 | }\
97 | }\
98 | + (void)_ZK_unconditionallySwizzle {\
99 | ZKSwizzle(CLASS_NAME, TARGET_CLASS);\
100 | }\
101 | @end
102 |
103 | // Bootstraps your swizzling class so that it requires no setup
104 | // outside of this macro call
105 | // If you override +load you must call ZKSwizzle(CLASS_NAME, TARGET_CLASS)
106 | // yourself, otherwise the swizzling would not take place
107 | #define ZKSwizzleInterface(CLASS_NAME, TARGET_CLASS, SUPERCLASS) \
108 | _ZKSwizzleInterfaceConditionally(CLASS_NAME, TARGET_CLASS, SUPERCLASS, ZK_UNGROUPED, YES)
109 |
110 | // Same as ZKSwizzleInterface, except
111 | #define ZKSwizzleInterfaceGroup(CLASS_NAME, TARGET_CLASS, SUPER_CLASS, GROUP) \
112 | _ZKSwizzleInterfaceConditionally(CLASS_NAME, TARGET_CLASS, SUPER_CLASS, GROUP, NO)
113 |
114 | ////////////////////////////////////////////////////////////////////////////////
115 | //// Sugar Macros (For general use)
116 | ////////////////////////////////////////////////////////////////////////////////
117 | // Inspired by logos. Credits to @mstg!
118 |
119 | #define __GEN_CLASS(TARGET, LINE) __ZK_## LINE## TARGET
120 | #define _GEN_CLASS(TARGET, LINE) __GEN_CLASS(TARGET, LINE)
121 | #define GEN_CLASS(TARGET) _GEN_CLASS(TARGET, __LINE__)
122 |
123 | #define hook_2(TARGET, GROUP) \
124 | ZKSwizzleInterfaceGroup(GEN_CLASS(TARGET), TARGET, NSObject, GROUP) @implementation GEN_CLASS(TARGET)
125 |
126 | #define hook_1(TARGET) \
127 | ZKSwizzleInterface(GEN_CLASS(TARGET), TARGET, NSObject) @implementation GEN_CLASS(TARGET)
128 |
129 | #define endhook @end
130 |
131 | #define _orig(...) ZKOrig(__VA_ARGS__)
132 | #define _super(...) ZKSuper(__VA_ARGS__)
133 |
134 | #define __HOOK(ARGC, ARGS...) hook_ ## ARGC (ARGS)
135 | #define _HOOK(ARGC, ARGS...) __HOOK(ARGC, ARGS)
136 | #define hook(...) _HOOK(VA_NUM_ARGS(__VA_ARGS__), __VA_ARGS__)
137 | #define ctor __attribute__((constructor)) void init()
138 |
139 | #define ZKIgnoreTypes +(BOOL)_ZK_ignoreTypes { return YES; }
140 |
141 | __BEGIN_DECLS
142 |
143 | ////////////////////////////////////////////////////////////////////////////////
144 | //// C Backing (Don't typically call directly)
145 | ////////////////////////////////////////////////////////////////////////////////
146 |
147 | // Make sure to cast this before you use it
148 | typedef id (*ZKIMP)(id, SEL, ...);
149 |
150 | // returns a pointer to the instance variable "name" on the object
151 | void *ZKIvarPointer(id self, const char *name);
152 | // returns the original implementation of a method with selector "sel" of an object hooked by the methods below
153 | ZKIMP ZKOriginalImplementation(id self, SEL sel, const char *info);
154 | // returns the implementation of a method with selector "sel" of the superclass of object
155 | ZKIMP ZKSuperImplementation(id object, SEL sel, const char *info);
156 |
157 | // hooks all the implemented methods of source with destination
158 | // adds any methods that arent implemented on destination to destination that are implemented in source
159 | #define ZKSwizzle(src, dst) _ZKSwizzle(ZKClass(src), ZKClass(dst))
160 | BOOL _ZKSwizzle(Class src, Class dest);
161 |
162 | #define ZKSwizzleGroup(NAME) _ZKSwizzleGroup(#NAME)
163 | void _$ZKRegisterInterface(Class cls, const char *groupName);
164 | BOOL _ZKSwizzleGroup(const char *groupName);
165 |
166 | // Calls above method with the superclass of source for desination
167 | #define ZKSwizzleClass(src) _ZKSwizzleClass(ZKClass(src))
168 | BOOL _ZKSwizzleClass(Class cls);
169 |
170 | __END_DECLS
171 | #endif
172 |
173 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/Headers/10.14/PRSResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 9 2015 22:53:21).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard.
5 | //
6 |
7 | #import
8 |
9 | //#import
10 | //#import
11 | //#import
12 | //#import
13 |
14 | @class LSApplicationProxy, NSArray, NSDate, NSDictionary, NSImage, NSNumber, NSString, NSURL, PRSRankingItem, SFPunchout, SFSearchResult;
15 | @protocol NSPasteboardWriting;
16 |
17 | @interface PRSResult : NSObject
18 | {
19 | long long _retainCount;
20 | unsigned long long _matchBits;
21 | BOOL doesContentMatch;
22 | BOOL resultLocationInteresting;
23 | BOOL keyWordMatch;
24 | BOOL isPremium;
25 | BOOL isStaticTopHit;
26 | BOOL isPredictedTopHit;
27 | BOOL queryLastLaunched;
28 | BOOL queryEverLaunched;
29 | BOOL isAlternateNameMatch;
30 | BOOL isDisplayNameMatch;
31 | BOOL isParsec;
32 | BOOL isUsed;
33 | BOOL isMostRecentlyUsed;
34 | BOOL isEngagedWith;
35 | BOOL isParsecTopHit;
36 | BOOL _autoLaunch;
37 | BOOL _isFirstTopHit;
38 | BOOL _isAnyTopHit;
39 | BOOL _isShowAllInFinder;
40 | BOOL _isSynthetic;
41 | BOOL _isFolderQuery;
42 | BOOL _supportsSubView;
43 | unsigned long long topHit;
44 | NSString *resultBundleID;
45 | NSString *type;
46 | NSString *title;
47 | unsigned long long engagementScore;
48 | unsigned long long displayNameMatchScore;
49 | unsigned long long alternateNameMatchScore;
50 | unsigned long long resultEngagementScore;
51 | double lastUsedTime;
52 | unsigned long long contentMatchScore;
53 | unsigned long long usedCount;
54 | unsigned long long predicted;
55 | unsigned long long queryIndependentScore;
56 | NSString *categoryForCP;
57 | unsigned long long interestingTimeScore;
58 | NSString *bundleID;
59 | NSString *_contentType;
60 | NSString *_displayName;
61 | NSURL *_fastLaunchURL;
62 | NSString *_distinguishPathString;
63 | unsigned long long _rank;
64 | NSURL *_altPath;
65 | PRSRankingItem *_rankingItem;
66 | long long _dpos;
67 | NSString *_NLPConfidence;
68 | NSString *_NLPCategory;
69 | double _sqf;
70 | double _cep;
71 | SFSearchResult *_sfSearchResult;
72 | }
73 |
74 | + (void)initialize;
75 | @property(retain, nonatomic) SFSearchResult *sfSearchResult; // @synthesize sfSearchResult=_sfSearchResult;
76 | @property(nonatomic) double cep; // @synthesize cep=_cep;
77 | @property(nonatomic) double sqf; // @synthesize sqf=_sqf;
78 | @property(retain) NSString *NLPCategory; // @synthesize NLPCategory=_NLPCategory;
79 | @property(retain) NSString *NLPConfidence; // @synthesize NLPConfidence=_NLPConfidence;
80 | @property(nonatomic) long long dpos; // @synthesize dpos=_dpos;
81 | @property(retain, nonatomic) PRSRankingItem *rankingItem; // @synthesize rankingItem=_rankingItem;
82 | @property(retain) NSURL *altPath; // @synthesize altPath=_altPath;
83 | @property BOOL supportsSubView; // @synthesize supportsSubView=_supportsSubView;
84 | @property(nonatomic) unsigned long long rank; // @synthesize rank=_rank;
85 | @property(retain) NSString *distinguishPathString; // @synthesize distinguishPathString=_distinguishPathString;
86 | @property BOOL isFolderQuery; // @synthesize isFolderQuery=_isFolderQuery;
87 | @property(nonatomic) BOOL isSynthetic; // @synthesize isSynthetic=_isSynthetic;
88 | @property(nonatomic) BOOL isShowAllInFinder; // @synthesize isShowAllInFinder=_isShowAllInFinder;
89 | @property(nonatomic) BOOL isAnyTopHit; // @synthesize isAnyTopHit=_isAnyTopHit;
90 | @property(nonatomic) BOOL isFirstTopHit; // @synthesize isFirstTopHit=_isFirstTopHit;
91 | @property(getter=isAutoLaunch) BOOL autoLaunch; // @synthesize autoLaunch=_autoLaunch;
92 | @property(readonly) NSURL *fastLaunchURL; // @synthesize fastLaunchURL=_fastLaunchURL;
93 | @property(readonly) NSString *displayName; // @synthesize displayName=_displayName;
94 | @property(readonly) NSString *contentType; // @synthesize contentType=_contentType;
95 | @property(retain, nonatomic) NSString *bundleID; // @synthesize bundleID;
96 | @property(nonatomic) unsigned long long interestingTimeScore; // @synthesize interestingTimeScore;
97 | @property(nonatomic) BOOL isParsecTopHit; // @synthesize isParsecTopHit;
98 | @property(nonatomic) BOOL isEngagedWith; // @synthesize isEngagedWith;
99 | @property(nonatomic) BOOL isMostRecentlyUsed; // @synthesize isMostRecentlyUsed;
100 | @property(nonatomic) BOOL isUsed; // @synthesize isUsed;
101 | @property(nonatomic) BOOL isParsec; // @synthesize isParsec;
102 | @property(nonatomic) BOOL isDisplayNameMatch; // @synthesize isDisplayNameMatch;
103 | @property(nonatomic) BOOL isAlternateNameMatch; // @synthesize isAlternateNameMatch;
104 | @property(nonatomic) BOOL queryEverLaunched; // @synthesize queryEverLaunched;
105 | @property(nonatomic) BOOL queryLastLaunched; // @synthesize queryLastLaunched;
106 | @property(retain, nonatomic) NSString *categoryForCP; // @synthesize categoryForCP;
107 | @property(nonatomic) BOOL isPredictedTopHit; // @synthesize isPredictedTopHit;
108 | @property(nonatomic) unsigned long long queryIndependentScore; // @synthesize queryIndependentScore;
109 | @property(nonatomic) BOOL isStaticTopHit; // @synthesize isStaticTopHit;
110 | @property(nonatomic) BOOL isPremium; // @synthesize isPremium;
111 | @property(nonatomic) unsigned long long predicted; // @synthesize predicted;
112 | @property(nonatomic) unsigned long long usedCount; // @synthesize usedCount;
113 | @property(nonatomic) BOOL keyWordMatch; // @synthesize keyWordMatch;
114 | @property(nonatomic) unsigned long long contentMatchScore; // @synthesize contentMatchScore;
115 | @property(nonatomic) BOOL resultLocationInteresting; // @synthesize resultLocationInteresting;
116 | @property(nonatomic) double lastUsedTime; // @synthesize lastUsedTime;
117 | @property(nonatomic) unsigned long long resultEngagementScore; // @synthesize resultEngagementScore;
118 | @property(nonatomic) unsigned long long alternateNameMatchScore; // @synthesize alternateNameMatchScore;
119 | @property(nonatomic) unsigned long long displayNameMatchScore; // @synthesize displayNameMatchScore;
120 | @property(nonatomic) BOOL doesContentMatch; // @synthesize doesContentMatch;
121 | @property(nonatomic) unsigned long long engagementScore; // @synthesize engagementScore;
122 | @property(retain, nonatomic) NSString *title;
123 | @property(retain, nonatomic) NSString *type;
124 | @property(retain, nonatomic) NSString *resultBundleID; // @synthesize resultBundleID;
125 | @property(nonatomic) unsigned long long topHit; // @synthesize topHit;
126 | @property(readonly) NSString *uniqueIdentifier;
127 | @property(readonly) NSString *relatedIdentifier;
128 | - (void)prepareIcons;
129 | - (void)setCategory:(id)arg1;
130 | @property(readonly) NSString *category;
131 | - (id)valueForAttribute:(id)arg1;
132 | @property(nonatomic) unsigned long long score;
133 | - (unsigned long long)matchQuality;
134 | - (BOOL)isExactMatch;
135 | - (BOOL)isPrefixMatch;
136 | @property(retain, nonatomic) NSString *groupName;
137 | @property(readonly) NSDate *lastUsedDate;
138 | @property(readonly) NSURL *URL;
139 | - (void)updateRenderOrEngagementCountsForKey:(id)arg1 date:(id)arg2;
140 | @property(readonly) NSArray *otherNames;
141 | @property(readonly) NSArray *otherTypes;
142 | @property(readonly) unsigned long long hash;
143 | - (BOOL)isEqualToResult:(id)arg1;
144 | - (BOOL)isEqual:(id)arg1;
145 | @property(readonly, copy) NSString *description;
146 | @property(readonly) BOOL allowsCPRecording;
147 | - (void)prepare;
148 | - (id)initWithFastLaunchURL:(id)arg1 displayName:(id)arg2 contentType:(id)arg3;
149 | - (id)initWithContentType:(id)arg1 displayName:(id)arg2;
150 | - (id)copyWithZone:(struct _NSZone *)arg1;
151 | @property(readonly, nonatomic) id pasteboardObject;
152 | @property(readonly) NSURL *fastURL;
153 | @property(readonly) NSString *filePath;
154 | @property(readonly) LSApplicationProxy *appProxy;
155 | - (void)cacheImage:(id)arg1 forKey:(id)arg2;
156 | - (id)cachedImageForKey:(id)arg1;
157 | - (id)quickLookItemForQueryString:(id)arg1;
158 | @property(readonly) BOOL isPhotoImageOrMovie;
159 | - (BOOL)isMovie;
160 | - (BOOL)isImage;
161 | @property(readonly) NSString *targetString;
162 | - (BOOL)allowShowPath;
163 | - (int)qlPreviewMode;
164 | - (id)previewItemURL;
165 | - (id)sharedCustomPreviewController;
166 | - (id)seamlessOpener:(id)arg1 sourcePreviewViewForPreviewItem:(id)arg2;
167 | - (id)unknownImage;
168 | - (id)safariDocumentImage;
169 | - (id)prefPaneImage;
170 | - (id)contactImage;
171 | @property(readonly) NSNumber *groupId;
172 | @property(retain, nonatomic) NSString *title_note;
173 | @property(readonly) NSString *displayInfo;
174 | @property(readonly) NSImage *iconImageForApplication;
175 | @property(readonly) NSImage *iconImage;
176 | @property(readonly) NSImage *largeIconImage;
177 | @property(readonly) NSString *fastPath;
178 | @property(readonly) NSString *parentPath;
179 | - (BOOL)isPrefixMatchWithName:(id)arg1;
180 | - (BOOL)isExactMatchWithName:(id)arg1;
181 | - (BOOL)isSomewhatRecentlyUsed;
182 | - (BOOL)isRecentlyUsed;
183 | - (BOOL)isVeryRecentlyUsed;
184 | - (BOOL)isUsedWithinDays:(double)arg1;
185 | - (id)customOpenSearchString;
186 | - (unsigned long long)resultOpenOptions;
187 | - (BOOL)isShortcutAllowed;
188 | - (BOOL)shouldNotBeTopHit;
189 | - (BOOL)isTopHitCandidate;
190 | - (BOOL)isLocalResult;
191 | - (BOOL)isCalculation;
192 | - (BOOL)isSafariHistory;
193 | - (BOOL)isEmail;
194 | - (BOOL)isCalendarEvent;
195 | - (BOOL)isFolder;
196 | - (BOOL)isContact;
197 | - (BOOL)isPrefPane;
198 | - (BOOL)isVideo;
199 | - (BOOL)isMusic;
200 | - (BOOL)isApplicationQueryResult;
201 | - (BOOL)isApplication;
202 | - (BOOL)isIndexingProgress;
203 | - (BOOL)isGroupHeading;
204 | - (BOOL)isFile;
205 | - (BOOL)isSelectable;
206 | - (void)addAdamID:(id)arg1;
207 | - (id)adamID;
208 | - (BOOL)utiTypeConformsTo:(id)arg1;
209 | - (void)setMatchName:(id)arg1;
210 | - (unsigned long long)writingOptionsForType:(id)arg1 pasteboard:(id)arg2;
211 | - (id)pasteboardPropertyListForType:(id)arg1;
212 | - (id)writableTypesForPasteboard:(id)arg1;
213 | - (id)previewController;
214 | - (BOOL)isCompatibleWithPreviewController:(id)arg1;
215 | - (BOOL)isApplicationManaged;
216 | - (id)subjectForEmailAttachment;
217 | - (BOOL)isBoundEmailAttachment;
218 | - (BOOL)isInEmailAttachmentLocation;
219 | - (id)emailURLForAttachment;
220 | - (void)markAsEngaged;
221 | - (void)markAsUsed;
222 | - (BOOL)_isDeallocating;
223 | - (BOOL)_tryRetain;
224 | - (unsigned long long)retainCount;
225 | - (oneway void)release;
226 | - (id)retain;
227 |
228 | // Remaining properties
229 | @property(nonatomic) long long adam_id;
230 | @property(retain, nonatomic) NSString *bundle_id;
231 | @property(retain, nonatomic) NSString *completion;
232 | @property(retain, nonatomic) NSImage *completion_icon;
233 | @property(readonly, copy) NSString *debugDescription;
234 | @property(retain, nonatomic) NSDictionary *featuresSet;
235 | @property(retain, nonatomic) NSString *geoUserSessionIDString;
236 | @property(nonatomic) double geoUserSessionStartTime;
237 | @property(retain, nonatomic) NSImage *icon;
238 | @property BOOL isQuickGlance;
239 | @property(nonatomic) BOOL isStreaming;
240 | @property(nonatomic) long long max_age;
241 | @property(nonatomic) long long media_kind;
242 | @property(nonatomic) long long placement;
243 | @property(nonatomic) BOOL playable;
244 | @property(retain, nonatomic) SFPunchout *punchout;
245 | @property(retain, nonatomic) NSString *resultIdentifier;
246 | @property(nonatomic) float resultScore;
247 | @property(retain, nonatomic) NSURL *resultURL;
248 | @property(retain, nonatomic) NSString *section_header;
249 | @property(retain, nonatomic) NSString *section_header_more;
250 | @property(retain, nonatomic) NSURL *section_header_more_url;
251 | @property(readonly) Class superclass;
252 | @property(retain, nonatomic) NSString *templateName;
253 | @property int title_note_size;
254 | @property long long topHitScore;
255 |
256 | @end
257 |
258 |
--------------------------------------------------------------------------------
/SpotlightBridgeFramework/Headers/10.15/SearchFoundation/SFSearchResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated by class-dump 3.5 (64 bit).
3 | //
4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
5 | //
6 |
7 | //#import "NSObject.h"
8 |
9 | //#import "NSCopying.h"
10 | //#import "NSSecureCoding.h"
11 | //#import "SFJSONSerializable.h"
12 | ////#import "SFSearchResult.h"
13 |
14 | #import
15 |
16 |
17 | @class NSArray, NSData, NSDictionary, NSNumber, NSString, NSURL, SFActionItem, SFCard, SFCustom, SFImage, SFMoreResults, SFPunchout, SFText;
18 |
19 | @interface SFSearchResult : NSObject
20 | {
21 | BOOL _preventThumbnailImageScaling;
22 | BOOL _isSecondaryTitleDetached;
23 | BOOL _isCentered;
24 | BOOL _isLocalApplicationResult;
25 | BOOL _renderHorizontallyWithOtherResultsInCategory;
26 | BOOL _isQuickGlance;
27 | BOOL _isStreaming;
28 | BOOL _isStaticCorrection;
29 | BOOL _isFuzzyMatch;
30 | BOOL _publiclyIndexable;
31 | BOOL _doNotFold;
32 | int _auxiliaryBottomTextColor;
33 | int _topHit;
34 | int _placement;
35 | int _type;
36 | NSString *_identifier;
37 | SFImage *_thumbnail;
38 | SFText *_title;
39 | NSString *_secondaryTitle;
40 | SFImage *_secondaryTitleImage;
41 | NSArray *_descriptions;
42 | NSString *_footnote;
43 | NSString *_publishDate;
44 | NSString *_sourceName;
45 | NSString *_completion;
46 | SFImage *_completionImage;
47 | NSURL *_url;
48 | NSString *_auxiliaryTopText;
49 | NSString *_auxiliaryMiddleText;
50 | NSString *_auxiliaryBottomText;
51 | SFActionItem *_action;
52 | SFPunchout *_punchout;
53 | NSString *_storeIdentifier;
54 | NSString *_contactIdentifier;
55 | NSString *_calendarIdentifier;
56 | NSData *_mapsData;
57 | NSString *_mapsResultType;
58 | NSURL *_mapsMoreURL;
59 | NSString *_mapsMoreString;
60 | SFImage *_mapsMoreIcon;
61 | NSString *_nearbyBusinessesString;
62 | NSString *_appleReferrer;
63 | SFCard *_card;
64 | SFCard *_inlineCard;
65 | SFMoreResults *_moreResults;
66 | SFPunchout *_moreResultsPunchout;
67 | NSString *_applicationBundleIdentifier;
68 | NSString *_sectionBundleIdentifier;
69 | NSString *_userActivityRequiredString;
70 | NSString *_sectionHeader;
71 | NSString *_sectionHeaderMore;
72 | NSURL *_sectionHeaderMoreURL;
73 | double _rankingScore;
74 | unsigned long long _minimumRankOfTopHitToSuppressResult;
75 | NSString *_mediaType;
76 | double _serverScore;
77 | double _personalizationScore;
78 | SFCustom *_customProperties;
79 | NSString *_resultType;
80 | NSString *_resultTemplate;
81 | NSNumber *_engagementScore;
82 | NSNumber *_queryIndependentScore;
83 | NSNumber *_maxAge;
84 | NSString *_titleNote;
85 | NSNumber *_titleNoteSize;
86 | NSString *_resultBundleId;
87 | SFImage *_icon;
88 | NSDictionary *_localFeatures;
89 | NSDictionary *_serverFeatures;
90 | NSString *_intendedQuery;
91 | NSString *_correctedQuery;
92 | NSString *_completedQuery;
93 | unsigned long long _queryId;
94 | NSString *_userInput;
95 | NSArray *_itemProviderDataTypes;
96 | NSArray *_itemProviderFileTypes;
97 | NSString *_contentType;
98 | NSArray *_contentTypeTree;
99 | long long _dataOwnerType;
100 | NSString *_fileProviderIdentifier;
101 | NSString *_fileProviderDomainIdentifier;
102 | NSString *_fbr;
103 | NSString *_srf;
104 | unsigned long long _blockId;
105 | NSData *_entityData;
106 | }
107 |
108 | + (BOOL)supportsSecureCoding;
109 | @property(retain, nonatomic) NSData *entityData; // @synthesize entityData=_entityData;
110 | @property(nonatomic) unsigned long long blockId; // @synthesize blockId=_blockId;
111 | @property(nonatomic) BOOL doNotFold; // @synthesize doNotFold=_doNotFold;
112 | @property(copy, nonatomic) NSString *srf; // @synthesize srf=_srf;
113 | @property(copy, nonatomic) NSString *fbr; // @synthesize fbr=_fbr;
114 | @property(copy, nonatomic) NSString *fileProviderDomainIdentifier; // @synthesize fileProviderDomainIdentifier=_fileProviderDomainIdentifier;
115 | @property(copy, nonatomic) NSString *fileProviderIdentifier; // @synthesize fileProviderIdentifier=_fileProviderIdentifier;
116 | @property(nonatomic) long long dataOwnerType; // @synthesize dataOwnerType=_dataOwnerType;
117 | @property(copy, nonatomic) NSArray *contentTypeTree; // @synthesize contentTypeTree=_contentTypeTree;
118 | @property(copy, nonatomic) NSString *contentType; // @synthesize contentType=_contentType;
119 | @property(copy, nonatomic) NSArray *itemProviderFileTypes; // @synthesize itemProviderFileTypes=_itemProviderFileTypes;
120 | @property(copy, nonatomic) NSArray *itemProviderDataTypes; // @synthesize itemProviderDataTypes=_itemProviderDataTypes;
121 | @property(copy, nonatomic) NSString *userInput; // @synthesize userInput=_userInput;
122 | @property(nonatomic) BOOL publiclyIndexable; // @synthesize publiclyIndexable=_publiclyIndexable;
123 | @property(nonatomic) unsigned long long queryId; // @synthesize queryId=_queryId;
124 | @property(copy, nonatomic) NSString *completedQuery; // @synthesize completedQuery=_completedQuery;
125 | @property(copy, nonatomic) NSString *correctedQuery; // @synthesize correctedQuery=_correctedQuery;
126 | @property(copy, nonatomic) NSString *intendedQuery; // @synthesize intendedQuery=_intendedQuery;
127 | @property(copy, nonatomic) NSDictionary *serverFeatures; // @synthesize serverFeatures=_serverFeatures;
128 | @property(copy, nonatomic) NSDictionary *localFeatures; // @synthesize localFeatures=_localFeatures;
129 | @property(nonatomic) BOOL isFuzzyMatch; // @synthesize isFuzzyMatch=_isFuzzyMatch;
130 | @property(nonatomic) BOOL isStaticCorrection; // @synthesize isStaticCorrection=_isStaticCorrection;
131 | @property(retain, nonatomic) SFImage *icon; // @synthesize icon=_icon;
132 | @property(copy, nonatomic) NSString *resultBundleId; // @synthesize resultBundleId=_resultBundleId;
133 | @property(retain, nonatomic) NSNumber *titleNoteSize; // @synthesize titleNoteSize=_titleNoteSize;
134 | @property(copy, nonatomic) NSString *titleNote; // @synthesize titleNote=_titleNote;
135 | @property(retain, nonatomic) NSNumber *maxAge; // @synthesize maxAge=_maxAge;
136 | @property(retain, nonatomic) NSNumber *queryIndependentScore; // @synthesize queryIndependentScore=_queryIndependentScore;
137 | @property(retain, nonatomic) NSNumber *engagementScore; // @synthesize engagementScore=_engagementScore;
138 | @property(nonatomic) BOOL isStreaming; // @synthesize isStreaming=_isStreaming;
139 | @property(nonatomic) BOOL isQuickGlance; // @synthesize isQuickGlance=_isQuickGlance;
140 | @property(copy, nonatomic) NSString *resultTemplate; // @synthesize resultTemplate=_resultTemplate;
141 | @property(copy, nonatomic) NSString *resultType; // @synthesize resultType=_resultType;
142 | @property(retain, nonatomic) SFCustom *customProperties; // @synthesize customProperties=_customProperties;
143 | @property(nonatomic) double personalizationScore; // @synthesize personalizationScore=_personalizationScore;
144 | @property(nonatomic) double serverScore; // @synthesize serverScore=_serverScore;
145 | @property(copy, nonatomic) NSString *mediaType; // @synthesize mediaType=_mediaType;
146 | @property(nonatomic) unsigned long long minimumRankOfTopHitToSuppressResult; // @synthesize minimumRankOfTopHitToSuppressResult=_minimumRankOfTopHitToSuppressResult;
147 | @property(nonatomic) int type; // @synthesize type=_type;
148 | @property(nonatomic) int placement; // @synthesize placement=_placement;
149 | @property(nonatomic) double rankingScore; // @synthesize rankingScore=_rankingScore;
150 | @property(nonatomic) BOOL renderHorizontallyWithOtherResultsInCategory; // @synthesize renderHorizontallyWithOtherResultsInCategory=_renderHorizontallyWithOtherResultsInCategory;
151 | @property(copy, nonatomic) NSURL *sectionHeaderMoreURL; // @synthesize sectionHeaderMoreURL=_sectionHeaderMoreURL;
152 | @property(copy, nonatomic) NSString *sectionHeaderMore; // @synthesize sectionHeaderMore=_sectionHeaderMore;
153 | @property(copy, nonatomic) NSString *sectionHeader; // @synthesize sectionHeader=_sectionHeader;
154 | @property(nonatomic) int topHit; // @synthesize topHit=_topHit;
155 | @property(copy, nonatomic) NSString *userActivityRequiredString; // @synthesize userActivityRequiredString=_userActivityRequiredString;
156 | @property(nonatomic) BOOL isLocalApplicationResult; // @synthesize isLocalApplicationResult=_isLocalApplicationResult;
157 | @property(copy, nonatomic) NSString *sectionBundleIdentifier; // @synthesize sectionBundleIdentifier=_sectionBundleIdentifier;
158 | @property(copy, nonatomic) NSString *applicationBundleIdentifier; // @synthesize applicationBundleIdentifier=_applicationBundleIdentifier;
159 | @property(retain, nonatomic) SFPunchout *moreResultsPunchout; // @synthesize moreResultsPunchout=_moreResultsPunchout;
160 | @property(retain, nonatomic) SFMoreResults *moreResults; // @synthesize moreResults=_moreResults;
161 | @property(retain, nonatomic) SFCard *inlineCard; // @synthesize inlineCard=_inlineCard;
162 | @property(retain, nonatomic) SFCard *card; // @synthesize card=_card;
163 | @property(copy, nonatomic) NSString *appleReferrer; // @synthesize appleReferrer=_appleReferrer;
164 | @property(copy, nonatomic) NSString *nearbyBusinessesString; // @synthesize nearbyBusinessesString=_nearbyBusinessesString;
165 | @property(retain, nonatomic) SFImage *mapsMoreIcon; // @synthesize mapsMoreIcon=_mapsMoreIcon;
166 | @property(copy, nonatomic) NSString *mapsMoreString; // @synthesize mapsMoreString=_mapsMoreString;
167 | @property(retain, nonatomic) NSURL *mapsMoreURL; // @synthesize mapsMoreURL=_mapsMoreURL;
168 | @property(copy, nonatomic) NSString *mapsResultType; // @synthesize mapsResultType=_mapsResultType;
169 | @property(retain, nonatomic) NSData *mapsData; // @synthesize mapsData=_mapsData;
170 | @property(copy, nonatomic) NSString *calendarIdentifier; // @synthesize calendarIdentifier=_calendarIdentifier;
171 | @property(copy, nonatomic) NSString *contactIdentifier; // @synthesize contactIdentifier=_contactIdentifier;
172 | @property(copy, nonatomic) NSString *storeIdentifier; // @synthesize storeIdentifier=_storeIdentifier;
173 | @property(retain, nonatomic) SFPunchout *punchout; // @synthesize punchout=_punchout;
174 | @property(retain, nonatomic) SFActionItem *action; // @synthesize action=_action;
175 | @property(nonatomic) int auxiliaryBottomTextColor; // @synthesize auxiliaryBottomTextColor=_auxiliaryBottomTextColor;
176 | @property(copy, nonatomic) NSString *auxiliaryBottomText; // @synthesize auxiliaryBottomText=_auxiliaryBottomText;
177 | @property(copy, nonatomic) NSString *auxiliaryMiddleText; // @synthesize auxiliaryMiddleText=_auxiliaryMiddleText;
178 | @property(copy, nonatomic) NSString *auxiliaryTopText; // @synthesize auxiliaryTopText=_auxiliaryTopText;
179 | @property(retain, nonatomic) NSURL *url; // @synthesize url=_url;
180 | @property(retain, nonatomic) SFImage *completionImage; // @synthesize completionImage=_completionImage;
181 | @property(copy, nonatomic) NSString *completion; // @synthesize completion=_completion;
182 | @property(copy, nonatomic) NSString *sourceName; // @synthesize sourceName=_sourceName;
183 | @property(copy, nonatomic) NSString *publishDate; // @synthesize publishDate=_publishDate;
184 | @property(copy, nonatomic) NSString *footnote; // @synthesize footnote=_footnote;
185 | @property(copy, nonatomic) NSArray *descriptions; // @synthesize descriptions=_descriptions;
186 | @property(nonatomic) BOOL isCentered; // @synthesize isCentered=_isCentered;
187 | @property(nonatomic) BOOL isSecondaryTitleDetached; // @synthesize isSecondaryTitleDetached=_isSecondaryTitleDetached;
188 | @property(retain, nonatomic) SFImage *secondaryTitleImage; // @synthesize secondaryTitleImage=_secondaryTitleImage;
189 | @property(copy, nonatomic) NSString *secondaryTitle; // @synthesize secondaryTitle=_secondaryTitle;
190 | @property(retain, nonatomic) SFText *title; // @synthesize title=_title;
191 | @property(nonatomic) BOOL preventThumbnailImageScaling; // @synthesize preventThumbnailImageScaling=_preventThumbnailImageScaling;
192 | @property(retain, nonatomic) SFImage *thumbnail; // @synthesize thumbnail=_thumbnail;
193 | @property(copy, nonatomic) NSString *identifier; // @synthesize identifier=_identifier;
194 | - (id)copyWithZone:(struct _NSZone *)arg1;
195 | - (void)encodeWithCoder:(id)arg1;
196 | - (id)initWithCoder:(id)arg1;
197 | @property(readonly, nonatomic) NSData *jsonData;
198 | @property(readonly, nonatomic) NSDictionary *dictionaryRepresentation;
199 |
200 | // Remaining properties
201 | @property(readonly, copy) NSString *debugDescription;
202 | @property(readonly, copy) NSString *description;
203 | @property(readonly) unsigned long long hash;
204 | @property(readonly) Class superclass;
205 |
206 | @end
207 |
208 |
--------------------------------------------------------------------------------
/SpotlightBridge/ZKSwizzle/ZKSwizzle.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZKSwizzle.m
3 | // ZKSwizzle
4 | //
5 | // Created by Alexander S Zielenski on 7/24/14.
6 | // Copyright (c) 2014 Alexander S Zielenski. All rights reserved.
7 | //
8 |
9 | #import "ZKSwizzle.h"
10 | static NSMutableDictionary *classTable;
11 |
12 | @interface NSObject (ZKSwizzle)
13 | + (void)_ZK_unconditionallySwizzle;
14 | + (BOOL)_ZK_ignoreTypes;
15 | @end
16 |
17 | void *ZKIvarPointer(id self, const char *name) {
18 | Ivar ivar = class_getInstanceVariable(object_getClass(self), name);
19 | return ivar == NULL ? NULL : (__bridge void *)self + ivar_getOffset(ivar);
20 | }
21 |
22 | static SEL destinationSelectorForSelector(SEL cmd, Class dst) {
23 | return NSSelectorFromString([@"_ZK_old_" stringByAppendingFormat:@"%s_%@", class_getName(dst), NSStringFromSelector(cmd)]);
24 | }
25 |
26 | static Class classFromInfo(const char *info) {
27 | NSUInteger bracket_index = -1;
28 | for (NSUInteger i = 0; i < strlen(info); i++) {
29 | if (info[i] == '[') {
30 | bracket_index = i;
31 | break;
32 | }
33 | }
34 | bracket_index++;
35 |
36 | if (bracket_index == -1) {
37 | [NSException raise:@"Failed to parse info" format:@"Couldn't find swizzle class for info: %s", info];
38 | return NULL;
39 | }
40 |
41 | char after_bracket[512];
42 | memcpy(after_bracket, &info[bracket_index], strlen(info) - bracket_index - 1);
43 |
44 | for (NSUInteger i = 0; i < strlen(info); i++) {
45 | if (after_bracket[i] == ' ') {
46 | after_bracket[i] = '\0';
47 | }
48 | }
49 |
50 | return objc_getClass(after_bracket);
51 | }
52 |
53 | // takes __PRETTY_FUNCTION__ for info which gives the name of the swizzle source class
54 | /*
55 |
56 | We add the original implementation onto the swizzle class
57 | On ZKOrig, we use __PRETTY_FUNCTION__ to get the name of the swizzle class
58 | Then we get the implementation of that selector on the swizzle class
59 | Then we call it directly, passing in the correct selector and self
60 |
61 | */
62 | ZKIMP ZKOriginalImplementation(id self, SEL sel, const char *info) {
63 | if (sel == NULL || self == NULL || info == NULL) {
64 | [NSException raise:@"Invalid Arguments" format:@"One of self: %@, self: %@, or info: %s is NULL", self, NSStringFromSelector(sel), info];
65 | return NULL;
66 | }
67 |
68 | Class cls = classFromInfo(info);
69 | Class dest = object_getClass(self);
70 |
71 | if (cls == NULL || dest == NULL) {
72 | [NSException raise:@"Failed obtain class pair" format:@"src: %@ | dst: %@ | sel: %@", NSStringFromClass(cls), NSStringFromClass(dest), NSStringFromSelector(sel)];
73 | return NULL;
74 | }
75 |
76 | SEL destSel = destinationSelectorForSelector(sel, cls);
77 |
78 | Method method = class_getInstanceMethod(dest, destSel);
79 |
80 | if (method == NULL) {
81 | if (![NSStringFromClass(cls) isEqualToString:NSStringFromClass([self class])]) {
82 | // There is no implementation at this class level. Call the super implementation
83 | return ZKSuperImplementation(self, sel, info);
84 | }
85 |
86 | [NSException raise:@"Failed to retrieve method" format:@"Got null for the source class %@ with selector %@ (%@)", NSStringFromClass(cls), NSStringFromSelector(sel), NSStringFromSelector(destSel)];
87 | return NULL;
88 | }
89 |
90 | ZKIMP implementation = (ZKIMP)method_getImplementation(method);
91 | if (implementation == NULL) {
92 | [NSException raise:@"Failed to get implementation" format:@"The objective-c runtime could not get the implementation for %@ on the class %@. There is no fix for this", NSStringFromClass(cls), NSStringFromSelector(sel)];
93 | }
94 |
95 | return implementation;
96 | }
97 |
98 | ZKIMP ZKSuperImplementation(id object, SEL sel, const char *info) {
99 | if (sel == NULL || object == NULL) {
100 | [NSException raise:@"Invalid Arguments" format:@"One of self: %@, self: %@ is NULL", object, NSStringFromSelector(sel)];
101 | return NULL;
102 | }
103 |
104 | Class cls = object_getClass(object);
105 | if (cls == NULL) {
106 | [NSException raise:@"Invalid Argument" format:@"Could not obtain class for the passed object"];
107 | return NULL;
108 | }
109 |
110 | // Two scenarios:
111 | // 1.) The superclass was not swizzled, no problem
112 | // 2.) The superclass was swizzled, problem
113 |
114 | // We want to return the swizzled class's superclass implementation
115 | // If this is a subclass of such a class, we want two behaviors:
116 | // a.) If this imp was also swizzled, no problem, return the superclass's swizzled imp
117 | // b.) This imp was not swizzled, return the class that was originally swizzled's superclass's imp
118 | Class sourceClass = classFromInfo(info);
119 | if (sourceClass != NULL) {
120 | BOOL isClassMethod = class_isMetaClass(cls);
121 | // This was called from a swizzled method, get the class it was swizzled with
122 | NSString *className = classTable[NSStringFromClass(sourceClass)];
123 | if (className != NULL) {
124 | cls = NSClassFromString(className);
125 | // make sure we get a class method if we asked for one
126 | if (isClassMethod) {
127 | cls = object_getClass(cls);
128 | }
129 | }
130 | }
131 |
132 | cls = class_getSuperclass(cls);
133 |
134 | // This is a root class, it has no super class
135 | if (cls == NULL) {
136 | [NSException raise:@"Invalid Argument" format:@"Could not obtain superclass for the passed object"];
137 | return NULL;
138 | }
139 |
140 | Method method = class_getInstanceMethod(cls, sel);
141 | if (method == NULL) {
142 | [NSException raise:@"Failed to retrieve method" format:@"We could not find the super implementation for the class %@ and selector %@, are you sure it exists?", NSStringFromClass(cls), NSStringFromSelector(sel)];
143 | return NULL;
144 | }
145 |
146 | ZKIMP implementation = (ZKIMP)method_getImplementation(method);
147 | if (implementation == NULL) {
148 | [NSException raise:@"Failed to get implementation" format:@"The objective-c runtime could not get the implementation for %@ on the class %@. There is no fix for this", NSStringFromClass(cls), NSStringFromSelector(sel)];
149 | }
150 |
151 | return implementation;
152 | }
153 |
154 | static BOOL enumerateMethods(Class, Class);
155 | BOOL _ZKSwizzle(Class src, Class dest) {
156 | if (dest == NULL)
157 | return NO;
158 |
159 | NSString *destName = NSStringFromClass(dest);
160 | if (!destName) {
161 | return NO;
162 | }
163 |
164 | if (!classTable) {
165 | classTable = [[NSMutableDictionary alloc] init];
166 | }
167 |
168 | if ([classTable objectForKey:NSStringFromClass(src)]) {
169 | [NSException raise:@"Invalid Argument"
170 | format:@"This source class (%@) was already swizzled with another, (%@)", NSStringFromClass(src), classTable[NSStringFromClass(src)]];
171 | return NO;
172 | }
173 |
174 | BOOL success = enumerateMethods(dest, src);
175 | // The above method only gets instance methods. Do the same method for the metaclass of the class
176 | success &= enumerateMethods(object_getClass(dest), object_getClass(src));
177 |
178 | [classTable setObject:destName forKey:NSStringFromClass(src)];
179 | return success;
180 | }
181 |
182 | BOOL _ZKSwizzleClass(Class cls) {
183 | return _ZKSwizzle(cls, [cls superclass]);
184 | }
185 |
186 | static BOOL classIgnoresTypes(Class cls) {
187 | if (!class_isMetaClass(cls)) {
188 | cls = object_getClass(cls);
189 | }
190 |
191 | if (class_respondsToSelector(cls, @selector(_ZK_ignoreTypes))) {
192 | Class cls2 = class_createInstance(cls, 0);
193 | return [cls2 _ZK_ignoreTypes];
194 | }
195 |
196 | return NO;
197 | }
198 |
199 | static BOOL enumerateMethods(Class destination, Class source) {
200 | #if OBJC_API_VERSION < 2
201 | [NSException raise:@"Unsupported feature" format:@"ZKSwizzle is only available in objc 2.0"];
202 | return NO;
203 |
204 | #else
205 |
206 | unsigned int methodCount;
207 | Method *methodList = class_copyMethodList(source, &methodCount);
208 | BOOL success = YES;
209 | BOOL ignoreTypes = classIgnoresTypes(source);
210 |
211 | for (int i = 0; i < methodCount; i++) {
212 | Method method = methodList[i];
213 | SEL selector = method_getName(method);
214 | NSString *methodName = NSStringFromSelector(selector);
215 |
216 | // Don't do anything with the unconditional swizzle
217 | if (sel_isEqual(selector, @selector(_ZK_unconditionallySwizzle)) ||
218 | sel_isEqual(selector, @selector(_ZK_ignoreTypes))) {
219 | continue;
220 | }
221 |
222 | // We only swizzle methods that are implemented
223 | if (class_respondsToSelector(destination, selector)) {
224 | Method originalMethod = class_getInstanceMethod(destination, selector);
225 |
226 | const char *originalType = method_getTypeEncoding(originalMethod);
227 | const char *newType = method_getTypeEncoding(method);
228 | if (strcmp(originalType, newType) != 0 && !ignoreTypes) {
229 | NSLog(@"ZKSwizzle: incompatible type encoding for %@. (expected %s, got %s)", methodName, originalType, newType);
230 | // Incompatible type encoding
231 | success = NO;
232 | continue;
233 | }
234 |
235 | Method superImp = class_getInstanceMethod(class_getSuperclass(destination), selector);
236 |
237 | if (originalMethod != superImp) {
238 | // We are re-adding the destination selector because it could be on a superclass and not on the class itself. This method could fail
239 | class_addMethod(destination, selector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod));
240 |
241 | SEL destSel = destinationSelectorForSelector(selector, source);
242 | if (!class_addMethod(destination, destSel, method_getImplementation(method), method_getTypeEncoding(originalMethod))) {
243 | NSLog(@"ZKSwizzle: failed to add method %@ onto class %@ with selector %@", NSStringFromSelector(selector), NSStringFromClass(source), NSStringFromSelector(destSel));
244 | success = NO;
245 | continue;
246 | }
247 |
248 | method_exchangeImplementations(class_getInstanceMethod(destination, selector), class_getInstanceMethod(destination, destSel));
249 | } else {
250 | // If the method we are hooking is not implemented on the subclass at hook-time,
251 | // we want orig calls from those hooks to go to the superclass. (ZKOriginalImplementation
252 | // redirects to ZKSuperImplementation when destinationSelectorForSelector() is not implemented
253 | // on the target class, that, combined with the fact that ZKOrig is called from a hook, means
254 | // calls should redirect to super)
255 | success &= class_addMethod(destination, selector, method_getImplementation(method), method_getTypeEncoding(method));
256 | }
257 |
258 | } else {
259 | // Add any extra methods to the class but don't swizzle them
260 | success &= class_addMethod(destination, selector, method_getImplementation(method), method_getTypeEncoding(method));
261 | }
262 | }
263 |
264 | unsigned int propertyCount;
265 | objc_property_t *propertyList = class_copyPropertyList(source, &propertyCount);
266 | for (int i = 0; i < propertyCount; i++) {
267 | objc_property_t property = propertyList[i];
268 | const char *name = property_getName(property);
269 | unsigned int attributeCount;
270 | objc_property_attribute_t *attributes = property_copyAttributeList(property, &attributeCount);
271 |
272 | if (class_getProperty(destination, name) == NULL) {
273 | class_addProperty(destination, name, attributes, attributeCount);
274 | } else {
275 | class_replaceProperty(destination, name, attributes, attributeCount);
276 | }
277 |
278 | free(attributes);
279 | }
280 |
281 | free(propertyList);
282 | free(methodList);
283 | return success;
284 | #endif
285 | }
286 |
287 | // Options were to use a group class and traverse its subclasses
288 | // or to create a groups dictionary
289 | // This works because +load on NSObject is called before attribute((constructor))
290 | static NSMutableDictionary *groups = nil;
291 | void _$ZKRegisterInterface(Class cls, const char *groupName) {
292 | if (!groups)
293 | groups = [[NSMutableDictionary dictionary] retain];
294 |
295 | NSString *groupString = @(groupName);
296 | NSMutableArray *groupList = groups[groupString];
297 | if (!groupList) {
298 | groupList = [NSMutableArray array];
299 | groups[groupString] = groupList;
300 | }
301 |
302 | [groupList addObject:NSStringFromClass(cls)];
303 | }
304 |
305 | BOOL _ZKSwizzleGroup(const char *groupName) {
306 | NSArray *groupList = groups[@(groupName)];
307 | if (!groupList) {
308 | [NSException raise:@"Invalid Argument" format:@"ZKSwizzle: There is no group by the name of %s", groupName];
309 | return NO;
310 | }
311 |
312 | BOOL success = YES;
313 | for (NSString *className in groupList) {
314 | Class cls = NSClassFromString(className);
315 | if (cls == NULL)
316 | continue;
317 |
318 | if (class_respondsToSelector(object_getClass(cls), @selector(_ZK_unconditionallySwizzle))) {
319 | [cls _ZK_unconditionallySwizzle];
320 | } else {
321 | success = NO;
322 | }
323 | }
324 |
325 | return success;
326 | }
327 |
--------------------------------------------------------------------------------
/SpotlightBridge.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 6F01E0D224EFD5B000CC6FAB /* SPBResultSection+SFMutableResultSection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F01E0D024EFD5AF00CC6FAB /* SPBResultSection+SFMutableResultSection.m */; };
11 | 6F01E0D324EFD5B000CC6FAB /* SPBResultSection+SFMutableResultSection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F01E0D124EFD5AF00CC6FAB /* SPBResultSection+SFMutableResultSection.h */; };
12 | 6F06F45724F08B4600187D99 /* SPBSectionRankingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F06F45624F08B4600187D99 /* SPBSectionRankingManager.m */; };
13 | 6F06F45924F08E2000187D99 /* SPBSectionRankingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F06F45824F08E2000187D99 /* SPBSectionRankingManager.m */; };
14 | 6F0E30BA24CD891D00B45588 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F0E30B924CD891D00B45588 /* AppKit.framework */; };
15 | 6F0E30BC24CD891D00B45588 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F0E30BB24CD891D00B45588 /* Foundation.framework */; };
16 | 6F0E30C924CD891D00B45588 /* PrefixHeader.pch in Resources */ = {isa = PBXBuildFile; fileRef = 6F0E30C824CD891D00B45588 /* PrefixHeader.pch */; };
17 | 6F0E30D724CD895400B45588 /* SPBManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0E30D024CD895300B45588 /* SPBManager.m */; };
18 | 6F0E30D924CD895400B45588 /* SPBExtensionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0E30D324CD895400B45588 /* SPBExtensionManager.m */; };
19 | 6F0E30DA24CD895400B45588 /* SPBValidator.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0E30D424CD895400B45588 /* SPBValidator.m */; };
20 | 6F0E30DD24CD89DE00B45588 /* ZKSwizzle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0E30DB24CD89DE00B45588 /* ZKSwizzle.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
21 | 6F20093B24EDBD4E00923C5F /* SPKResponse+SPBResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F20093924EDBD4E00923C5F /* SPKResponse+SPBResponse.h */; };
22 | 6F20093C24EDBD4E00923C5F /* SPKResponse+SPBResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F20093A24EDBD4E00923C5F /* SPKResponse+SPBResponse.m */; };
23 | 6F20093F24EDC6F700923C5F /* SPBResponse+Spotlight.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F20093D24EDC6F700923C5F /* SPBResponse+Spotlight.h */; };
24 | 6F20094024EDC6F700923C5F /* SPBResponse+Spotlight.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F20093E24EDC6F700923C5F /* SPBResponse+Spotlight.m */; };
25 | 6F4FD06B24E1F9C200096B87 /* SPBRankingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F4FD06A24E1F9C200096B87 /* SPBRankingManager.m */; };
26 | 6F6B169624E5377B0041B8EF /* SPBPlaceholderPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F6B169524E5377B0041B8EF /* SPBPlaceholderPreviewController.m */; };
27 | 6F6B169824E537970041B8EF /* SPBPlaceholderPreviewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F6B169724E537970041B8EF /* SPBPlaceholderPreviewController.h */; };
28 | 6F77148624E7482100CBA340 /* SpotlightBridgeFrameworkTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F77148524E7482100CBA340 /* SpotlightBridgeFrameworkTests.m */; };
29 | 6F77148824E7482100CBA340 /* SpotlightBridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD38DB624CD8F940077C921 /* SpotlightBridge.framework */; };
30 | 6F77148F24E7485600CBA340 /* SPBPreviewControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F77148E24E7485600CBA340 /* SPBPreviewControllerTests.m */; };
31 | 6F77149224E7495E00CBA340 /* SPBTestPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F77149124E7495E00CBA340 /* SPBTestPreviewController.m */; };
32 | 6F77149324E74A8E00CBA340 /* SPBBridgingSearchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FCB3A5124D53A5700121805 /* SPBBridgingSearchResult.m */; };
33 | 6F77149424E74B2100CBA340 /* Spotlight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD38E0724CD91080077C921 /* Spotlight.framework */; };
34 | 6F77149624E7528C00CBA340 /* SPBResultSection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F77149524E7528C00CBA340 /* SPBResultSection.m */; };
35 | 6F7714A424E757E200CBA340 /* SPBExtensionManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F7714A324E757E200CBA340 /* SPBExtensionManagerTests.m */; };
36 | 6F7714A524E7581000CBA340 /* SPBExtensionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0E30D324CD895400B45588 /* SPBExtensionManager.m */; };
37 | 6F7714A624E7587F00CBA340 /* SpotlightBridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD38DB624CD8F940077C921 /* SpotlightBridge.framework */; };
38 | 6F7714C224E75CB700CBA340 /* SPBTestExtension.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6F7714C124E75CB700CBA340 /* SPBTestExtension.bundle */; };
39 | 6F7714C524E75F0E00CBA340 /* SPBTestExtensionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F7714C424E75F0E00CBA340 /* SPBTestExtensionManager.m */; };
40 | 6F7BA88A25049FAD009EF976 /* SpotlightBridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD38DB624CD8F940077C921 /* SpotlightBridge.framework */; settings = {ATTRIBUTES = (Required, ); }; };
41 | 6F7BA88C2504A036009EF976 /* SpotlightBridge.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6FD38DB624CD8F940077C921 /* SpotlightBridge.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
42 | 6F916C5B24CED9E400B42823 /* Spotlight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD38E0724CD91080077C921 /* Spotlight.framework */; };
43 | 6F916C5C24CED9F300B42823 /* SpotlightServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD38E0924CD91330077C921 /* SpotlightServices.framework */; };
44 | 6F916C5D24CEDA0700B42823 /* SearchFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD38E0524CD90E70077C921 /* SearchFoundation.framework */; };
45 | 6F916C5F24CEDB2900B42823 /* ParsecUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F916C5E24CEDB2900B42823 /* ParsecUI.framework */; };
46 | 6FA464D224CE315500F3C8F8 /* PRSPreviewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FA464D124CE315500F3C8F8 /* PRSPreviewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
47 | 6FC1E24B24EA6CC80059BE4A /* SpotlightServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD38E0924CD91330077C921 /* SpotlightServices.framework */; };
48 | 6FC1E24D24EA77A20059BE4A /* SPBRankingManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FC1E24C24EA77A20059BE4A /* SPBRankingManagerTests.m */; };
49 | 6FC1E24E24EA78E40059BE4A /* SPBBridgingSearchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FCB3A5124D53A5700121805 /* SPBBridgingSearchResult.m */; };
50 | 6FC1E25124EA79440059BE4A /* SPBTestSearchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FC1E25024EA79440059BE4A /* SPBTestSearchResult.m */; };
51 | 6FC1E25224EA79F20059BE4A /* SpotlightServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD38E0924CD91330077C921 /* SpotlightServices.framework */; };
52 | 6FC1E25324EA79FE0059BE4A /* Spotlight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD38E0724CD91080077C921 /* Spotlight.framework */; };
53 | 6FC1E25424EA7AD40059BE4A /* SPBRankingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F4FD06A24E1F9C200096B87 /* SPBRankingManager.m */; };
54 | 6FCB3A5224D53A5700121805 /* SPBBridgingSearchResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FCB3A5024D53A5700121805 /* SPBBridgingSearchResult.h */; };
55 | 6FCB3A5324D53A5700121805 /* SPBBridgingSearchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FCB3A5124D53A5700121805 /* SPBBridgingSearchResult.m */; };
56 | 6FD38DBA24CD8F940077C921 /* SpotlightBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DB824CD8F940077C921 /* SpotlightBridge.h */; settings = {ATTRIBUTES = (Public, ); }; };
57 | 6FD38DE324CD90160077C921 /* SPBQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FD38DD724CD90160077C921 /* SPBQuery.m */; };
58 | 6FD38DE424CD90160077C921 /* SPBResultSection.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FD38DD824CD90160077C921 /* SPBResultSection.m */; };
59 | 6FD38DE524CD90160077C921 /* SPBSearchResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DD924CD90160077C921 /* SPBSearchResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
60 | 6FD38DE624CD90160077C921 /* SPBPlaceholderPreviewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6FD38DDA24CD90160077C921 /* SPBPlaceholderPreviewController.xib */; };
61 | 6FD38DE724CD90160077C921 /* SPBResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FD38DDB24CD90160077C921 /* SPBResponse.m */; };
62 | 6FD38DE824CD90160077C921 /* SPBResultSection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DDC24CD90160077C921 /* SPBResultSection.h */; settings = {ATTRIBUTES = (Public, ); }; };
63 | 6FD38DE924CD90160077C921 /* SPBSearchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FD38DDD24CD90160077C921 /* SPBSearchResult.m */; };
64 | 6FD38DEA24CD90160077C921 /* SPBPreviewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DDE24CD90160077C921 /* SPBPreviewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
65 | 6FD38DEB24CD90160077C921 /* SPBQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DDF24CD90160077C921 /* SPBQuery.h */; settings = {ATTRIBUTES = (Public, ); }; };
66 | 6FD38DEC24CD90160077C921 /* SPBResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DE024CD90160077C921 /* SPBResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
67 | 6FD38DED24CD90160077C921 /* SPBPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FD38DE124CD90160077C921 /* SPBPreviewController.m */; };
68 | 6FD38DFD24CD905D0077C921 /* PRSCalculatorResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DF324CD905D0077C921 /* PRSCalculatorResult.h */; };
69 | 6FD38DFE24CD905D0077C921 /* SPKResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DF424CD905D0077C921 /* SPKResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
70 | 6FD38DFF24CD905D0077C921 /* SPKQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DF524CD905D0077C921 /* SPKQuery.h */; settings = {ATTRIBUTES = (Public, ); }; };
71 | 6FD38E0024CD905D0077C921 /* SPPreviewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DF624CD905D0077C921 /* SPPreviewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
72 | 6FD38E0124CD905D0077C921 /* SFSearchResult_SpotlightExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DF824CD905D0077C921 /* SFSearchResult_SpotlightExtras.h */; };
73 | 6FD38E0224CD905D0077C921 /* SFResultSection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DFA24CD905D0077C921 /* SFResultSection.h */; };
74 | 6FD38E0324CD905D0077C921 /* SFSearchResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DFB24CD905D0077C921 /* SFSearchResult.h */; };
75 | 6FD38E0424CD905D0077C921 /* SFMutableResultSection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FD38DFC24CD905D0077C921 /* SFMutableResultSection.h */; };
76 | 6FDAFE0C24EBCE9400689FDF /* SPBSpotlightBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0E30D124CD895300B45588 /* SPBSpotlightBridge.m */; };
77 | 6FDAFE0F24EBD05C00689FDF /* Spotlight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FD38E0724CD91080077C921 /* Spotlight.framework */; };
78 | 6FED219524EC688A00F341C3 /* SPBStandardSearchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FED219424EC688A00F341C3 /* SPBStandardSearchResult.m */; };
79 | 6FED219724EC6FB500F341C3 /* PRSCalculatorResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FED219624EC6FB500F341C3 /* PRSCalculatorResult.h */; };
80 | 6FED219924EC705E00F341C3 /* PRSResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 6FED219824EC705D00F341C3 /* PRSResult.h */; };
81 | /* End PBXBuildFile section */
82 |
83 | /* Begin PBXContainerItemProxy section */
84 | 6F77148924E7482100CBA340 /* PBXContainerItemProxy */ = {
85 | isa = PBXContainerItemProxy;
86 | containerPortal = 6F0E30AE24CD891D00B45588 /* Project object */;
87 | proxyType = 1;
88 | remoteGlobalIDString = 6FD38DB524CD8F940077C921;
89 | remoteInfo = SpotlightBridgeFramework;
90 | };
91 | /* End PBXContainerItemProxy section */
92 |
93 | /* Begin PBXCopyFilesBuildPhase section */
94 | 6F7BA88B2504A02B009EF976 /* CopyFiles */ = {
95 | isa = PBXCopyFilesBuildPhase;
96 | buildActionMask = 2147483647;
97 | dstPath = "";
98 | dstSubfolderSpec = 10;
99 | files = (
100 | 6F7BA88C2504A036009EF976 /* SpotlightBridge.framework in CopyFiles */,
101 | );
102 | runOnlyForDeploymentPostprocessing = 0;
103 | };
104 | /* End PBXCopyFilesBuildPhase section */
105 |
106 | /* Begin PBXFileReference section */
107 | 6F01E0D024EFD5AF00CC6FAB /* SPBResultSection+SFMutableResultSection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SPBResultSection+SFMutableResultSection.m"; sourceTree = ""; };
108 | 6F01E0D124EFD5AF00CC6FAB /* SPBResultSection+SFMutableResultSection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SPBResultSection+SFMutableResultSection.h"; sourceTree = ""; };
109 | 6F06F45524F08B4600187D99 /* SPBSectionRankingManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPBSectionRankingManager.h; sourceTree = ""; };
110 | 6F06F45624F08B4600187D99 /* SPBSectionRankingManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPBSectionRankingManager.m; sourceTree = ""; };
111 | 6F06F45824F08E2000187D99 /* SPBSectionRankingManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPBSectionRankingManager.m; sourceTree = ""; };
112 | 6F0E30B624CD891D00B45588 /* SpotlightBridge.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SpotlightBridge.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
113 | 6F0E30B924CD891D00B45588 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
114 | 6F0E30BB24CD891D00B45588 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
115 | 6F0E30BF24CD891D00B45588 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../Info.plist; sourceTree = ""; };
116 | 6F0E30C824CD891D00B45588 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PrefixHeader.pch; path = ../PrefixHeader.pch; sourceTree = ""; };
117 | 6F0E30CF24CD895300B45588 /* SPBExtensionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPBExtensionManager.h; sourceTree = ""; };
118 | 6F0E30D024CD895300B45588 /* SPBManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPBManager.m; sourceTree = ""; };
119 | 6F0E30D124CD895300B45588 /* SPBSpotlightBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPBSpotlightBridge.m; sourceTree = ""; };
120 | 6F0E30D224CD895400B45588 /* SPBValidator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPBValidator.h; sourceTree = ""; };
121 | 6F0E30D324CD895400B45588 /* SPBExtensionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPBExtensionManager.m; sourceTree = ""; };
122 | 6F0E30D424CD895400B45588 /* SPBValidator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPBValidator.m; sourceTree = ""; };
123 | 6F0E30D524CD895400B45588 /* SPBSpotlightBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPBSpotlightBridge.h; sourceTree = ""; };
124 | 6F0E30D624CD895400B45588 /* SPBManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPBManager.h; sourceTree = ""; };
125 | 6F0E30DB24CD89DE00B45588 /* ZKSwizzle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZKSwizzle.m; sourceTree = ""; };
126 | 6F0E30DC24CD89DE00B45588 /* ZKSwizzle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZKSwizzle.h; sourceTree = ""; };
127 | 6F0E30E324CD8D8C00B45588 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; };
128 | 6F20093924EDBD4E00923C5F /* SPKResponse+SPBResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SPKResponse+SPBResponse.h"; sourceTree = ""; };
129 | 6F20093A24EDBD4E00923C5F /* SPKResponse+SPBResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SPKResponse+SPBResponse.m"; sourceTree = ""; };
130 | 6F20093D24EDC6F700923C5F /* SPBResponse+Spotlight.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SPBResponse+Spotlight.h"; sourceTree = ""; };
131 | 6F20093E24EDC6F700923C5F /* SPBResponse+Spotlight.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "SPBResponse+Spotlight.m"; sourceTree = ""; };
132 | 6F4FD06924E1F9C200096B87 /* SPBRankingManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPBRankingManager.h; sourceTree = ""; };
133 | 6F4FD06A24E1F9C200096B87 /* SPBRankingManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPBRankingManager.m; sourceTree = ""; };
134 | 6F6B169524E5377B0041B8EF /* SPBPlaceholderPreviewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPBPlaceholderPreviewController.m; sourceTree = ""; };
135 | 6F6B169724E537970041B8EF /* SPBPlaceholderPreviewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPBPlaceholderPreviewController.h; sourceTree = ""; };
136 | 6F77148324E7482100CBA340 /* SpotlightBridgeFrameworkTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SpotlightBridgeFrameworkTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
137 | 6F77148524E7482100CBA340 /* SpotlightBridgeFrameworkTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SpotlightBridgeFrameworkTests.m; sourceTree = ""; };
138 | 6F77148724E7482100CBA340 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
139 | 6F77148E24E7485600CBA340 /* SPBPreviewControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPBPreviewControllerTests.m; sourceTree = ""; };
140 | 6F77149024E7495E00CBA340 /* SPBTestPreviewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPBTestPreviewController.h; sourceTree = ""; };
141 | 6F77149124E7495E00CBA340 /* SPBTestPreviewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPBTestPreviewController.m; sourceTree = ""; };
142 | 6F77149524E7528C00CBA340 /* SPBResultSection.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPBResultSection.m; sourceTree = ""; };
143 | 6F77149B24E757BB00CBA340 /* SpotlightBridgeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SpotlightBridgeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
144 | 6F77149F24E757BB00CBA340 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
145 | 6F7714A324E757E200CBA340 /* SPBExtensionManagerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPBExtensionManagerTests.m; sourceTree = ""; };
146 | 6F7714C124E75CB700CBA340 /* SPBTestExtension.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = SPBTestExtension.bundle; sourceTree = ""; };
147 | 6F7714C324E75F0E00CBA340 /* SPBTestExtensionManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPBTestExtensionManager.h; sourceTree = ""; };
148 | 6F7714C424E75F0E00CBA340 /* SPBTestExtensionManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPBTestExtensionManager.m; sourceTree = ""; };
149 | 6F916C5E24CEDB2900B42823 /* ParsecUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ParsecUI.framework; path = ../../../../System/Library/PrivateFrameworks/ParsecUI.framework; sourceTree = ""; };
150 | 6FA464D124CE315500F3C8F8 /* PRSPreviewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PRSPreviewController.h; sourceTree = ""; };
151 | 6FC1E24724EA637B0059BE4A /* PRSRankingManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PRSRankingManager.h; sourceTree = ""; };
152 | 6FC1E24C24EA77A20059BE4A /* SPBRankingManagerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPBRankingManagerTests.m; sourceTree = ""; };
153 | 6FC1E24F24EA79440059BE4A /* SPBTestSearchResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPBTestSearchResult.h; sourceTree = ""; };
154 | 6FC1E25024EA79440059BE4A /* SPBTestSearchResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPBTestSearchResult.m; sourceTree = ""; };
155 | 6FCB3A5024D53A5700121805 /* SPBBridgingSearchResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPBBridgingSearchResult.h; sourceTree = ""; };
156 | 6FCB3A5124D53A5700121805 /* SPBBridgingSearchResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPBBridgingSearchResult.m; sourceTree = ""; };
157 | 6FD38DB624CD8F940077C921 /* SpotlightBridge.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SpotlightBridge.framework; sourceTree = BUILT_PRODUCTS_DIR; };
158 | 6FD38DB824CD8F940077C921 /* SpotlightBridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SpotlightBridge.h; sourceTree = ""; };
159 | 6FD38DB924CD8F940077C921 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
160 | 6FD38DD724CD90160077C921 /* SPBQuery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPBQuery.m; sourceTree = ""; };
161 | 6FD38DD824CD90160077C921 /* SPBResultSection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPBResultSection.m; sourceTree = ""; };
162 | 6FD38DD924CD90160077C921 /* SPBSearchResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPBSearchResult.h; sourceTree = ""; };
163 | 6FD38DDA24CD90160077C921 /* SPBPlaceholderPreviewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SPBPlaceholderPreviewController.xib; sourceTree = ""; };
164 | 6FD38DDB24CD90160077C921 /* SPBResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPBResponse.m; sourceTree = ""; };
165 | 6FD38DDC24CD90160077C921 /* SPBResultSection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPBResultSection.h; sourceTree = ""; };
166 | 6FD38DDD24CD90160077C921 /* SPBSearchResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPBSearchResult.m; sourceTree = ""; };
167 | 6FD38DDE24CD90160077C921 /* SPBPreviewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPBPreviewController.h; sourceTree = ""; };
168 | 6FD38DDF24CD90160077C921 /* SPBQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPBQuery.h; sourceTree = ""; };
169 | 6FD38DE024CD90160077C921 /* SPBResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPBResponse.h; sourceTree = ""; };
170 | 6FD38DE124CD90160077C921 /* SPBPreviewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPBPreviewController.m; sourceTree = ""; };
171 | 6FD38DF324CD905D0077C921 /* PRSCalculatorResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PRSCalculatorResult.h; sourceTree = ""; };
172 | 6FD38DF424CD905D0077C921 /* SPKResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPKResponse.h; sourceTree = ""; };
173 | 6FD38DF524CD905D0077C921 /* SPKQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPKQuery.h; sourceTree = ""; };
174 | 6FD38DF624CD905D0077C921 /* SPPreviewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPPreviewController.h; sourceTree = ""; };
175 | 6FD38DF824CD905D0077C921 /* SFSearchResult_SpotlightExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SFSearchResult_SpotlightExtras.h; sourceTree = ""; };
176 | 6FD38DFA24CD905D0077C921 /* SFResultSection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SFResultSection.h; sourceTree = ""; };
177 | 6FD38DFB24CD905D0077C921 /* SFSearchResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SFSearchResult.h; sourceTree = ""; };
178 | 6FD38DFC24CD905D0077C921 /* SFMutableResultSection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SFMutableResultSection.h; sourceTree = ""; };
179 | 6FD38E0524CD90E70077C921 /* SearchFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SearchFoundation.framework; path = ../../../../System/Library/PrivateFrameworks/SearchFoundation.framework; sourceTree = ""; };
180 | 6FD38E0724CD91080077C921 /* Spotlight.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Spotlight.framework; path = ../../../../System/Library/PrivateFrameworks/Spotlight.framework; sourceTree = ""; };
181 | 6FD38E0924CD91330077C921 /* SpotlightServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SpotlightServices.framework; path = ../../../../System/Library/PrivateFrameworks/SpotlightServices.framework; sourceTree = ""; };
182 | 6FDAFE0D24EBD04600689FDF /* Spotlight */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = Spotlight; path = ../../../../System/Library/PrivateFrameworks/Spotlight.framework/Versions/A/Spotlight; sourceTree = ""; };
183 | 6FED219324EC688A00F341C3 /* SPBStandardSearchResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SPBStandardSearchResult.h; sourceTree = ""; };
184 | 6FED219424EC688A00F341C3 /* SPBStandardSearchResult.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SPBStandardSearchResult.m; sourceTree = ""; };
185 | 6FED219624EC6FB500F341C3 /* PRSCalculatorResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PRSCalculatorResult.h; sourceTree = ""; };
186 | 6FED219824EC705D00F341C3 /* PRSResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PRSResult.h; sourceTree = ""; };
187 | /* End PBXFileReference section */
188 |
189 | /* Begin PBXFrameworksBuildPhase section */
190 | 6F0E30B324CD891D00B45588 /* Frameworks */ = {
191 | isa = PBXFrameworksBuildPhase;
192 | buildActionMask = 2147483647;
193 | files = (
194 | 6F7BA88A25049FAD009EF976 /* SpotlightBridge.framework in Frameworks */,
195 | 6FDAFE0F24EBD05C00689FDF /* Spotlight.framework in Frameworks */,
196 | 6FC1E24B24EA6CC80059BE4A /* SpotlightServices.framework in Frameworks */,
197 | 6F0E30BA24CD891D00B45588 /* AppKit.framework in Frameworks */,
198 | 6F0E30BC24CD891D00B45588 /* Foundation.framework in Frameworks */,
199 | );
200 | runOnlyForDeploymentPostprocessing = 0;
201 | };
202 | 6F77148024E7482100CBA340 /* Frameworks */ = {
203 | isa = PBXFrameworksBuildPhase;
204 | buildActionMask = 2147483647;
205 | files = (
206 | 6F77148824E7482100CBA340 /* SpotlightBridge.framework in Frameworks */,
207 | 6F77149424E74B2100CBA340 /* Spotlight.framework in Frameworks */,
208 | );
209 | runOnlyForDeploymentPostprocessing = 0;
210 | };
211 | 6F77149824E757BB00CBA340 /* Frameworks */ = {
212 | isa = PBXFrameworksBuildPhase;
213 | buildActionMask = 2147483647;
214 | files = (
215 | 6FC1E25324EA79FE0059BE4A /* Spotlight.framework in Frameworks */,
216 | 6FC1E25224EA79F20059BE4A /* SpotlightServices.framework in Frameworks */,
217 | 6F7714A624E7587F00CBA340 /* SpotlightBridge.framework in Frameworks */,
218 | );
219 | runOnlyForDeploymentPostprocessing = 0;
220 | };
221 | 6FD38DB324CD8F940077C921 /* Frameworks */ = {
222 | isa = PBXFrameworksBuildPhase;
223 | buildActionMask = 2147483647;
224 | files = (
225 | 6F916C5F24CEDB2900B42823 /* ParsecUI.framework in Frameworks */,
226 | 6F916C5D24CEDA0700B42823 /* SearchFoundation.framework in Frameworks */,
227 | 6F916C5C24CED9F300B42823 /* SpotlightServices.framework in Frameworks */,
228 | 6F916C5B24CED9E400B42823 /* Spotlight.framework in Frameworks */,
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | /* End PBXFrameworksBuildPhase section */
233 |
234 | /* Begin PBXGroup section */
235 | 6F0E30AD24CD891D00B45588 = {
236 | isa = PBXGroup;
237 | children = (
238 | 6F0E30BD24CD891D00B45588 /* SpotlightBridge */,
239 | 6FD38DB724CD8F940077C921 /* SpotlightBridgeFramework */,
240 | 6F77148424E7482100CBA340 /* SpotlightBridgeFrameworkTests */,
241 | 6F77149C24E757BB00CBA340 /* SpotlightBridgeTests */,
242 | 6F0E30B824CD891D00B45588 /* Frameworks */,
243 | 6F0E30B724CD891D00B45588 /* Products */,
244 | );
245 | sourceTree = "";
246 | };
247 | 6F0E30B724CD891D00B45588 /* Products */ = {
248 | isa = PBXGroup;
249 | children = (
250 | 6F0E30B624CD891D00B45588 /* SpotlightBridge.bundle */,
251 | 6FD38DB624CD8F940077C921 /* SpotlightBridge.framework */,
252 | 6F77148324E7482100CBA340 /* SpotlightBridgeFrameworkTests.xctest */,
253 | 6F77149B24E757BB00CBA340 /* SpotlightBridgeTests.xctest */,
254 | );
255 | name = Products;
256 | sourceTree = "";
257 | };
258 | 6F0E30B824CD891D00B45588 /* Frameworks */ = {
259 | isa = PBXGroup;
260 | children = (
261 | 6FDAFE0D24EBD04600689FDF /* Spotlight */,
262 | 6F916C5E24CEDB2900B42823 /* ParsecUI.framework */,
263 | 6FD38E0924CD91330077C921 /* SpotlightServices.framework */,
264 | 6FD38E0724CD91080077C921 /* Spotlight.framework */,
265 | 6FD38E0524CD90E70077C921 /* SearchFoundation.framework */,
266 | 6F0E30B924CD891D00B45588 /* AppKit.framework */,
267 | 6F0E30BB24CD891D00B45588 /* Foundation.framework */,
268 | 6F0E30E324CD8D8C00B45588 /* Quartz.framework */,
269 | );
270 | name = Frameworks;
271 | sourceTree = "";
272 | };
273 | 6F0E30BD24CD891D00B45588 /* SpotlightBridge */ = {
274 | isa = PBXGroup;
275 | children = (
276 | 6FC1E24724EA637B0059BE4A /* PRSRankingManager.h */,
277 | 6F0E30CF24CD895300B45588 /* SPBExtensionManager.h */,
278 | 6F0E30D324CD895400B45588 /* SPBExtensionManager.m */,
279 | 6F0E30D624CD895400B45588 /* SPBManager.h */,
280 | 6F0E30D024CD895300B45588 /* SPBManager.m */,
281 | 6F0E30D524CD895400B45588 /* SPBSpotlightBridge.h */,
282 | 6F0E30D124CD895300B45588 /* SPBSpotlightBridge.m */,
283 | 6F0E30D224CD895400B45588 /* SPBValidator.h */,
284 | 6F0E30D424CD895400B45588 /* SPBValidator.m */,
285 | 6F4FD06924E1F9C200096B87 /* SPBRankingManager.h */,
286 | 6F4FD06A24E1F9C200096B87 /* SPBRankingManager.m */,
287 | 6F06F45524F08B4600187D99 /* SPBSectionRankingManager.h */,
288 | 6F06F45624F08B4600187D99 /* SPBSectionRankingManager.m */,
289 | 6F0E30C424CD891D00B45588 /* ZKSwizzle */,
290 | 6F0E30BE24CD891D00B45588 /* Supporting Files */,
291 | );
292 | path = SpotlightBridge;
293 | sourceTree = "";
294 | };
295 | 6F0E30BE24CD891D00B45588 /* Supporting Files */ = {
296 | isa = PBXGroup;
297 | children = (
298 | 6F0E30BF24CD891D00B45588 /* Info.plist */,
299 | 6F0E30C824CD891D00B45588 /* PrefixHeader.pch */,
300 | );
301 | path = "Supporting Files";
302 | sourceTree = "";
303 | };
304 | 6F0E30C424CD891D00B45588 /* ZKSwizzle */ = {
305 | isa = PBXGroup;
306 | children = (
307 | 6F0E30DC24CD89DE00B45588 /* ZKSwizzle.h */,
308 | 6F0E30DB24CD89DE00B45588 /* ZKSwizzle.m */,
309 | );
310 | path = ZKSwizzle;
311 | sourceTree = "";
312 | };
313 | 6F77148424E7482100CBA340 /* SpotlightBridgeFrameworkTests */ = {
314 | isa = PBXGroup;
315 | children = (
316 | 6F77148524E7482100CBA340 /* SpotlightBridgeFrameworkTests.m */,
317 | 6F77148724E7482100CBA340 /* Info.plist */,
318 | 6F77148E24E7485600CBA340 /* SPBPreviewControllerTests.m */,
319 | 6F77149024E7495E00CBA340 /* SPBTestPreviewController.h */,
320 | 6F77149124E7495E00CBA340 /* SPBTestPreviewController.m */,
321 | 6F77149524E7528C00CBA340 /* SPBResultSection.m */,
322 | );
323 | path = SpotlightBridgeFrameworkTests;
324 | sourceTree = "";
325 | };
326 | 6F77149C24E757BB00CBA340 /* SpotlightBridgeTests */ = {
327 | isa = PBXGroup;
328 | children = (
329 | 6F7714C124E75CB700CBA340 /* SPBTestExtension.bundle */,
330 | 6F77149F24E757BB00CBA340 /* Info.plist */,
331 | 6F7714A324E757E200CBA340 /* SPBExtensionManagerTests.m */,
332 | 6F7714C324E75F0E00CBA340 /* SPBTestExtensionManager.h */,
333 | 6F7714C424E75F0E00CBA340 /* SPBTestExtensionManager.m */,
334 | 6FC1E24C24EA77A20059BE4A /* SPBRankingManagerTests.m */,
335 | 6FC1E24F24EA79440059BE4A /* SPBTestSearchResult.h */,
336 | 6FC1E25024EA79440059BE4A /* SPBTestSearchResult.m */,
337 | 6FED219324EC688A00F341C3 /* SPBStandardSearchResult.h */,
338 | 6FED219424EC688A00F341C3 /* SPBStandardSearchResult.m */,
339 | 6F06F45824F08E2000187D99 /* SPBSectionRankingManager.m */,
340 | );
341 | path = SpotlightBridgeTests;
342 | sourceTree = "";
343 | };
344 | 6FD38DB724CD8F940077C921 /* SpotlightBridgeFramework */ = {
345 | isa = PBXGroup;
346 | children = (
347 | 6FD38DEE24CD905D0077C921 /* Headers */,
348 | 6FD38DB824CD8F940077C921 /* SpotlightBridge.h */,
349 | 6F01E0D124EFD5AF00CC6FAB /* SPBResultSection+SFMutableResultSection.h */,
350 | 6F01E0D024EFD5AF00CC6FAB /* SPBResultSection+SFMutableResultSection.m */,
351 | 6FD38DDE24CD90160077C921 /* SPBPreviewController.h */,
352 | 6FD38DE124CD90160077C921 /* SPBPreviewController.m */,
353 | 6F6B169724E537970041B8EF /* SPBPlaceholderPreviewController.h */,
354 | 6F6B169524E5377B0041B8EF /* SPBPlaceholderPreviewController.m */,
355 | 6FD38DDA24CD90160077C921 /* SPBPlaceholderPreviewController.xib */,
356 | 6F20093924EDBD4E00923C5F /* SPKResponse+SPBResponse.h */,
357 | 6F20093A24EDBD4E00923C5F /* SPKResponse+SPBResponse.m */,
358 | 6F20093D24EDC6F700923C5F /* SPBResponse+Spotlight.h */,
359 | 6F20093E24EDC6F700923C5F /* SPBResponse+Spotlight.m */,
360 | 6FD38DDF24CD90160077C921 /* SPBQuery.h */,
361 | 6FD38DD724CD90160077C921 /* SPBQuery.m */,
362 | 6FD38DE024CD90160077C921 /* SPBResponse.h */,
363 | 6FD38DDB24CD90160077C921 /* SPBResponse.m */,
364 | 6FD38DDC24CD90160077C921 /* SPBResultSection.h */,
365 | 6FD38DD824CD90160077C921 /* SPBResultSection.m */,
366 | 6FD38DD924CD90160077C921 /* SPBSearchResult.h */,
367 | 6FD38DDD24CD90160077C921 /* SPBSearchResult.m */,
368 | 6FD38DB924CD8F940077C921 /* Info.plist */,
369 | 6FCB3A5024D53A5700121805 /* SPBBridgingSearchResult.h */,
370 | 6FCB3A5124D53A5700121805 /* SPBBridgingSearchResult.m */,
371 | );
372 | path = SpotlightBridgeFramework;
373 | sourceTree = "";
374 | };
375 | 6FD38DEE24CD905D0077C921 /* Headers */ = {
376 | isa = PBXGroup;
377 | children = (
378 | 6FD38DEF24CD905D0077C921 /* 10.14 */,
379 | 6FD38DF124CD905D0077C921 /* 10.15 */,
380 | );
381 | path = Headers;
382 | sourceTree = "";
383 | };
384 | 6FD38DEF24CD905D0077C921 /* 10.14 */ = {
385 | isa = PBXGroup;
386 | children = (
387 | 6FED219624EC6FB500F341C3 /* PRSCalculatorResult.h */,
388 | 6FA464D124CE315500F3C8F8 /* PRSPreviewController.h */,
389 | 6FED219824EC705D00F341C3 /* PRSResult.h */,
390 | 6FD38DF024CD905D0077C921 /* Spotlight */,
391 | );
392 | path = 10.14;
393 | sourceTree = "";
394 | };
395 | 6FD38DF024CD905D0077C921 /* Spotlight */ = {
396 | isa = PBXGroup;
397 | children = (
398 | );
399 | path = Spotlight;
400 | sourceTree = "";
401 | };
402 | 6FD38DF124CD905D0077C921 /* 10.15 */ = {
403 | isa = PBXGroup;
404 | children = (
405 | 6FD38DF224CD905D0077C921 /* Spotlight */,
406 | 6FD38DF724CD905D0077C921 /* SpotlightServices */,
407 | 6FD38DF924CD905D0077C921 /* SearchFoundation */,
408 | );
409 | path = 10.15;
410 | sourceTree = "";
411 | };
412 | 6FD38DF224CD905D0077C921 /* Spotlight */ = {
413 | isa = PBXGroup;
414 | children = (
415 | 6FD38DF324CD905D0077C921 /* PRSCalculatorResult.h */,
416 | 6FD38DF424CD905D0077C921 /* SPKResponse.h */,
417 | 6FD38DF524CD905D0077C921 /* SPKQuery.h */,
418 | 6FD38DF624CD905D0077C921 /* SPPreviewController.h */,
419 | );
420 | path = Spotlight;
421 | sourceTree = "";
422 | };
423 | 6FD38DF724CD905D0077C921 /* SpotlightServices */ = {
424 | isa = PBXGroup;
425 | children = (
426 | 6FD38DF824CD905D0077C921 /* SFSearchResult_SpotlightExtras.h */,
427 | );
428 | path = SpotlightServices;
429 | sourceTree = "";
430 | };
431 | 6FD38DF924CD905D0077C921 /* SearchFoundation */ = {
432 | isa = PBXGroup;
433 | children = (
434 | 6FD38DFA24CD905D0077C921 /* SFResultSection.h */,
435 | 6FD38DFB24CD905D0077C921 /* SFSearchResult.h */,
436 | 6FD38DFC24CD905D0077C921 /* SFMutableResultSection.h */,
437 | );
438 | path = SearchFoundation;
439 | sourceTree = "";
440 | };
441 | /* End PBXGroup section */
442 |
443 | /* Begin PBXHeadersBuildPhase section */
444 | 6FD38DB124CD8F940077C921 /* Headers */ = {
445 | isa = PBXHeadersBuildPhase;
446 | buildActionMask = 2147483647;
447 | files = (
448 | 6FD38DEC24CD90160077C921 /* SPBResponse.h in Headers */,
449 | 6FD38DEA24CD90160077C921 /* SPBPreviewController.h in Headers */,
450 | 6FED219924EC705E00F341C3 /* PRSResult.h in Headers */,
451 | 6FD38DFE24CD905D0077C921 /* SPKResponse.h in Headers */,
452 | 6F01E0D324EFD5B000CC6FAB /* SPBResultSection+SFMutableResultSection.h in Headers */,
453 | 6F6B169824E537970041B8EF /* SPBPlaceholderPreviewController.h in Headers */,
454 | 6FA464D224CE315500F3C8F8 /* PRSPreviewController.h in Headers */,
455 | 6FED219724EC6FB500F341C3 /* PRSCalculatorResult.h in Headers */,
456 | 6FD38DE524CD90160077C921 /* SPBSearchResult.h in Headers */,
457 | 6FD38DE824CD90160077C921 /* SPBResultSection.h in Headers */,
458 | 6FD38E0024CD905D0077C921 /* SPPreviewController.h in Headers */,
459 | 6FD38E0124CD905D0077C921 /* SFSearchResult_SpotlightExtras.h in Headers */,
460 | 6F20093B24EDBD4E00923C5F /* SPKResponse+SPBResponse.h in Headers */,
461 | 6F20093F24EDC6F700923C5F /* SPBResponse+Spotlight.h in Headers */,
462 | 6FD38E0324CD905D0077C921 /* SFSearchResult.h in Headers */,
463 | 6FD38DBA24CD8F940077C921 /* SpotlightBridge.h in Headers */,
464 | 6FD38E0224CD905D0077C921 /* SFResultSection.h in Headers */,
465 | 6FD38DEB24CD90160077C921 /* SPBQuery.h in Headers */,
466 | 6FD38DFF24CD905D0077C921 /* SPKQuery.h in Headers */,
467 | 6FD38E0424CD905D0077C921 /* SFMutableResultSection.h in Headers */,
468 | 6FCB3A5224D53A5700121805 /* SPBBridgingSearchResult.h in Headers */,
469 | 6FD38DFD24CD905D0077C921 /* PRSCalculatorResult.h in Headers */,
470 | );
471 | runOnlyForDeploymentPostprocessing = 0;
472 | };
473 | /* End PBXHeadersBuildPhase section */
474 |
475 | /* Begin PBXNativeTarget section */
476 | 6F0E30B524CD891D00B45588 /* SpotlightBridge */ = {
477 | isa = PBXNativeTarget;
478 | buildConfigurationList = 6F0E30CC24CD891D00B45588 /* Build configuration list for PBXNativeTarget "SpotlightBridge" */;
479 | buildPhases = (
480 | 6F0E30B224CD891D00B45588 /* Sources */,
481 | 6F0E30B324CD891D00B45588 /* Frameworks */,
482 | 6F0E30B424CD891D00B45588 /* Resources */,
483 | 6F7BA88B2504A02B009EF976 /* CopyFiles */,
484 | );
485 | buildRules = (
486 | );
487 | dependencies = (
488 | );
489 | name = SpotlightBridge;
490 | productName = SpotlightBridge;
491 | productReference = 6F0E30B624CD891D00B45588 /* SpotlightBridge.bundle */;
492 | productType = "com.apple.product-type.bundle";
493 | };
494 | 6F77148224E7482100CBA340 /* SpotlightBridgeFrameworkTests */ = {
495 | isa = PBXNativeTarget;
496 | buildConfigurationList = 6F77148B24E7482100CBA340 /* Build configuration list for PBXNativeTarget "SpotlightBridgeFrameworkTests" */;
497 | buildPhases = (
498 | 6F77147F24E7482100CBA340 /* Sources */,
499 | 6F77148024E7482100CBA340 /* Frameworks */,
500 | 6F77148124E7482100CBA340 /* Resources */,
501 | );
502 | buildRules = (
503 | );
504 | dependencies = (
505 | 6F77148A24E7482100CBA340 /* PBXTargetDependency */,
506 | );
507 | name = SpotlightBridgeFrameworkTests;
508 | productName = SpotlightBridgeFrameworkTests;
509 | productReference = 6F77148324E7482100CBA340 /* SpotlightBridgeFrameworkTests.xctest */;
510 | productType = "com.apple.product-type.bundle.unit-test";
511 | };
512 | 6F77149A24E757BB00CBA340 /* SpotlightBridgeTests */ = {
513 | isa = PBXNativeTarget;
514 | buildConfigurationList = 6F7714A024E757BB00CBA340 /* Build configuration list for PBXNativeTarget "SpotlightBridgeTests" */;
515 | buildPhases = (
516 | 6F77149724E757BB00CBA340 /* Sources */,
517 | 6F77149824E757BB00CBA340 /* Frameworks */,
518 | 6F77149924E757BB00CBA340 /* Resources */,
519 | );
520 | buildRules = (
521 | );
522 | dependencies = (
523 | );
524 | name = SpotlightBridgeTests;
525 | productName = SpotlightBridgeTests;
526 | productReference = 6F77149B24E757BB00CBA340 /* SpotlightBridgeTests.xctest */;
527 | productType = "com.apple.product-type.bundle.unit-test";
528 | };
529 | 6FD38DB524CD8F940077C921 /* SpotlightBridgeFramework */ = {
530 | isa = PBXNativeTarget;
531 | buildConfigurationList = 6FD38DBD24CD8F940077C921 /* Build configuration list for PBXNativeTarget "SpotlightBridgeFramework" */;
532 | buildPhases = (
533 | 6FD38DB124CD8F940077C921 /* Headers */,
534 | 6FD38DB224CD8F940077C921 /* Sources */,
535 | 6FD38DB324CD8F940077C921 /* Frameworks */,
536 | 6FD38DB424CD8F940077C921 /* Resources */,
537 | );
538 | buildRules = (
539 | );
540 | dependencies = (
541 | );
542 | name = SpotlightBridgeFramework;
543 | productName = SpotlightBridgeFramework;
544 | productReference = 6FD38DB624CD8F940077C921 /* SpotlightBridge.framework */;
545 | productType = "com.apple.product-type.framework";
546 | };
547 | /* End PBXNativeTarget section */
548 |
549 | /* Begin PBXProject section */
550 | 6F0E30AE24CD891D00B45588 /* Project object */ = {
551 | isa = PBXProject;
552 | attributes = {
553 | LastUpgradeCheck = 1150;
554 | ORGANIZATIONNAME = "Benjamin Johnson";
555 | TargetAttributes = {
556 | 6F0E30B524CD891D00B45588 = {
557 | CreatedOnToolsVersion = 11.5;
558 | };
559 | 6F77148224E7482100CBA340 = {
560 | CreatedOnToolsVersion = 11.6;
561 | };
562 | 6F77149A24E757BB00CBA340 = {
563 | CreatedOnToolsVersion = 11.6;
564 | };
565 | 6FD38DB524CD8F940077C921 = {
566 | CreatedOnToolsVersion = 11.5;
567 | };
568 | };
569 | };
570 | buildConfigurationList = 6F0E30B124CD891D00B45588 /* Build configuration list for PBXProject "SpotlightBridge" */;
571 | compatibilityVersion = "Xcode 9.3";
572 | developmentRegion = en;
573 | hasScannedForEncodings = 0;
574 | knownRegions = (
575 | en,
576 | Base,
577 | );
578 | mainGroup = 6F0E30AD24CD891D00B45588;
579 | productRefGroup = 6F0E30B724CD891D00B45588 /* Products */;
580 | projectDirPath = "";
581 | projectRoot = "";
582 | targets = (
583 | 6F0E30B524CD891D00B45588 /* SpotlightBridge */,
584 | 6FD38DB524CD8F940077C921 /* SpotlightBridgeFramework */,
585 | 6F77148224E7482100CBA340 /* SpotlightBridgeFrameworkTests */,
586 | 6F77149A24E757BB00CBA340 /* SpotlightBridgeTests */,
587 | );
588 | };
589 | /* End PBXProject section */
590 |
591 | /* Begin PBXResourcesBuildPhase section */
592 | 6F0E30B424CD891D00B45588 /* Resources */ = {
593 | isa = PBXResourcesBuildPhase;
594 | buildActionMask = 2147483647;
595 | files = (
596 | 6F0E30C924CD891D00B45588 /* PrefixHeader.pch in Resources */,
597 | );
598 | runOnlyForDeploymentPostprocessing = 0;
599 | };
600 | 6F77148124E7482100CBA340 /* Resources */ = {
601 | isa = PBXResourcesBuildPhase;
602 | buildActionMask = 2147483647;
603 | files = (
604 | );
605 | runOnlyForDeploymentPostprocessing = 0;
606 | };
607 | 6F77149924E757BB00CBA340 /* Resources */ = {
608 | isa = PBXResourcesBuildPhase;
609 | buildActionMask = 2147483647;
610 | files = (
611 | 6F7714C224E75CB700CBA340 /* SPBTestExtension.bundle in Resources */,
612 | );
613 | runOnlyForDeploymentPostprocessing = 0;
614 | };
615 | 6FD38DB424CD8F940077C921 /* Resources */ = {
616 | isa = PBXResourcesBuildPhase;
617 | buildActionMask = 2147483647;
618 | files = (
619 | 6FD38DE624CD90160077C921 /* SPBPlaceholderPreviewController.xib in Resources */,
620 | );
621 | runOnlyForDeploymentPostprocessing = 0;
622 | };
623 | /* End PBXResourcesBuildPhase section */
624 |
625 | /* Begin PBXSourcesBuildPhase section */
626 | 6F0E30B224CD891D00B45588 /* Sources */ = {
627 | isa = PBXSourcesBuildPhase;
628 | buildActionMask = 2147483647;
629 | files = (
630 | 6F0E30D724CD895400B45588 /* SPBManager.m in Sources */,
631 | 6F0E30D924CD895400B45588 /* SPBExtensionManager.m in Sources */,
632 | 6F0E30DA24CD895400B45588 /* SPBValidator.m in Sources */,
633 | 6F06F45724F08B4600187D99 /* SPBSectionRankingManager.m in Sources */,
634 | 6F4FD06B24E1F9C200096B87 /* SPBRankingManager.m in Sources */,
635 | 6F0E30DD24CD89DE00B45588 /* ZKSwizzle.m in Sources */,
636 | 6FDAFE0C24EBCE9400689FDF /* SPBSpotlightBridge.m in Sources */,
637 | );
638 | runOnlyForDeploymentPostprocessing = 0;
639 | };
640 | 6F77147F24E7482100CBA340 /* Sources */ = {
641 | isa = PBXSourcesBuildPhase;
642 | buildActionMask = 2147483647;
643 | files = (
644 | 6F77149324E74A8E00CBA340 /* SPBBridgingSearchResult.m in Sources */,
645 | 6F77148F24E7485600CBA340 /* SPBPreviewControllerTests.m in Sources */,
646 | 6F77149624E7528C00CBA340 /* SPBResultSection.m in Sources */,
647 | 6F77148624E7482100CBA340 /* SpotlightBridgeFrameworkTests.m in Sources */,
648 | 6F77149224E7495E00CBA340 /* SPBTestPreviewController.m in Sources */,
649 | );
650 | runOnlyForDeploymentPostprocessing = 0;
651 | };
652 | 6F77149724E757BB00CBA340 /* Sources */ = {
653 | isa = PBXSourcesBuildPhase;
654 | buildActionMask = 2147483647;
655 | files = (
656 | 6FC1E24D24EA77A20059BE4A /* SPBRankingManagerTests.m in Sources */,
657 | 6F7714C524E75F0E00CBA340 /* SPBTestExtensionManager.m in Sources */,
658 | 6FC1E24E24EA78E40059BE4A /* SPBBridgingSearchResult.m in Sources */,
659 | 6FC1E25424EA7AD40059BE4A /* SPBRankingManager.m in Sources */,
660 | 6F7714A424E757E200CBA340 /* SPBExtensionManagerTests.m in Sources */,
661 | 6F06F45924F08E2000187D99 /* SPBSectionRankingManager.m in Sources */,
662 | 6FC1E25124EA79440059BE4A /* SPBTestSearchResult.m in Sources */,
663 | 6F7714A524E7581000CBA340 /* SPBExtensionManager.m in Sources */,
664 | 6FED219524EC688A00F341C3 /* SPBStandardSearchResult.m in Sources */,
665 | );
666 | runOnlyForDeploymentPostprocessing = 0;
667 | };
668 | 6FD38DB224CD8F940077C921 /* Sources */ = {
669 | isa = PBXSourcesBuildPhase;
670 | buildActionMask = 2147483647;
671 | files = (
672 | 6FD38DED24CD90160077C921 /* SPBPreviewController.m in Sources */,
673 | 6F20094024EDC6F700923C5F /* SPBResponse+Spotlight.m in Sources */,
674 | 6FD38DE724CD90160077C921 /* SPBResponse.m in Sources */,
675 | 6FD38DE424CD90160077C921 /* SPBResultSection.m in Sources */,
676 | 6FCB3A5324D53A5700121805 /* SPBBridgingSearchResult.m in Sources */,
677 | 6FD38DE924CD90160077C921 /* SPBSearchResult.m in Sources */,
678 | 6F20093C24EDBD4E00923C5F /* SPKResponse+SPBResponse.m in Sources */,
679 | 6F01E0D224EFD5B000CC6FAB /* SPBResultSection+SFMutableResultSection.m in Sources */,
680 | 6F6B169624E5377B0041B8EF /* SPBPlaceholderPreviewController.m in Sources */,
681 | 6FD38DE324CD90160077C921 /* SPBQuery.m in Sources */,
682 | );
683 | runOnlyForDeploymentPostprocessing = 0;
684 | };
685 | /* End PBXSourcesBuildPhase section */
686 |
687 | /* Begin PBXTargetDependency section */
688 | 6F77148A24E7482100CBA340 /* PBXTargetDependency */ = {
689 | isa = PBXTargetDependency;
690 | target = 6FD38DB524CD8F940077C921 /* SpotlightBridgeFramework */;
691 | targetProxy = 6F77148924E7482100CBA340 /* PBXContainerItemProxy */;
692 | };
693 | /* End PBXTargetDependency section */
694 |
695 | /* Begin XCBuildConfiguration section */
696 | 6F0E30CA24CD891D00B45588 /* Debug */ = {
697 | isa = XCBuildConfiguration;
698 | buildSettings = {
699 | ALWAYS_SEARCH_USER_PATHS = NO;
700 | CLANG_ANALYZER_NONNULL = YES;
701 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
702 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
703 | CLANG_CXX_LIBRARY = "libc++";
704 | CLANG_ENABLE_MODULES = YES;
705 | CLANG_ENABLE_OBJC_ARC = YES;
706 | CLANG_ENABLE_OBJC_WEAK = YES;
707 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
708 | CLANG_WARN_BOOL_CONVERSION = YES;
709 | CLANG_WARN_COMMA = YES;
710 | CLANG_WARN_CONSTANT_CONVERSION = YES;
711 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
712 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
713 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
714 | CLANG_WARN_EMPTY_BODY = YES;
715 | CLANG_WARN_ENUM_CONVERSION = YES;
716 | CLANG_WARN_INFINITE_RECURSION = YES;
717 | CLANG_WARN_INT_CONVERSION = YES;
718 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
719 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
720 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
721 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
722 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
723 | CLANG_WARN_STRICT_PROTOTYPES = YES;
724 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
725 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
726 | CLANG_WARN_UNREACHABLE_CODE = YES;
727 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
728 | COPY_PHASE_STRIP = NO;
729 | DEBUG_INFORMATION_FORMAT = dwarf;
730 | ENABLE_STRICT_OBJC_MSGSEND = YES;
731 | ENABLE_TESTABILITY = YES;
732 | GCC_C_LANGUAGE_STANDARD = gnu11;
733 | GCC_DYNAMIC_NO_PIC = NO;
734 | GCC_NO_COMMON_BLOCKS = YES;
735 | GCC_OPTIMIZATION_LEVEL = 0;
736 | GCC_PREPROCESSOR_DEFINITIONS = (
737 | "DEBUG=1",
738 | "$(inherited)",
739 | );
740 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
741 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
742 | GCC_WARN_UNDECLARED_SELECTOR = YES;
743 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
744 | GCC_WARN_UNUSED_FUNCTION = YES;
745 | GCC_WARN_UNUSED_VARIABLE = YES;
746 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
747 | MTL_FAST_MATH = YES;
748 | ONLY_ACTIVE_ARCH = YES;
749 | };
750 | name = Debug;
751 | };
752 | 6F0E30CB24CD891D00B45588 /* Release */ = {
753 | isa = XCBuildConfiguration;
754 | buildSettings = {
755 | ALWAYS_SEARCH_USER_PATHS = NO;
756 | CLANG_ANALYZER_NONNULL = YES;
757 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
758 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
759 | CLANG_CXX_LIBRARY = "libc++";
760 | CLANG_ENABLE_MODULES = YES;
761 | CLANG_ENABLE_OBJC_ARC = YES;
762 | CLANG_ENABLE_OBJC_WEAK = YES;
763 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
764 | CLANG_WARN_BOOL_CONVERSION = YES;
765 | CLANG_WARN_COMMA = YES;
766 | CLANG_WARN_CONSTANT_CONVERSION = YES;
767 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
768 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
769 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
770 | CLANG_WARN_EMPTY_BODY = YES;
771 | CLANG_WARN_ENUM_CONVERSION = YES;
772 | CLANG_WARN_INFINITE_RECURSION = YES;
773 | CLANG_WARN_INT_CONVERSION = YES;
774 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
775 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
776 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
777 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
778 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
779 | CLANG_WARN_STRICT_PROTOTYPES = YES;
780 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
781 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
782 | CLANG_WARN_UNREACHABLE_CODE = YES;
783 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
784 | COPY_PHASE_STRIP = NO;
785 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
786 | ENABLE_NS_ASSERTIONS = NO;
787 | ENABLE_STRICT_OBJC_MSGSEND = YES;
788 | GCC_C_LANGUAGE_STANDARD = gnu11;
789 | GCC_NO_COMMON_BLOCKS = YES;
790 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
791 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
792 | GCC_WARN_UNDECLARED_SELECTOR = YES;
793 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
794 | GCC_WARN_UNUSED_FUNCTION = YES;
795 | GCC_WARN_UNUSED_VARIABLE = YES;
796 | MTL_ENABLE_DEBUG_INFO = NO;
797 | MTL_FAST_MATH = YES;
798 | };
799 | name = Release;
800 | };
801 | 6F0E30CD24CD891D00B45588 /* Debug */ = {
802 | isa = XCBuildConfiguration;
803 | buildSettings = {
804 | ARCHS = "$(ARCHS_STANDARD)";
805 | CLANG_ENABLE_OBJC_ARC = YES;
806 | CODE_SIGN_STYLE = Automatic;
807 | COMBINE_HIDPI_IMAGES = YES;
808 | DEPLOYMENT_LOCATION = YES;
809 | DSTROOT = /;
810 | FRAMEWORK_SEARCH_PATHS = "";
811 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
812 | GCC_PREFIX_HEADER = SpotlightBridge/PrefixHeader.pch;
813 | INFOPLIST_FILE = SpotlightBridge/Info.plist;
814 | INSTALL_PATH = "/Library/Application Support/MacEnhance/Plugins";
815 | LD_RUNPATH_SEARCH_PATHS = (
816 | "$(inherited)",
817 | "@loader_path/../Frameworks",
818 | );
819 | LIBRARY_SEARCH_PATHS = (
820 | "$(inherited)",
821 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/Spotlight.framework/Versions/A",
822 | );
823 | MACH_O_TYPE = mh_dylib;
824 | PRODUCT_BUNDLE_IDENTIFIER = benjamin.spotlightbridge.SpotlightBridge;
825 | PRODUCT_NAME = "$(TARGET_NAME)";
826 | SYSTEM_FRAMEWORK_SEARCH_PATHS = (
827 | "$(inherited)",
828 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
829 | );
830 | WRAPPER_EXTENSION = bundle;
831 | };
832 | name = Debug;
833 | };
834 | 6F0E30CE24CD891D00B45588 /* Release */ = {
835 | isa = XCBuildConfiguration;
836 | buildSettings = {
837 | ARCHS = "$(ARCHS_STANDARD)";
838 | CLANG_ENABLE_OBJC_ARC = YES;
839 | CODE_SIGN_STYLE = Automatic;
840 | COMBINE_HIDPI_IMAGES = YES;
841 | DEPLOYMENT_LOCATION = YES;
842 | DSTROOT = /;
843 | FRAMEWORK_SEARCH_PATHS = "";
844 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
845 | GCC_PREFIX_HEADER = SpotlightBridge/PrefixHeader.pch;
846 | INFOPLIST_FILE = SpotlightBridge/Info.plist;
847 | INSTALL_PATH = "/Library/Application Support/MacEnhance/Plugins";
848 | LD_RUNPATH_SEARCH_PATHS = (
849 | "$(inherited)",
850 | "@loader_path/../Frameworks",
851 | );
852 | LIBRARY_SEARCH_PATHS = (
853 | "$(inherited)",
854 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/Spotlight.framework/Versions/A",
855 | );
856 | MACH_O_TYPE = mh_dylib;
857 | PRODUCT_BUNDLE_IDENTIFIER = benjamin.spotlightbridge.SpotlightBridge;
858 | PRODUCT_NAME = "$(TARGET_NAME)";
859 | SYSTEM_FRAMEWORK_SEARCH_PATHS = (
860 | "$(inherited)",
861 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
862 | );
863 | WRAPPER_EXTENSION = bundle;
864 | };
865 | name = Release;
866 | };
867 | 6F77148C24E7482100CBA340 /* Debug */ = {
868 | isa = XCBuildConfiguration;
869 | buildSettings = {
870 | CODE_SIGN_STYLE = Automatic;
871 | COMBINE_HIDPI_IMAGES = YES;
872 | INFOPLIST_FILE = SpotlightBridgeFrameworkTests/Info.plist;
873 | LD_RUNPATH_SEARCH_PATHS = (
874 | "$(inherited)",
875 | "@executable_path/../Frameworks",
876 | "@loader_path/../Frameworks",
877 | );
878 | MACOSX_DEPLOYMENT_TARGET = 10.14;
879 | PRODUCT_BUNDLE_IDENTIFIER = benjamin.spotlightbridge.SpotlightBridgeFrameworkTests;
880 | PRODUCT_NAME = "$(TARGET_NAME)";
881 | SDKROOT = macosx;
882 | SYSTEM_FRAMEWORK_SEARCH_PATHS = (
883 | "$(inherited)",
884 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
885 | );
886 | };
887 | name = Debug;
888 | };
889 | 6F77148D24E7482100CBA340 /* Release */ = {
890 | isa = XCBuildConfiguration;
891 | buildSettings = {
892 | CODE_SIGN_STYLE = Automatic;
893 | COMBINE_HIDPI_IMAGES = YES;
894 | INFOPLIST_FILE = SpotlightBridgeFrameworkTests/Info.plist;
895 | LD_RUNPATH_SEARCH_PATHS = (
896 | "$(inherited)",
897 | "@executable_path/../Frameworks",
898 | "@loader_path/../Frameworks",
899 | );
900 | MACOSX_DEPLOYMENT_TARGET = 10.14;
901 | PRODUCT_BUNDLE_IDENTIFIER = benjamin.spotlightbridge.SpotlightBridgeFrameworkTests;
902 | PRODUCT_NAME = "$(TARGET_NAME)";
903 | SDKROOT = macosx;
904 | SYSTEM_FRAMEWORK_SEARCH_PATHS = (
905 | "$(inherited)",
906 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
907 | );
908 | };
909 | name = Release;
910 | };
911 | 6F7714A124E757BB00CBA340 /* Debug */ = {
912 | isa = XCBuildConfiguration;
913 | buildSettings = {
914 | CODE_SIGN_STYLE = Automatic;
915 | COMBINE_HIDPI_IMAGES = YES;
916 | INFOPLIST_FILE = SpotlightBridgeTests/Info.plist;
917 | LD_RUNPATH_SEARCH_PATHS = (
918 | "$(inherited)",
919 | "@executable_path/../Frameworks",
920 | "@loader_path/../Frameworks",
921 | );
922 | MACOSX_DEPLOYMENT_TARGET = 10.14;
923 | PRODUCT_BUNDLE_IDENTIFIER = benjamin.spotlightbridge.SpotlightBridgeTests;
924 | PRODUCT_NAME = "$(TARGET_NAME)";
925 | SDKROOT = macosx;
926 | SYSTEM_FRAMEWORK_SEARCH_PATHS = (
927 | "$(inherited)",
928 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
929 | );
930 | };
931 | name = Debug;
932 | };
933 | 6F7714A224E757BB00CBA340 /* Release */ = {
934 | isa = XCBuildConfiguration;
935 | buildSettings = {
936 | CODE_SIGN_STYLE = Automatic;
937 | COMBINE_HIDPI_IMAGES = YES;
938 | INFOPLIST_FILE = SpotlightBridgeTests/Info.plist;
939 | LD_RUNPATH_SEARCH_PATHS = (
940 | "$(inherited)",
941 | "@executable_path/../Frameworks",
942 | "@loader_path/../Frameworks",
943 | );
944 | MACOSX_DEPLOYMENT_TARGET = 10.14;
945 | PRODUCT_BUNDLE_IDENTIFIER = benjamin.spotlightbridge.SpotlightBridgeTests;
946 | PRODUCT_NAME = "$(TARGET_NAME)";
947 | SDKROOT = macosx;
948 | SYSTEM_FRAMEWORK_SEARCH_PATHS = (
949 | "$(inherited)",
950 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
951 | );
952 | };
953 | name = Release;
954 | };
955 | 6FD38DBB24CD8F940077C921 /* Debug */ = {
956 | isa = XCBuildConfiguration;
957 | buildSettings = {
958 | CODE_SIGN_STYLE = Automatic;
959 | COMBINE_HIDPI_IMAGES = YES;
960 | CURRENT_PROJECT_VERSION = 1;
961 | DEFINES_MODULE = YES;
962 | DYLIB_COMPATIBILITY_VERSION = 1;
963 | DYLIB_CURRENT_VERSION = 1;
964 | DYLIB_INSTALL_NAME_BASE = "@rpath";
965 | INFOPLIST_FILE = SpotlightBridgeFramework/Info.plist;
966 | INSTALL_PATH = "@executable_path/../Frameworks";
967 | LD_RUNPATH_SEARCH_PATHS = (
968 | "$(inherited)",
969 | "@executable_path/../Frameworks",
970 | "@loader_path/Frameworks",
971 | );
972 | MACOSX_DEPLOYMENT_TARGET = 10.14;
973 | OTHER_LDFLAGS = (
974 | "-weak_framework",
975 | SearchFoundation,
976 | );
977 | PRODUCT_BUNDLE_IDENTIFIER = benjamin.spotlightbridge.SpotlightBridgeFramework;
978 | PRODUCT_NAME = SpotlightBridge;
979 | SDKROOT = macosx;
980 | SKIP_INSTALL = YES;
981 | SYSTEM_FRAMEWORK_SEARCH_PATHS = (
982 | "$(inherited)",
983 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
984 | );
985 | VERSIONING_SYSTEM = "apple-generic";
986 | VERSION_INFO_PREFIX = "";
987 | };
988 | name = Debug;
989 | };
990 | 6FD38DBC24CD8F940077C921 /* Release */ = {
991 | isa = XCBuildConfiguration;
992 | buildSettings = {
993 | CODE_SIGN_STYLE = Automatic;
994 | COMBINE_HIDPI_IMAGES = YES;
995 | CURRENT_PROJECT_VERSION = 1;
996 | DEFINES_MODULE = YES;
997 | DYLIB_COMPATIBILITY_VERSION = 1;
998 | DYLIB_CURRENT_VERSION = 1;
999 | DYLIB_INSTALL_NAME_BASE = "@rpath";
1000 | INFOPLIST_FILE = SpotlightBridgeFramework/Info.plist;
1001 | INSTALL_PATH = "@executable_path/../Frameworks";
1002 | LD_RUNPATH_SEARCH_PATHS = (
1003 | "$(inherited)",
1004 | "@executable_path/../Frameworks",
1005 | "@loader_path/Frameworks",
1006 | );
1007 | MACOSX_DEPLOYMENT_TARGET = 10.14;
1008 | OTHER_LDFLAGS = (
1009 | "-weak_framework",
1010 | SearchFoundation,
1011 | );
1012 | PRODUCT_BUNDLE_IDENTIFIER = benjamin.spotlightbridge.SpotlightBridgeFramework;
1013 | PRODUCT_NAME = SpotlightBridge;
1014 | SDKROOT = macosx;
1015 | SKIP_INSTALL = YES;
1016 | SYSTEM_FRAMEWORK_SEARCH_PATHS = (
1017 | "$(inherited)",
1018 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks",
1019 | );
1020 | VERSIONING_SYSTEM = "apple-generic";
1021 | VERSION_INFO_PREFIX = "";
1022 | };
1023 | name = Release;
1024 | };
1025 | /* End XCBuildConfiguration section */
1026 |
1027 | /* Begin XCConfigurationList section */
1028 | 6F0E30B124CD891D00B45588 /* Build configuration list for PBXProject "SpotlightBridge" */ = {
1029 | isa = XCConfigurationList;
1030 | buildConfigurations = (
1031 | 6F0E30CA24CD891D00B45588 /* Debug */,
1032 | 6F0E30CB24CD891D00B45588 /* Release */,
1033 | );
1034 | defaultConfigurationIsVisible = 0;
1035 | defaultConfigurationName = Release;
1036 | };
1037 | 6F0E30CC24CD891D00B45588 /* Build configuration list for PBXNativeTarget "SpotlightBridge" */ = {
1038 | isa = XCConfigurationList;
1039 | buildConfigurations = (
1040 | 6F0E30CD24CD891D00B45588 /* Debug */,
1041 | 6F0E30CE24CD891D00B45588 /* Release */,
1042 | );
1043 | defaultConfigurationIsVisible = 0;
1044 | defaultConfigurationName = Release;
1045 | };
1046 | 6F77148B24E7482100CBA340 /* Build configuration list for PBXNativeTarget "SpotlightBridgeFrameworkTests" */ = {
1047 | isa = XCConfigurationList;
1048 | buildConfigurations = (
1049 | 6F77148C24E7482100CBA340 /* Debug */,
1050 | 6F77148D24E7482100CBA340 /* Release */,
1051 | );
1052 | defaultConfigurationIsVisible = 0;
1053 | defaultConfigurationName = Release;
1054 | };
1055 | 6F7714A024E757BB00CBA340 /* Build configuration list for PBXNativeTarget "SpotlightBridgeTests" */ = {
1056 | isa = XCConfigurationList;
1057 | buildConfigurations = (
1058 | 6F7714A124E757BB00CBA340 /* Debug */,
1059 | 6F7714A224E757BB00CBA340 /* Release */,
1060 | );
1061 | defaultConfigurationIsVisible = 0;
1062 | defaultConfigurationName = Release;
1063 | };
1064 | 6FD38DBD24CD8F940077C921 /* Build configuration list for PBXNativeTarget "SpotlightBridgeFramework" */ = {
1065 | isa = XCConfigurationList;
1066 | buildConfigurations = (
1067 | 6FD38DBB24CD8F940077C921 /* Debug */,
1068 | 6FD38DBC24CD8F940077C921 /* Release */,
1069 | );
1070 | defaultConfigurationIsVisible = 0;
1071 | defaultConfigurationName = Release;
1072 | };
1073 | /* End XCConfigurationList section */
1074 | };
1075 | rootObject = 6F0E30AE24CD891D00B45588 /* Project object */;
1076 | }
1077 |
--------------------------------------------------------------------------------