Skip to content
Browse files

first

  • Loading branch information...
0 parents commit 666934743e74ec40365213f5e282362a571fdd56 @probablycorey probablycorey committed Feb 16, 2010
Showing with 656 additions and 0 deletions.
  1. +29 −0 Simulator.h
  2. +123 −0 Simulator.m
  3. +117 −0 WaxSim.m
  4. +254 −0 WaxSim.xcodeproj/project.pbxproj
  5. +7 −0 WaxSim_Prefix.pch
  6. +126 −0 iPhoneSimulatorRemoteClient/iPhoneSimulatorRemoteClient.h
29 Simulator.h
@@ -0,0 +1,29 @@
+//
+// Simulator.h
+// Sim
+//
+// Created by ProbablyInteractive on 7/28/09.
+// Copyright 2009 Probably Interactive. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+#import "iPhoneSimulatorRemoteClient.h"
+
+@class DTiPhoneSimulatorSystemRoot;
+
+@interface Simulator : NSObject <DTiPhoneSimulatorSessionDelegate> {
+ NSString *_appPath;
+ DTiPhoneSimulatorSystemRoot *_sdk;
+ DTiPhoneSimulatorSession* _session;
+ NSArray *_args;
+}
+
+@property (nonatomic, readonly) DTiPhoneSimulatorSession* session;
+
++ (NSArray *)availableSDKs;
+
+- (id)initWithAppPath:(NSString *)appPath sdk:(NSString *)sdk args:(NSArray *)args;
+- (int)launch;
+- (void)end;
+
+@end
123 Simulator.m
@@ -0,0 +1,123 @@
+//
+//
+// Sim
+//
+// Created by ProbablyInteractive on 7/28/09.
+// Copyright 2009 Probably Interactive. All rights reserved.
+//
+
+#import "Simulator.h"
+
+#include <sys/param.h>
+#include <objc/runtime.h>
+
+#define WaxLog(format, args...) \
+ printf("%s\n", [[NSString stringWithFormat:(format), ## args] UTF8String])
+
+@implementation Simulator
+
+@synthesize session=_session;
+
+- (id)initWithAppPath:(NSString *)appPath sdk:(NSString *)sdk args:(NSArray *)args {
+ self = [super init];
+
+ NSFileManager *fileManager = [NSFileManager defaultManager];
+ if (![appPath isAbsolutePath]) {
+ appPath = [[fileManager currentDirectoryPath] stringByAppendingPathComponent:appPath];
+ }
+
+ _appPath = [appPath retain];
+
+ if (![fileManager fileExistsAtPath:_appPath]) {
+ WaxLog(@"App path '%@' does not exist!", _appPath);
+ exit(EXIT_FAILURE);
+ }
+
+ if (!sdk) _sdk = [[DTiPhoneSimulatorSystemRoot defaultRoot] retain];
+ else {
+ _sdk = [[DTiPhoneSimulatorSystemRoot rootWithSDKVersion:sdk] retain];
+ }
+
+ if (!_sdk) {
+ WaxLog(@"Unknown sdk '%@'", sdk);
+ WaxLog(@"Available sdks are...");
+ for (id root in [DTiPhoneSimulatorSystemRoot knownRoots]) {
+ WaxLog(@" %@", [root sdkVersion]);
+ }
+
+ exit(EXIT_FAILURE);
+ }
+
+ _args = [args retain];
+
+ return self;
+}
+
++ (NSArray *)availableSDKs {
+ NSMutableArray *sdks = [NSMutableArray array];
+ for (id root in [DTiPhoneSimulatorSystemRoot knownRoots]) {
+ [sdks addObject:[root sdkVersion]];
+ }
+
+ return sdks;
+}
+
+- (int)launch {
+ WaxLog(@"Launching '%@' on'%@'", _appPath, [_sdk sdkDisplayName]);
+
+ DTiPhoneSimulatorApplicationSpecifier *appSpec = [DTiPhoneSimulatorApplicationSpecifier specifierWithApplicationPath:_appPath];
+ if (!appSpec) {
+ WaxLog(@"Could not load application specifier for '%@'", _appPath);
+ return EXIT_FAILURE;
+ }
+
+ DTiPhoneSimulatorSystemRoot *sdkRoot = [DTiPhoneSimulatorSystemRoot defaultRoot];
+
+ DTiPhoneSimulatorSessionConfig *config = [[DTiPhoneSimulatorSessionConfig alloc] init];
+ [config setApplicationToSimulateOnStart:appSpec];
+ [config setSimulatedSystemRoot:sdkRoot];
+ [config setSimulatedApplicationShouldWaitForDebugger:NO];
+ [config setSimulatedApplicationLaunchArgs:_args];
+ [config setSimulatedApplicationLaunchEnvironment:[[NSProcessInfo processInfo] environment]];
+ [config setLocalizedClientName:@"WaxSim"];
+
+ // Make the simulator output to the current STDOUT & STDERR
+ char path[MAXPATHLEN];
+ fcntl(STDOUT_FILENO, F_GETPATH, &path);
+ [config setSimulatedApplicationStdOutPath:[NSString stringWithUTF8String:path]];
+
+ fcntl(STDERR_FILENO, F_GETPATH, &path);
+ [config setSimulatedApplicationStdErrPath:[NSString stringWithUTF8String:path]];
+
+ _session = [[DTiPhoneSimulatorSession alloc] init];
+ [_session setDelegate:self];
+ [_session setSimulatedApplicationPID:[NSNumber numberWithInt:35]];
+
+ NSError *error;
+ if (![_session requestStartWithConfig:config timeout:30 error:&error]) {
+ WaxLog(@"Could not start simulator session: %@", [error localizedDescription]);
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}
+
+- (void)end {
+ [_session requestEndWithTimeout:0];
+}
+
+// DTiPhoneSimulatorSession Delegate
+// ---------------------------------
+- (void)session:(DTiPhoneSimulatorSession *)session didStart:(BOOL)started withError:(NSError *)error {
+ if (!started) {
+ WaxLog(@"Session failed to start. %@", [error localizedDescription]);
+ exit(EXIT_FAILURE);
+ }
+}
+
+- (void)session:(DTiPhoneSimulatorSession *)session didEndWithError:(NSError *)error {
+ WaxLog(@"Session ended with error. %@", [error localizedDescription]);
+ return exit(error ? EXIT_FAILURE : EXIT_SUCCESS);
+}
+
+@end
117 WaxSim.m
@@ -0,0 +1,117 @@
+#import <AppKit/AppKit.h>
+#import "iPhoneSimulatorRemoteClient.h"
+#import "Simulator.h"
+#import "termios.h"
+
+struct termios savedTermios;
+
+void printUsage();
+int hasInput();
+void ttyRaw();
+void ttyReset();
+
+int main(int argc, char *argv[]) {
+ int c;
+ char *sdk = nil;
+ char *appPath = nil;
+ NSMutableArray *additionalArgs = [NSMutableArray array];
+
+ while ((c = getopt(argc, argv, "s:ah")) != -1) {
+ switch(c) {
+ case 's':
+ sdk = optarg;
+ break;
+ case 'a':
+ fprintf(stdout, "Available SDK Versions.\n", optopt);
+ for (NSString *sdkVersion in [Simulator availableSDKs]) {
+ fprintf(stderr, " %s\n", [sdkVersion UTF8String]);
+ }
+ return 1;
+ case 'h':
+ printUsage();
+ return 1;
+ case '?':
+ if (optopt == 's') {
+ fprintf(stderr, "Option -%c requires an argument.\n", optopt);
+ printUsage();
+ }
+ else {
+ fprintf(stderr, "Unknown option `-%c'.\n", optopt);
+ printUsage();
+ }
+ return 1;
+ break;
+ default:
+ abort ();
+ }
+
+ }
+
+ if (argc > optind) {
+ appPath = argv[optind];
+
+ // Additional args are sent to app
+ for (int i = optind + 1; i < argc; i++) {
+ [additionalArgs addObject:[NSString stringWithUTF8String:argv[i]]];
+ }
+ }
+ else {
+ fprintf(stderr, "No app-path was specified!\n");
+ printUsage();
+ return 1;
+ }
+
+ ttyRaw();
+ atexit(ttyReset);
+
+ NSString *sdkString = sdk ? [NSString stringWithUTF8String:sdk] : nil;
+ NSString *appPathString = [NSString stringWithUTF8String:appPath];
+ Simulator *simulator = [[Simulator alloc] initWithAppPath:appPathString sdk:sdkString args:additionalArgs];
+ [simulator launch];
+
+ while ([[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:-1]]) {
+ int r;
+ unsigned char c;
+
+ if (hasInput()) {
+ if ((r = read(0, &c, sizeof(c))) < 0) continue; // error
+
+ printf("REBOOT %c\n", c);
+ }
+ }
+
+ return 0;
+}
+
+void printUsage() {
+ fprintf(stderr, "usage: waxsim [options] app-path\n");
+ fprintf(stderr, "example: waxsim -s 2.2 /path/to/app.app\n");
+ fprintf(stderr, "Available options are:\n");
+ fprintf(stderr, "\t-s sdk\tVersion number of sdk to use (-s 3.1)\n");
+ fprintf(stderr, "\t-a \tAvailable SDK's\n");
+ fprintf(stderr, "\t-h \tPrints out this wonderful documentation!\n");
+}
+
+int hasInput() {
+ struct timeval tv = { 0L, 0L };
+ fd_set fds;
+ FD_SET(STDIN_FILENO, &fds);
+ return select(1, &fds, NULL, NULL, &tv);
+}
+
+void ttyRaw() {
+ struct termios buf;
+ tcgetattr(STDIN_FILENO, &buf);
+
+ savedTermios = buf;
+
+ buf.c_lflag &= ~ICANON;
+ buf.c_cc[VMIN] = 0;
+ buf.c_cc[VTIME] = 0;
+
+ tcsetattr(STDIN_FILENO, TCSANOW, &buf);
+}
+
+void ttyReset() {
+ tcsetattr(STDIN_FILENO, TCSANOW, &savedTermios);
+}
254 WaxSim.xcodeproj/project.pbxproj
@@ -0,0 +1,254 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 048274F11126398C003DFACB /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 048274F01126398C003DFACB /* AppKit.framework */; };
+ 048275B2112639B7003DFACB /* Simulator.m in Sources */ = {isa = PBXBuildFile; fileRef = 048275B1112639B7003DFACB /* Simulator.m */; };
+ 048275C011263A74003DFACB /* iPhoneSimulatorRemoteClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 048275BF11263A74003DFACB /* iPhoneSimulatorRemoteClient.framework */; };
+ 8DD76F9A0486AA7600D96B5E /* WaxSim.m in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* WaxSim.m */; settings = {ATTRIBUTES = (); }; };
+ 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 8DD76F9E0486AA7600D96B5E /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 8;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 048274F01126398C003DFACB /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+ 048275AF112639B7003DFACB /* iPhoneSimulatorRemoteClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iPhoneSimulatorRemoteClient.h; path = iPhoneSimulatorRemoteClient/iPhoneSimulatorRemoteClient.h; sourceTree = "<group>"; };
+ 048275B0112639B7003DFACB /* Simulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Simulator.h; sourceTree = "<group>"; };
+ 048275B1112639B7003DFACB /* Simulator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Simulator.m; sourceTree = "<group>"; };
+ 048275BF11263A74003DFACB /* iPhoneSimulatorRemoteClient.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iPhoneSimulatorRemoteClient.framework; path = Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework; sourceTree = DEVELOPER_DIR; };
+ 08FB7796FE84155DC02AAC07 /* WaxSim.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WaxSim.m; sourceTree = "<group>"; };
+ 08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 32A70AAB03705E1F00C91783 /* WaxSim_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaxSim_Prefix.pch; sourceTree = "<group>"; };
+ 8DD76FA10486AA7600D96B5E /* waxsim */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = waxsim; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8DD76F9B0486AA7600D96B5E /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */,
+ 048274F11126398C003DFACB /* AppKit.framework in Frameworks */,
+ 048275C011263A74003DFACB /* iPhoneSimulatorRemoteClient.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 08FB7794FE84155DC02AAC07 /* WaxSim */ = {
+ isa = PBXGroup;
+ children = (
+ 08FB7795FE84155DC02AAC07 /* Source */,
+ 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */,
+ 1AB674ADFE9D54B511CA2CBB /* Products */,
+ );
+ name = WaxSim;
+ sourceTree = "<group>";
+ };
+ 08FB7795FE84155DC02AAC07 /* Source */ = {
+ isa = PBXGroup;
+ children = (
+ 32A70AAB03705E1F00C91783 /* WaxSim_Prefix.pch */,
+ 08FB7796FE84155DC02AAC07 /* WaxSim.m */,
+ 048275B0112639B7003DFACB /* Simulator.h */,
+ 048275B1112639B7003DFACB /* Simulator.m */,
+ 048275AF112639B7003DFACB /* iPhoneSimulatorRemoteClient.h */,
+ );
+ name = Source;
+ sourceTree = "<group>";
+ };
+ 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ 048275BF11263A74003DFACB /* iPhoneSimulatorRemoteClient.framework */,
+ 048274F01126398C003DFACB /* AppKit.framework */,
+ 08FB779EFE84155DC02AAC07 /* Foundation.framework */,
+ );
+ name = "External Frameworks and Libraries";
+ sourceTree = "<group>";
+ };
+ 1AB674ADFE9D54B511CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8DD76FA10486AA7600D96B5E /* waxsim */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8DD76F960486AA7600D96B5E /* WaxSim */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1DEB927408733DD40010E9CD /* Build configuration list for PBXNativeTarget "WaxSim" */;
+ buildPhases = (
+ 8DD76F990486AA7600D96B5E /* Sources */,
+ 8DD76F9B0486AA7600D96B5E /* Frameworks */,
+ 8DD76F9E0486AA7600D96B5E /* CopyFiles */,
+ 0482769511263E2A003DFACB /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = WaxSim;
+ productInstallPath = "$(HOME)/bin";
+ productName = WaxSim;
+ productReference = 8DD76FA10486AA7600D96B5E /* waxsim */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 08FB7793FE84155DC02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "WaxSim" */;
+ compatibilityVersion = "Xcode 3.1";
+ hasScannedForEncodings = 1;
+ mainGroup = 08FB7794FE84155DC02AAC07 /* WaxSim */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8DD76F960486AA7600D96B5E /* WaxSim */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 0482769511263E2A003DFACB /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "cp \"$TARGET_BUILD_DIR/$EXECUTABLE_NAME\" ~/bin/\ncp \"$TARGET_BUILD_DIR/$EXECUTABLE_NAME\" ~/code/wax/lib/bin/";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8DD76F990486AA7600D96B5E /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8DD76F9A0486AA7600D96B5E /* WaxSim.m in Sources */,
+ 048275B2112639B7003DFACB /* Simulator.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 1DEB927508733DD40010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks\"",
+ );
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_ENABLE_OBJC_GC = supported;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = WaxSim_Prefix.pch;
+ INSTALL_PATH = /usr/local/bin;
+ LD_RUNPATH_SEARCH_PATHS = /Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks;
+ PRODUCT_NAME = waxsim;
+ };
+ name = Debug;
+ };
+ 1DEB927608733DD40010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks\"",
+ );
+ GCC_ENABLE_OBJC_GC = supported;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = WaxSim_Prefix.pch;
+ INSTALL_PATH = /usr/local/bin;
+ LD_RUNPATH_SEARCH_PATHS = /Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks;
+ PRODUCT_NAME = waxsim;
+ };
+ name = Release;
+ };
+ 1DEB927908733DD40010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.6;
+ };
+ name = Debug;
+ };
+ 1DEB927A08733DD40010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.6;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1DEB927408733DD40010E9CD /* Build configuration list for PBXNativeTarget "WaxSim" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB927508733DD40010E9CD /* Debug */,
+ 1DEB927608733DD40010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "WaxSim" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB927908733DD40010E9CD /* Debug */,
+ 1DEB927A08733DD40010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
+}
7 WaxSim_Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'WaxSim' target in the 'WaxSim' project.
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+#endif
126 iPhoneSimulatorRemoteClient/iPhoneSimulatorRemoteClient.h
@@ -0,0 +1,126 @@
+#import <Cocoa/Cocoa.h>
+
+/*
+ * File: /Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
+ * Arch: Intel 80x86 (i386)
+ * Current version: 12.0.0, Compatibility version: 1.0.0
+ */
+
+@class DTiPhoneSimulatorSession;
+
+@protocol DTiPhoneSimulatorSessionDelegate
+
+- (void) session: (DTiPhoneSimulatorSession *) session didEndWithError: (NSError *) error;
+- (void) session: (DTiPhoneSimulatorSession *) session didStart: (BOOL) started withError: (NSError *) error;
+
+@end
+
+@interface DTiPhoneSimulatorApplicationSpecifier : NSObject <NSCopying>
+{
+ NSString *_appPath;
+ NSString *_bundleID;
+}
+
++ (id) specifierWithApplicationPath: (NSString *) appPath;
++ (id) specifierWithApplicationBundleIdentifier: (NSString *) bundleID;
+- (NSString *) bundleID;
+- (void) setBundleID: (NSString *) bundleId;
+- (NSString *) appPath;
+- (void) setAppPath: (NSString *) appPath;
+
+@end
+
+@interface DTiPhoneSimulatorSystemRoot : NSObject <NSCopying>
+{
+ NSString *sdkRootPath;
+ NSString *sdkVersion;
+ NSString *sdkDisplayName;
+}
+
++ (id) defaultRoot;
+
++ (id)rootWithSDKPath:(NSString *) path;
++ (id)rootWithSDKVersion:(NSString *)version;
+
++ (NSArray *) knownRoots;
+- (id)initWithSDKPath:(id)fp8;
+- (id)sdkDisplayName;
+- (void)setSdkDisplayName:(id)fp8;
+- (id)sdkVersion;
+- (void)setSdkVersion:(id)fp8;
+- (id)sdkRootPath;
+- (void)setSdkRootPath:(id)fp8;
+
+@end
+
+
+
+@interface DTiPhoneSimulatorSessionConfig : NSObject <NSCopying>
+{
+ NSString *_localizedClientName;
+ DTiPhoneSimulatorSystemRoot *_simulatedSystemRoot;
+ DTiPhoneSimulatorApplicationSpecifier *_applicationToSimulateOnStart;
+ NSArray *_simulatedApplicationLaunchArgs;
+ NSDictionary *_simulatedApplicationLaunchEnvironment;
+ BOOL _simulatedApplicationShouldWaitForDebugger;
+ NSString *_simulatedApplicationStdOutPath;
+ NSString *_simulatedApplicationStdErrPath;
+}
+
++ (NSString *) displayNameForDeviceFamily: (NSNumber *) family;
+
+- (id)simulatedApplicationStdErrPath;
+- (void)setSimulatedApplicationStdErrPath:(id)fp8;
+- (id)simulatedApplicationStdOutPath;
+- (void)setSimulatedApplicationStdOutPath:(id)fp8;
+- (id)simulatedApplicationLaunchEnvironment;
+- (void)setSimulatedApplicationLaunchEnvironment:(id)fp8;
+- (id)simulatedApplicationLaunchArgs;
+- (void)setSimulatedApplicationLaunchArgs:(id)fp8;
+
+- (DTiPhoneSimulatorApplicationSpecifier *) applicationToSimulateOnStart;
+- (void) setApplicationToSimulateOnStart: (DTiPhoneSimulatorApplicationSpecifier *) appSpec;
+- (DTiPhoneSimulatorSystemRoot *) simulatedSystemRoot;
+- (void) setSimulatedSystemRoot: (DTiPhoneSimulatorSystemRoot *) simulatedSystemRoot;
+
+- (NSNumber *) simulatedDeviceFamily;
+- (void) setSimulatedDeviceFamily: (NSNumber *) family;
+
+- (BOOL) simulatedApplicationShouldWaitForDebugger;
+- (void) setSimulatedApplicationShouldWaitForDebugger: (BOOL) waitForDebugger;
+
+- (id)localizedClientName;
+- (void)setLocalizedClientName:(id)fp8;
+
+@end
+
+
+@interface DTiPhoneSimulatorSession : NSObject {
+ NSString *_uuid;
+ id <DTiPhoneSimulatorSessionDelegate> _delegate;
+ NSNumber *_simulatedApplicationPID;
+ int _sessionLifecycleProgress;
+ NSTimer *_timeoutTimer;
+ DTiPhoneSimulatorSessionConfig *_sessionConfig;
+ struct ProcessSerialNumber _simulatorPSN;
+}
+
+- (BOOL) requestStartWithConfig: (DTiPhoneSimulatorSessionConfig *) config timeout: (NSTimeInterval) timeout error: (NSError **) outError;
+- (void) requestEndWithTimeout: (NSTimeInterval) timeout;
+
+- (id)sessionConfig;
+- (void)setSessionConfig:(id)fp8;
+- (id)timeoutTimer;
+- (void)setTimeoutTimer:(id)fp8;
+- (int)sessionLifecycleProgress;
+- (void)setSessionLifecycleProgress:(int)fp8;
+- (id)simulatedApplicationPID;
+- (void)setSimulatedApplicationPID:(id)fp8;
+
+- (id<DTiPhoneSimulatorSessionDelegate>) delegate;
+- (void) setDelegate: (id<DTiPhoneSimulatorSessionDelegate>) delegate;
+
+- (id)uuid;
+- (void)setUuid:(id)fp8;
+
+@end

0 comments on commit 6669347

Please sign in to comment.
Something went wrong with that request. Please try again.