├── .gitignore ├── README.md ├── XcodeFindMyCode ├── FindMyCode │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ ├── Controller │ │ ├── DetailViewController.h │ │ ├── DetailViewController.m │ │ ├── DetailViewController.xib │ │ ├── RootViewController.h │ │ ├── RootViewController.m │ │ └── RootViewController.xib │ ├── FindMyCode │ │ ├── FindMyCode.h │ │ └── FindMyCode.m │ ├── Info.plist │ └── main.m ├── XcodeFindMyCode.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata └── XcodeFindMyCode │ ├── Info.plist │ ├── NSObject_Extension.h │ ├── NSObject_Extension.m │ ├── Utils │ ├── NSView+MCLog.h │ ├── NSView+MCLog.m │ ├── XToDoModel.h │ └── XToDoModel.m │ ├── XcodeFindMyCode.h │ └── XcodeFindMyCode.m └── product ├── XcodeFindMyCode.xcplugin └── Contents │ ├── Info.plist │ ├── MacOS │ └── XcodeFindMyCode │ └── Resources │ └── XcodeFindMyCode.xcscheme └── XcodeFindMyCode ├── FindMyCode.h └── FindMyCode.m /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | 29 | ## Playgrounds 30 | timeline.xctimeline 31 | playground.xcworkspace 32 | 33 | # Swift Package Manager 34 | # 35 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 36 | # Packages/ 37 | .build/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # XcodeFindMyCode 2 | Long press your viewcontroller\`s view, Xcode will open that controller\`s source file. 3 | 4 | It contains two components: some code for iOS, and a plugin for Xcode. 5 | 6 | --- 7 | **usage**: 8 | 9 | - for iOS client, copy the content in /product/XcodeFinMyCode directory to your iOS project. 10 | - for Xcode client, copy the plugin /product/XcodeFindMyCode.xcplugin to your plugin directory(~/Library/Application Support/Developer/Shared/Xcode/Plug-ins) 11 | 12 | [video demo][1] 13 | 14 | 15 | 16 | 17 | [1]: http://www.miaopai.com/show/YUduW4PFx6SYsEeekRy~AQ__.htm 18 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // FindMyCode 4 | // 5 | // Created by 张小刚 on 16/3/5. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // FindMyCode 4 | // 5 | // Created by 张小刚 on 16/3/5. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "RootViewController.h" 11 | #import "FindMyCode.h" 12 | 13 | @interface AppDelegate () 14 | 15 | @end 16 | 17 | @implementation AppDelegate 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | UIWindow * window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 21 | self.window = window; 22 | RootViewController * rootVC = [[RootViewController alloc] init]; 23 | UINavigationController * nvc = [[UINavigationController alloc] initWithRootViewController:rootVC]; 24 | self.window.rootViewController = nvc; 25 | [self.window makeKeyAndVisible]; 26 | return YES; 27 | } 28 | 29 | - (void)applicationWillResignActive:(UIApplication *)application { 30 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 31 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 32 | } 33 | 34 | - (void)applicationDidEnterBackground:(UIApplication *)application { 35 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 | } 38 | 39 | - (void)applicationWillEnterForeground:(UIApplication *)application { 40 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 41 | } 42 | 43 | - (void)applicationDidBecomeActive:(UIApplication *)application { 44 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 45 | } 46 | 47 | - (void)applicationWillTerminate:(UIApplication *)application { 48 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/Controller/DetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.h 3 | // FindMyCodeDemo 4 | // 5 | // Created by 张小刚 on 16/3/5. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DetailViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/Controller/DetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.m 3 | // FindMyCodeDemo 4 | // 5 | // Created by 张小刚 on 16/3/5. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import "DetailViewController.h" 10 | 11 | @interface DetailViewController () 12 | 13 | @end 14 | 15 | @implementation DetailViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | self.navigationItem.title = @"Detail"; 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/Controller/DetailViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/Controller/RootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.h 3 | // FindMyCodeDemo 4 | // 5 | // Created by 张小刚 on 16/3/5. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RootViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/Controller/RootViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.m 3 | // FindMyCodeDemo 4 | // 5 | // Created by 张小刚 on 16/3/5. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import "RootViewController.h" 10 | #import "DetailViewController.h" 11 | 12 | @interface RootViewController () 13 | 14 | @end 15 | 16 | @implementation RootViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | self.navigationItem.title = @"Root"; 21 | } 22 | 23 | - (IBAction)detailButtonPressed:(id)sender { 24 | DetailViewController * detaiVC = [[DetailViewController alloc] init]; 25 | [self.navigationController pushViewController:detaiVC animated:YES]; 26 | } 27 | 28 | - (void)didReceiveMemoryWarning { 29 | [super didReceiveMemoryWarning]; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/Controller/RootViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 26 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/FindMyCode/FindMyCode.h: -------------------------------------------------------------------------------- 1 | // 2 | // FindMyCode.h 3 | // XcodeFindMyCode 4 | // 5 | // Created by 张小刚 on 16/3/6. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | FMCTriggerModeTwoFingerLongPress = 2, 13 | FMCTriggerModeThreeFingerLongPress = 3, 14 | }FMCTriggerMode; 15 | 16 | @interface FindMyCode : NSObject 17 | 18 | + (FindMyCode *)sharedInstance; 19 | @property (nonatomic, assign) FMCTriggerMode triggerMode; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/FindMyCode/FindMyCode.m: -------------------------------------------------------------------------------- 1 | // 2 | // FindMyCode.m 3 | // XcodeFindMyCode 4 | // 5 | // Created by 张小刚 on 16/3/6. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import "FindMyCode.h" 10 | @import UIKit; 11 | 12 | @interface FMCLongPressGestureRecognizer : UILongPressGestureRecognizer 13 | 14 | @end 15 | 16 | @interface UIWindow (FindMyCode) 17 | 18 | - (void)fmc_setupTrigger; 19 | 20 | @end 21 | 22 | @interface FindMyCode () 23 | 24 | @property (nonatomic, strong) NSString * controllerClassName; 25 | 26 | @end 27 | 28 | @implementation FindMyCode 29 | 30 | + (void)load 31 | { 32 | [[FindMyCode sharedInstance] setup]; 33 | } 34 | 35 | + (FindMyCode *)sharedInstance 36 | { 37 | static FindMyCode * sharedInstance = nil; 38 | static dispatch_once_t onceToken; 39 | dispatch_once(&onceToken, ^{ 40 | sharedInstance = [[FindMyCode alloc] init]; 41 | }); 42 | return sharedInstance; 43 | } 44 | 45 | - (instancetype)init 46 | { 47 | self = [super init]; 48 | if (self) { 49 | self.triggerMode = FMCTriggerModeTwoFingerLongPress; 50 | } 51 | return self; 52 | } 53 | 54 | - (void)setup 55 | { 56 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appKeyWindowChanged:) name:UIWindowDidBecomeKeyNotification object:nil]; 57 | } 58 | 59 | - (void)appKeyWindowChanged:(NSNotification *)notification 60 | { 61 | UIWindow * keyWinow = (UIWindow *)notification.object; 62 | [keyWinow fmc_setupTrigger]; 63 | } 64 | 65 | - (void)setTriggerMode:(FMCTriggerMode)triggerMode 66 | { 67 | _triggerMode = triggerMode; 68 | UIWindow * keyWinow = [UIApplication sharedApplication].keyWindow; 69 | if(keyWinow){ 70 | [keyWinow fmc_setupTrigger]; 71 | } 72 | } 73 | 74 | - (void)dealloc 75 | { 76 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 77 | } 78 | 79 | @end 80 | 81 | @implementation FMCLongPressGestureRecognizer 82 | 83 | @end 84 | 85 | @implementation UIWindow (FindMyCode) 86 | 87 | - (void)fmc_setupTrigger 88 | { 89 | #if DEBUG 90 | FMCLongPressGestureRecognizer * targetRecognizer = nil; 91 | for (UIGestureRecognizer * recognizer in self.gestureRecognizers) { 92 | if([recognizer isKindOfClass:[FMCLongPressGestureRecognizer class]]){ 93 | targetRecognizer = (FMCLongPressGestureRecognizer *)recognizer; 94 | break; 95 | } 96 | } 97 | if(!targetRecognizer){ 98 | targetRecognizer = [[FMCLongPressGestureRecognizer alloc] initWithTarget:self action:@selector(fmc_triggerGestureRecognized:)]; 99 | [self addGestureRecognizer:targetRecognizer]; 100 | } 101 | targetRecognizer.numberOfTouchesRequired = [[FindMyCode sharedInstance] triggerMode]; 102 | #endif 103 | } 104 | 105 | - (void)fmc_triggerGestureRecognized:(UILongPressGestureRecognizer *)recognizer 106 | { 107 | if(recognizer.state != UIGestureRecognizerStateBegan){ 108 | return; 109 | } 110 | CGPoint point = [recognizer locationInView:self]; 111 | UIView * targetView = [self hitTest:point withEvent:nil]; 112 | UIViewController * targetVC = [self fmc_getViewController:targetView]; 113 | if(!targetVC) return; 114 | NSString * controllerClasName = NSStringFromClass(targetVC.class); 115 | [FindMyCode sharedInstance].controllerClassName = controllerClasName; 116 | UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:@"Find My Code" message:[NSString stringWithFormat:@"Xcode Open %@.m ?",controllerClasName] delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Open", nil]; 117 | [alertView show]; 118 | } 119 | 120 | - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex 121 | { 122 | if(buttonIndex != 1){ 123 | return; 124 | } 125 | NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; 126 | NSString * requestCmd = [NSString stringWithFormat:@"XcodeFindMyCode[%.f] request open file %@.m",now,[FindMyCode sharedInstance].controllerClassName]; 127 | NSString * seperator = @"--------------------------XcodeFindMyCode----------------------"; 128 | NSLog(@"\n\n\n%@\n\n%@\n\n%@\n\n\n",seperator,requestCmd,seperator); 129 | } 130 | 131 | - (UIViewController *)fmc_getViewController: (UIView *)view 132 | { 133 | UIViewController * result = nil; 134 | UIResponder * nextResponder = view; 135 | while ((nextResponder = nextResponder.nextResponder)) { 136 | if ([nextResponder isKindOfClass:[UIViewController class]]) { 137 | result = (UIViewController *)nextResponder; 138 | break; 139 | } 140 | } 141 | return result; 142 | } 143 | 144 | 145 | @end 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /XcodeFindMyCode/FindMyCode/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // FindMyCode 4 | // 5 | // Created by 张小刚 on 16/3/5. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /XcodeFindMyCode/XcodeFindMyCode.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1F4F71BD1C87474000BD850F /* XToDoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F4F71BC1C87474000BD850F /* XToDoModel.m */; }; 11 | 1F521CDC1C85F27700907BB6 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F521CDB1C85F27700907BB6 /* AppKit.framework */; }; 12 | 1F521CDE1C85F27700907BB6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F521CDD1C85F27700907BB6 /* Foundation.framework */; }; 13 | 1F521CE51C85F27700907BB6 /* XcodeFindMyCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F521CE41C85F27700907BB6 /* XcodeFindMyCode.m */; }; 14 | 1F521CE81C85F27700907BB6 /* NSObject_Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F521CE71C85F27700907BB6 /* NSObject_Extension.m */; }; 15 | 1F638CA21C8B0BC600DE0D2B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F638CA11C8B0BC600DE0D2B /* main.m */; }; 16 | 1F638CA51C8B0BC600DE0D2B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F638CA41C8B0BC600DE0D2B /* AppDelegate.m */; }; 17 | 1F638CAD1C8B0BC600DE0D2B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1F638CAC1C8B0BC600DE0D2B /* Assets.xcassets */; }; 18 | 1F638CB01C8B0BC600DE0D2B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1F638CAE1C8B0BC600DE0D2B /* LaunchScreen.storyboard */; }; 19 | 1F638CBC1C8B0BE300DE0D2B /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F638CB71C8B0BE300DE0D2B /* DetailViewController.m */; }; 20 | 1F638CBD1C8B0BE300DE0D2B /* DetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1F638CB81C8B0BE300DE0D2B /* DetailViewController.xib */; }; 21 | 1F638CBE1C8B0BE300DE0D2B /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F638CBA1C8B0BE300DE0D2B /* RootViewController.m */; }; 22 | 1F638CBF1C8B0BE300DE0D2B /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1F638CBB1C8B0BE300DE0D2B /* RootViewController.xib */; }; 23 | 1F8BBCD31C8BE11B006D4170 /* FindMyCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F8BBCD21C8BE11B006D4170 /* FindMyCode.m */; }; 24 | 1FA5C8461C85F77A00497948 /* NSView+MCLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FA5C8451C85F77A00497948 /* NSView+MCLog.m */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXFileReference section */ 28 | 1F4F71BB1C87474000BD850F /* XToDoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XToDoModel.h; sourceTree = ""; }; 29 | 1F4F71BC1C87474000BD850F /* XToDoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XToDoModel.m; sourceTree = ""; }; 30 | 1F521CD81C85F27700907BB6 /* XcodeFindMyCode.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XcodeFindMyCode.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 1F521CDB1C85F27700907BB6 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 32 | 1F521CDD1C85F27700907BB6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 33 | 1F521CE31C85F27700907BB6 /* XcodeFindMyCode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XcodeFindMyCode.h; sourceTree = ""; }; 34 | 1F521CE41C85F27700907BB6 /* XcodeFindMyCode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XcodeFindMyCode.m; sourceTree = ""; }; 35 | 1F521CE61C85F27700907BB6 /* NSObject_Extension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSObject_Extension.h; sourceTree = ""; }; 36 | 1F521CE71C85F27700907BB6 /* NSObject_Extension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSObject_Extension.m; sourceTree = ""; }; 37 | 1F521CE91C85F27700907BB6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | 1F638C9E1C8B0BC600DE0D2B /* FindMyCode.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FindMyCode.app; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 1F638CA11C8B0BC600DE0D2B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 40 | 1F638CA31C8B0BC600DE0D2B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 41 | 1F638CA41C8B0BC600DE0D2B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 42 | 1F638CAC1C8B0BC600DE0D2B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 1F638CAF1C8B0BC600DE0D2B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 1F638CB11C8B0BC600DE0D2B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | 1F638CB61C8B0BE300DE0D2B /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = ""; }; 46 | 1F638CB71C8B0BE300DE0D2B /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = ""; }; 47 | 1F638CB81C8B0BE300DE0D2B /* DetailViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DetailViewController.xib; sourceTree = ""; }; 48 | 1F638CB91C8B0BE300DE0D2B /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; 49 | 1F638CBA1C8B0BE300DE0D2B /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; 50 | 1F638CBB1C8B0BE300DE0D2B /* RootViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RootViewController.xib; sourceTree = ""; }; 51 | 1F8BBCD11C8BE11B006D4170 /* FindMyCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FindMyCode.h; sourceTree = ""; }; 52 | 1F8BBCD21C8BE11B006D4170 /* FindMyCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FindMyCode.m; sourceTree = ""; }; 53 | 1FA5C8441C85F77A00497948 /* NSView+MCLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSView+MCLog.h"; sourceTree = ""; }; 54 | 1FA5C8451C85F77A00497948 /* NSView+MCLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSView+MCLog.m"; sourceTree = ""; }; 55 | /* End PBXFileReference section */ 56 | 57 | /* Begin PBXFrameworksBuildPhase section */ 58 | 1F521CD61C85F27700907BB6 /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | 1F521CDC1C85F27700907BB6 /* AppKit.framework in Frameworks */, 63 | 1F521CDE1C85F27700907BB6 /* Foundation.framework in Frameworks */, 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | 1F638C9B1C8B0BC600DE0D2B /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | /* End PBXFrameworksBuildPhase section */ 75 | 76 | /* Begin PBXGroup section */ 77 | 1F521CCF1C85F27700907BB6 = { 78 | isa = PBXGroup; 79 | children = ( 80 | 1F521CDF1C85F27700907BB6 /* XcodeFindMyCode */, 81 | 1F638C9F1C8B0BC600DE0D2B /* FindMyCode */, 82 | 1F521CDA1C85F27700907BB6 /* Frameworks */, 83 | 1F521CD91C85F27700907BB6 /* Products */, 84 | ); 85 | sourceTree = ""; 86 | }; 87 | 1F521CD91C85F27700907BB6 /* Products */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 1F521CD81C85F27700907BB6 /* XcodeFindMyCode.xcplugin */, 91 | 1F638C9E1C8B0BC600DE0D2B /* FindMyCode.app */, 92 | ); 93 | name = Products; 94 | sourceTree = ""; 95 | }; 96 | 1F521CDA1C85F27700907BB6 /* Frameworks */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 1F521CDB1C85F27700907BB6 /* AppKit.framework */, 100 | 1F521CDD1C85F27700907BB6 /* Foundation.framework */, 101 | ); 102 | name = Frameworks; 103 | sourceTree = ""; 104 | }; 105 | 1F521CDF1C85F27700907BB6 /* XcodeFindMyCode */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 1FA5C8431C85F75400497948 /* Utils */, 109 | 1F521CE31C85F27700907BB6 /* XcodeFindMyCode.h */, 110 | 1F521CE41C85F27700907BB6 /* XcodeFindMyCode.m */, 111 | 1F521CE61C85F27700907BB6 /* NSObject_Extension.h */, 112 | 1F521CE71C85F27700907BB6 /* NSObject_Extension.m */, 113 | 1F521CE91C85F27700907BB6 /* Info.plist */, 114 | 1F521CE01C85F27700907BB6 /* Supporting Files */, 115 | ); 116 | path = XcodeFindMyCode; 117 | sourceTree = ""; 118 | }; 119 | 1F521CE01C85F27700907BB6 /* Supporting Files */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | ); 123 | name = "Supporting Files"; 124 | sourceTree = ""; 125 | }; 126 | 1F638C9F1C8B0BC600DE0D2B /* FindMyCode */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 1F638CC01C8B0BEB00DE0D2B /* FindMyCode */, 130 | 1F638CB51C8B0BE300DE0D2B /* Controller */, 131 | 1F638CA31C8B0BC600DE0D2B /* AppDelegate.h */, 132 | 1F638CA41C8B0BC600DE0D2B /* AppDelegate.m */, 133 | 1F638CAC1C8B0BC600DE0D2B /* Assets.xcassets */, 134 | 1F638CAE1C8B0BC600DE0D2B /* LaunchScreen.storyboard */, 135 | 1F638CB11C8B0BC600DE0D2B /* Info.plist */, 136 | 1F638CA01C8B0BC600DE0D2B /* Supporting Files */, 137 | ); 138 | path = FindMyCode; 139 | sourceTree = ""; 140 | }; 141 | 1F638CA01C8B0BC600DE0D2B /* Supporting Files */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | 1F638CA11C8B0BC600DE0D2B /* main.m */, 145 | ); 146 | name = "Supporting Files"; 147 | sourceTree = ""; 148 | }; 149 | 1F638CB51C8B0BE300DE0D2B /* Controller */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | 1F638CB61C8B0BE300DE0D2B /* DetailViewController.h */, 153 | 1F638CB71C8B0BE300DE0D2B /* DetailViewController.m */, 154 | 1F638CB81C8B0BE300DE0D2B /* DetailViewController.xib */, 155 | 1F638CB91C8B0BE300DE0D2B /* RootViewController.h */, 156 | 1F638CBA1C8B0BE300DE0D2B /* RootViewController.m */, 157 | 1F638CBB1C8B0BE300DE0D2B /* RootViewController.xib */, 158 | ); 159 | path = Controller; 160 | sourceTree = ""; 161 | }; 162 | 1F638CC01C8B0BEB00DE0D2B /* FindMyCode */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | 1F8BBCD11C8BE11B006D4170 /* FindMyCode.h */, 166 | 1F8BBCD21C8BE11B006D4170 /* FindMyCode.m */, 167 | ); 168 | path = FindMyCode; 169 | sourceTree = ""; 170 | }; 171 | 1FA5C8431C85F75400497948 /* Utils */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 1F4F71BB1C87474000BD850F /* XToDoModel.h */, 175 | 1F4F71BC1C87474000BD850F /* XToDoModel.m */, 176 | 1FA5C8441C85F77A00497948 /* NSView+MCLog.h */, 177 | 1FA5C8451C85F77A00497948 /* NSView+MCLog.m */, 178 | ); 179 | path = Utils; 180 | sourceTree = ""; 181 | }; 182 | /* End PBXGroup section */ 183 | 184 | /* Begin PBXNativeTarget section */ 185 | 1F521CD71C85F27700907BB6 /* XcodeFindMyCode */ = { 186 | isa = PBXNativeTarget; 187 | buildConfigurationList = 1F521CEC1C85F27700907BB6 /* Build configuration list for PBXNativeTarget "XcodeFindMyCode" */; 188 | buildPhases = ( 189 | 1F521CD41C85F27700907BB6 /* Sources */, 190 | 1F521CD51C85F27700907BB6 /* Resources */, 191 | 1F521CD61C85F27700907BB6 /* Frameworks */, 192 | ); 193 | buildRules = ( 194 | ); 195 | dependencies = ( 196 | ); 197 | name = XcodeFindMyCode; 198 | productName = XcodeFindMyCode; 199 | productReference = 1F521CD81C85F27700907BB6 /* XcodeFindMyCode.xcplugin */; 200 | productType = "com.apple.product-type.bundle"; 201 | }; 202 | 1F638C9D1C8B0BC600DE0D2B /* FindMyCode */ = { 203 | isa = PBXNativeTarget; 204 | buildConfigurationList = 1F638CB41C8B0BC600DE0D2B /* Build configuration list for PBXNativeTarget "FindMyCode" */; 205 | buildPhases = ( 206 | 1F638C9A1C8B0BC600DE0D2B /* Sources */, 207 | 1F638C9B1C8B0BC600DE0D2B /* Frameworks */, 208 | 1F638C9C1C8B0BC600DE0D2B /* Resources */, 209 | ); 210 | buildRules = ( 211 | ); 212 | dependencies = ( 213 | ); 214 | name = FindMyCode; 215 | productName = FindMyCode; 216 | productReference = 1F638C9E1C8B0BC600DE0D2B /* FindMyCode.app */; 217 | productType = "com.apple.product-type.application"; 218 | }; 219 | /* End PBXNativeTarget section */ 220 | 221 | /* Begin PBXProject section */ 222 | 1F521CD01C85F27700907BB6 /* Project object */ = { 223 | isa = PBXProject; 224 | attributes = { 225 | LastUpgradeCheck = 0720; 226 | ORGANIZATIONNAME = "lyeah company"; 227 | TargetAttributes = { 228 | 1F521CD71C85F27700907BB6 = { 229 | CreatedOnToolsVersion = 7.2; 230 | }; 231 | 1F638C9D1C8B0BC600DE0D2B = { 232 | CreatedOnToolsVersion = 7.2; 233 | }; 234 | }; 235 | }; 236 | buildConfigurationList = 1F521CD31C85F27700907BB6 /* Build configuration list for PBXProject "XcodeFindMyCode" */; 237 | compatibilityVersion = "Xcode 3.2"; 238 | developmentRegion = English; 239 | hasScannedForEncodings = 0; 240 | knownRegions = ( 241 | en, 242 | Base, 243 | ); 244 | mainGroup = 1F521CCF1C85F27700907BB6; 245 | productRefGroup = 1F521CD91C85F27700907BB6 /* Products */; 246 | projectDirPath = ""; 247 | projectRoot = ""; 248 | targets = ( 249 | 1F521CD71C85F27700907BB6 /* XcodeFindMyCode */, 250 | 1F638C9D1C8B0BC600DE0D2B /* FindMyCode */, 251 | ); 252 | }; 253 | /* End PBXProject section */ 254 | 255 | /* Begin PBXResourcesBuildPhase section */ 256 | 1F521CD51C85F27700907BB6 /* Resources */ = { 257 | isa = PBXResourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | ); 261 | runOnlyForDeploymentPostprocessing = 0; 262 | }; 263 | 1F638C9C1C8B0BC600DE0D2B /* Resources */ = { 264 | isa = PBXResourcesBuildPhase; 265 | buildActionMask = 2147483647; 266 | files = ( 267 | 1F638CB01C8B0BC600DE0D2B /* LaunchScreen.storyboard in Resources */, 268 | 1F638CBD1C8B0BE300DE0D2B /* DetailViewController.xib in Resources */, 269 | 1F638CBF1C8B0BE300DE0D2B /* RootViewController.xib in Resources */, 270 | 1F638CAD1C8B0BC600DE0D2B /* Assets.xcassets in Resources */, 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | /* End PBXResourcesBuildPhase section */ 275 | 276 | /* Begin PBXSourcesBuildPhase section */ 277 | 1F521CD41C85F27700907BB6 /* Sources */ = { 278 | isa = PBXSourcesBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | 1FA5C8461C85F77A00497948 /* NSView+MCLog.m in Sources */, 282 | 1F521CE51C85F27700907BB6 /* XcodeFindMyCode.m in Sources */, 283 | 1F4F71BD1C87474000BD850F /* XToDoModel.m in Sources */, 284 | 1F521CE81C85F27700907BB6 /* NSObject_Extension.m in Sources */, 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | 1F638C9A1C8B0BC600DE0D2B /* Sources */ = { 289 | isa = PBXSourcesBuildPhase; 290 | buildActionMask = 2147483647; 291 | files = ( 292 | 1F638CA51C8B0BC600DE0D2B /* AppDelegate.m in Sources */, 293 | 1F8BBCD31C8BE11B006D4170 /* FindMyCode.m in Sources */, 294 | 1F638CA21C8B0BC600DE0D2B /* main.m in Sources */, 295 | 1F638CBC1C8B0BE300DE0D2B /* DetailViewController.m in Sources */, 296 | 1F638CBE1C8B0BE300DE0D2B /* RootViewController.m in Sources */, 297 | ); 298 | runOnlyForDeploymentPostprocessing = 0; 299 | }; 300 | /* End PBXSourcesBuildPhase section */ 301 | 302 | /* Begin PBXVariantGroup section */ 303 | 1F638CAE1C8B0BC600DE0D2B /* LaunchScreen.storyboard */ = { 304 | isa = PBXVariantGroup; 305 | children = ( 306 | 1F638CAF1C8B0BC600DE0D2B /* Base */, 307 | ); 308 | name = LaunchScreen.storyboard; 309 | sourceTree = ""; 310 | }; 311 | /* End PBXVariantGroup section */ 312 | 313 | /* Begin XCBuildConfiguration section */ 314 | 1F521CEA1C85F27700907BB6 /* Debug */ = { 315 | isa = XCBuildConfiguration; 316 | buildSettings = { 317 | ALWAYS_SEARCH_USER_PATHS = NO; 318 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 319 | CLANG_CXX_LIBRARY = "libc++"; 320 | CLANG_ENABLE_MODULES = YES; 321 | CLANG_ENABLE_OBJC_ARC = YES; 322 | CLANG_WARN_BOOL_CONVERSION = YES; 323 | CLANG_WARN_CONSTANT_CONVERSION = YES; 324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 325 | CLANG_WARN_EMPTY_BODY = YES; 326 | CLANG_WARN_ENUM_CONVERSION = YES; 327 | CLANG_WARN_INT_CONVERSION = YES; 328 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 329 | CLANG_WARN_UNREACHABLE_CODE = YES; 330 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = dwarf; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | ENABLE_TESTABILITY = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_DYNAMIC_NO_PIC = NO; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | MTL_ENABLE_DEBUG_INFO = YES; 350 | ONLY_ACTIVE_ARCH = YES; 351 | }; 352 | name = Debug; 353 | }; 354 | 1F521CEB1C85F27700907BB6 /* Release */ = { 355 | isa = XCBuildConfiguration; 356 | buildSettings = { 357 | ALWAYS_SEARCH_USER_PATHS = NO; 358 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 359 | CLANG_CXX_LIBRARY = "libc++"; 360 | CLANG_ENABLE_MODULES = YES; 361 | CLANG_ENABLE_OBJC_ARC = YES; 362 | CLANG_WARN_BOOL_CONVERSION = YES; 363 | CLANG_WARN_CONSTANT_CONVERSION = YES; 364 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 365 | CLANG_WARN_EMPTY_BODY = YES; 366 | CLANG_WARN_ENUM_CONVERSION = YES; 367 | CLANG_WARN_INT_CONVERSION = YES; 368 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 369 | CLANG_WARN_UNREACHABLE_CODE = YES; 370 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 371 | COPY_PHASE_STRIP = NO; 372 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 373 | ENABLE_NS_ASSERTIONS = NO; 374 | ENABLE_STRICT_OBJC_MSGSEND = YES; 375 | GCC_C_LANGUAGE_STANDARD = gnu99; 376 | GCC_NO_COMMON_BLOCKS = YES; 377 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 378 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 379 | GCC_WARN_UNDECLARED_SELECTOR = YES; 380 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 381 | GCC_WARN_UNUSED_FUNCTION = YES; 382 | GCC_WARN_UNUSED_VARIABLE = YES; 383 | MTL_ENABLE_DEBUG_INFO = NO; 384 | }; 385 | name = Release; 386 | }; 387 | 1F521CED1C85F27700907BB6 /* Debug */ = { 388 | isa = XCBuildConfiguration; 389 | buildSettings = { 390 | COMBINE_HIDPI_IMAGES = YES; 391 | DEPLOYMENT_LOCATION = YES; 392 | DSTROOT = "$(HOME)"; 393 | INFOPLIST_FILE = XcodeFindMyCode/Info.plist; 394 | INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; 395 | MACOSX_DEPLOYMENT_TARGET = 10.10; 396 | PRODUCT_BUNDLE_IDENTIFIER = com.lyeah.XcodeFindMyCode; 397 | PRODUCT_NAME = "$(TARGET_NAME)"; 398 | WRAPPER_EXTENSION = xcplugin; 399 | }; 400 | name = Debug; 401 | }; 402 | 1F521CEE1C85F27700907BB6 /* Release */ = { 403 | isa = XCBuildConfiguration; 404 | buildSettings = { 405 | COMBINE_HIDPI_IMAGES = YES; 406 | DEPLOYMENT_LOCATION = YES; 407 | DSTROOT = "$(HOME)"; 408 | INFOPLIST_FILE = XcodeFindMyCode/Info.plist; 409 | INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; 410 | MACOSX_DEPLOYMENT_TARGET = 10.10; 411 | PRODUCT_BUNDLE_IDENTIFIER = com.lyeah.XcodeFindMyCode; 412 | PRODUCT_NAME = "$(TARGET_NAME)"; 413 | WRAPPER_EXTENSION = xcplugin; 414 | }; 415 | name = Release; 416 | }; 417 | 1F638CB21C8B0BC600DE0D2B /* Debug */ = { 418 | isa = XCBuildConfiguration; 419 | buildSettings = { 420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 421 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 422 | INFOPLIST_FILE = FindMyCode/Info.plist; 423 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 424 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 425 | PRODUCT_BUNDLE_IDENTIFIER = com.lyeah.FindMyCode; 426 | PRODUCT_NAME = "$(TARGET_NAME)"; 427 | SDKROOT = iphoneos; 428 | }; 429 | name = Debug; 430 | }; 431 | 1F638CB31C8B0BC600DE0D2B /* Release */ = { 432 | isa = XCBuildConfiguration; 433 | buildSettings = { 434 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 435 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 436 | INFOPLIST_FILE = FindMyCode/Info.plist; 437 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 438 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 439 | PRODUCT_BUNDLE_IDENTIFIER = com.lyeah.FindMyCode; 440 | PRODUCT_NAME = "$(TARGET_NAME)"; 441 | SDKROOT = iphoneos; 442 | VALIDATE_PRODUCT = YES; 443 | }; 444 | name = Release; 445 | }; 446 | /* End XCBuildConfiguration section */ 447 | 448 | /* Begin XCConfigurationList section */ 449 | 1F521CD31C85F27700907BB6 /* Build configuration list for PBXProject "XcodeFindMyCode" */ = { 450 | isa = XCConfigurationList; 451 | buildConfigurations = ( 452 | 1F521CEA1C85F27700907BB6 /* Debug */, 453 | 1F521CEB1C85F27700907BB6 /* Release */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | 1F521CEC1C85F27700907BB6 /* Build configuration list for PBXNativeTarget "XcodeFindMyCode" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 1F521CED1C85F27700907BB6 /* Debug */, 462 | 1F521CEE1C85F27700907BB6 /* Release */, 463 | ); 464 | defaultConfigurationIsVisible = 0; 465 | defaultConfigurationName = Release; 466 | }; 467 | 1F638CB41C8B0BC600DE0D2B /* Build configuration list for PBXNativeTarget "FindMyCode" */ = { 468 | isa = XCConfigurationList; 469 | buildConfigurations = ( 470 | 1F638CB21C8B0BC600DE0D2B /* Debug */, 471 | 1F638CB31C8B0BC600DE0D2B /* Release */, 472 | ); 473 | defaultConfigurationIsVisible = 0; 474 | defaultConfigurationName = Release; 475 | }; 476 | /* End XCConfigurationList section */ 477 | }; 478 | rootObject = 1F521CD01C85F27700907BB6 /* Project object */; 479 | } 480 | -------------------------------------------------------------------------------- /XcodeFindMyCode/XcodeFindMyCode.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /XcodeFindMyCode/XcodeFindMyCode/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 | DVTPlugInCompatibilityUUIDs 26 | 27 | C4A681B0-4A26-480E-93EC-1218098B9AA0 28 | F41BD31E-2683-44B8-AE7F-5F09E919790E 29 | AD68E85B-441B-4301-B564-A45E4919A6AD 30 | A16FF353-8441-459E-A50C-B071F53F51B7 31 | 9F75337B-21B4-4ADC-B558-F9CADF7073A7 32 | E969541F-E6F9-4D25-8158-72DC3545A6C6 33 | 8DC44374-2B35-4C57-A6FE-2AD66A36AAD9 34 | AABB7188-E14E-4433-AD3B-5CD791EAD9A3 35 | 8DC44374-2B35-4C57-A6FE-2AD66A36AAD9 36 | AABB7188-E14E-4433-AD3B-5CD791EAD9A3 37 | 7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90 38 | 0420B86A-AA43-4792-9ED0-6FE0F2B16A13 39 | 7265231C-39B4-402C-89E1-16167C4CC990 40 | 41 | LSMinimumSystemVersion 42 | $(MACOSX_DEPLOYMENT_TARGET) 43 | NSPrincipalClass 44 | XcodeFindMyCode 45 | XC4Compatible 46 | 47 | XCPluginHasUI 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /XcodeFindMyCode/XcodeFindMyCode/NSObject_Extension.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject_Extension.h 3 | // XcodeFindMyCode 4 | // 5 | // Created by 张小刚 on 16/3/1. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSObject (Xcode_Plugin_Template_Extension) 12 | 13 | + (void)pluginDidLoad:(NSBundle *)plugin; 14 | 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /XcodeFindMyCode/XcodeFindMyCode/NSObject_Extension.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject_Extension.m 3 | // XcodeFindMyCode 4 | // 5 | // Created by 张小刚 on 16/3/1. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | 10 | #import "NSObject_Extension.h" 11 | #import "XcodeFindMyCode.h" 12 | 13 | @implementation NSObject (Xcode_Plugin_Template_Extension) 14 | 15 | + (void)pluginDidLoad:(NSBundle *)plugin 16 | { 17 | static dispatch_once_t onceToken; 18 | NSString *currentApplicationName = [[NSBundle mainBundle] infoDictionary][@"CFBundleName"]; 19 | if ([currentApplicationName isEqual:@"Xcode"]) { 20 | dispatch_once(&onceToken, ^{ 21 | sharedPlugin = [[XcodeFindMyCode alloc] initWithBundle:plugin]; 22 | }); 23 | } 24 | } 25 | @end 26 | -------------------------------------------------------------------------------- /XcodeFindMyCode/XcodeFindMyCode/Utils/NSView+MCLog.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSView+MCLog.h 3 | // MCLog 4 | // 5 | // Created by Alex Lee on 1/6/16. 6 | // Copyright © 2016 Yuhua Chen. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | @interface NSView (MCLog) 13 | 14 | - (nullable __kindof NSView *)descendantViewByClassName:(NSString *)className; 15 | 16 | - (nullable __kindof NSView *)ancestralViewByClassName:(NSString *)className; 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /XcodeFindMyCode/XcodeFindMyCode/Utils/NSView+MCLog.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSView+MCLog.m 3 | // MCLog 4 | // 5 | // Created by Alex Lee on 1/6/16. 6 | // Copyright © 2016 Yuhua Chen. All rights reserved. 7 | // 8 | 9 | #import "NSView+MCLog.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @implementation NSView (MCLog) 14 | 15 | - (nullable __kindof NSView *)descendantViewByClassName:(NSString *)className{ 16 | Class class = NSClassFromString(className); 17 | 18 | for (NSView *subView in self.subviews) { 19 | if ([subView isKindOfClass:class]) { 20 | return subView; 21 | } else { 22 | NSView *view = [subView descendantViewByClassName:className]; 23 | if ([view isKindOfClass:class]) { 24 | return view; 25 | } 26 | } 27 | } 28 | return nil; 29 | } 30 | 31 | - (nullable __kindof NSView *)ancestralViewByClassName:(NSString *)className { 32 | if ([className length] == 0) return nil; 33 | NSView *superView = self.superview; 34 | while (superView) { 35 | if ([[superView className] isEqualToString:className]) { 36 | return superView; 37 | } 38 | superView = superView.superview; 39 | } 40 | return nil; 41 | } 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /XcodeFindMyCode/XcodeFindMyCode/Utils/XToDoModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // XToDoModel.h 3 | // XToDo 4 | // 5 | // Created by Travis on 13-11-28. 6 | // Copyright (c) 2013年 Plumn LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | 13 | @interface DVTChoice : NSObject 14 | - (id)initWithTitle:(id)arg1 toolTip:(id)arg2 image:(id)arg3 representedObject:(id)arg4; 15 | @end 16 | 17 | 18 | @interface DVTTextDocumentLocation : NSObject 19 | @property (readonly) NSRange characterRange; 20 | @property (readonly) NSRange lineRange; 21 | @end 22 | 23 | @interface DVTTextPreferences : NSObject 24 | + (id)preferences; 25 | @property BOOL trimWhitespaceOnlyLines; 26 | @property BOOL trimTrailingWhitespace; 27 | @property BOOL useSyntaxAwareIndenting; 28 | @end 29 | 30 | @interface DVTSourceTextStorage : NSTextStorage 31 | - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)string withUndoManager:(id)undoManager; 32 | - (NSRange)lineRangeForCharacterRange:(NSRange)range; 33 | - (NSRange)characterRangeForLineRange:(NSRange)range; 34 | - (void)indentCharacterRange:(NSRange)range undoManager:(id)undoManager; 35 | @end 36 | 37 | @interface DVTFileDataType : NSObject 38 | @property (readonly) NSString *identifier; 39 | @end 40 | 41 | @interface DVTFilePath : NSObject 42 | @property (readonly) NSURL *fileURL; 43 | @property (readonly) DVTFileDataType *fileDataTypePresumed; 44 | @end 45 | 46 | @interface IDEContainerItem : NSObject 47 | @property (readonly) DVTFilePath *resolvedFilePath; 48 | @end 49 | 50 | @interface IDEGroup : IDEContainerItem 51 | 52 | @end 53 | 54 | @interface IDEFileReference : IDEContainerItem 55 | 56 | @end 57 | 58 | @interface IDENavigableItem : NSObject 59 | @property (readonly) IDENavigableItem *parentItem; 60 | @property (readonly) id representedObject; 61 | 62 | 63 | @end 64 | 65 | @interface IDEFileNavigableItem : IDENavigableItem 66 | @property (readonly) DVTFileDataType *documentType; 67 | @property (readonly) NSURL *fileURL; 68 | @end 69 | 70 | @interface IDEStructureNavigator : NSObject 71 | @property (retain) NSArray *selectedObjects; 72 | @end 73 | 74 | @interface IDENavigableItemCoordinator : NSObject 75 | - (id)structureNavigableItemForDocumentURL:(id)arg1 inWorkspace:(id)arg2 error:(id *)arg3; 76 | @end 77 | 78 | @interface IDENavigatorArea : NSObject 79 | @property NSArrayController *extensionsController; 80 | - (id)currentNavigator; 81 | @end 82 | 83 | @interface IDEWorkspaceTabController : NSObject 84 | @property (readonly) IDENavigatorArea *navigatorArea; 85 | @property(readonly) IDEWorkspaceTabController *structureEditWorkspaceTabController; 86 | @end 87 | 88 | @interface IDEDocumentController : NSDocumentController 89 | +(IDEDocumentController*)sharedDocumentController; 90 | + (id)editorDocumentForNavigableItem:(id)arg1; 91 | + (id)retainedEditorDocumentForNavigableItem:(id)arg1 error:(id *)arg2; 92 | + (void)releaseEditorDocument:(id)arg1; 93 | 94 | @end 95 | 96 | @interface IDESourceCodeDocument : NSDocument 97 | - (DVTSourceTextStorage *)textStorage; 98 | - (NSUndoManager *)undoManager; 99 | @end 100 | 101 | @interface IDESourceCodeComparisonEditor : NSObject 102 | @property (readonly) NSTextView *keyTextView; 103 | @property (retain) NSDocument *primaryDocument; 104 | @end 105 | 106 | @interface IDESourceCodeEditor : NSObject 107 | @property (retain) NSTextView *textView; 108 | - (IDESourceCodeDocument *)sourceCodeDocument; 109 | @end 110 | 111 | @interface IDEEditorContext : NSObject 112 | - (id)editor; // returns the current editor. If the editor is the code editor, the class is `IDESourceCodeEditor` 113 | @end 114 | 115 | @interface IDEEditorArea : NSObject 116 | - (IDEEditorContext *)lastActiveEditorContext; 117 | @end 118 | 119 | @interface IDEConsoleArea : NSObject 120 | - (IDEEditorContext *)lastActiveEditorContext; 121 | @end 122 | 123 | @interface IDEWorkspaceWindowController : NSObject 124 | @property (readonly) IDEWorkspaceTabController *activeWorkspaceTabController; 125 | - (IDEEditorArea *)editorArea; 126 | @end 127 | 128 | @interface IDEWorkspace : NSWorkspace 129 | @property (readonly) DVTFilePath *representingFilePath; 130 | @end 131 | 132 | @interface IDEWorkspaceDocument : NSDocument 133 | @property (readonly) IDEWorkspace *workspace; 134 | @end 135 | 136 | 137 | 138 | @interface XToDoModel : NSObject 139 | 140 | + (IDEWorkspaceDocument *)currentWorkspaceDocument; 141 | + (IDEWorkspaceTabController*)tabController; 142 | + (IDESourceCodeEditor*)currentEditor; 143 | 144 | @end 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /XcodeFindMyCode/XcodeFindMyCode/Utils/XToDoModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // XToDoModel.m 3 | // XToDo 4 | // 5 | // Created by Travis on 13-11-28. 6 | // Copyright (c) 2013年 Plumn LLC. All rights reserved. 7 | // 8 | 9 | #import "XToDoModel.h" 10 | #import 11 | 12 | @implementation XToDoModel 13 | 14 | + (IDEWorkspaceTabController*)tabController{ 15 | NSWindowController *currentWindowController = [[NSApp keyWindow] windowController]; 16 | if ([currentWindowController isKindOfClass:NSClassFromString(@"IDEWorkspaceWindowController")]) { 17 | IDEWorkspaceWindowController *workspaceController = (IDEWorkspaceWindowController *)currentWindowController; 18 | 19 | return workspaceController.activeWorkspaceTabController; 20 | } 21 | return nil; 22 | } 23 | 24 | + (id)currentEditor { 25 | NSWindowController *currentWindowController = [[NSApp mainWindow] windowController]; 26 | if ([currentWindowController isKindOfClass:NSClassFromString(@"IDEWorkspaceWindowController")]) { 27 | IDEWorkspaceWindowController *workspaceController = (IDEWorkspaceWindowController *)currentWindowController; 28 | IDEEditorArea *editorArea = [workspaceController editorArea]; 29 | IDEEditorContext *editorContext = [editorArea lastActiveEditorContext]; 30 | return [editorContext editor]; 31 | } 32 | return nil; 33 | } 34 | + (IDEWorkspaceDocument *)currentWorkspaceDocument { 35 | NSWindowController *currentWindowController = [[NSApp mainWindow] windowController]; 36 | id document = [currentWindowController document]; 37 | if (currentWindowController && [document isKindOfClass:NSClassFromString(@"IDEWorkspaceDocument")]) { 38 | return (IDEWorkspaceDocument *)document; 39 | } 40 | return nil; 41 | } 42 | 43 | + (IDESourceCodeDocument *)currentSourceCodeDocument { 44 | 45 | IDESourceCodeEditor *editor=[self currentEditor]; 46 | 47 | if ([editor isKindOfClass:NSClassFromString(@"IDESourceCodeEditor")]) { 48 | return editor.sourceCodeDocument; 49 | } 50 | 51 | if ([editor isKindOfClass:NSClassFromString(@"IDESourceCodeComparisonEditor")]) { 52 | if ([[(IDESourceCodeComparisonEditor*)editor primaryDocument] isKindOfClass:NSClassFromString(@"IDESourceCodeDocument")]) { 53 | return (id)[(IDESourceCodeComparisonEditor *)editor primaryDocument]; 54 | } 55 | } 56 | 57 | return nil; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /XcodeFindMyCode/XcodeFindMyCode/XcodeFindMyCode.h: -------------------------------------------------------------------------------- 1 | // 2 | // XcodeFindMyCode.h 3 | // XcodeFindMyCode 4 | // 5 | // Created by 张小刚 on 16/3/1. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class XcodeFindMyCode; 12 | 13 | static XcodeFindMyCode *sharedPlugin; 14 | 15 | @interface XcodeFindMyCode : NSObject 16 | 17 | + (instancetype)sharedPlugin; 18 | - (id)initWithBundle:(NSBundle *)plugin; 19 | 20 | @property (nonatomic, strong, readonly) NSBundle* bundle; 21 | @end -------------------------------------------------------------------------------- /XcodeFindMyCode/XcodeFindMyCode/XcodeFindMyCode.m: -------------------------------------------------------------------------------- 1 | // 2 | // XcodeFindMyCode.m 3 | // XcodeFindMyCode 4 | // 5 | // Created by 张小刚 on 16/3/1. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import "XcodeFindMyCode.h" 10 | #import "NSView+MCLog.h" 11 | #import "XToDoModel.h" 12 | 13 | static NSString * const kTargetRegexPattern = @"XcodeFindMyCode\\[\\d+\\] request open file (\\w+).m"; 14 | static NSString * const kTimeRegexPattern = @"\\[\\d+\\]"; 15 | static NSString * const kFilenameRegexPattern = @"(\\w+).m"; 16 | 17 | static NSTimeInterval const kMinEventHandleInterval = 1.0f; 18 | static NSTimeInterval const kMaxPhoneXcodeDeltaInterval = 1.0f; 19 | 20 | @interface XcodeFindMyCode() 21 | 22 | @property (nonatomic, strong, readwrite) NSBundle *bundle; 23 | @property (nonatomic, strong) NSTextView * consoleTextView; 24 | //last handle time 25 | @property (nonatomic, assign) NSTimeInterval lastTimeInterval; 26 | 27 | @end 28 | 29 | @implementation XcodeFindMyCode 30 | 31 | + (instancetype)sharedPlugin 32 | { 33 | return sharedPlugin; 34 | } 35 | 36 | - (id)initWithBundle:(NSBundle *)plugin 37 | { 38 | if (self = [super init]) { 39 | // reference to plugin's bundle, for resource access 40 | self.bundle = plugin; 41 | [[NSNotificationCenter defaultCenter] addObserver:self 42 | selector:@selector(didApplicationFinishLaunchingNotification:) 43 | name:NSApplicationDidFinishLaunchingNotification 44 | object:nil]; 45 | [[NSNotificationCenter defaultCenter] addObserver:self 46 | selector:@selector(activate:) 47 | name:@"IDEControlGroupDidChangeNotificationName" 48 | object:nil]; 49 | } 50 | return self; 51 | } 52 | 53 | - (void)didApplicationFinishLaunchingNotification:(NSNotification*)noti 54 | { 55 | //removeObserver 56 | [[NSNotificationCenter defaultCenter] removeObserver:self name:NSApplicationDidFinishLaunchingNotification object:nil]; 57 | } 58 | 59 | - (void)activate:(NSNotification *)notification { 60 | NSView *contentView = [[NSApp mainWindow] contentView]; 61 | NSTextView *consoleTextView = [contentView descendantViewByClassName:@"IDEConsoleTextView"]; 62 | if (!consoleTextView) { 63 | return; 64 | } 65 | self.consoleTextView = consoleTextView; 66 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(consoleTextViewTextChanged:) name:NSTextDidChangeNotification object:self.consoleTextView]; 67 | } 68 | 69 | - (void)consoleTextViewTextChanged: (NSNotification *)notification 70 | { 71 | NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; 72 | if((now - self.lastTimeInterval) < kMinEventHandleInterval){ 73 | return; 74 | } 75 | NSString * content = self.consoleTextView.string; 76 | 77 | if(content.length == 0) return; 78 | NSError * error = nil; 79 | NSRegularExpression * regExpression = [NSRegularExpression regularExpressionWithPattern:kTargetRegexPattern options:0 error:&error]; 80 | NSArray * matches = [regExpression matchesInString:content options:0 range:NSMakeRange(0, content.length)]; 81 | if(matches.count == 0) return; 82 | NSTextCheckingResult * possibleMatch = [matches lastObject]; 83 | NSString * matchText = [content substringWithRange:possibleMatch.range]; 84 | // XcodeFindMyCode[2748237487284] request open file HHH_XXX.m 85 | NSRegularExpression * timeRegExpression = [NSRegularExpression regularExpressionWithPattern:kTimeRegexPattern options:0 error:&error]; 86 | NSTextCheckingResult * timeMatch = [timeRegExpression firstMatchInString:matchText options:0 range:NSMakeRange(0, matchText.length)]; 87 | if(!timeMatch) return; 88 | NSString * timeMatchText = [matchText substringWithRange:timeMatch.range]; 89 | NSString * timeText = [timeMatchText stringByReplacingOccurrencesOfString:@"[" withString:@""]; 90 | timeText = [timeText stringByReplacingOccurrencesOfString:@"]" withString:@""]; 91 | NSTimeInterval timeInterval = [timeText doubleValue]; 92 | 93 | NSRegularExpression * nameRegExpression = [NSRegularExpression regularExpressionWithPattern:kFilenameRegexPattern options:0 error:&error]; 94 | NSTextCheckingResult * nameMatch = [nameRegExpression firstMatchInString:matchText options:0 range:NSMakeRange(0, matchText.length)]; 95 | if(!nameMatch) return; 96 | NSString * filename = [matchText substringWithRange:nameMatch.range]; 97 | 98 | if((now - timeInterval) > kMaxPhoneXcodeDeltaInterval){ 99 | return; 100 | } 101 | // NSLog(@"XcodeFindMyCode: request open file %@ at time %.f",filename,timeInterval); 102 | NSString * filePath = [self getFilePath:filename]; 103 | if(filePath){ 104 | [[NSApp delegate] application:NSApp openFile:filePath]; 105 | } 106 | self.lastTimeInterval = now; 107 | } 108 | 109 | - (NSString *)getFilePath: (NSString *)filename 110 | { 111 | NSString * filePath = nil; 112 | NSString * workPath = [[[XToDoModel currentWorkspaceDocument].workspace.representingFilePath.fileURL 113 | path] 114 | stringByDeletingLastPathComponent]; 115 | //check from .xcodeproj`s parent directory 116 | NSFileManager * fileManager = [NSFileManager defaultManager]; 117 | NSDirectoryEnumerator * enumerator = [fileManager enumeratorAtPath:workPath]; 118 | for (NSString * fileItem in enumerator) { 119 | NSString * name = [fileItem lastPathComponent]; 120 | if([name isEqualToString:filename]){ 121 | filePath = fileItem; 122 | break; 123 | } 124 | } 125 | if(filePath){ 126 | filePath = [workPath stringByAppendingPathComponent:filePath]; 127 | } 128 | return filePath; 129 | } 130 | 131 | - (void)dealloc 132 | { 133 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 134 | } 135 | 136 | @end 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /product/XcodeFindMyCode.xcplugin/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 14F1021 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | XcodeFindMyCode 11 | CFBundleIdentifier 12 | com.lyeah.XcodeFindMyCode 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | XcodeFindMyCode 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleSupportedPlatforms 24 | 25 | MacOSX 26 | 27 | CFBundleVersion 28 | 1 29 | DTCompiler 30 | com.apple.compilers.llvm.clang.1_0 31 | DTPlatformBuild 32 | 7C68 33 | DTPlatformVersion 34 | GM 35 | DTSDKBuild 36 | 15C43 37 | DTSDKName 38 | macosx10.11 39 | DTXcode 40 | 0720 41 | DTXcodeBuild 42 | 7C68 43 | DVTPlugInCompatibilityUUIDs 44 | 45 | C4A681B0-4A26-480E-93EC-1218098B9AA0 46 | F41BD31E-2683-44B8-AE7F-5F09E919790E 47 | AD68E85B-441B-4301-B564-A45E4919A6AD 48 | A16FF353-8441-459E-A50C-B071F53F51B7 49 | 9F75337B-21B4-4ADC-B558-F9CADF7073A7 50 | E969541F-E6F9-4D25-8158-72DC3545A6C6 51 | 8DC44374-2B35-4C57-A6FE-2AD66A36AAD9 52 | AABB7188-E14E-4433-AD3B-5CD791EAD9A3 53 | 8DC44374-2B35-4C57-A6FE-2AD66A36AAD9 54 | AABB7188-E14E-4433-AD3B-5CD791EAD9A3 55 | 7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90 56 | 0420B86A-AA43-4792-9ED0-6FE0F2B16A13 57 | 7265231C-39B4-402C-89E1-16167C4CC990 58 | 59 | LSMinimumSystemVersion 60 | 10.10 61 | NSPrincipalClass 62 | XcodeFindMyCode 63 | XC4Compatible 64 | 65 | XCPluginHasUI 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /product/XcodeFindMyCode.xcplugin/Contents/MacOS/XcodeFindMyCode: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/github-xiaogang/XcodeFindMyCode/46bc2b496e056c02bb468bef0636b0b961933405/product/XcodeFindMyCode.xcplugin/Contents/MacOS/XcodeFindMyCode -------------------------------------------------------------------------------- /product/XcodeFindMyCode.xcplugin/Contents/Resources/XcodeFindMyCode.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 46 | 47 | 58 | 60 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /product/XcodeFindMyCode/FindMyCode.h: -------------------------------------------------------------------------------- 1 | // 2 | // FindMyCode.h 3 | // XcodeFindMyCode 4 | // 5 | // Created by 张小刚 on 16/3/6. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | FMCTriggerModeTwoFingerLongPress = 2, 13 | FMCTriggerModeThreeFingerLongPress = 3, 14 | }FMCTriggerMode; 15 | 16 | @interface FindMyCode : NSObject 17 | 18 | + (FindMyCode *)sharedInstance; 19 | @property (nonatomic, assign) FMCTriggerMode triggerMode; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /product/XcodeFindMyCode/FindMyCode.m: -------------------------------------------------------------------------------- 1 | // 2 | // FindMyCode.m 3 | // XcodeFindMyCode 4 | // 5 | // Created by 张小刚 on 16/3/6. 6 | // Copyright © 2016年 lyeah company. All rights reserved. 7 | // 8 | 9 | #import "FindMyCode.h" 10 | @import UIKit; 11 | 12 | @interface FMCLongPressGestureRecognizer : UILongPressGestureRecognizer 13 | 14 | @end 15 | 16 | @interface UIWindow (FindMyCode) 17 | 18 | - (void)fmc_setupTrigger; 19 | 20 | @end 21 | 22 | @interface FindMyCode () 23 | 24 | @property (nonatomic, strong) NSString * controllerClassName; 25 | 26 | @end 27 | 28 | @implementation FindMyCode 29 | 30 | + (void)load 31 | { 32 | [[FindMyCode sharedInstance] setup]; 33 | } 34 | 35 | + (FindMyCode *)sharedInstance 36 | { 37 | static FindMyCode * sharedInstance = nil; 38 | static dispatch_once_t onceToken; 39 | dispatch_once(&onceToken, ^{ 40 | sharedInstance = [[FindMyCode alloc] init]; 41 | }); 42 | return sharedInstance; 43 | } 44 | 45 | - (instancetype)init 46 | { 47 | self = [super init]; 48 | if (self) { 49 | self.triggerMode = FMCTriggerModeTwoFingerLongPress; 50 | } 51 | return self; 52 | } 53 | 54 | - (void)setup 55 | { 56 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appKeyWindowChanged:) name:UIWindowDidBecomeKeyNotification object:nil]; 57 | } 58 | 59 | - (void)appKeyWindowChanged:(NSNotification *)notification 60 | { 61 | UIWindow * keyWinow = (UIWindow *)notification.object; 62 | [keyWinow fmc_setupTrigger]; 63 | } 64 | 65 | - (void)setTriggerMode:(FMCTriggerMode)triggerMode 66 | { 67 | _triggerMode = triggerMode; 68 | UIWindow * keyWinow = [UIApplication sharedApplication].keyWindow; 69 | if(keyWinow){ 70 | [keyWinow fmc_setupTrigger]; 71 | } 72 | } 73 | 74 | - (void)dealloc 75 | { 76 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 77 | } 78 | 79 | @end 80 | 81 | @implementation FMCLongPressGestureRecognizer 82 | 83 | @end 84 | 85 | @implementation UIWindow (FindMyCode) 86 | 87 | - (void)fmc_setupTrigger 88 | { 89 | #if DEBUG 90 | FMCLongPressGestureRecognizer * targetRecognizer = nil; 91 | for (UIGestureRecognizer * recognizer in self.gestureRecognizers) { 92 | if([recognizer isKindOfClass:[FMCLongPressGestureRecognizer class]]){ 93 | targetRecognizer = (FMCLongPressGestureRecognizer *)recognizer; 94 | break; 95 | } 96 | } 97 | if(!targetRecognizer){ 98 | targetRecognizer = [[FMCLongPressGestureRecognizer alloc] initWithTarget:self action:@selector(fmc_triggerGestureRecognized:)]; 99 | [self addGestureRecognizer:targetRecognizer]; 100 | } 101 | targetRecognizer.numberOfTouchesRequired = [[FindMyCode sharedInstance] triggerMode]; 102 | #endif 103 | } 104 | 105 | - (void)fmc_triggerGestureRecognized:(UILongPressGestureRecognizer *)recognizer 106 | { 107 | if(recognizer.state != UIGestureRecognizerStateBegan){ 108 | return; 109 | } 110 | CGPoint point = [recognizer locationInView:self]; 111 | UIView * targetView = [self hitTest:point withEvent:nil]; 112 | UIViewController * targetVC = [self fmc_getViewController:targetView]; 113 | if(!targetVC) return; 114 | NSString * controllerClasName = NSStringFromClass(targetVC.class); 115 | [FindMyCode sharedInstance].controllerClassName = controllerClasName; 116 | UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:@"Find My Code" message:[NSString stringWithFormat:@"Xcode Open %@.m ?",controllerClasName] delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Open", nil]; 117 | [alertView show]; 118 | } 119 | 120 | - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex 121 | { 122 | if(buttonIndex != 1){ 123 | return; 124 | } 125 | NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; 126 | NSString * requestCmd = [NSString stringWithFormat:@"XcodeFindMyCode[%.f] request open file %@.m",now,[FindMyCode sharedInstance].controllerClassName]; 127 | NSString * seperator = @"--------------------------XcodeFindMyCode----------------------"; 128 | NSLog(@"\n\n\n%@\n\n%@\n\n%@\n\n\n",seperator,requestCmd,seperator); 129 | } 130 | 131 | - (UIViewController *)fmc_getViewController: (UIView *)view 132 | { 133 | UIViewController * result = nil; 134 | UIResponder * nextResponder = view; 135 | while ((nextResponder = nextResponder.nextResponder)) { 136 | if ([nextResponder isKindOfClass:[UIViewController class]]) { 137 | result = (UIViewController *)nextResponder; 138 | break; 139 | } 140 | } 141 | return result; 142 | } 143 | 144 | 145 | @end 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | --------------------------------------------------------------------------------