master d8d68b0825f5 cached
21 files
43.0 KB
13.4k tokens
1 requests
Download .txt
Repository: shjborage/Reveal-Plugin-for-Xcode
Branch: master
Commit: d8d68b0825f5
Files: 21
Total size: 43.0 KB

Directory structure:
gitextract_j8urf0xo/

├── .gitignore
├── LICENSE
├── README.md
├── RevealPlugin/
│   ├── Resources/
│   │   └── RevealScriptHeader.h
│   ├── RevealIDEModel.h
│   ├── RevealIDEModel.m
│   ├── RevealPlugin-Info.plist
│   ├── RevealPlugin-Prefix.pch
│   ├── RevealPlugin.h
│   ├── RevealPlugin.m
│   ├── Vendors/
│   │   └── Catagories/
│   │       ├── NSView+SQDump.h
│   │       ├── NSView+SQDump.m
│   │       ├── NSView+SQFindSubView.h
│   │       └── NSView+SQFindSubView.m
│   └── en.lproj/
│       └── InfoPlist.strings
├── RevealPlugin.xcodeproj/
│   ├── project.pbxproj
│   ├── project.xcworkspace/
│   │   └── contents.xcworkspacedata
│   └── xcshareddata/
│       └── xcschemes/
│           └── RevealPlugin.xcscheme
└── RevealPlugin_bak/
    ├── Podfile
    ├── RevealPlugin.podspec
    └── RevealPlugin.xcworkspace/
        └── contents.xcworkspacedata

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
# Xcode
.DS_Store
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
*.xccheckout

#CocoaPods
Pods


================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2014 Eric

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

================================================
FILE: README.md
================================================
Reveal-Plugin-for-Xcode
=======================

