Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: testing/iossim/iossim.mm

Issue 2066983004: Work around iossim compile issues on latest Xcode beta. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/class-dump/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Appkit/Appkit.h>
5 #include <asl.h> 6 #include <asl.h>
6 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
7 #include <libgen.h> 8 #include <libgen.h>
8 #include <stdarg.h> 9 #include <stdarg.h>
9 #include <stdio.h> 10 #include <stdio.h>
10 11
11 // An executable (iossim) that runs an app in the iOS Simulator. 12 // An executable (iossim) that runs an app in the iOS Simulator.
12 // Run 'iossim -h' for usage information. 13 // Run 'iossim -h' for usage information.
13 // 14 //
14 // For best results, the iOS Simulator application should not be running when 15 // For best results, the iOS Simulator application should not be running when
15 // iossim is invoked. 16 // iossim is invoked.
16 // 17 //
17 // Headers for iPhoneSimulatorRemoteClient and other frameworks used in this 18 // Headers for iPhoneSimulatorRemoteClient and other frameworks used in this
18 // tool are generated by class-dump, via GYP. 19 // tool are generated by class-dump, via GYP.
19 // (class-dump is available at http://www.codethecode.com/projects/class-dump/) 20 // (class-dump is available at http://www.codethecode.com/projects/class-dump/)
20 // 21 //
21 // However, there are some forward declarations required to get things to 22 // However, there are some forward declarations required to get things to
22 // compile. 23 // compile.
23 24
24 @class DVTStackBacktrace; 25 @class DVTStackBacktrace;
25 #import "DVTFoundation.h" 26 #import "DVTFoundation.h"
26 27
28 // TODO(crbug.com/619982): The latest Xcode beta does not include the proper
29 // headers to use or compile iossim. Define them here so iossim can compile for
30 // now. Unwind this #ifdef if future betas work, or replace and remove iossim.
31 #if defined(__MAC_10_12) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_12
32 @class SimDevice;
33 @class SimDevicePasteboardConnection;
34 @class SimDeviceNotificationManager;
35 @class SimMachPortServer;
36 @class SimPasteboardItem;
37 #endif
38
27 @protocol SimBridge; 39 @protocol SimBridge;
28 @class DVTSimulatorApplication; 40 @class DVTSimulatorApplication;
29 @class SimDeviceSet; 41 @class SimDeviceSet;
30 @class SimDeviceType; 42 @class SimDeviceType;
31 @class SimProfilesPathMonitor; 43 @class SimProfilesPathMonitor;
32 @class SimRuntime; 44 @class SimRuntime;
33 @class SimServiceConnectionManager; 45 @class SimServiceConnectionManager;
34 #import "CoreSimulator.h" 46 #import "CoreSimulator.h"
35 47
36 @interface DVTPlatform : NSObject 48 @interface DVTPlatform : NSObject
(...skipping 12 matching lines...) Expand all
49 // by the iPhoneSimulatorRemoteClient framework, but not defined in the object 61 // by the iPhoneSimulatorRemoteClient framework, but not defined in the object
50 // file, so it must be defined here before importing the generated 62 // file, so it must be defined here before importing the generated
51 // iPhoneSimulatorRemoteClient.h file. 63 // iPhoneSimulatorRemoteClient.h file.
52 @protocol DTiPhoneSimulatorSessionDelegate 64 @protocol DTiPhoneSimulatorSessionDelegate
53 - (void)session:(DTiPhoneSimulatorSession*)session 65 - (void)session:(DTiPhoneSimulatorSession*)session
54 didEndWithError:(NSError*)error; 66 didEndWithError:(NSError*)error;
55 - (void)session:(DTiPhoneSimulatorSession*)session 67 - (void)session:(DTiPhoneSimulatorSession*)session
56 didStart:(BOOL)started 68 didStart:(BOOL)started
57 withError:(NSError*)error; 69 withError:(NSError*)error;
58 @end 70 @end
71
72 // TODO(crbug.com/619982): The latest Xcode beta does not include the proper
73 // headers to use or compile iossim. Define them here so iossim can compile for
74 // now. Unwind this #ifdef if future betas work, or replace and remove iossim.
75 #if defined(__MAC_10_12) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_12
76 @class SimRuntime;
77 @interface DTiPhoneSimulatorSystemRoot : NSObject<NSCopying> {
78 SimRuntime* _runtime;
79 }
80 + (id)rootWithSDKVersion:(id)arg1;
81 @property(readonly) SimRuntime* runtime;
82 @property(readonly, copy) NSString* sdkVersion;
83 @end
84 #endif
85
59 #import "DVTiPhoneSimulatorRemoteClient.h" 86 #import "DVTiPhoneSimulatorRemoteClient.h"
60 87
61 // An undocumented system log key included in messages from launchd. The value 88 // An undocumented system log key included in messages from launchd. The value
62 // is the PID of the process the message is about (as opposed to launchd's PID). 89 // is the PID of the process the message is about (as opposed to launchd's PID).
63 #define ASL_KEY_REF_PID "RefPID" 90 #define ASL_KEY_REF_PID "RefPID"
64 91
65 namespace { 92 namespace {
66 93
67 // Name of environment variables that control the user's home directory in the 94 // Name of environment variables that control the user's home directory in the
68 // simulator. 95 // simulator.
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 [error localizedDescription], 885 [error localizedDescription],
859 [error domain], static_cast<long int>([error code])); 886 [error domain], static_cast<long int>([error code]));
860 } 887 }
861 888
862 // Note that this code is only executed if the simulator fails to start 889 // Note that this code is only executed if the simulator fails to start
863 // because once the main run loop is started, only the delegate calling 890 // because once the main run loop is started, only the delegate calling
864 // exit() will end the program. 891 // exit() will end the program.
865 [pool drain]; 892 [pool drain];
866 return kExitFailure; 893 return kExitFailure;
867 } 894 }
OLDNEW
« no previous file with comments | « no previous file | third_party/class-dump/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698