Files
flipper/iOS/Plugins/FlipperKitUIDebuggerPlugin/FlipperKitUIDebuggerPlugin/FlipperKitUIDebuggerPluginInit.mm
Lorenzo Blasa 544e49c097 Podspec and sample integration
Summary: Create podspec for UI Debugger and integrate with our iOS sample application.

Reviewed By: aigoncharov

Differential Revision: D47715973

fbshipit-source-id: a64444660ea9fb8a2c29fcafe1a44266e8daf414
2023-07-26 05:01:58 -07:00

38 lines
990 B
Plaintext

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#if FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
#import "FlipperKitUIDebuggerPlugin.h"
#import "UIDContext.h"
#import "UIDDescriptorRegister.h"
#import "UIDTreeObserverFactory.h"
@interface FlipperKitUIDebuggerPlugin ()
- (instancetype)initWithContext:(UIDContext*)context;
@end
#ifdef __cplusplus
extern "C" {
#endif
void FlipperKitUIDebuggerAddPlugin(FlipperClient* client) {
UIDContext* context = [[UIDContext alloc]
initWithApplication:[UIApplication sharedApplication]
descriptorRegister:[UIDDescriptorRegister defaultRegister]
observerFactory:[UIDTreeObserverFactory shared]];
FlipperKitUIDebuggerPlugin* plugin =
[[FlipperKitUIDebuggerPlugin alloc] initWithContext:context];
[client addPlugin:plugin];
}
#ifdef __cplusplus
}
#endif
#endif