Add Example for InteropLayer on RNTester (#51260)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51260

This is a preparatory change that adds an example to RNTester for the Fabric interop layer on iOS.
This example is needed to create a Jest E2E tests that will make sure that the Fabric Interop Layer can properly add views as subviews.

We discovered the bug thanks to react-native-maps.

## Changelog:
[Internal] - Add Example for the Fabric Interop Layer to RNTester iOS

Reviewed By: cortinico

Differential Revision: D74579737

fbshipit-source-id: 0c1bbb06790b01313cd98aa4b7152d8aba0cded3
This commit is contained in:
Riccardo Cipolleschi
2025-05-14 10:11:03 -07:00
committed by Facebook GitHub Bot
parent 337ae3bacb
commit e9c8fee4ef
6 changed files with 221 additions and 0 deletions
@@ -0,0 +1,15 @@
/*
* 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.
*/
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface InteropTestView : UIView
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,18 @@
/*
* 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.
*/
#import "RCTInteropTestView.h"
@implementation InteropTestView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
return self;
}
@end
@@ -0,0 +1,14 @@
/*
* 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.
*/
#import <React/RCTViewManager.h>
NS_ASSUME_NONNULL_BEGIN
@interface InteropTestViewManager : RCTViewManager
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,20 @@
/*
* 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.
*/
#import "RCTInteropTestViewManager.h"
#import "RCTInteropTestView.h"
@implementation InteropTestViewManager
RCT_EXPORT_MODULE(InteropTestView)
- (UIView *)view
{
return [[InteropTestView alloc] init];
}
@end