Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RCTConvert: Deprecated NSStringArray typedef
Summary: Eliminates a build warning related to the use of the deprecated `NSStringArray` typedef. This fix was more complex than I'd anticipated because `NSStringArray` was also being used as part of a macro-generated selector name, and in two different ways for debug/release. I've added a macro which allows the selector name to be specified explicitly, thus generally allowing for converters which return arrays of templated types. There's an argument for ditching `RCT_JSON_ARRAY_CONVERTER` in favour of `RCT_JSON_ARRAY_CONVERTER_NAMED` as they're both private, but `RCT_ARRAY_CONVERTER` is in the public API so we'd at least need to retain that. There are also arguments for ditching the use of the macro for the nested array case(s) - since afaik this is the only one at the moment. Feedback appreciated :) Tested with the `UIExplorer` unit tests and by diffing the preprocessor output of `RCTConvert.m` in both release and debug configs, verifying that they're identical apart from that `NSStringArray` is replaced by Closes #11799 Differential Revision: D4441197 fbshipit-source-id: 7535ebe6f8ad4566df742e805b0a64530d1b269f
- Loading branch information