├── .gitignore
├── FinderSyncDemo
├── DemoFinderSync
│ ├── DemoFinderSync.entitlements
│ ├── FinderSync.h
│ ├── FinderSync.m
│ ├── FinderSyncController.h
│ ├── FinderSyncController.m
│ ├── FinderSyncController.xib
│ ├── Info.plist
│ └── Media.xcassets
│ │ ├── Contents.json
│ │ └── Menu.imageset
│ │ ├── Contents.json
│ │ ├── Icon_16x16.png
│ │ ├── Icon_16x16@3x-1.png
│ │ └── Icon_16x16@3x.png
├── FinderSyncDemo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── FinderSyncDemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── LICENSE
├── README.md
└── 屏幕截图 2015-12-09 17.34.24.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 |
20 | # CocoaPods
21 | #
22 | # We recommend against adding the Pods directory to your .gitignore. However
23 | # you should judge for yourself, the pros and cons are mentioned at:
24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
25 | #
26 | #Pods/
27 |
--------------------------------------------------------------------------------
/FinderSyncDemo/DemoFinderSync/DemoFinderSync.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-only
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/FinderSyncDemo/DemoFinderSync/FinderSync.h:
--------------------------------------------------------------------------------
1 | //
2 | // FinderSync.h
3 | // DemoFinderSync
4 | //
5 | // Created by Yang on 12/2/15.
6 | // Copyright © 2015 Yang. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface FinderSync : FIFinderSync
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/FinderSyncDemo/DemoFinderSync/FinderSync.m:
--------------------------------------------------------------------------------
1 | //
2 | // FinderSync.m
3 | // DemoFinderSync
4 | //
5 | // Created by Yang on 12/2/15.
6 | // Copyright © 2015 Yang. All rights reserved.
7 | //
8 |
9 | #import "FinderSync.h"
10 | #import "FinderSyncController.h"
11 |
12 | typedef void (^URLActionBlock)(NSURL * obj, NSUInteger idx, BOOL *stop);
13 |
14 | @interface FinderSync ()
15 |
16 | @property NSURL *myFolderURL;
17 |
18 | @end
19 |
20 | @implementation FinderSync
21 | {
22 | FinderSyncController * finderSyncController; //You can create menu from IB.
23 | }
24 |
25 | - (instancetype)init {
26 | self = [super init];
27 |
28 |
29 | self.myFolderURL = [NSURL fileURLWithPath:@"/Users/yang/Desktop"];
30 | [FIFinderSyncController defaultController].directoryURLs = [NSSet setWithObject:self.myFolderURL];
31 |
32 | [[FIFinderSyncController defaultController] setBadgeImage:[NSImage imageNamed: NSImageNameColorPanel] label:@"Status One" forBadgeIdentifier:@"Color"];
33 | [[FIFinderSyncController defaultController] setBadgeImage:[NSImage imageNamed: NSImageNameCaution] label:@"Status Two" forBadgeIdentifier:@"Caution"];
34 | [[FIFinderSyncController defaultController] setBadgeImage:[NSImage imageNamed: NSImageNameUser] label:@"Status Two" forBadgeIdentifier:@"User"];
35 |
36 | return self;
37 | }
38 |
39 | #pragma mark - Primary Finder Sync protocol methods
40 | - (void)beginObservingDirectoryAtURL:(NSURL *)url {
41 |
42 | }
43 |
44 |
45 | - (void)endObservingDirectoryAtURL:(NSURL *)url {
46 |
47 | }
48 |
49 | - (void)requestBadgeIdentifierForURL:(NSURL *)url {
50 | NSInteger whichBadge = [url.path length] % 3;
51 | NSString* badgeIdentifier = @[@"User", @"Color", @"Caution"][whichBadge];
52 | [[FIFinderSyncController defaultController] setBadgeIdentifier:badgeIdentifier forURL:url];
53 | }
54 |
55 | #pragma mark - Menu and toolbar item support
56 | - (NSString *)toolbarItemName {
57 | return @"AnyShare";
58 | }
59 |
60 | - (NSString *)toolbarItemToolTip {
61 | return @"AnyShare: 使用AnyShare相关的功能";
62 | }
63 |
64 | - (NSImage *)toolbarItemImage {
65 | NSImage * toolBarIcon = [NSImage imageNamed:@"Menu"];
66 | toolBarIcon.template = YES;
67 | return toolBarIcon;
68 | }
69 |
70 | - (NSMenu *)menuForMenuKind:(FIMenuKind)whichMenu {
71 | NSMenu *menu = nil;
72 |
73 | switch (whichMenu) {
74 | case FIMenuKindToolbarItemMenu:
75 | menu = [self toolbarMenu];
76 | break;
77 | case FIMenuKindContextualMenuForContainer:
78 | menu = [self directoryMenu];
79 | break;
80 | case FIMenuKindContextualMenuForItems:
81 | menu = [self fileMenu];
82 | break;
83 | default:
84 | break;
85 | }
86 |
87 | return menu;
88 | }
89 |
90 |
91 | #pragma mark - Actions
92 | - (IBAction)makeCaution:(id)sender {
93 | [self actionToSelectedURLs:^(NSURL * obj, NSUInteger idx, BOOL *stop) {
94 | [[FIFinderSyncController defaultController] setBadgeIdentifier:@"Caution" forURL:obj];
95 | }];
96 | }
97 |
98 | - (IBAction)makeColor:(id)sender {
99 | [self actionToSelectedURLs:^(NSURL * obj, NSUInteger idx, BOOL *stop) {
100 | [[FIFinderSyncController defaultController] setBadgeIdentifier:@"Color" forURL:obj];
101 | }];
102 | }
103 |
104 | - (IBAction)makeUser:(id)sender {
105 | [self actionToSelectedURLs:^(NSURL * obj, NSUInteger idx, BOOL *stop) {
106 | [[FIFinderSyncController defaultController] setBadgeIdentifier:@"User" forURL:obj];
107 | }];
108 | }
109 |
110 | - (IBAction)gotoMyFolder:(id)sender {
111 | [[NSWorkspace sharedWorkspace] openURL:self.myFolderURL];
112 | }
113 |
114 | - (void)actionToSelectedURLs:(URLActionBlock)action
115 | {
116 | NSArray* items = [FIFinderSyncController defaultController].selectedItemURLs;
117 | if (items.count) {
118 | [items enumerateObjectsUsingBlock:^(NSURL * obj, NSUInteger idx, BOOL * stop) {
119 | if (![self fileUrlIsInvisible:obj]) {
120 | action(obj, idx, stop);
121 | }
122 | }];
123 | }
124 | else {
125 | action([FIFinderSyncController defaultController].targetedURL, 0, nil);
126 | }
127 |
128 | }
129 |
130 | #pragma mark - Menus
131 | - (NSMenu *)toolbarMenu
132 | {
133 | NSMenu *menu = nil;
134 | if ([self toolBarMenuRequestFromMyFolder]) {
135 | menu = [[NSMenu alloc] initWithTitle:@""];
136 | NSMenuItem * makeCautionItem = [[NSMenuItem alloc] initWithTitle:@"Make Caution" action:@selector(makeCaution:) keyEquivalent:@""];
137 | makeCautionItem.image = [NSImage imageNamed: NSImageNameCaution];
138 | NSMenuItem * makeColorItem = [[NSMenuItem alloc] initWithTitle:@"Make Corlor" action:@selector(makeColor:) keyEquivalent:@""];
139 | makeColorItem.image = [NSImage imageNamed:NSImageNameColorPanel];
140 | NSMenuItem * makeUserItem = [[NSMenuItem alloc] initWithTitle:@"Make User" action:@selector(makeUser:) keyEquivalent:@""];
141 | makeUserItem.image = [NSImage imageNamed:NSImageNameUser];
142 |
143 | [menu addItem:makeCautionItem];
144 | [menu addItem:makeColorItem];
145 | [menu addItem:makeUserItem];
146 | }
147 | else {
148 | menu = [[NSMenu alloc] initWithTitle:@""];
149 | NSMenuItem * gotoItem = [[NSMenuItem alloc] initWithTitle:@"Goto AnyShare Folder" action:@selector(gotoMyFolder:) keyEquivalent:@""];
150 | [menu addItem:gotoItem];
151 | }
152 |
153 | return menu;
154 | }
155 |
156 | - (NSMenu *)fileMenu
157 | {
158 | if (![self validateFileMenu]) {
159 | return nil;
160 | }
161 |
162 | NSMenu *menu = [[NSMenu alloc] initWithTitle:@""];
163 | NSMenuItem * menuItem = [[NSMenuItem alloc] initWithTitle:@"AnyShare" action:nil keyEquivalent:@""];
164 | menuItem.image = [NSImage imageNamed:@"Menu"];
165 | NSMenu *subMenu = [[NSMenu alloc] initWithTitle:@""];
166 | NSMenuItem * makeCautionItem = [[NSMenuItem alloc] initWithTitle:@"Make Caution" action:@selector(makeCaution:) keyEquivalent:@""];
167 | makeCautionItem.image = [NSImage imageNamed: NSImageNameCaution];
168 | NSMenuItem * makeColorItem = [[NSMenuItem alloc] initWithTitle:@"Make Corlor" action:@selector(makeColor:) keyEquivalent:@""];
169 | makeColorItem.image = [NSImage imageNamed:NSImageNameColorPanel];
170 | NSMenuItem * makeUserItem = [[NSMenuItem alloc] initWithTitle:@"Make User" action:@selector(makeUser:) keyEquivalent:@""];
171 | makeUserItem.image = [NSImage imageNamed:NSImageNameUser];
172 |
173 | [subMenu addItem:makeCautionItem];
174 | [subMenu addItem:makeColorItem];
175 | [subMenu addItem:makeUserItem];
176 |
177 | menuItem.submenu = subMenu;
178 | [menu addItem:menuItem];
179 |
180 | return menu;
181 | }
182 |
183 | - (NSMenu *)directoryMenu
184 | {
185 | NSMenu *menu = [[NSMenu alloc] initWithTitle:@""];
186 | NSMenuItem * menuItem = [[NSMenuItem alloc] initWithTitle:@"AnyShare" action:nil keyEquivalent:@""];
187 | menuItem.image = [NSImage imageNamed:@"Menu"];
188 | NSMenu *subMenu = [[NSMenu alloc] initWithTitle:@""];
189 | NSMenuItem * makeCautionItem = [[NSMenuItem alloc] initWithTitle:@"Make folder Caution" action:@selector(makeCaution:) keyEquivalent:@""];
190 | makeCautionItem.image = [NSImage imageNamed: NSImageNameCaution];
191 | NSMenuItem * makeColorItem = [[NSMenuItem alloc] initWithTitle:@"Make folder Corlor" action:@selector(makeColor:) keyEquivalent:@""];
192 | makeColorItem.image = [NSImage imageNamed:NSImageNameColorPanel];
193 | NSMenuItem * makeUserItem = [[NSMenuItem alloc] initWithTitle:@"Make folder User" action:@selector(makeUser:) keyEquivalent:@""];
194 | makeUserItem.image = [NSImage imageNamed:NSImageNameUser];
195 |
196 | [subMenu addItem:makeCautionItem];
197 | [subMenu addItem:makeColorItem];
198 | [subMenu addItem:makeUserItem];
199 |
200 | menuItem.submenu = subMenu;
201 | [menu addItem:menuItem];
202 |
203 | return menu;
204 | }
205 |
206 | #pragma validate menu
207 | - (BOOL)validateToolbarMenu
208 | {
209 | BOOL bResult = NO;
210 | NSUInteger itemCounts = [FIFinderSyncController defaultController].selectedItemURLs.count;
211 | bResult = itemCounts == 1 ? YES : NO;
212 |
213 | return bResult;
214 | }
215 | - (BOOL)validateFileMenu
216 | {
217 | BOOL bResult = NO;
218 | NSUInteger itemCounts = [FIFinderSyncController defaultController].selectedItemURLs.count;
219 | bResult = itemCounts == 1 ? YES : NO;
220 |
221 | return bResult;
222 | }
223 | - (BOOL)validateDirectoryMenu
224 | {
225 | return YES;
226 | }
227 |
228 | - (BOOL)toolBarMenuRequestFromMyFolder
229 | {
230 | BOOL bResult = NO;
231 | NSURL * target = [FIFinderSyncController defaultController].targetedURL;
232 | bResult = [self path:target.path isSubPathOfPath:self.myFolderURL.path];
233 |
234 | return bResult;
235 | }
236 |
237 | #pragma mark path utils
238 | - (BOOL)path:(NSString *)aPath isSubPathOfPath:(NSString *)anotherPath
239 | {
240 | BOOL bResult = NO;
241 |
242 | bResult = [aPath hasPrefix:anotherPath];
243 |
244 | return bResult;
245 | }
246 |
247 | - (BOOL)fileUrlIsInvisible:(NSURL *)fileUrl
248 | {
249 | BOOL bResult = NO;
250 | NSNumber * numIsHidden = nil;
251 |
252 | [fileUrl getResourceValue:&numIsHidden forKey:NSURLIsHiddenKey error:NULL];
253 | bResult = numIsHidden.boolValue;
254 |
255 | return bResult;
256 | }
257 |
258 | @end
259 |
260 |
--------------------------------------------------------------------------------
/FinderSyncDemo/DemoFinderSync/FinderSyncController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FinderSyncController.h
3 | // FinderSyncDemo
4 | //
5 | // Created by Yang on 15/12/7.
6 | // Copyright © 2015年 Yang. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FinderSyncController : NSViewController
12 | @property (readonly) NSMenu *ActionMenu;
13 | @end
14 |
--------------------------------------------------------------------------------
/FinderSyncDemo/DemoFinderSync/FinderSyncController.m:
--------------------------------------------------------------------------------
1 | //
2 | // FinderSyncController.m
3 | // FinderSyncDemo
4 | //
5 | // Created by Yang on 15/12/7.
6 | // Copyright © 2015年 Yang. All rights reserved.
7 | //
8 |
9 | #import "FinderSyncController.h"
10 |
11 | @interface FinderSyncController ()
12 | @property (strong) IBOutlet NSMenu *ActionMenu;
13 |
14 |
15 | @end
16 |
17 | @implementation FinderSyncController
18 |
19 | - (void)viewDidLoad {
20 | [super viewDidLoad];
21 | // Do view setup here.
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/FinderSyncDemo/DemoFinderSync/FinderSyncController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/FinderSyncDemo/DemoFinderSync/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | DemoFinderSync
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | XPC!
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | LSUIElement
28 |
29 | NSExtension
30 |
31 | NSExtensionAttributes
32 |
33 | NSExtensionPointIdentifier
34 | com.apple.FinderSync
35 | NSExtensionPrincipalClass
36 | FinderSync
37 |
38 | NSHumanReadableCopyright
39 | Copyright © 2015 Yang. All rights reserved.
40 | NSPrincipalClass
41 | NSApplication
42 |
43 |
44 |
--------------------------------------------------------------------------------
/FinderSyncDemo/DemoFinderSync/Media.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/FinderSyncDemo/DemoFinderSync/Media.xcassets/Menu.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "Icon_16x16.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "Icon_16x16@3x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "Icon_16x16@3x-1.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/FinderSyncDemo/DemoFinderSync/Media.xcassets/Menu.imageset/Icon_16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BokkkRottt/FinderSyncDemo/4cf7eda82baf44913cf3edfbc80e52a2957b1f3d/FinderSyncDemo/DemoFinderSync/Media.xcassets/Menu.imageset/Icon_16x16.png
--------------------------------------------------------------------------------
/FinderSyncDemo/DemoFinderSync/Media.xcassets/Menu.imageset/Icon_16x16@3x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BokkkRottt/FinderSyncDemo/4cf7eda82baf44913cf3edfbc80e52a2957b1f3d/FinderSyncDemo/DemoFinderSync/Media.xcassets/Menu.imageset/Icon_16x16@3x-1.png
--------------------------------------------------------------------------------
/FinderSyncDemo/DemoFinderSync/Media.xcassets/Menu.imageset/Icon_16x16@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BokkkRottt/FinderSyncDemo/4cf7eda82baf44913cf3edfbc80e52a2957b1f3d/FinderSyncDemo/DemoFinderSync/Media.xcassets/Menu.imageset/Icon_16x16@3x.png
--------------------------------------------------------------------------------
/FinderSyncDemo/FinderSyncDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 2F16FCD71C155C6700705DC9 /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2F16FCD61C155C6700705DC9 /* Media.xcassets */; };
11 | 2F4281A11C0EC4E50010AEBE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F4281A01C0EC4E50010AEBE /* AppDelegate.m */; };
12 | 2F4281A41C0EC4E50010AEBE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F4281A31C0EC4E50010AEBE /* main.m */; };
13 | 2F4281A71C0EC4E50010AEBE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F4281A61C0EC4E50010AEBE /* ViewController.m */; };
14 | 2F4281A91C0EC4E50010AEBE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2F4281A81C0EC4E50010AEBE /* Assets.xcassets */; };
15 | 2F4281AC1C0EC4E50010AEBE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2F4281AA1C0EC4E50010AEBE /* Main.storyboard */; };
16 | 2F4281BD1C0EC52D0010AEBE /* FinderSync.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F4281BC1C0EC52D0010AEBE /* FinderSync.m */; };
17 | 2F4281C11C0EC52D0010AEBE /* DemoFinderSync.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 2F4281B71C0EC52D0010AEBE /* DemoFinderSync.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
18 | 2FE2C3051C15902500D5FD6C /* FinderSyncController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2FE2C3031C15902500D5FD6C /* FinderSyncController.m */; };
19 | 2FE2C3061C15902500D5FD6C /* FinderSyncController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2FE2C3041C15902500D5FD6C /* FinderSyncController.xib */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXContainerItemProxy section */
23 | 2F4281BF1C0EC52D0010AEBE /* PBXContainerItemProxy */ = {
24 | isa = PBXContainerItemProxy;
25 | containerPortal = 2F4281941C0EC4E50010AEBE /* Project object */;
26 | proxyType = 1;
27 | remoteGlobalIDString = 2F4281B61C0EC52D0010AEBE;
28 | remoteInfo = DemoFinderSync;
29 | };
30 | /* End PBXContainerItemProxy section */
31 |
32 | /* Begin PBXCopyFilesBuildPhase section */
33 | 2F4281C51C0EC52D0010AEBE /* Embed App Extensions */ = {
34 | isa = PBXCopyFilesBuildPhase;
35 | buildActionMask = 2147483647;
36 | dstPath = "";
37 | dstSubfolderSpec = 13;
38 | files = (
39 | 2F4281C11C0EC52D0010AEBE /* DemoFinderSync.appex in Embed App Extensions */,
40 | );
41 | name = "Embed App Extensions";
42 | runOnlyForDeploymentPostprocessing = 0;
43 | };
44 | /* End PBXCopyFilesBuildPhase section */
45 |
46 | /* Begin PBXFileReference section */
47 | 2F16FCD61C155C6700705DC9 /* Media.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Media.xcassets; sourceTree = ""; };
48 | 2F42819C1C0EC4E50010AEBE /* FinderSyncDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FinderSyncDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
49 | 2F42819F1C0EC4E50010AEBE /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
50 | 2F4281A01C0EC4E50010AEBE /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
51 | 2F4281A31C0EC4E50010AEBE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
52 | 2F4281A51C0EC4E50010AEBE /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
53 | 2F4281A61C0EC4E50010AEBE /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
54 | 2F4281A81C0EC4E50010AEBE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
55 | 2F4281AB1C0EC4E50010AEBE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
56 | 2F4281AD1C0EC4E50010AEBE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
57 | 2F4281B71C0EC52D0010AEBE /* DemoFinderSync.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = DemoFinderSync.appex; sourceTree = BUILT_PRODUCTS_DIR; };
58 | 2F4281BA1C0EC52D0010AEBE /* DemoFinderSync.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = DemoFinderSync.entitlements; sourceTree = ""; };
59 | 2F4281BB1C0EC52D0010AEBE /* FinderSync.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FinderSync.h; sourceTree = ""; };
60 | 2F4281BC1C0EC52D0010AEBE /* FinderSync.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FinderSync.m; sourceTree = ""; };
61 | 2F4281BE1C0EC52D0010AEBE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
62 | 2FE2C3021C15902500D5FD6C /* FinderSyncController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FinderSyncController.h; sourceTree = ""; };
63 | 2FE2C3031C15902500D5FD6C /* FinderSyncController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FinderSyncController.m; sourceTree = ""; };
64 | 2FE2C3041C15902500D5FD6C /* FinderSyncController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FinderSyncController.xib; sourceTree = ""; };
65 | /* End PBXFileReference section */
66 |
67 | /* Begin PBXFrameworksBuildPhase section */
68 | 2F4281991C0EC4E50010AEBE /* Frameworks */ = {
69 | isa = PBXFrameworksBuildPhase;
70 | buildActionMask = 2147483647;
71 | files = (
72 | );
73 | runOnlyForDeploymentPostprocessing = 0;
74 | };
75 | 2F4281B41C0EC52D0010AEBE /* Frameworks */ = {
76 | isa = PBXFrameworksBuildPhase;
77 | buildActionMask = 2147483647;
78 | files = (
79 | );
80 | runOnlyForDeploymentPostprocessing = 0;
81 | };
82 | /* End PBXFrameworksBuildPhase section */
83 |
84 | /* Begin PBXGroup section */
85 | 2F4281931C0EC4E50010AEBE = {
86 | isa = PBXGroup;
87 | children = (
88 | 2F42819E1C0EC4E50010AEBE /* FinderSyncDemo */,
89 | 2F4281B81C0EC52D0010AEBE /* DemoFinderSync */,
90 | 2F42819D1C0EC4E50010AEBE /* Products */,
91 | );
92 | sourceTree = "";
93 | };
94 | 2F42819D1C0EC4E50010AEBE /* Products */ = {
95 | isa = PBXGroup;
96 | children = (
97 | 2F42819C1C0EC4E50010AEBE /* FinderSyncDemo.app */,
98 | 2F4281B71C0EC52D0010AEBE /* DemoFinderSync.appex */,
99 | );
100 | name = Products;
101 | sourceTree = "";
102 | };
103 | 2F42819E1C0EC4E50010AEBE /* FinderSyncDemo */ = {
104 | isa = PBXGroup;
105 | children = (
106 | 2F42819F1C0EC4E50010AEBE /* AppDelegate.h */,
107 | 2F4281A01C0EC4E50010AEBE /* AppDelegate.m */,
108 | 2F4281A51C0EC4E50010AEBE /* ViewController.h */,
109 | 2F4281A61C0EC4E50010AEBE /* ViewController.m */,
110 | 2F4281A81C0EC4E50010AEBE /* Assets.xcassets */,
111 | 2F4281AA1C0EC4E50010AEBE /* Main.storyboard */,
112 | 2F4281AD1C0EC4E50010AEBE /* Info.plist */,
113 | 2F4281A21C0EC4E50010AEBE /* Supporting Files */,
114 | );
115 | path = FinderSyncDemo;
116 | sourceTree = "";
117 | };
118 | 2F4281A21C0EC4E50010AEBE /* Supporting Files */ = {
119 | isa = PBXGroup;
120 | children = (
121 | 2F4281A31C0EC4E50010AEBE /* main.m */,
122 | );
123 | name = "Supporting Files";
124 | sourceTree = "";
125 | };
126 | 2F4281B81C0EC52D0010AEBE /* DemoFinderSync */ = {
127 | isa = PBXGroup;
128 | children = (
129 | 2F4281BB1C0EC52D0010AEBE /* FinderSync.h */,
130 | 2F4281BC1C0EC52D0010AEBE /* FinderSync.m */,
131 | 2F4281BE1C0EC52D0010AEBE /* Info.plist */,
132 | 2F4281B91C0EC52D0010AEBE /* Supporting Files */,
133 | 2F16FCD61C155C6700705DC9 /* Media.xcassets */,
134 | 2FE2C3021C15902500D5FD6C /* FinderSyncController.h */,
135 | 2FE2C3031C15902500D5FD6C /* FinderSyncController.m */,
136 | 2FE2C3041C15902500D5FD6C /* FinderSyncController.xib */,
137 | );
138 | path = DemoFinderSync;
139 | sourceTree = "";
140 | };
141 | 2F4281B91C0EC52D0010AEBE /* Supporting Files */ = {
142 | isa = PBXGroup;
143 | children = (
144 | 2F4281BA1C0EC52D0010AEBE /* DemoFinderSync.entitlements */,
145 | );
146 | name = "Supporting Files";
147 | sourceTree = "";
148 | };
149 | /* End PBXGroup section */
150 |
151 | /* Begin PBXNativeTarget section */
152 | 2F42819B1C0EC4E50010AEBE /* FinderSyncDemo */ = {
153 | isa = PBXNativeTarget;
154 | buildConfigurationList = 2F4281B01C0EC4E50010AEBE /* Build configuration list for PBXNativeTarget "FinderSyncDemo" */;
155 | buildPhases = (
156 | 2F4281981C0EC4E50010AEBE /* Sources */,
157 | 2F4281991C0EC4E50010AEBE /* Frameworks */,
158 | 2F42819A1C0EC4E50010AEBE /* Resources */,
159 | 2F4281C51C0EC52D0010AEBE /* Embed App Extensions */,
160 | );
161 | buildRules = (
162 | );
163 | dependencies = (
164 | 2F4281C01C0EC52D0010AEBE /* PBXTargetDependency */,
165 | );
166 | name = FinderSyncDemo;
167 | productName = FinderSyncDemo;
168 | productReference = 2F42819C1C0EC4E50010AEBE /* FinderSyncDemo.app */;
169 | productType = "com.apple.product-type.application";
170 | };
171 | 2F4281B61C0EC52D0010AEBE /* DemoFinderSync */ = {
172 | isa = PBXNativeTarget;
173 | buildConfigurationList = 2F4281C21C0EC52D0010AEBE /* Build configuration list for PBXNativeTarget "DemoFinderSync" */;
174 | buildPhases = (
175 | 2F4281B31C0EC52D0010AEBE /* Sources */,
176 | 2F4281B41C0EC52D0010AEBE /* Frameworks */,
177 | 2F4281B51C0EC52D0010AEBE /* Resources */,
178 | );
179 | buildRules = (
180 | );
181 | dependencies = (
182 | );
183 | name = DemoFinderSync;
184 | productName = DemoFinderSync;
185 | productReference = 2F4281B71C0EC52D0010AEBE /* DemoFinderSync.appex */;
186 | productType = "com.apple.product-type.app-extension";
187 | };
188 | /* End PBXNativeTarget section */
189 |
190 | /* Begin PBXProject section */
191 | 2F4281941C0EC4E50010AEBE /* Project object */ = {
192 | isa = PBXProject;
193 | attributes = {
194 | LastUpgradeCheck = 0710;
195 | ORGANIZATIONNAME = Yang;
196 | TargetAttributes = {
197 | 2F42819B1C0EC4E50010AEBE = {
198 | CreatedOnToolsVersion = 7.1.1;
199 | };
200 | 2F4281B61C0EC52D0010AEBE = {
201 | CreatedOnToolsVersion = 7.1.1;
202 | };
203 | };
204 | };
205 | buildConfigurationList = 2F4281971C0EC4E50010AEBE /* Build configuration list for PBXProject "FinderSyncDemo" */;
206 | compatibilityVersion = "Xcode 3.2";
207 | developmentRegion = English;
208 | hasScannedForEncodings = 0;
209 | knownRegions = (
210 | en,
211 | Base,
212 | );
213 | mainGroup = 2F4281931C0EC4E50010AEBE;
214 | productRefGroup = 2F42819D1C0EC4E50010AEBE /* Products */;
215 | projectDirPath = "";
216 | projectRoot = "";
217 | targets = (
218 | 2F42819B1C0EC4E50010AEBE /* FinderSyncDemo */,
219 | 2F4281B61C0EC52D0010AEBE /* DemoFinderSync */,
220 | );
221 | };
222 | /* End PBXProject section */
223 |
224 | /* Begin PBXResourcesBuildPhase section */
225 | 2F42819A1C0EC4E50010AEBE /* Resources */ = {
226 | isa = PBXResourcesBuildPhase;
227 | buildActionMask = 2147483647;
228 | files = (
229 | 2F4281A91C0EC4E50010AEBE /* Assets.xcassets in Resources */,
230 | 2F4281AC1C0EC4E50010AEBE /* Main.storyboard in Resources */,
231 | );
232 | runOnlyForDeploymentPostprocessing = 0;
233 | };
234 | 2F4281B51C0EC52D0010AEBE /* Resources */ = {
235 | isa = PBXResourcesBuildPhase;
236 | buildActionMask = 2147483647;
237 | files = (
238 | 2FE2C3061C15902500D5FD6C /* FinderSyncController.xib in Resources */,
239 | 2F16FCD71C155C6700705DC9 /* Media.xcassets in Resources */,
240 | );
241 | runOnlyForDeploymentPostprocessing = 0;
242 | };
243 | /* End PBXResourcesBuildPhase section */
244 |
245 | /* Begin PBXSourcesBuildPhase section */
246 | 2F4281981C0EC4E50010AEBE /* Sources */ = {
247 | isa = PBXSourcesBuildPhase;
248 | buildActionMask = 2147483647;
249 | files = (
250 | 2F4281A71C0EC4E50010AEBE /* ViewController.m in Sources */,
251 | 2F4281A41C0EC4E50010AEBE /* main.m in Sources */,
252 | 2F4281A11C0EC4E50010AEBE /* AppDelegate.m in Sources */,
253 | );
254 | runOnlyForDeploymentPostprocessing = 0;
255 | };
256 | 2F4281B31C0EC52D0010AEBE /* Sources */ = {
257 | isa = PBXSourcesBuildPhase;
258 | buildActionMask = 2147483647;
259 | files = (
260 | 2FE2C3051C15902500D5FD6C /* FinderSyncController.m in Sources */,
261 | 2F4281BD1C0EC52D0010AEBE /* FinderSync.m in Sources */,
262 | );
263 | runOnlyForDeploymentPostprocessing = 0;
264 | };
265 | /* End PBXSourcesBuildPhase section */
266 |
267 | /* Begin PBXTargetDependency section */
268 | 2F4281C01C0EC52D0010AEBE /* PBXTargetDependency */ = {
269 | isa = PBXTargetDependency;
270 | target = 2F4281B61C0EC52D0010AEBE /* DemoFinderSync */;
271 | targetProxy = 2F4281BF1C0EC52D0010AEBE /* PBXContainerItemProxy */;
272 | };
273 | /* End PBXTargetDependency section */
274 |
275 | /* Begin PBXVariantGroup section */
276 | 2F4281AA1C0EC4E50010AEBE /* Main.storyboard */ = {
277 | isa = PBXVariantGroup;
278 | children = (
279 | 2F4281AB1C0EC4E50010AEBE /* Base */,
280 | );
281 | name = Main.storyboard;
282 | sourceTree = "";
283 | };
284 | /* End PBXVariantGroup section */
285 |
286 | /* Begin XCBuildConfiguration section */
287 | 2F4281AE1C0EC4E50010AEBE /* Debug */ = {
288 | isa = XCBuildConfiguration;
289 | buildSettings = {
290 | ALWAYS_SEARCH_USER_PATHS = NO;
291 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
292 | CLANG_CXX_LIBRARY = "libc++";
293 | CLANG_ENABLE_MODULES = YES;
294 | CLANG_ENABLE_OBJC_ARC = YES;
295 | CLANG_WARN_BOOL_CONVERSION = YES;
296 | CLANG_WARN_CONSTANT_CONVERSION = YES;
297 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
298 | CLANG_WARN_EMPTY_BODY = YES;
299 | CLANG_WARN_ENUM_CONVERSION = YES;
300 | CLANG_WARN_INT_CONVERSION = YES;
301 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
302 | CLANG_WARN_UNREACHABLE_CODE = YES;
303 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
304 | CODE_SIGN_IDENTITY = "-";
305 | COPY_PHASE_STRIP = NO;
306 | DEBUG_INFORMATION_FORMAT = dwarf;
307 | ENABLE_STRICT_OBJC_MSGSEND = YES;
308 | ENABLE_TESTABILITY = YES;
309 | GCC_C_LANGUAGE_STANDARD = gnu99;
310 | GCC_DYNAMIC_NO_PIC = NO;
311 | GCC_NO_COMMON_BLOCKS = YES;
312 | GCC_OPTIMIZATION_LEVEL = 0;
313 | GCC_PREPROCESSOR_DEFINITIONS = (
314 | "DEBUG=1",
315 | "$(inherited)",
316 | );
317 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
318 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
319 | GCC_WARN_UNDECLARED_SELECTOR = YES;
320 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
321 | GCC_WARN_UNUSED_FUNCTION = YES;
322 | GCC_WARN_UNUSED_VARIABLE = YES;
323 | MACOSX_DEPLOYMENT_TARGET = 10.11;
324 | MTL_ENABLE_DEBUG_INFO = YES;
325 | ONLY_ACTIVE_ARCH = YES;
326 | SDKROOT = macosx;
327 | };
328 | name = Debug;
329 | };
330 | 2F4281AF1C0EC4E50010AEBE /* Release */ = {
331 | isa = XCBuildConfiguration;
332 | buildSettings = {
333 | ALWAYS_SEARCH_USER_PATHS = NO;
334 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
335 | CLANG_CXX_LIBRARY = "libc++";
336 | CLANG_ENABLE_MODULES = YES;
337 | CLANG_ENABLE_OBJC_ARC = YES;
338 | CLANG_WARN_BOOL_CONVERSION = YES;
339 | CLANG_WARN_CONSTANT_CONVERSION = YES;
340 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
341 | CLANG_WARN_EMPTY_BODY = YES;
342 | CLANG_WARN_ENUM_CONVERSION = YES;
343 | CLANG_WARN_INT_CONVERSION = YES;
344 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
345 | CLANG_WARN_UNREACHABLE_CODE = YES;
346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
347 | CODE_SIGN_IDENTITY = "-";
348 | COPY_PHASE_STRIP = NO;
349 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
350 | ENABLE_NS_ASSERTIONS = NO;
351 | ENABLE_STRICT_OBJC_MSGSEND = YES;
352 | GCC_C_LANGUAGE_STANDARD = gnu99;
353 | GCC_NO_COMMON_BLOCKS = YES;
354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
356 | GCC_WARN_UNDECLARED_SELECTOR = YES;
357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
358 | GCC_WARN_UNUSED_FUNCTION = YES;
359 | GCC_WARN_UNUSED_VARIABLE = YES;
360 | MACOSX_DEPLOYMENT_TARGET = 10.11;
361 | MTL_ENABLE_DEBUG_INFO = NO;
362 | SDKROOT = macosx;
363 | };
364 | name = Release;
365 | };
366 | 2F4281B11C0EC4E50010AEBE /* Debug */ = {
367 | isa = XCBuildConfiguration;
368 | buildSettings = {
369 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
370 | COMBINE_HIDPI_IMAGES = YES;
371 | INFOPLIST_FILE = FinderSyncDemo/Info.plist;
372 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
373 | PRODUCT_BUNDLE_IDENTIFIER = cn.ysg.FinderSyncDemo;
374 | PRODUCT_NAME = "$(TARGET_NAME)";
375 | };
376 | name = Debug;
377 | };
378 | 2F4281B21C0EC4E50010AEBE /* Release */ = {
379 | isa = XCBuildConfiguration;
380 | buildSettings = {
381 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
382 | COMBINE_HIDPI_IMAGES = YES;
383 | INFOPLIST_FILE = FinderSyncDemo/Info.plist;
384 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
385 | PRODUCT_BUNDLE_IDENTIFIER = cn.ysg.FinderSyncDemo;
386 | PRODUCT_NAME = "$(TARGET_NAME)";
387 | };
388 | name = Release;
389 | };
390 | 2F4281C31C0EC52D0010AEBE /* Debug */ = {
391 | isa = XCBuildConfiguration;
392 | buildSettings = {
393 | CODE_SIGN_ENTITLEMENTS = DemoFinderSync/DemoFinderSync.entitlements;
394 | COMBINE_HIDPI_IMAGES = YES;
395 | INFOPLIST_FILE = DemoFinderSync/Info.plist;
396 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
397 | PRODUCT_BUNDLE_IDENTIFIER = cn.ysg.FinderSyncDemo.DemoFinderSync;
398 | PRODUCT_NAME = "$(TARGET_NAME)";
399 | SKIP_INSTALL = YES;
400 | };
401 | name = Debug;
402 | };
403 | 2F4281C41C0EC52D0010AEBE /* Release */ = {
404 | isa = XCBuildConfiguration;
405 | buildSettings = {
406 | CODE_SIGN_ENTITLEMENTS = DemoFinderSync/DemoFinderSync.entitlements;
407 | COMBINE_HIDPI_IMAGES = YES;
408 | INFOPLIST_FILE = DemoFinderSync/Info.plist;
409 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks";
410 | PRODUCT_BUNDLE_IDENTIFIER = cn.ysg.FinderSyncDemo.DemoFinderSync;
411 | PRODUCT_NAME = "$(TARGET_NAME)";
412 | SKIP_INSTALL = YES;
413 | };
414 | name = Release;
415 | };
416 | /* End XCBuildConfiguration section */
417 |
418 | /* Begin XCConfigurationList section */
419 | 2F4281971C0EC4E50010AEBE /* Build configuration list for PBXProject "FinderSyncDemo" */ = {
420 | isa = XCConfigurationList;
421 | buildConfigurations = (
422 | 2F4281AE1C0EC4E50010AEBE /* Debug */,
423 | 2F4281AF1C0EC4E50010AEBE /* Release */,
424 | );
425 | defaultConfigurationIsVisible = 0;
426 | defaultConfigurationName = Release;
427 | };
428 | 2F4281B01C0EC4E50010AEBE /* Build configuration list for PBXNativeTarget "FinderSyncDemo" */ = {
429 | isa = XCConfigurationList;
430 | buildConfigurations = (
431 | 2F4281B11C0EC4E50010AEBE /* Debug */,
432 | 2F4281B21C0EC4E50010AEBE /* Release */,
433 | );
434 | defaultConfigurationIsVisible = 0;
435 | defaultConfigurationName = Release;
436 | };
437 | 2F4281C21C0EC52D0010AEBE /* Build configuration list for PBXNativeTarget "DemoFinderSync" */ = {
438 | isa = XCConfigurationList;
439 | buildConfigurations = (
440 | 2F4281C31C0EC52D0010AEBE /* Debug */,
441 | 2F4281C41C0EC52D0010AEBE /* Release */,
442 | );
443 | defaultConfigurationIsVisible = 0;
444 | defaultConfigurationName = Release;
445 | };
446 | /* End XCConfigurationList section */
447 | };
448 | rootObject = 2F4281941C0EC4E50010AEBE /* Project object */;
449 | }
450 |
--------------------------------------------------------------------------------
/FinderSyncDemo/FinderSyncDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/FinderSyncDemo/FinderSyncDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // FinderSyncDemo
4 | //
5 | // Created by Yang on 12/2/15.
6 | // Copyright © 2015 Yang. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : NSObject
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/FinderSyncDemo/FinderSyncDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // FinderSyncDemo
4 | //
5 | // Created by Yang on 12/2/15.
6 | // Copyright © 2015 Yang. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
18 | // Insert code here to initialize your application
19 | }
20 |
21 | - (void)applicationWillTerminate:(NSNotification *)aNotification {
22 | // Insert code here to tear down your application
23 | }
24 | @end
25 |
--------------------------------------------------------------------------------
/FinderSyncDemo/FinderSyncDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/FinderSyncDemo/FinderSyncDemo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 | Default
511 |
512 |
513 |
514 |
515 |
516 |
517 | Left to Right
518 |
519 |
520 |
521 |
522 |
523 |
524 | Right to Left
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 | Default
536 |
537 |
538 |
539 |
540 |
541 |
542 | Left to Right
543 |
544 |
545 |
546 |
547 |
548 |
549 | Right to Left
550 |
551 |
552 |
553 |
554 |
555 |
556 |
557 |
558 |
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 |
612 |
613 |
614 |
615 |
616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
624 |
625 |
626 |
627 |
628 |
629 |
630 |
631 |
632 |
633 |
634 |
635 |
636 |
637 |
638 |
639 |
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
--------------------------------------------------------------------------------
/FinderSyncDemo/FinderSyncDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSHumanReadableCopyright
28 | Copyright © 2015 Yang. All rights reserved.
29 | NSMainStoryboardFile
30 | Main
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/FinderSyncDemo/FinderSyncDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // FinderSyncDemo
4 | //
5 | // Created by Yang on 12/2/15.
6 | // Copyright © 2015 Yang. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : NSViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/FinderSyncDemo/FinderSyncDemo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // FinderSyncDemo
4 | //
5 | // Created by Yang on 12/2/15.
6 | // Copyright © 2015 Yang. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @implementation ViewController
12 |
13 | - (void)viewDidLoad {
14 | [super viewDidLoad];
15 | }
16 |
17 | - (void)setRepresentedObject:(id)representedObject {
18 | [super setRepresentedObject:representedObject];
19 | }
20 |
21 | - (IBAction)myAction:(id)sender
22 | {
23 | [[NSWorkspace sharedWorkspace] openFile:NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES).firstObject];
24 | }
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/FinderSyncDemo/FinderSyncDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // FinderSyncDemo
4 | //
5 | // Created by Yang on 12/2/15.
6 | // Copyright © 2015 Yang. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, const char * argv[]) {
12 | return NSApplicationMain(argc, argv);
13 | }
14 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # FinderSyncDemo
2 | Finder Sync Demo for Mac OS X
3 |
4 | ###注意事项:
5 | 1.Finder Sync的menu不仅可以代码创建,也可以通过viewController从xib文件创建
6 |
7 | 2.Finder Sync的toolBar menu 和右键menu 发送消息时FIFinderSyncController
8 | 的selectedItemsURLs可能不同,右键menu时selectedItemsURLs最多会是你选中的前10个,要特别注意。
9 |
10 | 3.Finder Sync在debug时要注意不要冲突,尽量删掉你的APP的其他备份,有问题时重启Finder也是需要的。
11 |
12 | 4.***不要***在项目设置里把Code sign设置为Don't code sign!不然将无法启动这个扩展,你可以把它设为"-"。
13 |
14 | 
15 |
--------------------------------------------------------------------------------
/屏幕截图 2015-12-09 17.34.24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BokkkRottt/FinderSyncDemo/4cf7eda82baf44913cf3edfbc80e52a2957b1f3d/屏幕截图 2015-12-09 17.34.24.png
--------------------------------------------------------------------------------