Add physical iOS support to internal build

Summary: Adds support for physical iOS devices, when the necessary dependencies are present. Unfortunately these aren't open sourced yet so the open source build won't get this feature yet.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13001473

fbshipit-source-id: d8c2bcd53b7972bec676717c8af0112800b918d0
This commit is contained in:
John Knox
2018-12-03 11:32:38 -08:00
committed by Facebook Github Bot
parent 8d93946739
commit 40f50d48e3
22 changed files with 603 additions and 89 deletions

View File

@@ -18,7 +18,7 @@
#import "FlipperClient+Testing.h"
#if !TARGET_OS_SIMULATOR
//#import <FKPortForwarding/FKPortForwardingServer.h>
#import <FKPortForwarding/FKPortForwardingServer.h>
#endif
using WrapperPlugin = facebook::flipper::FlipperCppWrapperPlugin;
@@ -28,7 +28,8 @@ using WrapperPlugin = facebook::flipper::FlipperCppWrapperPlugin;
folly::ScopedEventBaseThread sonarThread;
folly::ScopedEventBaseThread connectionThread;
#if !TARGET_OS_SIMULATOR
// FKPortForwardingServer *_server;
FKPortForwardingServer *_secureServer;
FKPortForwardingServer *_insecureServer;
#endif
}
@@ -119,9 +120,12 @@ using WrapperPlugin = facebook::flipper::FlipperCppWrapperPlugin;
- (void)start;
{
#if !TARGET_OS_SIMULATOR
// _server = [FKPortForwardingServer new];
// [_server forwardConnectionsFromPort:8088];
// [_server listenForMultiplexingChannelOnPort:8078];
_secureServer = [FKPortForwardingServer new];
[_secureServer forwardConnectionsFromPort:8088];
[_secureServer listenForMultiplexingChannelOnPort:8078];
_insecureServer = [FKPortForwardingServer new];
[_insecureServer forwardConnectionsFromPort:8089];
[_insecureServer listenForMultiplexingChannelOnPort:8079];
#endif
_cppClient->start();
}
@@ -131,8 +135,10 @@ using WrapperPlugin = facebook::flipper::FlipperCppWrapperPlugin;
{
_cppClient->stop();
#if !TARGET_OS_SIMULATOR
// [_server close];
// _server = nil;
[_secureServer close];
_secureServer = nil;
[_insecureServer close];
_insecureServer = nil;
#endif
}