diff --git a/iOS/Plugins/SonarKitLayoutPlugin/SonarKitLayoutPlugin/SonarKitLayoutPlugin.mm b/iOS/Plugins/SonarKitLayoutPlugin/SonarKitLayoutPlugin/SonarKitLayoutPlugin.mm index 2e75a97a8..b040b4522 100644 --- a/iOS/Plugins/SonarKitLayoutPlugin/SonarKitLayoutPlugin/SonarKitLayoutPlugin.mm +++ b/iOS/Plugins/SonarKitLayoutPlugin/SonarKitLayoutPlugin/SonarKitLayoutPlugin.mm @@ -9,7 +9,7 @@ #import "SonarKitLayoutPlugin.h" -#import +#import #import #import #import diff --git a/iOS/Sample/AppDelegate.mm b/iOS/Sample/AppDelegate.mm index 568f8e94a..61fe792ba 100644 --- a/iOS/Sample/AppDelegate.mm +++ b/iOS/Sample/AppDelegate.mm @@ -7,7 +7,7 @@ */ #import "AppDelegate.h" -#import +#import #import #import #import @@ -28,14 +28,14 @@ { _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - SonarClient *client = [SonarClient sharedClient]; + FlipperClient *client = [FlipperClient sharedClient]; SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; [SonarKitLayoutComponentKitSupport setUpWithDescriptorMapper: layoutDescriptorMapper]; [client addPlugin: [[SonarKitLayoutPlugin alloc] initWithRootNode: application withDescriptorMapper: layoutDescriptorMapper]]; - [[SonarClient sharedClient] addPlugin: [[SonarKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; + [[FlipperClient sharedClient] addPlugin: [[SonarKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; [client start]; UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryBoard" bundle:nil]; diff --git a/iOS/Sample/Podfile.lock b/iOS/Sample/Podfile.lock index 5c5d884fe..6588edb08 100644 --- a/iOS/Sample/Podfile.lock +++ b/iOS/Sample/Podfile.lock @@ -16,36 +16,36 @@ PODS: - PeerTalk (0.0.2) - RSocket (0.10.0): - Folly - - Sonar (0.7.0): + - Sonar (0.7.1): - Folly (~> 1.1) - RSocket (~> 0.10) - - SonarKit (0.7.0): - - SonarKit/Core (= 0.7.0) - - SonarKit/Core (0.7.0): + - SonarKit (0.7.1): + - SonarKit/Core (= 0.7.1) + - SonarKit/Core (0.7.1): - CocoaAsyncSocket (~> 7.6) - Folly (~> 1.1) - OpenSSL-Static (= 1.0.2.c1) - PeerTalk (~> 0.0.2) - - Sonar (~> 0.7.0) + - Sonar (~> 0.7.1) - SonarKit/CppBridge - SonarKit/FBCxxUtils - SonarKit/FBDefines - - SonarKit/CppBridge (0.7.0) - - SonarKit/FBCxxUtils (0.7.0) - - SonarKit/FBDefines (0.7.0) - - SonarKit/SKIOSNetworkPlugin (0.7.0): + - SonarKit/CppBridge (0.7.1) + - SonarKit/FBCxxUtils (0.7.1) + - SonarKit/FBDefines (0.7.1) + - SonarKit/SKIOSNetworkPlugin (0.7.1): - SonarKit/Core - SonarKit/SonarKitNetworkPlugin - - SonarKit/SonarKitLayoutComponentKitSupport (0.7.0): + - SonarKit/SonarKitLayoutComponentKitSupport (0.7.1): - ComponentKit - SonarKit/Core - SonarKit/SonarKitLayoutPlugin - Yoga (~> 1.9) - - SonarKit/SonarKitLayoutPlugin (0.7.0): + - SonarKit/SonarKitLayoutPlugin (0.7.1): - SonarKit/Core - Yoga (~> 1.9) - YogaKit (~> 1.8) - - SonarKit/SonarKitNetworkPlugin (0.7.0): + - SonarKit/SonarKitNetworkPlugin (0.7.1): - SonarKit/Core - Yoga (1.9.0) - YogaKit (1.9.0): @@ -90,8 +90,8 @@ SPEC CHECKSUMS: OpenSSL-Static: bd17e34564a8591ad76b740318683a6caa19a13e PeerTalk: 77481b0a8136f226b90ccf828d6061f70139ffde RSocket: 4fdb7e562db30a2d4fceddefdc601749ffc9ebe2 - Sonar: 3ce26a113ca4cf69e0d784c22ca605708ee657ee - SonarKit: 924c28d0c1d5ef830d79cd71c934b3710daeb767 + Sonar: 63e5e5d1f217b691a528b68bb88ddc545dc808d5 + SonarKit: f457030ca47e09e714a7eadd64c9d0837c6a6b52 Yoga: aaae8abea68951f60bee05f6277d3eed90bb91bb YogaKit: d447a9bb808718e6f58e52a2255a8050081a3ead diff --git a/iOS/SampleSwift/SampleSwift/AppDelegate.swift b/iOS/SampleSwift/SampleSwift/AppDelegate.swift index 476d5e669..987434ed9 100644 --- a/iOS/SampleSwift/SampleSwift/AppDelegate.swift +++ b/iOS/SampleSwift/SampleSwift/AppDelegate.swift @@ -12,7 +12,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { window = UIWindow() - let client = SonarClient.shared() + let client = FlipperClient.shared() // Layout and network plugins are currently not supported for Swift apps. // let layoutDescriptorMapper = SKDescriptorMapper(defaults: ()) // SonarKitLayoutComponentKitSupport.setUp(descriptorMapper: layoutDescriptorMapper) diff --git a/iOS/SonarKit.podspec b/iOS/SonarKit.podspec index 39f42297c..90984291e 100644 --- a/iOS/SonarKit.podspec +++ b/iOS/SonarKit.podspec @@ -64,7 +64,7 @@ Pod::Spec.new do |spec| 'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKResponseInfo.h', 'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin.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\"" ss.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", "DEFINES_MODULE" => "YES", diff --git a/iOS/SonarKit/SonarClient.h b/iOS/SonarKit/FlipperClient.h similarity index 85% rename from iOS/SonarKit/SonarClient.h rename to iOS/SonarKit/FlipperClient.h index 790359595..8fe030053 100644 --- a/iOS/SonarKit/SonarClient.h +++ b/iOS/SonarKit/FlipperClient.h @@ -15,10 +15,10 @@ Represents a connection between the Sonar desktop och client side. Manages the lifecycle of attached 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; @@ -62,7 +62,7 @@ Subscribe a ViewController to state update change notifications */ - (void)subscribeForUpdates:(id)controller; -// initializers are disabled. You must use `+[SonarClient sharedClient]` instance. +// initializers are disabled. You must use `+[FlipperClient sharedClient]` instance. - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; diff --git a/iOS/SonarKit/SonarClient.mm b/iOS/SonarKit/FlipperClient.mm similarity index 97% rename from iOS/SonarKit/SonarClient.mm rename to iOS/SonarKit/FlipperClient.mm index 0c6710dcb..703ee39dd 100644 --- a/iOS/SonarKit/SonarClient.mm +++ b/iOS/SonarKit/FlipperClient.mm @@ -7,7 +7,7 @@ */ #if FB_SONARKIT_ENABLED -#import "SonarClient.h" +#import "FlipperClient.h" #import "SonarCppWrapperPlugin.h" #import #include @@ -22,7 +22,7 @@ using WrapperPlugin = facebook::flipper::SonarCppWrapperPlugin; -@implementation SonarClient { +@implementation FlipperClient { facebook::flipper::SonarClient *_cppClient; folly::ScopedEventBaseThread sonarThread; folly::ScopedEventBaseThread connectionThread; @@ -33,7 +33,7 @@ using WrapperPlugin = facebook::flipper::SonarCppWrapperPlugin; + (instancetype)sharedClient { - static SonarClient *sharedClient = nil; + static FlipperClient *sharedClient = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ sharedClient = [[self alloc] init]; diff --git a/iOS/SonarKit/FlipperDiagnosticsViewController.m b/iOS/SonarKit/FlipperDiagnosticsViewController.m index ae79c05ee..e5a931f98 100644 --- a/iOS/SonarKit/FlipperDiagnosticsViewController.m +++ b/iOS/SonarKit/FlipperDiagnosticsViewController.m @@ -1,7 +1,7 @@ #ifdef FB_SONARKIT_ENABLED #import "FlipperDiagnosticsViewController.h" -#import "SonarClient.h" +#import "FlipperClient.h" #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 registerClass:[UITableViewCell class] forCellReuseIdentifier:kSKCellIdentifier]; 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 updateLogView]; @@ -64,12 +64,12 @@ static NSString *const kSKCellIdentifier = @"FlipperDiagnosticStateTableStableCe } - (void)updateStateTable { - self.tableDataSource.elements = [[SonarClient sharedClient] getStateElements]; + self.tableDataSource.elements = [[FlipperClient sharedClient] getStateElements]; [self.stateTable reloadData]; } - (void)updateLogView { - NSString *state = [[SonarClient sharedClient] getState]; + NSString *state = [[FlipperClient sharedClient] getState]; self.logLabel.text = state; [self.logLabel sizeToFit]; self.scrollView.contentSize = self.logLabel.frame.size; @@ -82,7 +82,7 @@ static NSString *const kSKCellIdentifier = @"FlipperDiagnosticStateTableStableCe - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; id weakSelf = self; - [[SonarClient sharedClient] subscribeForUpdates:weakSelf]; + [[FlipperClient sharedClient] subscribeForUpdates:weakSelf]; } - (UIInterfaceOrientationMask)supportedInterfaceOrientations { diff --git a/iOS/SonarKitTestUtils/SonarClient+Testing.h b/iOS/SonarKitTestUtils/FlipperClient+Testing.h similarity index 86% rename from iOS/SonarKitTestUtils/SonarClient+Testing.h rename to iOS/SonarKitTestUtils/FlipperClient+Testing.h index 2b032f785..e33ae4953 100644 --- a/iOS/SonarKitTestUtils/SonarClient+Testing.h +++ b/iOS/SonarKitTestUtils/FlipperClient+Testing.h @@ -12,9 +12,9 @@ #import #import -#import +#import -@interface SonarClient (Testing) +@interface FlipperClient (Testing) - (instancetype)initWithCppClient:(facebook::flipper::SonarClient *)cppClient;