Rename iOS SonarClient to FlipperClient
Summary: Renamed `SonarClient` to `FlipperClient` Reviewed By: passy Differential Revision: D9861749 fbshipit-source-id: 3374e4297e49ac198a235babc92deb9d2dddc268
This commit is contained in:
committed by
Facebook Github Bot
parent
9d9fa17134
commit
a488e34514
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#import "SonarKitLayoutPlugin.h"
|
#import "SonarKitLayoutPlugin.h"
|
||||||
|
|
||||||
#import <SonarKit/SonarClient.h>
|
#import <SonarKit/FlipperClient.h>
|
||||||
#import <SonarKit/SonarConnection.h>
|
#import <SonarKit/SonarConnection.h>
|
||||||
#import <SonarKit/SonarResponder.h>
|
#import <SonarKit/SonarResponder.h>
|
||||||
#import <SonarKit/SKMacros.h>
|
#import <SonarKit/SKMacros.h>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
|
|
||||||
#import <SonarKit/SonarClient.h>
|
#import <SonarKit/FlipperClient.h>
|
||||||
#import <SonarKitLayoutPlugin/SonarKitLayoutPlugin.h>
|
#import <SonarKitLayoutPlugin/SonarKitLayoutPlugin.h>
|
||||||
#import <SonarKitNetworkPlugin/SonarKitNetworkPlugin.h>
|
#import <SonarKitNetworkPlugin/SonarKitNetworkPlugin.h>
|
||||||
#import <SonarKitLayoutComponentKitSupport/SonarKitLayoutComponentKitSupport.h>
|
#import <SonarKitLayoutComponentKitSupport/SonarKitLayoutComponentKitSupport.h>
|
||||||
@@ -28,14 +28,14 @@
|
|||||||
{
|
{
|
||||||
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||||
|
|
||||||
SonarClient *client = [SonarClient sharedClient];
|
FlipperClient *client = [FlipperClient sharedClient];
|
||||||
|
|
||||||
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
|
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
|
||||||
[SonarKitLayoutComponentKitSupport setUpWithDescriptorMapper: layoutDescriptorMapper];
|
[SonarKitLayoutComponentKitSupport setUpWithDescriptorMapper: layoutDescriptorMapper];
|
||||||
[client addPlugin: [[SonarKitLayoutPlugin alloc] initWithRootNode: application
|
[client addPlugin: [[SonarKitLayoutPlugin alloc] initWithRootNode: application
|
||||||
withDescriptorMapper: layoutDescriptorMapper]];
|
withDescriptorMapper: layoutDescriptorMapper]];
|
||||||
|
|
||||||
[[SonarClient sharedClient] addPlugin: [[SonarKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
|
[[FlipperClient sharedClient] addPlugin: [[SonarKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
|
||||||
[client start];
|
[client start];
|
||||||
|
|
||||||
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryBoard" bundle:nil];
|
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryBoard" bundle:nil];
|
||||||
|
|||||||
@@ -16,36 +16,36 @@ PODS:
|
|||||||
- PeerTalk (0.0.2)
|
- PeerTalk (0.0.2)
|
||||||
- RSocket (0.10.0):
|
- RSocket (0.10.0):
|
||||||
- Folly
|
- Folly
|
||||||
- Sonar (0.7.0):
|
- Sonar (0.7.1):
|
||||||
- Folly (~> 1.1)
|
- Folly (~> 1.1)
|
||||||
- RSocket (~> 0.10)
|
- RSocket (~> 0.10)
|
||||||
- SonarKit (0.7.0):
|
- SonarKit (0.7.1):
|
||||||
- SonarKit/Core (= 0.7.0)
|
- SonarKit/Core (= 0.7.1)
|
||||||
- SonarKit/Core (0.7.0):
|
- SonarKit/Core (0.7.1):
|
||||||
- CocoaAsyncSocket (~> 7.6)
|
- CocoaAsyncSocket (~> 7.6)
|
||||||
- Folly (~> 1.1)
|
- Folly (~> 1.1)
|
||||||
- OpenSSL-Static (= 1.0.2.c1)
|
- OpenSSL-Static (= 1.0.2.c1)
|
||||||
- PeerTalk (~> 0.0.2)
|
- PeerTalk (~> 0.0.2)
|
||||||
- Sonar (~> 0.7.0)
|
- Sonar (~> 0.7.1)
|
||||||
- SonarKit/CppBridge
|
- SonarKit/CppBridge
|
||||||
- SonarKit/FBCxxUtils
|
- SonarKit/FBCxxUtils
|
||||||
- SonarKit/FBDefines
|
- SonarKit/FBDefines
|
||||||
- SonarKit/CppBridge (0.7.0)
|
- SonarKit/CppBridge (0.7.1)
|
||||||
- SonarKit/FBCxxUtils (0.7.0)
|
- SonarKit/FBCxxUtils (0.7.1)
|
||||||
- SonarKit/FBDefines (0.7.0)
|
- SonarKit/FBDefines (0.7.1)
|
||||||
- SonarKit/SKIOSNetworkPlugin (0.7.0):
|
- SonarKit/SKIOSNetworkPlugin (0.7.1):
|
||||||
- SonarKit/Core
|
- SonarKit/Core
|
||||||
- SonarKit/SonarKitNetworkPlugin
|
- SonarKit/SonarKitNetworkPlugin
|
||||||
- SonarKit/SonarKitLayoutComponentKitSupport (0.7.0):
|
- SonarKit/SonarKitLayoutComponentKitSupport (0.7.1):
|
||||||
- ComponentKit
|
- ComponentKit
|
||||||
- SonarKit/Core
|
- SonarKit/Core
|
||||||
- SonarKit/SonarKitLayoutPlugin
|
- SonarKit/SonarKitLayoutPlugin
|
||||||
- Yoga (~> 1.9)
|
- Yoga (~> 1.9)
|
||||||
- SonarKit/SonarKitLayoutPlugin (0.7.0):
|
- SonarKit/SonarKitLayoutPlugin (0.7.1):
|
||||||
- SonarKit/Core
|
- SonarKit/Core
|
||||||
- Yoga (~> 1.9)
|
- Yoga (~> 1.9)
|
||||||
- YogaKit (~> 1.8)
|
- YogaKit (~> 1.8)
|
||||||
- SonarKit/SonarKitNetworkPlugin (0.7.0):
|
- SonarKit/SonarKitNetworkPlugin (0.7.1):
|
||||||
- SonarKit/Core
|
- SonarKit/Core
|
||||||
- Yoga (1.9.0)
|
- Yoga (1.9.0)
|
||||||
- YogaKit (1.9.0):
|
- YogaKit (1.9.0):
|
||||||
@@ -90,8 +90,8 @@ SPEC CHECKSUMS:
|
|||||||
OpenSSL-Static: bd17e34564a8591ad76b740318683a6caa19a13e
|
OpenSSL-Static: bd17e34564a8591ad76b740318683a6caa19a13e
|
||||||
PeerTalk: 77481b0a8136f226b90ccf828d6061f70139ffde
|
PeerTalk: 77481b0a8136f226b90ccf828d6061f70139ffde
|
||||||
RSocket: 4fdb7e562db30a2d4fceddefdc601749ffc9ebe2
|
RSocket: 4fdb7e562db30a2d4fceddefdc601749ffc9ebe2
|
||||||
Sonar: 3ce26a113ca4cf69e0d784c22ca605708ee657ee
|
Sonar: 63e5e5d1f217b691a528b68bb88ddc545dc808d5
|
||||||
SonarKit: 924c28d0c1d5ef830d79cd71c934b3710daeb767
|
SonarKit: f457030ca47e09e714a7eadd64c9d0837c6a6b52
|
||||||
Yoga: aaae8abea68951f60bee05f6277d3eed90bb91bb
|
Yoga: aaae8abea68951f60bee05f6277d3eed90bb91bb
|
||||||
YogaKit: d447a9bb808718e6f58e52a2255a8050081a3ead
|
YogaKit: d447a9bb808718e6f58e52a2255a8050081a3ead
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||||
window = UIWindow()
|
window = UIWindow()
|
||||||
|
|
||||||
let client = SonarClient.shared()
|
let client = FlipperClient.shared()
|
||||||
// Layout and network plugins are currently not supported for Swift apps.
|
// Layout and network plugins are currently not supported for Swift apps.
|
||||||
// let layoutDescriptorMapper = SKDescriptorMapper(defaults: ())
|
// let layoutDescriptorMapper = SKDescriptorMapper(defaults: ())
|
||||||
// SonarKitLayoutComponentKitSupport.setUp(descriptorMapper: layoutDescriptorMapper)
|
// SonarKitLayoutComponentKitSupport.setUp(descriptorMapper: layoutDescriptorMapper)
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ Pod::Spec.new do |spec|
|
|||||||
'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKResponseInfo.h',
|
'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKResponseInfo.h',
|
||||||
'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin.h',
|
'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin.h',
|
||||||
'iOS/FBDefines/FBMacros.h',
|
'iOS/FBDefines/FBMacros.h',
|
||||||
'iOS/SonarKit/**/{FlipperStateUpdateListener,SonarClient,SonarPlugin,SonarConnection,FlipperResponder,SKMacros}.h'
|
'iOS/SonarKit/**/{FlipperStateUpdateListener,FlipperClient,SonarPlugin,SonarConnection,SonarResponder,SKMacros}.h'
|
||||||
header_search_paths = "\"$(PODS_ROOT)/SonarKit/iOS/SonarKit\" \"$(PODS_ROOT)\"/Headers/Private/SonarKit/** \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/PeerTalkSonar\""
|
header_search_paths = "\"$(PODS_ROOT)/SonarKit/iOS/SonarKit\" \"$(PODS_ROOT)\"/Headers/Private/SonarKit/** \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/PeerTalkSonar\""
|
||||||
ss.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
ss.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
||||||
"DEFINES_MODULE" => "YES",
|
"DEFINES_MODULE" => "YES",
|
||||||
|
|||||||
@@ -15,10 +15,10 @@
|
|||||||
Represents a connection between the Sonar desktop och client side. Manages the lifecycle of attached
|
Represents a connection between the Sonar desktop och client side. Manages the lifecycle of attached
|
||||||
plugin instances.
|
plugin instances.
|
||||||
*/
|
*/
|
||||||
@interface SonarClient : NSObject
|
@interface FlipperClient : NSObject
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The shared singleton SonarClient instance. It is an error to call this on non-debug builds to avoid leaking data.
|
The shared singleton FlipperClient instance. It is an error to call this on non-debug builds to avoid leaking data.
|
||||||
*/
|
*/
|
||||||
+ (instancetype)sharedClient;
|
+ (instancetype)sharedClient;
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ Subscribe a ViewController to state update change notifications
|
|||||||
*/
|
*/
|
||||||
- (void)subscribeForUpdates:(id<FlipperStateUpdateListener>)controller;
|
- (void)subscribeForUpdates:(id<FlipperStateUpdateListener>)controller;
|
||||||
|
|
||||||
// initializers are disabled. You must use `+[SonarClient sharedClient]` instance.
|
// initializers are disabled. You must use `+[FlipperClient sharedClient]` instance.
|
||||||
- (instancetype)init NS_UNAVAILABLE;
|
- (instancetype)init NS_UNAVAILABLE;
|
||||||
+ (instancetype)new NS_UNAVAILABLE;
|
+ (instancetype)new NS_UNAVAILABLE;
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
#if FB_SONARKIT_ENABLED
|
#if FB_SONARKIT_ENABLED
|
||||||
|
|
||||||
#import "SonarClient.h"
|
#import "FlipperClient.h"
|
||||||
#import "SonarCppWrapperPlugin.h"
|
#import "SonarCppWrapperPlugin.h"
|
||||||
#import <Sonar/SonarClient.h>
|
#import <Sonar/SonarClient.h>
|
||||||
#include <folly/io/async/EventBase.h>
|
#include <folly/io/async/EventBase.h>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
using WrapperPlugin = facebook::flipper::SonarCppWrapperPlugin;
|
using WrapperPlugin = facebook::flipper::SonarCppWrapperPlugin;
|
||||||
|
|
||||||
@implementation SonarClient {
|
@implementation FlipperClient {
|
||||||
facebook::flipper::SonarClient *_cppClient;
|
facebook::flipper::SonarClient *_cppClient;
|
||||||
folly::ScopedEventBaseThread sonarThread;
|
folly::ScopedEventBaseThread sonarThread;
|
||||||
folly::ScopedEventBaseThread connectionThread;
|
folly::ScopedEventBaseThread connectionThread;
|
||||||
@@ -33,7 +33,7 @@ using WrapperPlugin = facebook::flipper::SonarCppWrapperPlugin;
|
|||||||
|
|
||||||
+ (instancetype)sharedClient
|
+ (instancetype)sharedClient
|
||||||
{
|
{
|
||||||
static SonarClient *sharedClient = nil;
|
static FlipperClient *sharedClient = nil;
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
dispatch_once(&onceToken, ^{
|
dispatch_once(&onceToken, ^{
|
||||||
sharedClient = [[self alloc] init];
|
sharedClient = [[self alloc] init];
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifdef FB_SONARKIT_ENABLED
|
#ifdef FB_SONARKIT_ENABLED
|
||||||
|
|
||||||
#import "FlipperDiagnosticsViewController.h"
|
#import "FlipperDiagnosticsViewController.h"
|
||||||
#import "SonarClient.h"
|
#import "FlipperClient.h"
|
||||||
|
|
||||||
#define STATE_VIEW_HEIGHT 300
|
#define STATE_VIEW_HEIGHT 300
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ static NSString *const kSKCellIdentifier = @"FlipperDiagnosticStateTableStableCe
|
|||||||
self.stateTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, STATE_VIEW_HEIGHT)];
|
self.stateTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, STATE_VIEW_HEIGHT)];
|
||||||
[self.stateTable registerClass:[UITableViewCell class] forCellReuseIdentifier:kSKCellIdentifier];
|
[self.stateTable registerClass:[UITableViewCell class] forCellReuseIdentifier:kSKCellIdentifier];
|
||||||
self.stateTable.rowHeight = 14;
|
self.stateTable.rowHeight = 14;
|
||||||
self.tableDataSource = [[StateTableDataSource alloc] initWithElements:[[SonarClient sharedClient] getStateElements]];
|
self.tableDataSource = [[StateTableDataSource alloc] initWithElements:[[FlipperClient sharedClient] getStateElements]];
|
||||||
self.stateTable.dataSource = self.tableDataSource;
|
self.stateTable.dataSource = self.tableDataSource;
|
||||||
|
|
||||||
[self updateLogView];
|
[self updateLogView];
|
||||||
@@ -64,12 +64,12 @@ static NSString *const kSKCellIdentifier = @"FlipperDiagnosticStateTableStableCe
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)updateStateTable {
|
- (void)updateStateTable {
|
||||||
self.tableDataSource.elements = [[SonarClient sharedClient] getStateElements];
|
self.tableDataSource.elements = [[FlipperClient sharedClient] getStateElements];
|
||||||
[self.stateTable reloadData];
|
[self.stateTable reloadData];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)updateLogView {
|
- (void)updateLogView {
|
||||||
NSString *state = [[SonarClient sharedClient] getState];
|
NSString *state = [[FlipperClient sharedClient] getState];
|
||||||
self.logLabel.text = state;
|
self.logLabel.text = state;
|
||||||
[self.logLabel sizeToFit];
|
[self.logLabel sizeToFit];
|
||||||
self.scrollView.contentSize = self.logLabel.frame.size;
|
self.scrollView.contentSize = self.logLabel.frame.size;
|
||||||
@@ -82,7 +82,7 @@ static NSString *const kSKCellIdentifier = @"FlipperDiagnosticStateTableStableCe
|
|||||||
- (void)viewWillAppear:(BOOL)animated {
|
- (void)viewWillAppear:(BOOL)animated {
|
||||||
[super viewWillAppear:animated];
|
[super viewWillAppear:animated];
|
||||||
id<FlipperStateUpdateListener> weakSelf = self;
|
id<FlipperStateUpdateListener> weakSelf = self;
|
||||||
[[SonarClient sharedClient] subscribeForUpdates:weakSelf];
|
[[FlipperClient sharedClient] subscribeForUpdates:weakSelf];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
#import <Sonar/SonarClient.h>
|
#import <Sonar/SonarClient.h>
|
||||||
#import <SonarKit/SonarClient.h>
|
#import <SonarKit/FlipperClient.h>
|
||||||
|
|
||||||
@interface SonarClient (Testing)
|
@interface FlipperClient (Testing)
|
||||||
|
|
||||||
- (instancetype)initWithCppClient:(facebook::flipper::SonarClient *)cppClient;
|
- (instancetype)initWithCppClient:(facebook::flipper::SonarClient *)cppClient;
|
||||||
|
|
||||||
Reference in New Issue
Block a user