├── AutoImport1.gif ├── AutoImport2.png ├── AutoImport3.gif ├── AutoImport.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── project.pbxproj ├── AutoImport ├── ViewController.h ├── AppDelegate.h ├── main.m ├── AutoImport.entitlements ├── ViewController.m ├── AppDelegate.m ├── Info.plist ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json └── Base.lproj │ └── Main.storyboard ├── AutoImportHeader ├── AutoImportHeader.entitlements ├── SourceEditorCommand.h ├── SourceEditorExtension.h ├── SourceEditorExtension.m ├── xTextModifier.h ├── SourceEditorCommand.m ├── xTextModifier.m ├── xTextMatcher.h ├── Info.plist ├── xTextMatcher.m └── SortHeader.h ├── AutoImportTests ├── Info.plist └── AutoImportTests.m ├── AutoImportUITests ├── Info.plist └── AutoImportUITests.m ├── README.md └── .gitignore /AutoImport1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hhfa008/AutoImport/HEAD/AutoImport1.gif -------------------------------------------------------------------------------- /AutoImport2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hhfa008/AutoImport/HEAD/AutoImport2.png -------------------------------------------------------------------------------- /AutoImport3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hhfa008/AutoImport/HEAD/AutoImport3.gif -------------------------------------------------------------------------------- /AutoImport.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AutoImport/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // AutoImport 4 | // 5 | // Created by hhfa on 2017/12/19. 6 | // Copyright © 2017年 hhfa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : NSViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /AutoImport/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AutoImport 4 | // 5 | // Created by hhfa on 2017/12/19. 6 | // Copyright © 2017年 hhfa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /AutoImport/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AutoImport 4 | // 5 | // Created by hhfa on 2017/12/19. 6 | // Copyright © 2017年 hhfa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /AutoImportHeader/AutoImportHeader.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AutoImportHeader/SourceEditorCommand.h: -------------------------------------------------------------------------------- 1 | // 2 | // SourceEditorCommand.h 3 | // AutoImport 4 | // 5 | // Created by hhfa on 2017/12/19. 6 | // Copyright © 2017年 hhfa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SourceEditorCommand : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AutoImportHeader/SourceEditorExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // SourceEditorExtension.h 3 | // AutoImport 4 | // 5 | // Created by hhfa on 2017/12/19. 6 | // Copyright © 2017年 hhfa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SourceEditorExtension : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AutoImport/AutoImport.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 | -------------------------------------------------------------------------------- /AutoImport/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // AutoImport 4 | // 5 | // Created by hhfa on 2017/12/19. 6 | // Copyright © 2017年 hhfa. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @implementation ViewController 12 | 13 | - (void)viewDidLoad { 14 | [super viewDidLoad]; 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | 20 | - (void)setRepresentedObject:(id)representedObject { 21 | [super setRepresentedObject:representedObject]; 22 | 23 | // Update the view, if already loaded. 24 | } 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /AutoImport/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AutoImport 4 | // 5 | // Created by hhfa on 2017/12/19. 6 | // Copyright © 2017年 hhfa. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | #import "ViewController.h" 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 19 | ViewController* vc = ViewController.new; 20 | // Insert code here to initialize your application 21 | } 22 | 23 | 24 | - (void)applicationWillTerminate:(NSNotification *)aNotification { 25 | // Insert code here to tear down your application 26 | } 27 | 28 | 29 | @end 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /AutoImportHeader/SourceEditorExtension.m: -------------------------------------------------------------------------------- 1 | // 2 | // SourceEditorExtension.m 3 | // AutoImport 4 | // 5 | // Created by hhfa on 2017/12/19. 6 | // Copyright © 2017年 hhfa. All rights reserved. 7 | // 8 | 9 | #import "SourceEditorExtension.h" 10 | 11 | @implementation SourceEditorExtension 12 | 13 | /* 14 | - (void)extensionDidFinishLaunching 15 | { 16 | // If your extension needs to do any work at launch, implement this optional method. 17 | } 18 | */ 19 | 20 | /* 21 | - (NSArray *> *)commandDefinitions 22 | { 23 | // If your extension needs to return a collection of command definitions that differs from those in its Info.plist, implement this optional property getter. 24 | return @[]; 25 | } 26 | */ 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /AutoImportTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /AutoImportUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AutoImport 2 | AutoImport, handy Xcode plugin to import heaer file automatically. 3 | Because sometimes you are on 999th line of code and scrolling up just to add an import is a waste of time. 4 | 5 | # Support 6 | AutoImport is a Xcode Source Editor Extension, supports Xcode 8 and above. 7 | Replacements of [Peckham](https://github.com/markohlebar/Peckham), as  decided to drop support for Xcode plugins in Xcode 8. 8 | ## AutoImport by Menu 9 | 10 | ![Usage](AutoImport3.gif) 11 | 12 | ## AutoImport Key Binding 13 | 14 | ![Usage](AutoImport2.png) 15 | 16 | ## AutoImport by Quick Key 17 | 18 | ![Usage](AutoImport1.gif) 19 | ## Credits 20 | 21 | I am using some helper functions to deal with the filtering out source text from[CleanHeaders-Xcode](https://github.com/insanoid/CleanHeaders-Xcode) and [xTextHandler-objc](https://github.com/cyanzhong/xTextHandler-objc), thanks for the awesome class. 22 | -------------------------------------------------------------------------------- /AutoImportHeader/xTextModifier.h: -------------------------------------------------------------------------------- 1 | // 2 | // xTextModifier.h 3 | // xTextHandler 4 | // 5 | // Created by cyan on 16/6/18. 6 | // Copyright © 2016年 cyan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | /** 13 | Block for text handling 14 | 15 | @param text text 16 | 17 | @return modified text 18 | */ 19 | typedef NSString * (^xTextHandlerBlock) (NSString *text); 20 | typedef NSArray * (^xLineHandlerBlock) (NSArray *lines,NSString *text); 21 | 22 | @interface xTextModifier : NSObject 23 | 24 | 25 | /** 26 | Select text with regex 27 | 28 | @param invocation XCSourceEditorCommandInvocation 29 | 30 | @param handler handler 31 | @param allContentHandler handler for entire source code. 32 | */ 33 | + (void)select:(XCSourceEditorCommandInvocation *)invocation 34 | handler:(xTextHandlerBlock)handler 35 | handlerForAllContent:(xLineHandlerBlock)allContentHandler; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /AutoImportTests/AutoImportTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AutoImportTests.m 3 | // AutoImportTests 4 | // 5 | // Created by hhfa on 2017/12/19. 6 | // Copyright © 2017年 hhfa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AutoImportTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AutoImportTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /AutoImport/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | Copyright © 2017年 hhfa. All rights reserved. 27 | NSMainStoryboardFile 28 | Main 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /AutoImport/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 | } -------------------------------------------------------------------------------- /AutoImportHeader/SourceEditorCommand.m: -------------------------------------------------------------------------------- 1 | // 2 | // SourceEditorCommand.m 3 | // AutoImport 4 | // 5 | // Created by hhfa on 2017/12/19. 6 | // Copyright © 2017年 hhfa. All rights reserved. 7 | // 8 | 9 | #import "SourceEditorCommand.h" 10 | 11 | #import "SortHeader.h" 12 | #import "xTextModifier.h" 13 | 14 | @implementation SourceEditorCommand 15 | 16 | - (void)performCommandWithInvocation:(XCSourceEditorCommandInvocation *)invocation 17 | completionHandler:(void (^)(NSError * _Nullable nilOrError))completionHandler { 18 | [xTextModifier select:invocation 19 | handler:self.handlers[invocation.commandIdentifier] 20 | handlerForAllContent:self.handlers[@"AutoImport"]]; 21 | completionHandler(nil); 22 | } 23 | 24 | - (NSDictionary *)handlers { 25 | static NSDictionary *_instance; 26 | static dispatch_once_t onceToken; 27 | dispatch_once(&onceToken, ^{ 28 | _instance = @{ 29 | @"com.hhfa008.AutoImport": 30 | ^NSString *(NSString *text) { return formatSelection(text); }, 31 | @"AutoImport": 32 | ^NSArray *(NSArray *lines,NSString* text) { return formatSelectionLines(lines,text); } 33 | }; 34 | }); 35 | return _instance; 36 | } 37 | @end 38 | -------------------------------------------------------------------------------- /.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 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | *.xcscheme 26 | 27 | ## Obj-C/Swift specific 28 | *.hmap 29 | *.ipa 30 | 31 | # CocoaPods 32 | # 33 | # We recommend against adding the Pods directory to your .gitignore. However 34 | # you should judge for yourself, the pros and cons are mentioned at: 35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 36 | # 37 | # Pods/ 38 | 39 | # Carthage 40 | # 41 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 42 | # Carthage/Checkouts 43 | 44 | Carthage/Build 45 | 46 | # fastlane 47 | # 48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 49 | # screenshots whenever they are needed. 50 | # For more information about the recommended setup visit: 51 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 52 | 53 | -------------------------------------------------------------------------------- /AutoImportUITests/AutoImportUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AutoImportUITests.m 3 | // AutoImportUITests 4 | // 5 | // Created by hhfa on 2017/12/19. 6 | // Copyright © 2017年 hhfa. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AutoImportUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AutoImportUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /AutoImportHeader/xTextModifier.m: -------------------------------------------------------------------------------- 1 | // 2 | // xTextModifier.m 3 | // xTextHandler 4 | // 5 | // Created by cyan on 16/6/18. 6 | // Copyright © 2016年 cyan. All rights reserved. 7 | // 8 | 9 | #import "xTextModifier.h" 10 | #import "xTextMatcher.h" 11 | #import 12 | 13 | @implementation xTextModifier 14 | 15 | + (void)select:(XCSourceEditorCommandInvocation *)invocation 16 | handler:(xTextHandlerBlock)handler 17 | handlerForAllContent:(xLineHandlerBlock)allContentHandler { 18 | 19 | 20 | NSString* selectedText = nil; 21 | // No selections but the file has lines. 22 | if (![self isNothingSelected:invocation] && invocation.buffer.lines) { 23 | xTextMatchResult *match = [xTextMatcher match:invocation.buffer.selections.firstObject invocation:invocation]; 24 | selectedText = [match.text substringWithRange:match.range]; 25 | } 26 | 27 | NSArray *formattedContentLines = allContentHandler(invocation.buffer.lines, selectedText); 28 | [invocation.buffer.lines removeAllObjects]; 29 | [invocation.buffer.lines addObjectsFromArray: formattedContentLines]; 30 | 31 | } 32 | 33 | + (BOOL)isNothingSelected:(XCSourceEditorCommandInvocation *)invocation { 34 | 35 | if (!invocation.buffer.selections.count) { 36 | return YES; 37 | } 38 | 39 | if (invocation.buffer.selections.count == 1) { 40 | XCSourceTextRange *selectionRange = [invocation.buffer.selections firstObject]; 41 | if(selectionRange.start.column == selectionRange.end.column && 42 | selectionRange.start.line == selectionRange.end.line) { 43 | return YES; 44 | } 45 | } 46 | 47 | return NO; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /AutoImportHeader/xTextMatcher.h: -------------------------------------------------------------------------------- 1 | // 2 | // xTextMatcher.h 3 | // xTextHandler 4 | // 5 | // Created by cyan on 16/6/18. 6 | // Copyright © 2016年 cyan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | static NSString *const xTextHandlerStringPattern = @"\"(.+)\""; // match "abc" 12 | static NSString *const xTextHandlerHexPattern = @"([0-9a-fA-F]+)"; // match 00FFFF 13 | static NSString *const xTextHandlerRGBPattern = @"([0-9]+.+[0-9]+.+[0-9]+)"; // match 20, 20, 20 | 20 20 20 ... 14 | static NSString *const xTextHandlerRadixPattern = @"([0-9]+)"; // match numbers 15 | 16 | @interface xTextMatchResult : NSObject 17 | 18 | @property (nonatomic, copy) NSString *text; // text for each lines 19 | @property (nonatomic, assign) NSRange range; // clipped text range 20 | @property (nonatomic, assign) BOOL clipboard; // is clipboard text 21 | 22 | 23 | /** 24 | Result from clipboard text 25 | 26 | @return xTextMatchResult 27 | */ 28 | + (instancetype)clipboardResult; 29 | 30 | /** 31 | Result with text & clipped text 32 | 33 | @param text text 34 | @param clipped clipped text 35 | 36 | @return xTextMatchResult 37 | */ 38 | + (instancetype)resultWithText:(NSString *)text clipped:(NSString *)clipped; 39 | 40 | @end 41 | 42 | @interface xTextMatcher : NSObject 43 | 44 | 45 | /** 46 | Match texts in XCSourceEditorCommandInvocation 47 | 48 | @param selection XCSourceTextRange 49 | @param invocation XCSourceEditorCommandInvocation 50 | 51 | @return match result 52 | */ 53 | + (xTextMatchResult *)match:(XCSourceTextRange *)selection invocation:(XCSourceEditorCommandInvocation *)invocation; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /AutoImportHeader/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | AutoImport 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 | CFBundleVersion 22 | 1 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSExtension 26 | 27 | NSExtensionAttributes 28 | 29 | XCSourceEditorCommandDefinitions 30 | 31 | 32 | XCSourceEditorCommandClassName 33 | SourceEditorCommand 34 | XCSourceEditorCommandIdentifier 35 | com.hhfa008.AutoImport 36 | XCSourceEditorCommandName 37 | AutoImport 38 | 39 | 40 | XCSourceEditorExtensionPrincipalClass 41 | SourceEditorExtension 42 | 43 | NSExtensionPointIdentifier 44 | com.apple.dt.Xcode.extension.source-editor 45 | 46 | NSHumanReadableCopyright 47 | Copyright © 2017年 hhfa. All rights reserved. 48 | 49 | 50 | -------------------------------------------------------------------------------- /AutoImportHeader/xTextMatcher.m: -------------------------------------------------------------------------------- 1 | // 2 | // xTextMatcher.m 3 | // xTextHandler 4 | // 5 | // Created by cyan on 16/6/18. 6 | // Copyright © 2016年 cyan. All rights reserved. 7 | // 8 | 9 | #import "xTextMatcher.h" 10 | #import 11 | 12 | static const NSInteger xTextInvalidLine = -1; 13 | 14 | typedef void (^xTextSelectionLineBlock) (NSInteger index, NSString *line, NSString *clipped); 15 | 16 | @implementation xTextMatchResult 17 | 18 | + (instancetype)clipboardResult { 19 | xTextMatchResult *result = [[xTextMatchResult alloc] init]; 20 | result.text = [[NSPasteboard generalPasteboard] stringForType:NSPasteboardTypeString]; 21 | result.range = NSMakeRange(0, result.text.length); 22 | result.clipboard = YES; 23 | return result; 24 | } 25 | 26 | + (instancetype)resultWithText:(NSString *)text clipped:(NSString *)clipped { 27 | xTextMatchResult *result = [[xTextMatchResult alloc] init]; 28 | result.text = text; 29 | result.range = [text rangeOfString:clipped]; 30 | return result; 31 | } 32 | 33 | - (NSString *)description { 34 | return [NSString stringWithFormat:@"%@, %@", self.text, NSStringFromRange(self.range)]; 35 | } 36 | 37 | @end 38 | 39 | @implementation xTextMatcher 40 | 41 | 42 | /** 43 | Enumerate lines in XCSourceEditorCommandInvocation 44 | 45 | @param invocation XCSourceEditorCommandInvocation 46 | @param selection XCSourceTextRange 47 | @param block (index, line, clipped) 48 | */ 49 | + (void)enumerate:(XCSourceEditorCommandInvocation *)invocation selection:(XCSourceTextRange *)selection lineBlock:(xTextSelectionLineBlock)block { 50 | 51 | NSInteger startLine = selection.start.line; 52 | NSInteger startColumn = selection.start.column; 53 | NSInteger endLine = selection.end.line; 54 | NSInteger endColumn = selection.end.column; 55 | 56 | // handle clipboard if selected nothing 57 | if (startLine == endLine && startColumn == endColumn) { 58 | block(xTextInvalidLine, @"", @""); 59 | return; 60 | } 61 | 62 | for (NSInteger index=startLine; index<=endLine; ++index) { 63 | 64 | NSString *line = invocation.buffer.lines[index]; 65 | NSString *clipped; 66 | 67 | if (startLine == endLine) { // single line 68 | clipped = [line substringWithRange:NSMakeRange(startColumn, endColumn-startColumn)]; 69 | } else if (index == startLine) { // first line 70 | clipped = [line substringFromIndex:startColumn]; 71 | } else if (index == endLine) { // last line 72 | clipped = [line substringToIndex:endColumn]; 73 | } else { // common line 74 | clipped = line; 75 | } 76 | 77 | if (clipped.length > 0 && block) { 78 | block(index, line, clipped); 79 | } 80 | } 81 | } 82 | 83 | + (xTextMatchResult *)match:(XCSourceTextRange *)selection invocation:(XCSourceEditorCommandInvocation *)invocation { 84 | 85 | NSMutableString *lineText = [NSMutableString string]; 86 | NSMutableString *clippedText = [NSMutableString string]; 87 | 88 | __block BOOL clipboard; 89 | 90 | // enumerate each lines 91 | [xTextMatcher enumerate:invocation selection:selection lineBlock:^(NSInteger index, NSString *line, NSString *clipped) { 92 | [lineText appendString:line]; 93 | [clippedText appendString:clipped]; 94 | clipboard = (index == xTextInvalidLine); 95 | }]; 96 | 97 | // clipboard result or selected result 98 | return clipboard ? xTextMatchResult.clipboardResult : [xTextMatchResult resultWithText:lineText clipped:clippedText]; 99 | } 100 | 101 | @end 102 | -------------------------------------------------------------------------------- /AutoImportHeader/SortHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // SortHeader.h 3 | // CleanHeaders-Xcode 4 | // 5 | // Created by Karthik on 28/10/2016. 6 | // Copyright © 2016 Karthik. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | static inline NSArray *formatSelectionLines(NSArray *sourceLines, NSString* text) { 12 | 13 | NSMutableArray *lines = [[NSMutableArray alloc] initWithArray:sourceLines]; 14 | 15 | // Let's assume all header files start with an #import, #include, @import, 16 | // import. 17 | NSString *traditionalImportPrefix = @"#import"; 18 | NSString *frameworkImportPrefix = @"@import"; 19 | NSString *traditionalIncludePrefix = @"#include"; 20 | NSString *swiftPrefix = @"import"; 21 | __block BOOL isSwift = NO; 22 | // Position of the first and last line of header, to be used for repalcement 23 | // of header content. 24 | NSInteger __block initalIndex = -1; 25 | NSInteger __block lastIndex = -1; 26 | BOOL __block endOfFileWithNewLine = YES; // Indicates if the selection's last 27 | // line was a new line. 28 | NSMutableArray *headerRows = [[NSMutableArray alloc] init]; 29 | 30 | // Go through each of the line and identify any header elements. 31 | [lines enumerateObjectsUsingBlock:^(NSString *string, NSUInteger idx, 32 | BOOL *_Nonnull stop) { 33 | NSString *cleansedLine = 34 | [string stringByTrimmingCharactersInSet: 35 | [NSCharacterSet whitespaceAndNewlineCharacterSet]]; 36 | 37 | BOOL isLineHeader = [cleansedLine hasPrefix:traditionalImportPrefix] || 38 | [cleansedLine hasPrefix:traditionalIncludePrefix] || 39 | [cleansedLine hasPrefix:frameworkImportPrefix] || 40 | [cleansedLine hasPrefix:swiftPrefix]; 41 | isSwift = [cleansedLine hasPrefix:swiftPrefix]; 42 | // If the line is a header and no header element has been detected so far, 43 | // mark this as the start of the header segment. 44 | if (isLineHeader && initalIndex < 0) { 45 | initalIndex = idx; 46 | } else if (initalIndex >= 0 && !(isLineHeader || ![cleansedLine length])) { 47 | // If the inital index has been set AND the line is not a header or a new 48 | // line, then this is to be marked as the end of header segment and 49 | // enumeration has to be stopped. 50 | lastIndex = idx; 51 | *stop = YES; 52 | } 53 | 54 | if (initalIndex >= 0 && lastIndex < 0) { 55 | // If the inital index is already set and we are in this condition it 56 | // means we are parsing the header. Check for duplicates and ensure that 57 | // it is not a new line and then add to the header rows array. 58 | if (![headerRows containsObject:[cleansedLine stringByAppendingString:@"\n"]] && 59 | [cleansedLine length]) { 60 | cleansedLine = [cleansedLine stringByAppendingString:@"\n"]; 61 | [headerRows addObject:cleansedLine]; 62 | } 63 | } 64 | 65 | // Reached the end of the selection or a file. (In case of a selection or a 66 | // header only file) 67 | if (idx >= lines.count - 1) { 68 | lastIndex = idx + 1; 69 | 70 | // If the end was a header and not a new line and also marked the end of 71 | // selection, a new line would look odd. 72 | if ([cleansedLine length]) { 73 | endOfFileWithNewLine = NO; 74 | } 75 | } 76 | }]; 77 | 78 | // If both the indices are set it means that we have a header section in the 79 | // file and it needs replacing after sorting. 80 | if (lastIndex >= 0 && initalIndex >= 0) { 81 | [headerRows sortUsingSelector:@selector(localizedCaseInsensitiveCompare:)]; 82 | // Add a new line to make it look clean (if needed, if only header is selected then don't) 83 | // This is a flawed logic, but cannot think of a perfect way to do it right now. 84 | if (endOfFileWithNewLine && !(headerRows.count == lines.count)) { 85 | [headerRows addObject:@"\n"]; 86 | } else if((headerRows.count == lines.count) && headerRows.count) { 87 | // Avoid extra line if one selects only the header and keeps sorting them. 88 | NSString *lastHeader = [headerRows lastObject]; 89 | lastHeader = [lastHeader stringByReplacingOccurrencesOfString:@"\n" withString:@""]; 90 | [headerRows replaceObjectAtIndex:headerRows.count - 1 withObject:lastHeader]; 91 | } 92 | // replace it in the array of all lines. 93 | 94 | NSString *newImport; 95 | if (isSwift) { 96 | newImport = [NSString stringWithFormat:@"import %@",text?:@"<#newImport#>"]; 97 | } else 98 | { 99 | newImport = [NSString stringWithFormat:@"#import \"%@.h\"",text?:@"<#newImport#>"]; 100 | } 101 | 102 | [headerRows addObject:newImport]; 103 | [lines replaceObjectsInRange:NSMakeRange(initalIndex, 104 | (lastIndex - initalIndex)) 105 | withObjectsFromArray:headerRows]; 106 | } 107 | 108 | return lines; 109 | } 110 | 111 | static inline NSString *formatSelection(NSString *content) { 112 | 113 | // Convert the entire source into an array based on new lines. 114 | // Hence the imports have to be alteast in new line to work. 115 | return [formatSelectionLines([content componentsSeparatedByString:@"\n"],nil) 116 | componentsJoinedByString:@""]; 117 | } 118 | -------------------------------------------------------------------------------- /AutoImport.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F31A71591FE910F7001F1E76 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F31A71581FE910F7001F1E76 /* AppDelegate.m */; }; 11 | F31A715C1FE910F7001F1E76 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F31A715B1FE910F7001F1E76 /* ViewController.m */; }; 12 | F31A715E1FE910F7001F1E76 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F31A715D1FE910F7001F1E76 /* Assets.xcassets */; }; 13 | F31A71611FE910F7001F1E76 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F31A715F1FE910F7001F1E76 /* Main.storyboard */; }; 14 | F31A71641FE910F7001F1E76 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F31A71631FE910F7001F1E76 /* main.m */; }; 15 | F31A716F1FE910F7001F1E76 /* AutoImportTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F31A716E1FE910F7001F1E76 /* AutoImportTests.m */; }; 16 | F31A717A1FE910F8001F1E76 /* AutoImportUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F31A71791FE910F8001F1E76 /* AutoImportUITests.m */; }; 17 | F31A718E1FE9114C001F1E76 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F31A718D1FE9114C001F1E76 /* Cocoa.framework */; }; 18 | F31A71921FE9114C001F1E76 /* SourceEditorExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = F31A71911FE9114C001F1E76 /* SourceEditorExtension.m */; }; 19 | F31A71951FE9114C001F1E76 /* SourceEditorCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = F31A71941FE9114C001F1E76 /* SourceEditorCommand.m */; }; 20 | F31A719A1FE9114C001F1E76 /* AutoImportHeader.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = F31A718B1FE9114C001F1E76 /* AutoImportHeader.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 21 | F31A71A41FE9117D001F1E76 /* xTextModifier.m in Sources */ = {isa = PBXBuildFile; fileRef = F31A719F1FE9117D001F1E76 /* xTextModifier.m */; }; 22 | F31A71A51FE9117D001F1E76 /* xTextMatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = F31A71A01FE9117D001F1E76 /* xTextMatcher.m */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | F31A716B1FE910F7001F1E76 /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = F31A714C1FE910F7001F1E76 /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = F31A71531FE910F7001F1E76; 31 | remoteInfo = AutoImport; 32 | }; 33 | F31A71761FE910F8001F1E76 /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = F31A714C1FE910F7001F1E76 /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = F31A71531FE910F7001F1E76; 38 | remoteInfo = AutoImport; 39 | }; 40 | F31A71981FE9114C001F1E76 /* PBXContainerItemProxy */ = { 41 | isa = PBXContainerItemProxy; 42 | containerPortal = F31A714C1FE910F7001F1E76 /* Project object */; 43 | proxyType = 1; 44 | remoteGlobalIDString = F31A718A1FE9114C001F1E76; 45 | remoteInfo = AutoImportHeader; 46 | }; 47 | /* End PBXContainerItemProxy section */ 48 | 49 | /* Begin PBXCopyFilesBuildPhase section */ 50 | F31A719E1FE9114C001F1E76 /* Embed App Extensions */ = { 51 | isa = PBXCopyFilesBuildPhase; 52 | buildActionMask = 2147483647; 53 | dstPath = ""; 54 | dstSubfolderSpec = 13; 55 | files = ( 56 | F31A719A1FE9114C001F1E76 /* AutoImportHeader.appex in Embed App Extensions */, 57 | ); 58 | name = "Embed App Extensions"; 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXCopyFilesBuildPhase section */ 62 | 63 | /* Begin PBXFileReference section */ 64 | F31A71541FE910F7001F1E76 /* AutoImport.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AutoImport.app; sourceTree = BUILT_PRODUCTS_DIR; }; 65 | F31A71571FE910F7001F1E76 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 66 | F31A71581FE910F7001F1E76 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 67 | F31A715A1FE910F7001F1E76 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 68 | F31A715B1FE910F7001F1E76 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 69 | F31A715D1FE910F7001F1E76 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 70 | F31A71601FE910F7001F1E76 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 71 | F31A71621FE910F7001F1E76 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 72 | F31A71631FE910F7001F1E76 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 73 | F31A71651FE910F7001F1E76 /* AutoImport.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AutoImport.entitlements; sourceTree = ""; }; 74 | F31A716A1FE910F7001F1E76 /* AutoImportTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AutoImportTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | F31A716E1FE910F7001F1E76 /* AutoImportTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AutoImportTests.m; sourceTree = ""; }; 76 | F31A71701FE910F7001F1E76 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 77 | F31A71751FE910F8001F1E76 /* AutoImportUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AutoImportUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 78 | F31A71791FE910F8001F1E76 /* AutoImportUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AutoImportUITests.m; sourceTree = ""; }; 79 | F31A717B1FE910F8001F1E76 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 80 | F31A718B1FE9114C001F1E76 /* AutoImportHeader.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = AutoImportHeader.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 81 | F31A718D1FE9114C001F1E76 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 82 | F31A71901FE9114C001F1E76 /* SourceEditorExtension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SourceEditorExtension.h; sourceTree = ""; }; 83 | F31A71911FE9114C001F1E76 /* SourceEditorExtension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SourceEditorExtension.m; sourceTree = ""; }; 84 | F31A71931FE9114C001F1E76 /* SourceEditorCommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SourceEditorCommand.h; sourceTree = ""; }; 85 | F31A71941FE9114C001F1E76 /* SourceEditorCommand.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SourceEditorCommand.m; sourceTree = ""; }; 86 | F31A71961FE9114C001F1E76 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 87 | F31A71971FE9114C001F1E76 /* AutoImportHeader.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AutoImportHeader.entitlements; sourceTree = ""; }; 88 | F31A719F1FE9117D001F1E76 /* xTextModifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = xTextModifier.m; sourceTree = ""; }; 89 | F31A71A01FE9117D001F1E76 /* xTextMatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = xTextMatcher.m; sourceTree = ""; }; 90 | F31A71A11FE9117D001F1E76 /* xTextMatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xTextMatcher.h; sourceTree = ""; }; 91 | F31A71A21FE9117D001F1E76 /* xTextModifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xTextModifier.h; sourceTree = ""; }; 92 | F31A71A31FE9117D001F1E76 /* SortHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SortHeader.h; sourceTree = ""; }; 93 | /* End PBXFileReference section */ 94 | 95 | /* Begin PBXFrameworksBuildPhase section */ 96 | F31A71511FE910F7001F1E76 /* Frameworks */ = { 97 | isa = PBXFrameworksBuildPhase; 98 | buildActionMask = 2147483647; 99 | files = ( 100 | ); 101 | runOnlyForDeploymentPostprocessing = 0; 102 | }; 103 | F31A71671FE910F7001F1E76 /* Frameworks */ = { 104 | isa = PBXFrameworksBuildPhase; 105 | buildActionMask = 2147483647; 106 | files = ( 107 | ); 108 | runOnlyForDeploymentPostprocessing = 0; 109 | }; 110 | F31A71721FE910F8001F1E76 /* Frameworks */ = { 111 | isa = PBXFrameworksBuildPhase; 112 | buildActionMask = 2147483647; 113 | files = ( 114 | ); 115 | runOnlyForDeploymentPostprocessing = 0; 116 | }; 117 | F31A71881FE9114C001F1E76 /* Frameworks */ = { 118 | isa = PBXFrameworksBuildPhase; 119 | buildActionMask = 2147483647; 120 | files = ( 121 | F31A718E1FE9114C001F1E76 /* Cocoa.framework in Frameworks */, 122 | ); 123 | runOnlyForDeploymentPostprocessing = 0; 124 | }; 125 | /* End PBXFrameworksBuildPhase section */ 126 | 127 | /* Begin PBXGroup section */ 128 | F31A714B1FE910F7001F1E76 = { 129 | isa = PBXGroup; 130 | children = ( 131 | F31A71561FE910F7001F1E76 /* AutoImport */, 132 | F31A716D1FE910F7001F1E76 /* AutoImportTests */, 133 | F31A71781FE910F8001F1E76 /* AutoImportUITests */, 134 | F31A718F1FE9114C001F1E76 /* AutoImportHeader */, 135 | F31A718C1FE9114C001F1E76 /* Frameworks */, 136 | F31A71551FE910F7001F1E76 /* Products */, 137 | ); 138 | sourceTree = ""; 139 | }; 140 | F31A71551FE910F7001F1E76 /* Products */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | F31A71541FE910F7001F1E76 /* AutoImport.app */, 144 | F31A716A1FE910F7001F1E76 /* AutoImportTests.xctest */, 145 | F31A71751FE910F8001F1E76 /* AutoImportUITests.xctest */, 146 | F31A718B1FE9114C001F1E76 /* AutoImportHeader.appex */, 147 | ); 148 | name = Products; 149 | sourceTree = ""; 150 | }; 151 | F31A71561FE910F7001F1E76 /* AutoImport */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | F31A71571FE910F7001F1E76 /* AppDelegate.h */, 155 | F31A71581FE910F7001F1E76 /* AppDelegate.m */, 156 | F31A715A1FE910F7001F1E76 /* ViewController.h */, 157 | F31A715B1FE910F7001F1E76 /* ViewController.m */, 158 | F31A715D1FE910F7001F1E76 /* Assets.xcassets */, 159 | F31A715F1FE910F7001F1E76 /* Main.storyboard */, 160 | F31A71621FE910F7001F1E76 /* Info.plist */, 161 | F31A71631FE910F7001F1E76 /* main.m */, 162 | F31A71651FE910F7001F1E76 /* AutoImport.entitlements */, 163 | ); 164 | path = AutoImport; 165 | sourceTree = ""; 166 | }; 167 | F31A716D1FE910F7001F1E76 /* AutoImportTests */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | F31A716E1FE910F7001F1E76 /* AutoImportTests.m */, 171 | F31A71701FE910F7001F1E76 /* Info.plist */, 172 | ); 173 | path = AutoImportTests; 174 | sourceTree = ""; 175 | }; 176 | F31A71781FE910F8001F1E76 /* AutoImportUITests */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | F31A71791FE910F8001F1E76 /* AutoImportUITests.m */, 180 | F31A717B1FE910F8001F1E76 /* Info.plist */, 181 | ); 182 | path = AutoImportUITests; 183 | sourceTree = ""; 184 | }; 185 | F31A718C1FE9114C001F1E76 /* Frameworks */ = { 186 | isa = PBXGroup; 187 | children = ( 188 | F31A718D1FE9114C001F1E76 /* Cocoa.framework */, 189 | ); 190 | name = Frameworks; 191 | sourceTree = ""; 192 | }; 193 | F31A718F1FE9114C001F1E76 /* AutoImportHeader */ = { 194 | isa = PBXGroup; 195 | children = ( 196 | F31A71A31FE9117D001F1E76 /* SortHeader.h */, 197 | F31A71A11FE9117D001F1E76 /* xTextMatcher.h */, 198 | F31A71A01FE9117D001F1E76 /* xTextMatcher.m */, 199 | F31A71A21FE9117D001F1E76 /* xTextModifier.h */, 200 | F31A719F1FE9117D001F1E76 /* xTextModifier.m */, 201 | F31A71901FE9114C001F1E76 /* SourceEditorExtension.h */, 202 | F31A71911FE9114C001F1E76 /* SourceEditorExtension.m */, 203 | F31A71931FE9114C001F1E76 /* SourceEditorCommand.h */, 204 | F31A71941FE9114C001F1E76 /* SourceEditorCommand.m */, 205 | F31A71961FE9114C001F1E76 /* Info.plist */, 206 | F31A71971FE9114C001F1E76 /* AutoImportHeader.entitlements */, 207 | ); 208 | path = AutoImportHeader; 209 | sourceTree = ""; 210 | }; 211 | /* End PBXGroup section */ 212 | 213 | /* Begin PBXNativeTarget section */ 214 | F31A71531FE910F7001F1E76 /* AutoImport */ = { 215 | isa = PBXNativeTarget; 216 | buildConfigurationList = F31A717E1FE910F8001F1E76 /* Build configuration list for PBXNativeTarget "AutoImport" */; 217 | buildPhases = ( 218 | F31A71501FE910F7001F1E76 /* Sources */, 219 | F31A71511FE910F7001F1E76 /* Frameworks */, 220 | F31A71521FE910F7001F1E76 /* Resources */, 221 | F31A719E1FE9114C001F1E76 /* Embed App Extensions */, 222 | ); 223 | buildRules = ( 224 | ); 225 | dependencies = ( 226 | F31A71991FE9114C001F1E76 /* PBXTargetDependency */, 227 | ); 228 | name = AutoImport; 229 | productName = AutoImport; 230 | productReference = F31A71541FE910F7001F1E76 /* AutoImport.app */; 231 | productType = "com.apple.product-type.application"; 232 | }; 233 | F31A71691FE910F7001F1E76 /* AutoImportTests */ = { 234 | isa = PBXNativeTarget; 235 | buildConfigurationList = F31A71811FE910F8001F1E76 /* Build configuration list for PBXNativeTarget "AutoImportTests" */; 236 | buildPhases = ( 237 | F31A71661FE910F7001F1E76 /* Sources */, 238 | F31A71671FE910F7001F1E76 /* Frameworks */, 239 | F31A71681FE910F7001F1E76 /* Resources */, 240 | ); 241 | buildRules = ( 242 | ); 243 | dependencies = ( 244 | F31A716C1FE910F7001F1E76 /* PBXTargetDependency */, 245 | ); 246 | name = AutoImportTests; 247 | productName = AutoImportTests; 248 | productReference = F31A716A1FE910F7001F1E76 /* AutoImportTests.xctest */; 249 | productType = "com.apple.product-type.bundle.unit-test"; 250 | }; 251 | F31A71741FE910F8001F1E76 /* AutoImportUITests */ = { 252 | isa = PBXNativeTarget; 253 | buildConfigurationList = F31A71841FE910F8001F1E76 /* Build configuration list for PBXNativeTarget "AutoImportUITests" */; 254 | buildPhases = ( 255 | F31A71711FE910F8001F1E76 /* Sources */, 256 | F31A71721FE910F8001F1E76 /* Frameworks */, 257 | F31A71731FE910F8001F1E76 /* Resources */, 258 | ); 259 | buildRules = ( 260 | ); 261 | dependencies = ( 262 | F31A71771FE910F8001F1E76 /* PBXTargetDependency */, 263 | ); 264 | name = AutoImportUITests; 265 | productName = AutoImportUITests; 266 | productReference = F31A71751FE910F8001F1E76 /* AutoImportUITests.xctest */; 267 | productType = "com.apple.product-type.bundle.ui-testing"; 268 | }; 269 | F31A718A1FE9114C001F1E76 /* AutoImportHeader */ = { 270 | isa = PBXNativeTarget; 271 | buildConfigurationList = F31A719B1FE9114C001F1E76 /* Build configuration list for PBXNativeTarget "AutoImportHeader" */; 272 | buildPhases = ( 273 | F31A71871FE9114C001F1E76 /* Sources */, 274 | F31A71881FE9114C001F1E76 /* Frameworks */, 275 | F31A71891FE9114C001F1E76 /* Resources */, 276 | ); 277 | buildRules = ( 278 | ); 279 | dependencies = ( 280 | ); 281 | name = AutoImportHeader; 282 | productName = AutoImportHeader; 283 | productReference = F31A718B1FE9114C001F1E76 /* AutoImportHeader.appex */; 284 | productType = "com.apple.product-type.xcode-extension"; 285 | }; 286 | /* End PBXNativeTarget section */ 287 | 288 | /* Begin PBXProject section */ 289 | F31A714C1FE910F7001F1E76 /* Project object */ = { 290 | isa = PBXProject; 291 | attributes = { 292 | LastUpgradeCheck = 0920; 293 | ORGANIZATIONNAME = hhfa; 294 | TargetAttributes = { 295 | F31A71531FE910F7001F1E76 = { 296 | CreatedOnToolsVersion = 9.2; 297 | ProvisioningStyle = Automatic; 298 | }; 299 | F31A71691FE910F7001F1E76 = { 300 | CreatedOnToolsVersion = 9.2; 301 | ProvisioningStyle = Automatic; 302 | TestTargetID = F31A71531FE910F7001F1E76; 303 | }; 304 | F31A71741FE910F8001F1E76 = { 305 | CreatedOnToolsVersion = 9.2; 306 | ProvisioningStyle = Automatic; 307 | TestTargetID = F31A71531FE910F7001F1E76; 308 | }; 309 | F31A718A1FE9114C001F1E76 = { 310 | CreatedOnToolsVersion = 9.2; 311 | ProvisioningStyle = Automatic; 312 | }; 313 | }; 314 | }; 315 | buildConfigurationList = F31A714F1FE910F7001F1E76 /* Build configuration list for PBXProject "AutoImport" */; 316 | compatibilityVersion = "Xcode 8.0"; 317 | developmentRegion = en; 318 | hasScannedForEncodings = 0; 319 | knownRegions = ( 320 | en, 321 | Base, 322 | ); 323 | mainGroup = F31A714B1FE910F7001F1E76; 324 | productRefGroup = F31A71551FE910F7001F1E76 /* Products */; 325 | projectDirPath = ""; 326 | projectRoot = ""; 327 | targets = ( 328 | F31A71531FE910F7001F1E76 /* AutoImport */, 329 | F31A71691FE910F7001F1E76 /* AutoImportTests */, 330 | F31A71741FE910F8001F1E76 /* AutoImportUITests */, 331 | F31A718A1FE9114C001F1E76 /* AutoImportHeader */, 332 | ); 333 | }; 334 | /* End PBXProject section */ 335 | 336 | /* Begin PBXResourcesBuildPhase section */ 337 | F31A71521FE910F7001F1E76 /* Resources */ = { 338 | isa = PBXResourcesBuildPhase; 339 | buildActionMask = 2147483647; 340 | files = ( 341 | F31A715E1FE910F7001F1E76 /* Assets.xcassets in Resources */, 342 | F31A71611FE910F7001F1E76 /* Main.storyboard in Resources */, 343 | ); 344 | runOnlyForDeploymentPostprocessing = 0; 345 | }; 346 | F31A71681FE910F7001F1E76 /* Resources */ = { 347 | isa = PBXResourcesBuildPhase; 348 | buildActionMask = 2147483647; 349 | files = ( 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | }; 353 | F31A71731FE910F8001F1E76 /* Resources */ = { 354 | isa = PBXResourcesBuildPhase; 355 | buildActionMask = 2147483647; 356 | files = ( 357 | ); 358 | runOnlyForDeploymentPostprocessing = 0; 359 | }; 360 | F31A71891FE9114C001F1E76 /* Resources */ = { 361 | isa = PBXResourcesBuildPhase; 362 | buildActionMask = 2147483647; 363 | files = ( 364 | ); 365 | runOnlyForDeploymentPostprocessing = 0; 366 | }; 367 | /* End PBXResourcesBuildPhase section */ 368 | 369 | /* Begin PBXSourcesBuildPhase section */ 370 | F31A71501FE910F7001F1E76 /* Sources */ = { 371 | isa = PBXSourcesBuildPhase; 372 | buildActionMask = 2147483647; 373 | files = ( 374 | F31A715C1FE910F7001F1E76 /* ViewController.m in Sources */, 375 | F31A71641FE910F7001F1E76 /* main.m in Sources */, 376 | F31A71591FE910F7001F1E76 /* AppDelegate.m in Sources */, 377 | ); 378 | runOnlyForDeploymentPostprocessing = 0; 379 | }; 380 | F31A71661FE910F7001F1E76 /* Sources */ = { 381 | isa = PBXSourcesBuildPhase; 382 | buildActionMask = 2147483647; 383 | files = ( 384 | F31A716F1FE910F7001F1E76 /* AutoImportTests.m in Sources */, 385 | ); 386 | runOnlyForDeploymentPostprocessing = 0; 387 | }; 388 | F31A71711FE910F8001F1E76 /* Sources */ = { 389 | isa = PBXSourcesBuildPhase; 390 | buildActionMask = 2147483647; 391 | files = ( 392 | F31A717A1FE910F8001F1E76 /* AutoImportUITests.m in Sources */, 393 | ); 394 | runOnlyForDeploymentPostprocessing = 0; 395 | }; 396 | F31A71871FE9114C001F1E76 /* Sources */ = { 397 | isa = PBXSourcesBuildPhase; 398 | buildActionMask = 2147483647; 399 | files = ( 400 | F31A71A41FE9117D001F1E76 /* xTextModifier.m in Sources */, 401 | F31A71921FE9114C001F1E76 /* SourceEditorExtension.m in Sources */, 402 | F31A71A51FE9117D001F1E76 /* xTextMatcher.m in Sources */, 403 | F31A71951FE9114C001F1E76 /* SourceEditorCommand.m in Sources */, 404 | ); 405 | runOnlyForDeploymentPostprocessing = 0; 406 | }; 407 | /* End PBXSourcesBuildPhase section */ 408 | 409 | /* Begin PBXTargetDependency section */ 410 | F31A716C1FE910F7001F1E76 /* PBXTargetDependency */ = { 411 | isa = PBXTargetDependency; 412 | target = F31A71531FE910F7001F1E76 /* AutoImport */; 413 | targetProxy = F31A716B1FE910F7001F1E76 /* PBXContainerItemProxy */; 414 | }; 415 | F31A71771FE910F8001F1E76 /* PBXTargetDependency */ = { 416 | isa = PBXTargetDependency; 417 | target = F31A71531FE910F7001F1E76 /* AutoImport */; 418 | targetProxy = F31A71761FE910F8001F1E76 /* PBXContainerItemProxy */; 419 | }; 420 | F31A71991FE9114C001F1E76 /* PBXTargetDependency */ = { 421 | isa = PBXTargetDependency; 422 | target = F31A718A1FE9114C001F1E76 /* AutoImportHeader */; 423 | targetProxy = F31A71981FE9114C001F1E76 /* PBXContainerItemProxy */; 424 | }; 425 | /* End PBXTargetDependency section */ 426 | 427 | /* Begin PBXVariantGroup section */ 428 | F31A715F1FE910F7001F1E76 /* Main.storyboard */ = { 429 | isa = PBXVariantGroup; 430 | children = ( 431 | F31A71601FE910F7001F1E76 /* Base */, 432 | ); 433 | name = Main.storyboard; 434 | sourceTree = ""; 435 | }; 436 | /* End PBXVariantGroup section */ 437 | 438 | /* Begin XCBuildConfiguration section */ 439 | F31A717C1FE910F8001F1E76 /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | buildSettings = { 442 | ALWAYS_SEARCH_USER_PATHS = NO; 443 | CLANG_ANALYZER_NONNULL = YES; 444 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 445 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 446 | CLANG_CXX_LIBRARY = "libc++"; 447 | CLANG_ENABLE_MODULES = YES; 448 | CLANG_ENABLE_OBJC_ARC = YES; 449 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 450 | CLANG_WARN_BOOL_CONVERSION = YES; 451 | CLANG_WARN_COMMA = YES; 452 | CLANG_WARN_CONSTANT_CONVERSION = YES; 453 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 454 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 455 | CLANG_WARN_EMPTY_BODY = YES; 456 | CLANG_WARN_ENUM_CONVERSION = YES; 457 | CLANG_WARN_INFINITE_RECURSION = YES; 458 | CLANG_WARN_INT_CONVERSION = YES; 459 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 460 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 461 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 462 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 463 | CLANG_WARN_STRICT_PROTOTYPES = YES; 464 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 465 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 466 | CLANG_WARN_UNREACHABLE_CODE = YES; 467 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 468 | CODE_SIGN_IDENTITY = "Mac Developer"; 469 | COPY_PHASE_STRIP = NO; 470 | DEBUG_INFORMATION_FORMAT = dwarf; 471 | ENABLE_STRICT_OBJC_MSGSEND = YES; 472 | ENABLE_TESTABILITY = YES; 473 | GCC_C_LANGUAGE_STANDARD = gnu11; 474 | GCC_DYNAMIC_NO_PIC = NO; 475 | GCC_NO_COMMON_BLOCKS = YES; 476 | GCC_OPTIMIZATION_LEVEL = 0; 477 | GCC_PREPROCESSOR_DEFINITIONS = ( 478 | "DEBUG=1", 479 | "$(inherited)", 480 | ); 481 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 482 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 483 | GCC_WARN_UNDECLARED_SELECTOR = YES; 484 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 485 | GCC_WARN_UNUSED_FUNCTION = YES; 486 | GCC_WARN_UNUSED_VARIABLE = YES; 487 | MACOSX_DEPLOYMENT_TARGET = 10.13; 488 | MTL_ENABLE_DEBUG_INFO = YES; 489 | ONLY_ACTIVE_ARCH = YES; 490 | SDKROOT = macosx; 491 | }; 492 | name = Debug; 493 | }; 494 | F31A717D1FE910F8001F1E76 /* Release */ = { 495 | isa = XCBuildConfiguration; 496 | buildSettings = { 497 | ALWAYS_SEARCH_USER_PATHS = NO; 498 | CLANG_ANALYZER_NONNULL = YES; 499 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 500 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 501 | CLANG_CXX_LIBRARY = "libc++"; 502 | CLANG_ENABLE_MODULES = YES; 503 | CLANG_ENABLE_OBJC_ARC = YES; 504 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 505 | CLANG_WARN_BOOL_CONVERSION = YES; 506 | CLANG_WARN_COMMA = YES; 507 | CLANG_WARN_CONSTANT_CONVERSION = YES; 508 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 509 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 510 | CLANG_WARN_EMPTY_BODY = YES; 511 | CLANG_WARN_ENUM_CONVERSION = YES; 512 | CLANG_WARN_INFINITE_RECURSION = YES; 513 | CLANG_WARN_INT_CONVERSION = YES; 514 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 515 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 516 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 517 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 518 | CLANG_WARN_STRICT_PROTOTYPES = YES; 519 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 520 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 521 | CLANG_WARN_UNREACHABLE_CODE = YES; 522 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 523 | CODE_SIGN_IDENTITY = "Mac Developer"; 524 | COPY_PHASE_STRIP = NO; 525 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 526 | ENABLE_NS_ASSERTIONS = NO; 527 | ENABLE_STRICT_OBJC_MSGSEND = YES; 528 | GCC_C_LANGUAGE_STANDARD = gnu11; 529 | GCC_NO_COMMON_BLOCKS = YES; 530 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 531 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 532 | GCC_WARN_UNDECLARED_SELECTOR = YES; 533 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 534 | GCC_WARN_UNUSED_FUNCTION = YES; 535 | GCC_WARN_UNUSED_VARIABLE = YES; 536 | MACOSX_DEPLOYMENT_TARGET = 10.13; 537 | MTL_ENABLE_DEBUG_INFO = NO; 538 | SDKROOT = macosx; 539 | }; 540 | name = Release; 541 | }; 542 | F31A717F1FE910F8001F1E76 /* Debug */ = { 543 | isa = XCBuildConfiguration; 544 | buildSettings = { 545 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 546 | CODE_SIGN_ENTITLEMENTS = AutoImport/AutoImport.entitlements; 547 | CODE_SIGN_STYLE = Automatic; 548 | COMBINE_HIDPI_IMAGES = YES; 549 | DEVELOPMENT_TEAM = 33Z285F3D8; 550 | INFOPLIST_FILE = AutoImport/Info.plist; 551 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 552 | PRODUCT_BUNDLE_IDENTIFIER = hhfa.AutoImport; 553 | PRODUCT_NAME = "$(TARGET_NAME)"; 554 | }; 555 | name = Debug; 556 | }; 557 | F31A71801FE910F8001F1E76 /* Release */ = { 558 | isa = XCBuildConfiguration; 559 | buildSettings = { 560 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 561 | CODE_SIGN_ENTITLEMENTS = AutoImport/AutoImport.entitlements; 562 | CODE_SIGN_STYLE = Automatic; 563 | COMBINE_HIDPI_IMAGES = YES; 564 | DEVELOPMENT_TEAM = 33Z285F3D8; 565 | INFOPLIST_FILE = AutoImport/Info.plist; 566 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 567 | PRODUCT_BUNDLE_IDENTIFIER = hhfa.AutoImport; 568 | PRODUCT_NAME = "$(TARGET_NAME)"; 569 | }; 570 | name = Release; 571 | }; 572 | F31A71821FE910F8001F1E76 /* Debug */ = { 573 | isa = XCBuildConfiguration; 574 | buildSettings = { 575 | BUNDLE_LOADER = "$(TEST_HOST)"; 576 | CODE_SIGN_STYLE = Automatic; 577 | COMBINE_HIDPI_IMAGES = YES; 578 | DEVELOPMENT_TEAM = 33Z285F3D8; 579 | INFOPLIST_FILE = AutoImportTests/Info.plist; 580 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 581 | PRODUCT_BUNDLE_IDENTIFIER = hhfa.AutoImportTests; 582 | PRODUCT_NAME = "$(TARGET_NAME)"; 583 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AutoImport.app/Contents/MacOS/AutoImport"; 584 | }; 585 | name = Debug; 586 | }; 587 | F31A71831FE910F8001F1E76 /* Release */ = { 588 | isa = XCBuildConfiguration; 589 | buildSettings = { 590 | BUNDLE_LOADER = "$(TEST_HOST)"; 591 | CODE_SIGN_STYLE = Automatic; 592 | COMBINE_HIDPI_IMAGES = YES; 593 | DEVELOPMENT_TEAM = 33Z285F3D8; 594 | INFOPLIST_FILE = AutoImportTests/Info.plist; 595 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 596 | PRODUCT_BUNDLE_IDENTIFIER = hhfa.AutoImportTests; 597 | PRODUCT_NAME = "$(TARGET_NAME)"; 598 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AutoImport.app/Contents/MacOS/AutoImport"; 599 | }; 600 | name = Release; 601 | }; 602 | F31A71851FE910F8001F1E76 /* Debug */ = { 603 | isa = XCBuildConfiguration; 604 | buildSettings = { 605 | CODE_SIGN_STYLE = Automatic; 606 | COMBINE_HIDPI_IMAGES = YES; 607 | DEVELOPMENT_TEAM = 33Z285F3D8; 608 | INFOPLIST_FILE = AutoImportUITests/Info.plist; 609 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 610 | PRODUCT_BUNDLE_IDENTIFIER = hhfa.AutoImportUITests; 611 | PRODUCT_NAME = "$(TARGET_NAME)"; 612 | TEST_TARGET_NAME = AutoImport; 613 | }; 614 | name = Debug; 615 | }; 616 | F31A71861FE910F8001F1E76 /* Release */ = { 617 | isa = XCBuildConfiguration; 618 | buildSettings = { 619 | CODE_SIGN_STYLE = Automatic; 620 | COMBINE_HIDPI_IMAGES = YES; 621 | DEVELOPMENT_TEAM = 33Z285F3D8; 622 | INFOPLIST_FILE = AutoImportUITests/Info.plist; 623 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 624 | PRODUCT_BUNDLE_IDENTIFIER = hhfa.AutoImportUITests; 625 | PRODUCT_NAME = "$(TARGET_NAME)"; 626 | TEST_TARGET_NAME = AutoImport; 627 | }; 628 | name = Release; 629 | }; 630 | F31A719C1FE9114C001F1E76 /* Debug */ = { 631 | isa = XCBuildConfiguration; 632 | buildSettings = { 633 | CODE_SIGN_ENTITLEMENTS = AutoImportHeader/AutoImportHeader.entitlements; 634 | CODE_SIGN_STYLE = Automatic; 635 | COMBINE_HIDPI_IMAGES = YES; 636 | DEVELOPMENT_TEAM = 33Z285F3D8; 637 | INFOPLIST_FILE = AutoImportHeader/Info.plist; 638 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; 639 | PRODUCT_BUNDLE_IDENTIFIER = hhfa.AutoImport.AutoImportHeader; 640 | PRODUCT_NAME = "$(TARGET_NAME)"; 641 | SKIP_INSTALL = YES; 642 | }; 643 | name = Debug; 644 | }; 645 | F31A719D1FE9114C001F1E76 /* Release */ = { 646 | isa = XCBuildConfiguration; 647 | buildSettings = { 648 | CODE_SIGN_ENTITLEMENTS = AutoImportHeader/AutoImportHeader.entitlements; 649 | CODE_SIGN_STYLE = Automatic; 650 | COMBINE_HIDPI_IMAGES = YES; 651 | DEVELOPMENT_TEAM = 33Z285F3D8; 652 | INFOPLIST_FILE = AutoImportHeader/Info.plist; 653 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; 654 | PRODUCT_BUNDLE_IDENTIFIER = hhfa.AutoImport.AutoImportHeader; 655 | PRODUCT_NAME = "$(TARGET_NAME)"; 656 | SKIP_INSTALL = YES; 657 | }; 658 | name = Release; 659 | }; 660 | /* End XCBuildConfiguration section */ 661 | 662 | /* Begin XCConfigurationList section */ 663 | F31A714F1FE910F7001F1E76 /* Build configuration list for PBXProject "AutoImport" */ = { 664 | isa = XCConfigurationList; 665 | buildConfigurations = ( 666 | F31A717C1FE910F8001F1E76 /* Debug */, 667 | F31A717D1FE910F8001F1E76 /* Release */, 668 | ); 669 | defaultConfigurationIsVisible = 0; 670 | defaultConfigurationName = Release; 671 | }; 672 | F31A717E1FE910F8001F1E76 /* Build configuration list for PBXNativeTarget "AutoImport" */ = { 673 | isa = XCConfigurationList; 674 | buildConfigurations = ( 675 | F31A717F1FE910F8001F1E76 /* Debug */, 676 | F31A71801FE910F8001F1E76 /* Release */, 677 | ); 678 | defaultConfigurationIsVisible = 0; 679 | defaultConfigurationName = Release; 680 | }; 681 | F31A71811FE910F8001F1E76 /* Build configuration list for PBXNativeTarget "AutoImportTests" */ = { 682 | isa = XCConfigurationList; 683 | buildConfigurations = ( 684 | F31A71821FE910F8001F1E76 /* Debug */, 685 | F31A71831FE910F8001F1E76 /* Release */, 686 | ); 687 | defaultConfigurationIsVisible = 0; 688 | defaultConfigurationName = Release; 689 | }; 690 | F31A71841FE910F8001F1E76 /* Build configuration list for PBXNativeTarget "AutoImportUITests" */ = { 691 | isa = XCConfigurationList; 692 | buildConfigurations = ( 693 | F31A71851FE910F8001F1E76 /* Debug */, 694 | F31A71861FE910F8001F1E76 /* Release */, 695 | ); 696 | defaultConfigurationIsVisible = 0; 697 | defaultConfigurationName = Release; 698 | }; 699 | F31A719B1FE9114C001F1E76 /* Build configuration list for PBXNativeTarget "AutoImportHeader" */ = { 700 | isa = XCConfigurationList; 701 | buildConfigurations = ( 702 | F31A719C1FE9114C001F1E76 /* Debug */, 703 | F31A719D1FE9114C001F1E76 /* Release */, 704 | ); 705 | defaultConfigurationIsVisible = 0; 706 | defaultConfigurationName = Release; 707 | }; 708 | /* End XCConfigurationList section */ 709 | }; 710 | rootObject = F31A714C1FE910F7001F1E76 /* Project object */; 711 | } 712 | -------------------------------------------------------------------------------- /AutoImport/Base.lproj/Main.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 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 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 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | Default 529 | 530 | 531 | 532 | 533 | 534 | 535 | Left to Right 536 | 537 | 538 | 539 | 540 | 541 | 542 | Right to Left 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | Default 554 | 555 | 556 | 557 | 558 | 559 | 560 | Left to Right 561 | 562 | 563 | 564 | 565 | 566 | 567 | Right to Left 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 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | --------------------------------------------------------------------------------