Skip to content

Commit 5428e03

Browse files
Marek Cirkosfacebook-github-bot
authored andcommitted
Kill USB server support
Summary: `iproxy` is much more handy than using our custom USB support. Time to simplify our life and kill it. Plus, we got ony one dependency now ;) Reviewed By: lawrencelomax Differential Revision: D4753457 fbshipit-source-id: 805ab7deeacf38c21eb312c6f87131fbdf5c4658
1 parent bb482e3 commit 5428e03

File tree

11 files changed

+2
-696
lines changed

11 files changed

+2
-696
lines changed

Cartfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
# Used for HTTP routing
22
github "marekcirkos/RoutingHTTPServer"
3-
4-
# Used for USBOverHTTP
5-
github "marekcirkos/peertalk"

WebDriverAgent.xcodeproj/project.pbxproj

Lines changed: 2 additions & 116 deletions
Large diffs are not rendered by default.

WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentUSBClient.xcscheme

Lines changed: 0 additions & 80 deletions
This file was deleted.

WebDriverAgentLib/Routing/FBHTTPOverUSBServer.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

WebDriverAgentLib/Routing/FBHTTPOverUSBServer.m

Lines changed: 0 additions & 173 deletions
This file was deleted.

WebDriverAgentLib/Routing/FBWebServer.m

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#import "FBCommandHandler.h"
1616
#import "FBErrorBuilder.h"
1717
#import "FBExceptionHandler.h"
18-
#import "FBHTTPOverUSBServer.h"
1918
#import "FBRouteRequest.h"
2019
#import "FBRuntimeUtils.h"
2120
#import "FBSession.h"
@@ -45,7 +44,6 @@ - (void)handleResourceNotFound
4544
@interface FBWebServer ()
4645
@property (nonatomic, strong) FBExceptionHandler *exceptionHandler;
4746
@property (nonatomic, strong) RoutingHTTPServer *server;
48-
@property (nonatomic, strong) FBHTTPOverUSBServer *USBServer;
4947
@end
5048

5149
@implementation FBWebServer
@@ -70,9 +68,6 @@ - (void)startServing
7068
[FBLogger logFmt:@"Built at %s %s", __DATE__, __TIME__];
7169
self.exceptionHandler = [FBExceptionHandler new];
7270
[self startHTTPServer];
73-
if (FBConfiguration.shouldListenOnUSB) {
74-
[self startUSBServer];
75-
}
7671
[[NSRunLoop mainRunLoop] run];
7772
}
7873

@@ -109,12 +104,6 @@ - (void)startHTTPServer
109104
[FBLogger logFmt:@"%@http://%@:%d%@", FBServerURLBeginMarker, [XCUIDevice sharedDevice].fb_wifiIPAddress ?: @"localhost", [self.server port], FBServerURLEndMarker];
110105
}
111106

112-
- (void)startUSBServer
113-
{
114-
self.USBServer = [[FBHTTPOverUSBServer alloc] initWithRoutingServer:self.server];
115-
[self.USBServer startServing];
116-
}
117-
118107
- (BOOL)attemptToStartServer:(RoutingHTTPServer *)server onPort:(NSInteger)port withError:(NSError **)error
119108
{
120109
server.port = (UInt16)port;

WebDriverAgentLib/Utilities/FBConfiguration.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ NS_ASSUME_NONNULL_BEGIN
2727
*/
2828
+ (NSRange)bindingPortRange;
2929

30-
/**
31-
YES if should listen on USB. NO otherwise.
32-
*/
33-
+ (BOOL)shouldListenOnUSB;
34-
3530
/**
3631
YES if verbose logging is enabled. NO otherwise.
3732
*/

WebDriverAgentLib/Utilities/FBConfiguration.m

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,6 @@ + (NSRange)bindingPortRange
4343
return NSMakeRange(DefaultStartingPort, DefaultPortRange);
4444
}
4545

46-
+ (BOOL)shouldListenOnUSB
47-
{
48-
#if TARGET_OS_SIMULATOR
49-
return NO;
50-
#else
51-
return YES;
52-
#endif
53-
}
54-
5546
+ (BOOL)verboseLoggingEnabled
5647
{
5748
return [NSProcessInfo.processInfo.environment[@"VERBOSE_LOGGING"] boolValue];

WebDriverAgentLib/WebDriverAgentLib.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ FOUNDATION_EXPORT const unsigned char WebDriverAgentLib_VersionString[];
2727
#import <WebDriverAgentLib/FBErrorBuilder.h>
2828
#import <WebDriverAgentLib/FBExceptionHandler.h>
2929
#import <WebDriverAgentLib/FBFailureProofTestCase.h>
30-
#import <WebDriverAgentLib/FBHTTPOverUSBServer.h>
3130
#import <WebDriverAgentLib/FBKeyboard.h>
3231
#import <WebDriverAgentLib/FBLogger.h>
3332
#import <WebDriverAgentLib/FBMacros.h>

0 commit comments

Comments
 (0)