[![Join the chat at https://gitter.im/shjborage/Reveal-Plugin-for-Xcode](https://badges.gitter.im/shjborage/Reveal-Plugin-for-Xcode.svg)](https://gitter.im/shjborage/Reveal-Plugin-for-Xcode?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Plugin for Xcode to integrate the Reveal App to your project automatic(Without any modifications to your project).

**Please note that plugins are not supported by Xcode 8. See [Here](https://github.com/alcatraz/Alcatraz/issues/475) for more information.**  

## Introduction

**The Reveal Plugin works just like Instruments.**

![ProductMenu](https://github.com/shjborage/Reveal-Plugin-for-Xcode/raw/master/Product-InspectWithReveal.png)

The Reveal app integrates directly into Xcode, so you don't need to add frameworks or modify your project to inspect your app in the iOS Simulator.

If you're in the middle of a debug session and something unexpected happens, you can attach Reveal to see what's going on. No restarting your app, no changing your project. All from inside Xcode.

![DebugMenu](https://github.com/shjborage/Reveal-Plugin-for-Xcode/raw/master/Debug-AttachToReveal.png)

## Install

###Via Alcatraz

Reveal-Plugin-for-XCode is available through the [Alcatraz](http://alcatraz.io/) Xcode plugin management system.

From source

Simply build the Xcode project and restart Xcode. The plugin will automatically install to `~/Library/Application Support/Developer/Shared/Xcode/Plug-ins`.

## Uninstall

To uninstall, just remove the plugin from the above directory, and restart Xcode:

```
rm -rf ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/RevealPlugin.xcplugin
```

Tested on Xcode 5.1 and Mac OS X 10.9.2.

## Plugins upgrade for new Xcode
```
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`
```

## Issue
*	When using `Inspect ith Reveal`, if your simulator can't lanuch within 5 seconds, it's will alert an error. Thus, you can alse use Debug->`Attach to Reveal` after your app launched.

* If the plugin is not successfully loaded, it's possible your Xcode version is not supported, Add the build UUIDs for the versions of Xcode you wish to support to `DVTPlugInCompatibilityUUIDs` in `Info.plist`.

	You can get the UUID with this command `defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`, run it in termial.

## Contributors

Welcome to fork and PullRequest to do this better.
We use issues to manage bugs and enhanced features.

## Thanks

+	[Integrating Reveal without modifying your Xcode project](http://blog.ittybittyapps.com/blog/2013/11/07/integrating-reveal-without-modifying-your-xcode-project/)
+	[Xcode 4 插件制作入门](http://onevcat.com/2013/02/xcode-plugin)


================================================
FILE: RevealPlugin/Resources/RevealScriptHeader.h
================================================
//
//  BuildScriptHeader.h
//  RevealPlugin
//
//  Created by shjborage on 4/3/14.
//  Copyright (c) 2014 Saick. All rights reserved.
//

#ifndef RevealPlugin_BuildScriptHeader_h
#define RevealPlugin_BuildScriptHeader_h

//#define kScriptBuild @"tell application \"Xcode\" \n\
//activate \n\
//open \"{xcodeProjectPath}\" \n\
//end tell \n\
//tell application \"System Events\" \n\
//key code 15 using {command down} \n\
//end tell \n\
//tell application \"Spark Inspector\" \n\
//activate\n\
//end tell"

#define kScriptLaunchReveal @"tell application \"Reveal\" \n\
activate\n\
end tell"

#define kScriptActiveXcode @"tell application \"Xcode\" \n\
activate\n\
end tell"

#endif


================================================
FILE: RevealPlugin/RevealIDEModel.h
================================================
//
//  RevealIDEModel.h
//  RevealPlugin
//
//  Created by shjborage on 4/4/14.
//  Copyright (c) 2014 Saick. All rights reserved.
//

#import <Foundation/Foundation.h>

@class IDEConsoleTextView;

@interface DBGDebugSession : NSObject

- (void)requestStop;
- (void)requestPause;
- (void)requestContinue;

@end

@interface DBGDebugSessionController : NSObject

@property (readonly) DBGDebugSession *debugSession;

@end


@interface IDENavigatorArea : NSObject

@property NSArrayController *extensionsController;
- (id)currentNavigator;

@end


@interface IDEWorkspaceTabController : NSObject

@property (readonly) IDENavigatorArea *navigatorArea;
@property(readonly) IDEWorkspaceTabController *structureEditWorkspaceTabController;

- (void)runActiveRunContext:(id)arg1;

@end


@interface IDEWorkspaceWindowController : NSObject

@property (readonly) IDEWorkspaceTabController *activeWorkspaceTabController;
@property (readonly) DBGDebugSessionController *debugSessionController;

@end

#pragma mark - Reveal IDE Tools

@interface RevealIDEModel : NSObject

+ (IDEWorkspaceTabController *)workspaceControllerIn;

//+ (void)activeIDEWindow;

+ (DBGDebugSession *)debugSessionIn;

+ (IDEConsoleTextView *)whenXcodeConsoleIn;

@end


================================================
FILE: RevealPlugin/RevealIDEModel.m
================================================
//
//  RevealIDEModel.m
//  RevealPlugin
//
//  Created by shjborage on 4/4/14.
//  Copyright (c) 2014 Saick. All rights reserved.
//

#import "RevealIDEModel.h"
#import <objc/message.h>
#import "NSView+SQDump.h"
#import "NSView+SQFindSubView.h"

@implementation RevealIDEModel

+ (IDEWorkspaceTabController *)workspaceControllerIn
{
  NSWindowController *currentWindowController = [[NSApp keyWindow] windowController];
  if ([currentWindowController isKindOfClass:NSClassFromString(@"IDEWorkspaceWindowController")]) {
    IDEWorkspaceWindowController *workspaceController = (IDEWorkspaceWindowController *)currentWindowController;
    
    return workspaceController.activeWorkspaceTabController;
  }
  return nil;
}

//+ (void)activeIDEWindow
//{
//  NSWindowController *currentWindowController = [[NSApp keyWindow] windowController];
//  if ([currentWindowController isKindOfClass:NSClassFromString(@"IDEWorkspaceWindowController")]) {
//    IDEWorkspaceWindowController *workspaceController = (IDEWorkspaceWindowController *)currentWindowController;
//    
//    IDEWorkspaceTabController *activeTabController = workspaceController.activeWorkspaceTabController;
//    [activeTabController performSelectorOnMainThread:@selector(runActiveRunContext:) withObject:nil waitUntilDone:NO];
//  }
//}

+ (DBGDebugSession *)debugSessionIn
{
  IDEWorkspaceTabController *tabController = [self workspaceControllerIn];
  
  if (![tabController respondsToSelector:@selector(debugSessionController)]) {
    return nil;
  } else {
    DBGDebugSessionController *debugSessionController = objc_msgSend(tabController, @selector(debugSessionController));
    if ([debugSessionController respondsToSelector:@selector(debugSession)]) {
      id debugSession = objc_msgSend(debugSessionController, @selector(debugSession));
      if ([NSStringFromClass([debugSession class]) isEqualToString:@"DBGLLDBSession"]) {
        return debugSession;
      } else {
        return nil;
      }
    } else {
      return nil;
    }
  }
}

+ (IDEConsoleTextView *)whenXcodeConsoleIn
{
//  [[[NSApp mainWindow] contentView] dumpWithIndent:@""];
  NSView *consoleView = [[[NSApp mainWindow] contentView] findSubView:NSClassFromString(@"IDEConsoleTextView")];
  
  if (consoleView == nil) {
    // TODO: View->Debug Area->Active Console to get the IDEConsoleTextView
  }
  return (IDEConsoleTextView *)consoleView;
}

@end


================================================
FILE: RevealPlugin/RevealPlugin-Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleExecutable</key>
	<string>${EXECUTABLE_NAME}</string>
	<key>CFBundleIconFile</key>
	<string></string>
	<key>CFBundleIdentifier</key>
	<string>net.saick.${PRODUCT_NAME:rfc1034identifier}</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>${PRODUCT_NAME}</string>
	<key>CFBundlePackageType</key>
	<string>BNDL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1</string>
	<key>CFPlugInDynamicRegisterFunction</key>
	<string></string>
	<key>CFPlugInDynamicRegistration</key>
	<string>NO</string>
	<key>CFPlugInFactories</key>
	<dict>
		<key>00000000-0000-0000-0000-000000000000</key>
		<string>MyFactoryFunction</string>
	</dict>
	<key>CFPlugInTypes</key>
	<dict>
		<key>00000000-0000-0000-0000-000000000000</key>
		<array>
			<string>00000000-0000-0000-0000-000000000000</string>
		</array>
	</dict>
	<key>CFPlugInUnloadFunction</key>
	<string></string>
	<key>DVTPlugInCompatibilityUUIDs</key>
	<array>
		<string>37B30044-3B14-46BA-ABAA-F01000C27B63</string>
		<string>640F884E-CE55-4B40-87C0-8869546CAB7A</string>
		<string>A2E4D43F-41F4-4FB9-BB94-7177011C9AED</string>
		<string>AD68E85B-441B-4301-B564-A45E4919A6AD</string>
		<string>C4A681B0-4A26-480E-93EC-1218098B9AA0</string>
		<string>FEC992CC-CA4A-4CFD-8881-77300FCB848A</string>
		<string>A16FF353-8441-459E-A50C-B071F53F51B7</string>
		<string>992275C1-432A-4CF7-B659-D84ED6D42D3F</string>
		<string>9F75337B-21B4-4ADC-B558-F9CADF7073A7</string>
		<string>E969541F-E6F9-4D25-8158-72DC3545A6C6</string>
		<string>8DC44374-2B35-4C57-A6FE-2AD66A36AAD9</string>
		<string>5EDAC44F-8E0B-42C9-9BEF-E9C12EEC4949</string>
		<string>7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90</string>
		<string>AABB7188-E14E-4433-AD3B-5CD791EAD9A3</string>
		<string>0420B86A-AA43-4792-9ED0-6FE0F2B16A13</string>
		<string>CC0D0F4F-05B3-431A-8F33-F84AFCB2C651</string>
		<string>7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90</string>
		<string>7265231C-39B4-402C-89E1-16167C4CC990</string>
		<string>F41BD31E-2683-44B8-AE7F-5F09E919790E</string>
		<string>ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C</string>
	</array>
	<key>NSHumanReadableCopyright</key>
	<string>Copyright © 2014 Saick. All rights reserved.</string>
	<key>XC4Compatible</key>
	<true/>
	<key>XCGCReady</key>
	<true/>
	<key>XCPluginHasUI</key>
	<false/>
</dict>
</plist>


================================================
FILE: RevealPlugin/RevealPlugin-Prefix.pch
================================================
//
//  Prefix header
//
//  The contents of this file are implicitly included at the beginning of every source file.
//

#ifdef __OBJC__
  #import <Cocoa/Cocoa.h>

// Close NSLog during Release Mode
#ifdef DEBUG
#define NSLog(fmt, ...) do { \
NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);\
} while (0);
#else
#define NSLog(...) /**/
#endif

#endif


================================================
FILE: RevealPlugin/RevealPlugin.h
================================================
//
//  RevealPlugin.h
//  RevealPlugin
//
//  Created by shjborage on 3/27/14.
//  Copyright (c) 2014 Saick. All rights reserved.
//

/*!
  "Inspect With RevealApp" menuItem enable or not
  0x0: check the project type, if the type is equal to iOS project, YES. Otherwise NO;
  0x1:

  "Attach to RevealApp" menuItem enable or not
  0x0: product is running..., YES. Otherwise NO.

 */

#import <Foundation/Foundation.h>

@interface RevealPlugin : NSObject

@end


================================================
FILE: RevealPlugin/RevealPlugin.m
================================================
//
//  RevealPlugin.m
//  RevealPlugin
//
//  Created by shjborage on 3/27/14.
//  Copyright (c) 2014 Saick. All rights reserved.
//

#import "RevealPlugin.h"
#import <objc/runtime.h>
#import <objc/message.h>
#import "RevealScriptHeader.h"
#import "RevealIDEModel.h"

@interface RevealPlugin ()

@property (nonatomic, assign) BOOL isRevealed;
@property (nonatomic, assign) BOOL isPreparedForLaunch;
@property (nonatomic, assign) BOOL isInspected;

@property (nonatomic, strong) NSMenuItem *revealItem;
@property (nonatomic, strong) NSMenuItem *attachItem;
@property (nonatomic, strong) NSString *dyLibPath;

@end

@implementation RevealPlugin

- (void)dealloc
{
  [[NSNotificationCenter defaultCenter] removeObserver:self];
}

+ (void)pluginDidLoad:(NSBundle *)plugin
{
  NSString *currentApplicationName = [[NSBundle mainBundle] infoDictionary][@"CFBundleName"];
  if ([currentApplicationName isEqual:@"Xcode"]) {
    NSLog(@"Reveal plugin DidLoaded");
    [self shared];
  }
}

+ (id)shared
{
  static dispatch_once_t onceToken;
  static id instance = nil;
  dispatch_once(&onceToken, ^{
    instance = [[self alloc] init];
  });
  return instance;
}

- (id)init
{
  if (self = [super init]) {
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(applicationDidFinishLaunching:)
                                                 name:NSApplicationDidFinishLaunchingNotification
                                               object:nil];
    
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(observeAllNotification:)
                                                 name:nil
                                               object:nil];
  }
  return self;
}

#pragma mark - notif

- (void)applicationDidFinishLaunching:(NSNotification *)notif
{
  NSMenuItem *productMenuItem = [[NSApp mainMenu] itemWithTitle:@"Product"];
  if (productMenuItem) {
    NSMenu *menu = [productMenuItem submenu];
    NSMenuItem *analyzeItem = [productMenuItem.submenu itemWithTitle:@"Analyze"];
    NSInteger revealIndex = [menu indexOfItem:analyzeItem] + 1;

//    [[productMenuItem submenu] addItem:[NSMenuItem separatorItem]];
    NSMenuItem *revealItem = [[NSMenuItem alloc] initWithTitle:@"Inspect with Reveal"
                                                        action:@selector(didPressRevealInspectProductMenu:)
                                                 keyEquivalent:@"p"];
    [revealItem setTarget:self];
    [revealItem setKeyEquivalentModifierMask:NSControlKeyMask|NSCommandKeyMask];
    [[productMenuItem submenu] insertItem:revealItem atIndex:revealIndex];
    
    self.revealItem = revealItem;
  }

  NSMenuItem *debugMenuItem = [[NSApp mainMenu] itemWithTitle:@"Debug"];
  if (debugMenuItem) {
    NSMenuItem *revealItem = [[NSMenuItem alloc] initWithTitle:@"Attach to Reveal"
                                                        action:@selector(didPressRevealInspectDebugMenu:)
                                                 keyEquivalent:@";"];
    [revealItem setTarget:self];
    [revealItem setKeyEquivalentModifierMask:NSControlKeyMask|NSCommandKeyMask];
    [[debugMenuItem submenu] addItem:revealItem];
    
    [revealItem.menu setAutoenablesItems:NO];
    [revealItem setEnabled:NO];
    self.attachItem = revealItem;
  }
}

- (void)observeAllNotification:(NSNotification *)notif
{
//  // Log notifications if you like
//  if ([[notif name] length] >= 2 && ([[[notif name] substringWithRange:NSMakeRange(0, 2)] isEqualTo:@"NS"] || [[[notif name] substringWithRange:NSMakeRange(0, 2)] isEqualTo:@"_N"])) {
//    // It's a system-level notification
//  } else {
//    // It's a Xcode-level notification
//    NSLog(@"%@", notif.name);
//  }
  
  // This seems like quite a mess, but the notification-driven approach avoids waiting for
  // indeterminate amounts of time for building / running to get far enough along to avoid crashes.
  
  /*
   IDEBuildOperationDidStopNotification
   IDEBuildOperationWillStartNotification
   
   DVTDeviceShouldIgnoreChangesDidEndNotification
   IDECurrentLaunchSessionTargetOutputChanged
   IDECurrentLaunchSessionStateChanged
   */
  
  // Finished building
  if ([[notif name] isEqualToString:@"IDEBuildOperationDidGenerateOutputFilesNotification"]) {
    // Recived notification every time per build
    NSLog(@"Build finish...");
    
    self.isPreparedForLaunch = YES;
  }
  
  if ([[notif name] isEqualToString:@"IDECurrentLaunchSessionTargetOutputChanged"]) {
    // Finish building and second notif is the already run the project.
    NSLog(@"Debug state change...");
    if (self.isPreparedForLaunch) {
      NSLog(@"isPreparedForLaunch...");
      [self.attachItem setEnabled:YES];
      
      if (self.isRevealed) {
        self.isRevealed = NO;
        [self attachToLLDB];
      }
    }
    self.isPreparedForLaunch = NO;
  }
  
  // Finished stopping
  if ([[notif name] isEqualToString:@"CurrentExecutionTrackerCompletedNotification"]) {
    // Reviced no matter how it is stoped.
    NSLog(@"Finished.");
    [self.attachItem setEnabled:NO];
    self.isPreparedForLaunch = NO;
  }
}

#pragma mark - actions

/*!
 @brief click Reveal Inspect Menu Action
 
 // 0 step is only used for debug
 // 0. User already run the project (otherwise, alert an error)
 1. enter `lldb`, and attach process (if error occured, process not found)
 2. lldb operation pause and other command
 */
- (void)didPressRevealInspectProductMenu:(NSMenuItem *)sender
{
  NSLog(@"Reveal didPressRevealInspectProductMenu:%@", sender);

  self.isRevealed = YES;
  
  NSMenuItem *productMenuItem = [[NSApp mainMenu] itemWithTitle:@"Product"];
  if (productMenuItem) {
    NSMenuItem *runItem = [productMenuItem.submenu itemWithTitle:@"Run"];
    [self performActionForMenuItem:runItem];
  }
}

- (void)didPressRevealInspectDebugMenu:(NSMenuItem *)sender
{
  NSLog(@"Reveal didPressRevealInspectDebugMenu(Attach to Reveal):%@", sender);

  [self attachToLLDB];
}

#pragma mark -

- (void)performActionForMenuItem:(NSMenuItem *)menuItem
{
  // Run UI stuff on the main thread
  dispatch_async(dispatch_get_main_queue(), ^{
    [[menuItem menu] performActionForItemAtIndex:[[menuItem menu] indexOfItem:menuItem]];
  });
}

#pragma mark - attach to lldb

- (void)attachToLLDB
{
  if (!self.isInspected) {
    NSLog(@"AttachToLLDB starting");
    self.isInspected = YES;
    [self.attachItem setEnabled:NO];
  } else {
    [self.attachItem setEnabled:NO];
    NSLog(@"AttachToLLDB already started");
    return;
  }
  
  // do pause execution in and then attach
  // check the dylib exist, if not, alert
  if (![self checkRevealDylib]) {
    NSAlert *alert = [[NSAlert alloc] init];
    [alert setMessageText:@"The Reveal dynamic library does not exist. Please download the latest copy of the Reveal and replace the old version at http://revealapp.com."];
    [alert runModal];
    
    self.isInspected = NO;
    return;
  }
  
  [self pauseExecutionIn];
  
  self.isInspected = NO;
}

#pragma mark - private

- (BOOL)checkRevealDylib
{
  NSString *dylibPath1 = @"/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib";
  NSString *dylibPath2 = [@"~/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib" stringByResolvingSymlinksInPath];

  if ([[NSFileManager defaultManager] fileExistsAtPath:dylibPath1]) {
    self.dyLibPath = dylibPath1;
    return YES;
  } else if ([[NSFileManager defaultManager] fileExistsAtPath:dylibPath2]) {
    self.dyLibPath = dylibPath2;
    return YES;
  } else {
    return NO;
  }
}

- (void)launchRevealApp
{
  // start applescript to launch Reveal
  NSString *scriptPath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"rp.script"];
  [kScriptLaunchReveal writeToFile:scriptPath atomically:YES encoding:NSUTF8StringEncoding error:nil];
  if ([scriptPath length] == 0)
    return;
  
  NSURL *scriptURL = [NSURL fileURLWithPath:scriptPath];
  NSAppleScript *as = [[NSAppleScript alloc] initWithContentsOfURL:scriptURL
                                                             error:nil];
  [as executeAndReturnError: NULL];
}

- (void)activeXcodeApp
{
  NSString *scriptPath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"xcode.script"];
  [kScriptActiveXcode writeToFile:scriptPath atomically:YES encoding:NSUTF8StringEncoding error:nil];
  if ([scriptPath length] == 0)
    return;
  
  NSURL *scriptURL = [NSURL fileURLWithPath:scriptPath];
  NSAppleScript *as = [[NSAppleScript alloc] initWithContentsOfURL:scriptURL
                                                             error:nil];
  [as executeAndReturnError: NULL];
}

- (void)pauseExecutionIn
{
  DBGDebugSession *debugsession = [RevealIDEModel debugSessionIn];
  
  if (!debugsession) {
    [self activeXcodeApp];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
      [self activeXcodeApp];
      dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        DBGDebugSession *debugsession = [RevealIDEModel debugSessionIn];
        if (!debugsession) {
          NSLog(@"Debugsession is nil");
          NSAlert *alert = [[NSAlert alloc] init];
          [alert setMessageText:@"An unexpected error occurred, please try again later!"];
          [alert runModal];
          
          [self.attachItem setEnabled:YES];
          return;
        } else {
          [self inspectWithReveal:debugsession];
        }
      });
    });
  } else {
    [self inspectWithReveal:debugsession];
  }
}

- (void)inspectWithReveal:(DBGDebugSession *)debugsession
{
  if ([debugsession respondsToSelector:@selector(requestPause)]) {
    objc_msgSend(debugsession, @selector(requestPause));
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
      IDEConsoleTextView *consoleView = [RevealIDEModel whenXcodeConsoleIn];
      NSString *consoleStr = objc_msgSend(consoleView, @selector(string));
      if (NSNotFound != [consoleStr rangeOfString:@"(lldb)" options:NSBackwardsSearch].location) {
        NSString *loadDyLibExpression = [NSString stringWithFormat:@"expr (void*)dlopen(\"%@\", 0x2);", self.dyLibPath];
        objc_msgSend(consoleView, @selector(insertText:), loadDyLibExpression);
        objc_msgSend(consoleView, @selector(insertNewline:), nil);
        
        objc_msgSend(consoleView, @selector(insertText:), @"expr [(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@\"IBARevealRequestStart\" object:nil];");
        objc_msgSend(consoleView, @selector(insertNewline:), nil);
        
        objc_msgSend(consoleView, @selector(insertText:), @"continue");
        objc_msgSend(consoleView, @selector(insertNewline:), nil);
        
        [self launchRevealApp];
        NSLog(@"AttachToLLDB done!");
      } else {
        NSLog(@"(lldb) not found");
        NSAlert *alert = [[NSAlert alloc] init];
        [alert setMessageText:@"An unexpected error occurred, please try again later!"];
        [alert runModal];
        
        [self.attachItem setEnabled:YES];
      }
    });
  } else {
    NSLog(@"Error:if ([debugsession respondsToSelector:@selector(requestPause)]) {");
    NSAlert *alert = [[NSAlert alloc] init];
    [alert setMessageText:@"An unexpected error occurred, please try again later!"];
    [alert runModal];
    
    [self.attachItem setEnabled:YES];
    return;
  }
}

@end


================================================
FILE: RevealPlugin/Vendors/Catagories/NSView+SQDump.h
================================================
//
//  NSView+SQDump.h
//  RevealPlugin
//
//  Created by shjborage on 4/7/14.
//  Copyright (c) 2014 Saick. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@interface NSView (SQDump)

- (void)dumpWithIndent:(NSString *)indent;

@end


================================================
FILE: RevealPlugin/Vendors/Catagories/NSView+SQDump.m
================================================
//
//  NSView+SQDump.m
//  RevealPlugin
//
//  Created by shjborage on 4/7/14.
//  Copyright (c) 2014 Saick. All rights reserved.
//

#import "NSView+SQDump.h"

@implementation NSView (SQDump)

- (void)dumpWithIndent:(NSString *)indent
{
  NSString *class = NSStringFromClass([self class]);
  NSString *info = @"";
  if ([self respondsToSelector:@selector(title)]) {
    NSString *title = [self performSelector:@selector(title)];
    if (title != nil && [title length] > 0) {
      info = [info stringByAppendingFormat:@" title=%@", title];
    }
  }
  
  if ([self respondsToSelector:@selector(stringValue)]) {
    NSString *string = [self performSelector:@selector(stringValue)];
    if (string != nil && [string length] > 0) {
      info = [info stringByAppendingFormat:@" stringValue=%@", string];
    }
  }
  NSString *tooltip = [self toolTip];
  if (tooltip != nil && [tooltip length] > 0) {
    info = [info stringByAppendingFormat:@" tooltip=%@", tooltip];
  }
  
  NSLog(@"%@%@%@", indent, class, info);
  
  if ([[self subviews] count] > 0) {
    NSString *subIndent = [NSString stringWithFormat:@"%@%@", indent, ([indent length]/2)%2==0 ? @"| " : @": "];
    for (NSView *subview in [self subviews]) {
      [subview dumpWithIndent:subIndent];
    }
  }
}

@end


================================================
FILE: RevealPlugin/Vendors/Catagories/NSView+SQFindSubView.h
================================================
//
//  NSView+SQFindSubView.h
//  RevealPlugin
//
//  Created by shjborage on 4/7/14.
//  Copyright (c) 2014 Saick. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@interface NSView (SQFindSubView)

- (NSView *)findSubView:(Class)cls;

@end


================================================
FILE: RevealPlugin/Vendors/Catagories/NSView+SQFindSubView.m
================================================
//
//  NSView+SQFindSubView.m
//  RevealPlugin
//
//  Created by shjborage on 4/7/14.
//  Copyright (c) 2014 Saick. All rights reserved.
//

#import "NSView+SQFindSubView.h"

@implementation NSView (SQFindSubView)

- (NSView *)findSubView:(Class)cls
{
  if ([[self subviews] count] > 0) {
    for (NSView *subview in [self subviews]) {
//      NSLog(@"%@", NSStringFromClass([subview class]));
      if ([subview isKindOfClass:cls]) {
        return subview;
      } else {
        NSView *foundView = [subview findSubView:cls];
        if (foundView != nil)
          return foundView;
      }
    }
  }
  
  return nil;
}

@end


================================================
FILE: RevealPlugin/en.lproj/InfoPlist.strings
================================================
/* Localized versions of Info.plist keys */



================================================
FILE: RevealPlugin.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
	archiveVersion = 1;
	classes = {
	};
	objectVersion = 46;
	objects = {

/* Begin PBXBuildFile section */
		A05281CA18EEBB5700F54910 /* RevealIDEModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A05281C918EEBB5700F54910 /* RevealIDEModel.m */; };
		A06A7E5E18E40D9C0039BB1B /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A06A7E5D18E40D9C0039BB1B /* CoreFoundation.framework */; };
		A06A7E6418E40D9C0039BB1B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A06A7E6218E40D9C0039BB1B /* InfoPlist.strings */; };
		A06A7E6D18E412520039BB1B /* RevealPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = A06A7E6C18E412520039BB1B /* RevealPlugin.m */; };
		A09434AD18F2E15900AE246C /* NSView+SQDump.m in Sources */ = {isa = PBXBuildFile; fileRef = A09434AC18F2E15900AE246C /* NSView+SQDump.m */; };
		A09434B018F2E16E00AE246C /* NSView+SQFindSubView.m in Sources */ = {isa = PBXBuildFile; fileRef = A09434AF18F2E16E00AE246C /* NSView+SQFindSubView.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
		0C4AC3B54C1C4664BF51AC76 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
		A05281C818EEBB5700F54910 /* RevealIDEModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RevealIDEModel.h; sourceTree = "<group>"; };
		A05281C918EEBB5700F54910 /* RevealIDEModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RevealIDEModel.m; sourceTree = "<group>"; };
		A06A7E5A18E40D9C0039BB1B /* RevealPlugin.xcplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RevealPlugin.xcplugin; sourceTree = BUILT_PRODUCTS_DIR; };
		A06A7E5D18E40D9C0039BB1B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
		A06A7E6118E40D9C0039BB1B /* RevealPlugin-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "RevealPlugin-Info.plist"; sourceTree = "<group>"; };
		A06A7E6318E40D9C0039BB1B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
		A06A7E6518E40D9C0039BB1B /* RevealPlugin-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RevealPlugin-Prefix.pch"; sourceTree = "<group>"; };
		A06A7E6B18E412520039BB1B /* RevealPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RevealPlugin.h; sourceTree = "<group>"; };
		A06A7E6C18E412520039BB1B /* RevealPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RevealPlugin.m; sourceTree = "<group>"; };
		A09434AB18F2E15900AE246C /* NSView+SQDump.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSView+SQDump.h"; sourceTree = "<group>"; };
		A09434AC18F2E15900AE246C /* NSView+SQDump.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSView+SQDump.m"; sourceTree = "<group>"; };
		A09434AE18F2E16E00AE246C /* NSView+SQFindSubView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSView+SQFindSubView.h"; sourceTree = "<group>"; };
		A09434AF18F2E16E00AE246C /* NSView+SQFindSubView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSView+SQFindSubView.m"; sourceTree = "<group>"; };
		A0FDABD518ED53A60073873B /* RevealScriptHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RevealScriptHeader.h; path = Resources/RevealScriptHeader.h; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
		A06A7E5718E40D9C0039BB1B /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
			files = (
				A06A7E5E18E40D9C0039BB1B /* CoreFoundation.framework in Frameworks */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
		A01CEA8018EC0F90006A55BC /* Vendors */ = {
			isa = PBXGroup;
			children = (
				A09434AA18F2E15900AE246C /* Catagories */,
			);
			path = Vendors;
			sourceTree = "<group>";
		};
		A06A7E5118E40D9C0039BB1B = {
			isa = PBXGroup;
			children = (
				A06A7E5F18E40D9C0039BB1B /* RevealPlugin */,
				A06A7E5C18E40D9C0039BB1B /* Frameworks */,
				A06A7E5B18E40D9C0039BB1B /* Products */,
			);
			sourceTree = "<group>";
		};
		A06A7E5B18E40D9C0039BB1B /* Products */ = {
			isa = PBXGroup;
			children = (
				A06A7E5A18E40D9C0039BB1B /* RevealPlugin.xcplugin */,
			);
			name = Products;
			sourceTree = "<group>";
		};
		A06A7E5C18E40D9C0039BB1B /* Frameworks */ = {
			isa = PBXGroup;
			children = (
				A06A7E5D18E40D9C0039BB1B /* CoreFoundation.framework */,
				0C4AC3B54C1C4664BF51AC76 /* libPods.a */,
			);
			name = Frameworks;
			sourceTree = "<group>";
		};
		A06A7E5F18E40D9C0039BB1B /* RevealPlugin */ = {
			isa = PBXGroup;
			children = (
				A06A7E6B18E412520039BB1B /* RevealPlugin.h */,
				A06A7E6C18E412520039BB1B /* RevealPlugin.m */,
				A05281C818EEBB5700F54910 /* RevealIDEModel.h */,
				A05281C918EEBB5700F54910 /* RevealIDEModel.m */,
				A0FDABD518ED53A60073873B /* RevealScriptHeader.h */,
				A01CEA8018EC0F90006A55BC /* Vendors */,
				A06A7E6018E40D9C0039BB1B /* Supporting Files */,
			);
			path = RevealPlugin;
			sourceTree = "<group>";
		};
		A06A7E6018E40D9C0039BB1B /* Supporting Files */ = {
			isa = PBXGroup;
			children = (
				A06A7E6118E40D9C0039BB1B /* RevealPlugin-Info.plist */,
				A06A7E6218E40D9C0039BB1B /* InfoPlist.strings */,
				A06A7E6518E40D9C0039BB1B /* RevealPlugin-Prefix.pch */,
			);
			name = "Supporting Files";
			sourceTree = "<group>";
		};
		A09434AA18F2E15900AE246C /* Catagories */ = {
			isa = PBXGroup;
			children = (
				A09434AB18F2E15900AE246C /* NSView+SQDump.h */,
				A09434AC18F2E15900AE246C /* NSView+SQDump.m */,
				A09434AE18F2E16E00AE246C /* NSView+SQFindSubView.h */,
				A09434AF18F2E16E00AE246C /* NSView+SQFindSubView.m */,
			);
			path = Catagories;
			sourceTree = "<group>";
		};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
		A06A7E5918E40D9C0039BB1B /* RevealPlugin */ = {
			isa = PBXNativeTarget;
			buildConfigurationList = A06A7E6818E40D9C0039BB1B /* Build configuration list for PBXNativeTarget "RevealPlugin" */;
			buildPhases = (
				A06A7E5618E40D9C0039BB1B /* Sources */,
				A06A7E5718E40D9C0039BB1B /* Frameworks */,
				A06A7E5818E40D9C0039BB1B /* Resources */,
			);
			buildRules = (
			);
			dependencies = (
			);
			name = RevealPlugin;
			productName = RevealPlugin;
			productReference = A06A7E5A18E40D9C0039BB1B /* RevealPlugin.xcplugin */;
			productType = "com.apple.product-type.bundle";
		};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
		A06A7E5218E40D9C0039BB1B /* Project object */ = {
			isa = PBXProject;
			attributes = {
				LastUpgradeCheck = 0510;
				ORGANIZATIONNAME = Saick;
			};
			buildConfigurationList = A06A7E5518E40D9C0039BB1B /* Build configuration list for PBXProject "RevealPlugin" */;
			compatibilityVersion = "Xcode 3.2";
			developmentRegion = English;
			hasScannedForEncodings = 0;
			knownRegions = (
				en,
			);
			mainGroup = A06A7E5118E40D9C0039BB1B;
			productRefGroup = A06A7E5B18E40D9C0039BB1B /* Products */;
			projectDirPath = "";
			projectRoot = "";
			targets = (
				A06A7E5918E40D9C0039BB1B /* RevealPlugin */,
			);
		};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
		A06A7E5818E40D9C0039BB1B /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				A06A7E6418E40D9C0039BB1B /* InfoPlist.strings in Resources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
		A06A7E5618E40D9C0039BB1B /* Sources */ = {
			isa = PBXSourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				A09434AD18F2E15900AE246C /* NSView+SQDump.m in Sources */,
				A06A7E6D18E412520039BB1B /* RevealPlugin.m in Sources */,
				A09434B018F2E16E00AE246C /* NSView+SQFindSubView.m in Sources */,
				A05281CA18EEBB5700F54910 /* RevealIDEModel.m in Sources */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
		A06A7E6218E40D9C0039BB1B /* InfoPlist.strings */ = {
			isa = PBXVariantGroup;
			children = (
				A06A7E6318E40D9C0039BB1B /* en */,
			);
			name = InfoPlist.strings;
			sourceTree = "<group>";
		};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
		A06A7E6618E40D9C0039BB1B /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
				CLANG_CXX_LIBRARY = "libc++";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_WARN_BOOL_CONVERSION = YES;
				CLANG_WARN_CONSTANT_CONVERSION = YES;
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
				CLANG_WARN_EMPTY_BODY = YES;
				CLANG_WARN_ENUM_CONVERSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				COPY_PHASE_STRIP = NO;
				GCC_C_LANGUAGE_STANDARD = gnu99;
				GCC_DYNAMIC_NO_PIC = NO;
				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
				GCC_OPTIMIZATION_LEVEL = 0;
				GCC_PREPROCESSOR_DEFINITIONS = (
					"DEBUG=1",
					"$(inherited)",
				);
				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				GCC_WARN_UNUSED_FUNCTION = YES;
				GCC_WARN_UNUSED_VARIABLE = YES;
				MACOSX_DEPLOYMENT_TARGET = 10.10;
				ONLY_ACTIVE_ARCH = YES;
				SDKROOT = macosx;
			};
			name = Debug;
		};
		A06A7E6718E40D9C0039BB1B /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				ALWAYS_SEARCH_USER_PATHS = NO;
				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
				CLANG_CXX_LIBRARY = "libc++";
				CLANG_ENABLE_MODULES = YES;
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_WARN_BOOL_CONVERSION = YES;
				CLANG_WARN_CONSTANT_CONVERSION = YES;
				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
				CLANG_WARN_EMPTY_BODY = YES;
				CLANG_WARN_ENUM_CONVERSION = YES;
				CLANG_WARN_INT_CONVERSION = YES;
				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
				COPY_PHASE_STRIP = YES;
				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
				ENABLE_NS_ASSERTIONS = NO;
				GCC_C_LANGUAGE_STANDARD = gnu99;
				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
				GCC_WARN_UNDECLARED_SELECTOR = YES;
				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
				GCC_WARN_UNUSED_FUNCTION = YES;
				GCC_WARN_UNUSED_VARIABLE = YES;
				MACOSX_DEPLOYMENT_TARGET = 10.10;
				SDKROOT = macosx;
			};
			name = Release;
		};
		A06A7E6918E40D9C0039BB1B /* Debug */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES;
				COMBINE_HIDPI_IMAGES = YES;
				DEPLOYMENT_LOCATION = YES;
				DSTROOT = "${HOME}";
				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
				GCC_ENABLE_OBJC_GC = unsupported;
				GCC_MODEL_TUNING = G5;
				GCC_PRECOMPILE_PREFIX_HEADER = YES;
				GCC_PREFIX_HEADER = "RevealPlugin/RevealPlugin-Prefix.pch";
				HEADER_SEARCH_PATHS = (
					"$(inherited)",
					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
				);
				INFOPLIST_FILE = "RevealPlugin/RevealPlugin-Info.plist";
				INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins";
				PRODUCT_NAME = "$(TARGET_NAME)";
				WRAPPER_EXTENSION = xcplugin;
			};
			name = Debug;
		};
		A06A7E6A18E40D9C0039BB1B /* Release */ = {
			isa = XCBuildConfiguration;
			buildSettings = {
				CLANG_ENABLE_OBJC_ARC = YES;
				CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES;
				COMBINE_HIDPI_IMAGES = YES;
				DEPLOYMENT_LOCATION = YES;
				DSTROOT = "${HOME}";
				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
				GCC_ENABLE_OBJC_GC = unsupported;
				GCC_MODEL_TUNING = G5;
				GCC_PRECOMPILE_PREFIX_HEADER = YES;
				GCC_PREFIX_HEADER = "RevealPlugin/RevealPlugin-Prefix.pch";
				HEADER_SEARCH_PATHS = (
					"$(inherited)",
					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
				);
				INFOPLIST_FILE = "RevealPlugin/RevealPlugin-Info.plist";
				INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins";
				PRODUCT_NAME = "$(TARGET_NAME)";
				WRAPPER_EXTENSION = xcplugin;
			};
			name = Release;
		};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
		A06A7E5518E40D9C0039BB1B /* Build configuration list for PBXProject "RevealPlugin" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				A06A7E6618E40D9C0039BB1B /* Debug */,
				A06A7E6718E40D9C0039BB1B /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
		A06A7E6818E40D9C0039BB1B /* Build configuration list for PBXNativeTarget "RevealPlugin" */ = {
			isa = XCConfigurationList;
			buildConfigurations = (
				A06A7E6918E40D9C0039BB1B /* Debug */,
				A06A7E6A18E40D9C0039BB1B /* Release */,
			);
			defaultConfigurationIsVisible = 0;
			defaultConfigurationName = Release;
		};
/* End XCConfigurationList section */
	};
	rootObject = A06A7E5218E40D9C0039BB1B /* Project object */;
}


================================================
FILE: RevealPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:RevealPlugin.xcodeproj">
   </FileRef>
</Workspace>


================================================
FILE: RevealPlugin.xcodeproj/xcshareddata/xcschemes/RevealPlugin.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "0640"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "A06A7E5918E40D9C0039BB1B"
               BuildableName = "RevealPlugin.xcplugin"
               BlueprintName = "RevealPlugin"
               ReferencedContainer = "container:RevealPlugin.xcodeproj">
            </BuildableReference>
         </BuildActionEntry>
      </BuildActionEntries>
   </BuildAction>
   <TestAction
      buildConfiguration = "Debug"
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
      shouldUseLaunchSchemeArgsEnv = "YES">
      <Testables>
      </Testables>
      <AdditionalOptions>
      </AdditionalOptions>
   </TestAction>
   <LaunchAction
      buildConfiguration = "Debug"
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
      launchStyle = "0"
      useCustomWorkingDirectory = "NO"
      ignoresPersistentStateOnLaunch = "NO"
      debugDocumentVersioning = "YES"
      debugServiceExtension = "internal"
      allowLocationSimulation = "YES">
      <PathRunnable
         runnableDebuggingMode = "0"
         BundleIdentifier = "com.apple.dt.Xcode"
         FilePath = "/Applications/Xcode.app">
      </PathRunnable>
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "A06A7E5918E40D9C0039BB1B"
            BuildableName = "RevealPlugin.xcplugin"
            BlueprintName = "RevealPlugin"
            ReferencedContainer = "container:RevealPlugin.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "A06A7E5918E40D9C0039BB1B"
            BuildableName = "RevealPlugin.xcplugin"
            BlueprintName = "RevealPlugin"
            ReferencedContainer = "container:RevealPlugin.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>


================================================
FILE: RevealPlugin_bak/Podfile
================================================
platform :osx

pod 'JRSwizzle', '~> 1.0'

================================================
FILE: RevealPlugin_bak/RevealPlugin.podspec
================================================
Pod::Spec.new do |s|
  s.name         = 'RevealPlugin'
  s.version      = '1.0'
  s.license      =  :type => '<#License#>'
  s.homepage     = '<#Homepage URL#>'
  s.authors      =  '<#Author Name#>' => '<#Author Email#>'
  s.summary      = '<#Summary (Up to 140 characters#>'

# Source Info
  s.platform     =  :ios, '<#iOS Platform#>'
  s.source       =  :git => '<#Github Repo URL#>', :tag => '<#Tag name#>'
  s.source_files = '<#Resources#>'
  s.framework    =  '<#Required Frameworks#>'

  s.requires_arc = true
  
# Pod Dependencies
  s.dependencies =	pod 'JRSwizzle', '~> 1.0'

end

================================================
FILE: RevealPlugin_bak/RevealPlugin.xcworkspace/contents.xcworkspacedata
================================================
<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:RevealPlugin.xcodeproj'/><FileRef location='group:Pods/Pods.xcodeproj'/></Workspace>
Download .txt
gitextract_j8urf0xo/

├── .gitignore
├── LICENSE
├── README.md
├── RevealPlugin/
│   ├── Resources/
│   │   └── RevealScriptHeader.h
│   ├── RevealIDEModel.h
│   ├── RevealIDEModel.m
│   ├── RevealPlugin-Info.plist
│   ├── RevealPlugin-Prefix.pch
│   ├── RevealPlugin.h
│   ├── RevealPlugin.m
│   ├── Vendors/
│   │   └── Catagories/
│   │       ├── NSView+SQDump.h
│   │       ├── NSView+SQDump.m
│   │       ├── NSView+SQFindSubView.h
│   │       └── NSView+SQFindSubView.m
│   └── en.lproj/
│       └── InfoPlist.strings
├── RevealPlugin.xcodeproj/
│   ├── project.pbxproj
│   ├── project.xcworkspace/
│   │   └── contents.xcworkspacedata
│   └── xcshareddata/
│       └── xcschemes/
│           └── RevealPlugin.xcscheme
└── RevealPlugin_bak/
    ├── Podfile
    ├── RevealPlugin.podspec
    └── RevealPlugin.xcworkspace/
        └── contents.xcworkspacedata
Condensed preview — 21 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (48K chars).
[
  {
    "path": ".gitignore",
    "chars": 237,
    "preview": "# Xcode\n.DS_Store\n*/build/*\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspecti"
  },
  {
    "path": "LICENSE",
    "chars": 1070,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2014 Eric\n\nPermission is hereby granted, free of charge, to any person obtaining a "
  },
  {
    "path": "README.md",
    "chars": 2952,
    "preview": "Reveal-Plugin-for-Xcode\n=======================\n\n[![Join the chat at https://gitter.im/shjborage/Reveal-Plugin-for-Xcode"
  },
  {
    "path": "RevealPlugin/Resources/RevealScriptHeader.h",
    "chars": 681,
    "preview": "//\n//  BuildScriptHeader.h\n//  RevealPlugin\n//\n//  Created by shjborage on 4/3/14.\n//  Copyright (c) 2014 Saick. All rig"
  },
  {
    "path": "RevealPlugin/RevealIDEModel.h",
    "chars": 1229,
    "preview": "//\n//  RevealIDEModel.h\n//  RevealPlugin\n//\n//  Created by shjborage on 4/4/14.\n//  Copyright (c) 2014 Saick. All rights"
  },
  {
    "path": "RevealPlugin/RevealIDEModel.m",
    "chars": 2392,
    "preview": "//\n//  RevealIDEModel.m\n//  RevealPlugin\n//\n//  Created by shjborage on 4/4/14.\n//  Copyright (c) 2014 Saick. All rights"
  },
  {
    "path": "RevealPlugin/RevealPlugin-Info.plist",
    "chars": 2665,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "RevealPlugin/RevealPlugin-Prefix.pch",
    "chars": 379,
    "preview": "//\n//  Prefix header\n//\n//  The contents of this file are implicitly included at the beginning of every source file.\n//\n"
  },
  {
    "path": "RevealPlugin/RevealPlugin.h",
    "chars": 461,
    "preview": "//\n//  RevealPlugin.h\n//  RevealPlugin\n//\n//  Created by shjborage on 3/27/14.\n//  Copyright (c) 2014 Saick. All rights "
  },
  {
    "path": "RevealPlugin/RevealPlugin.m",
    "chars": 11590,
    "preview": "//\n//  RevealPlugin.m\n//  RevealPlugin\n//\n//  Created by shjborage on 3/27/14.\n//  Copyright (c) 2014 Saick. All rights "
  },
  {
    "path": "RevealPlugin/Vendors/Catagories/NSView+SQDump.h",
    "chars": 236,
    "preview": "//\n//  NSView+SQDump.h\n//  RevealPlugin\n//\n//  Created by shjborage on 4/7/14.\n//  Copyright (c) 2014 Saick. All rights "
  },
  {
    "path": "RevealPlugin/Vendors/Catagories/NSView+SQDump.m",
    "chars": 1273,
    "preview": "//\n//  NSView+SQDump.m\n//  RevealPlugin\n//\n//  Created by shjborage on 4/7/14.\n//  Copyright (c) 2014 Saick. All rights "
  },
  {
    "path": "RevealPlugin/Vendors/Catagories/NSView+SQFindSubView.h",
    "chars": 243,
    "preview": "//\n//  NSView+SQFindSubView.h\n//  RevealPlugin\n//\n//  Created by shjborage on 4/7/14.\n//  Copyright (c) 2014 Saick. All "
  },
  {
    "path": "RevealPlugin/Vendors/Catagories/NSView+SQFindSubView.m",
    "chars": 630,
    "preview": "//\n//  NSView+SQFindSubView.m\n//  RevealPlugin\n//\n//  Created by shjborage on 4/7/14.\n//  Copyright (c) 2014 Saick. All "
  },
  {
    "path": "RevealPlugin/en.lproj/InfoPlist.strings",
    "chars": 45,
    "preview": "/* Localized versions of Info.plist keys */\n\n"
  },
  {
    "path": "RevealPlugin.xcodeproj/project.pbxproj",
    "chars": 13963,
    "preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
  },
  {
    "path": "RevealPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "chars": 157,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:RevealPlugin.xc"
  },
  {
    "path": "RevealPlugin.xcodeproj/xcshareddata/xcschemes/RevealPlugin.xcscheme",
    "chars": 3067,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"0640\"\n   version = \"1.3\">\n   <BuildAction\n      "
  },
  {
    "path": "RevealPlugin_bak/Podfile",
    "chars": 40,
    "preview": "platform :osx\n\npod 'JRSwizzle', '~> 1.0'"
  },
  {
    "path": "RevealPlugin_bak/RevealPlugin.podspec",
    "chars": 587,
    "preview": "Pod::Spec.new do |s|\n  s.name         = 'RevealPlugin'\n  s.version      = '1.0'\n  s.license      =  :type => '<#License#"
  },
  {
    "path": "RevealPlugin_bak/RevealPlugin.xcworkspace/contents.xcworkspacedata",
    "chars": 172,
    "preview": "<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:RevealPlugin.xcodeproj'/><FileRe"
  }
]

About this extraction

This page contains the full source code of the shjborage/Reveal-Plugin-for-Xcode GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 21 files (43.0 KB), approximately 13.4k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!