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:
Riccardo Cipolleschi
2024-04-08 07:51:09 +01:00
committed by Nicola Corti
parent 57ed1bde01
commit 4e9196d433
@@ -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]]) {