Summary: Create podspec for UI Debugger and integrate with our iOS sample application. Reviewed By: aigoncharov Differential Revision: D47715973 fbshipit-source-id: a64444660ea9fb8a2c29fcafe1a44266e8daf414
38 lines
990 B
Plaintext
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
|