mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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: https://github.com/facebook/react-native/pull/43850 Test Plan: Tested locally with the repro provided by SWM Reviewed By: javache Differential Revision: D55743648 Pulled By: cipolleschi fbshipit-source-id: 7bdb92625341cd704b8b09920ab3223a2ca61a54
This commit is contained in:
@@ -1680,6 +1680,16 @@ static UIView *_jsResponder;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSUInteger)count
|
||||
{
|
||||
return self->_registry.count;
|
||||
}
|
||||
|
||||
- (NSEnumerator *)keyEnumerator
|
||||
{
|
||||
return self->_registry.keyEnumerator;
|
||||
}
|
||||
|
||||
- (id)objectForKey:(id)key
|
||||
{
|
||||
if (![key isKindOfClass:[NSNumber class]]) {
|
||||
|
||||
Reference in New Issue
Block a user