mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
Summary: Move implementation out from header file. Because it may have potential linker issue. CC. sahrens <img width="716" alt="image" src="https://user-images.githubusercontent.com/5061845/54267283-ea11ac00-45b3-11e9-8d0e-9ff20db98b01.png"> [iOS] [Fixed] - Move Bridge RCTSurfacePresenterStub category implementation to .m file Pull Request resolved: https://github.com/facebook/react-native/pull/23888 Differential Revision: D14477611 Pulled By: cpojer fbshipit-source-id: 660f3c27806252fc8f47430582818d37d42fd365
43 lines
1.1 KiB
Objective-C
43 lines
1.1 KiB
Objective-C
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <objc/runtime.h>
|
|
|
|
#import <React/RCTBridge.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
// TODO: Eventually this should go away and files should just include RCTSurfacePresenter.h, but
|
|
// that pulls in all of fabric which doesn't compile in open source yet, so we mirror the protocol
|
|
// and duplicate the category here for now.
|
|
|
|
|
|
@protocol RCTSurfacePresenterObserver <NSObject>
|
|
|
|
@optional
|
|
|
|
- (void)willMountComponentsWithRootTag:(NSInteger)rootTag;
|
|
- (void)didMountComponentsWithRootTag:(NSInteger)rootTag;
|
|
|
|
@end
|
|
|
|
@protocol RCTSurfacePresenterStub <NSObject>
|
|
|
|
- (BOOL)synchronouslyUpdateViewOnUIThread:(NSNumber *)reactTag props:(NSDictionary *)props;
|
|
- (void)addObserver:(id<RCTSurfacePresenterObserver>)observer;
|
|
- (void)removeObserver:(id<RCTSurfacePresenterObserver>)observer;
|
|
|
|
@end
|
|
|
|
@interface RCTBridge (RCTSurfacePresenterStub)
|
|
|
|
- (id<RCTSurfacePresenterStub>)surfacePresenter;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|