Skip to content

Commit 82b58d0

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Fix RCTRCTComposedViewRegistry for Old Arch by adding count and keyEnumerator (#43850)
Summary: In the Old Architecture and for Swift Libraries, these two methods are used to initialize a new disctionary but their implementation was missing so some libraries like lottie were failig to build. ## Changelog: [Internal] - Implement missing `count` and `keyEnumerator` methods for RCTComposedViewRegistry Pull Request resolved: #43850 Test Plan: Tested locally with the repro provided by SWM Reviewed By: javache Differential Revision: D55743648 Pulled By: cipolleschi fbshipit-source-id: 7bdb92625341cd704b8b09920ab3223a2ca61a54
1 parent 6bac579 commit 82b58d0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/react-native/React/Modules/RCTUIManager.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,6 +1680,16 @@ - (instancetype)initWithUIManager:(RCTUIManager *)uiManager andRegistry:(NSDicti
16801680
return self;
16811681
}
16821682

1683+
- (NSUInteger)count
1684+
{
1685+
return self->_registry.count;
1686+
}
1687+
1688+
- (NSEnumerator *)keyEnumerator
1689+
{
1690+
return self->_registry.keyEnumerator;
1691+
}
1692+
16831693
- (id)objectForKey:(id)key
16841694
{
16851695
if (![key isKindOfClass:[NSNumber class]]) {

0 commit comments

Comments
 (0)