Skip to content

Commit d31ffe6

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Add RCTDependencyProvider protocol
Summary: React Native has a last temporal dependency on Codegen in the React-RCTAppDelegate pod. The RCTAppDelegate has the responsibility to provide various dependencies to react native, like third party components and various modules. ReactCodegen is generated when the user create the project, while React-RCTAppDelegate eists in React Native itself. This dependency means that we cannot prepare prebuilt for iOS for React Native because when we would have to create prebuilds, we would need the React Codegen, but we can't create a React codegen package that will fit all the apps, because React Codegen can contains App Specific modules and components and apps might have different dependencies. This change introduces the RCTDependencyProvider protocol to invert this dependency. ## Changelog: [iOS][Added] - Add RCTDependencyProvider protocol Differential Revision: D66074409
1 parent 89a7238 commit d31ffe6

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
#import <Foundation/Foundation.h>
9+
10+
@protocol RCTComponentViewProtocol;
11+
12+
NS_ASSUME_NONNULL_BEGIN
13+
14+
@protocol RCTDependencyProvider <NSObject>
15+
16+
- (NSArray<NSString *> *)imageURLLoaderClassNames;
17+
18+
- (NSArray<NSString *> *)imageDataDecoderClassNames;
19+
20+
- (NSArray<NSString *> *)URLRequestHandlerClassNames;
21+
22+
- (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
23+
24+
@end
25+
26+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)