mirror of
https://github.com/react/react-native.git
synced 2026-09-28 05:13:06 +08:00
Summary: Adds ArrayBuffer support to ObjC TurboModules, following the C++ ArrayBuffer PR ([`226ef2e`](https://github.com/facebook/react-native/commit/226ef2e7c5d1928d5696dc23efc1b8950ba00e37)). - Codegen support for `ArrayBufferTypeAnnotation` in ObjC module specs (`NSMutableData *` params/returns, new `ArrayBufferKind`) - JSI↔ObjC conversion wraps native-backed buffers zero-copy via `-[NSMutableData initWithBytesNoCopy:length:deallocator:]`; the deallocator retains the backing store so the bytes stay valid even if the `NSMutableData` escapes the call or the source ArrayBuffer is garbage-collected - JS-backed buffers are copied, which is safe on both the synchronous and asynchronous paths This PR is iOS-only; Android support follows in a separate PR. ## Changelog: [IOS] [ADDED] - Add ArrayBuffer support to ObjC TurboModules X-link: https://github.com/facebook/react-native/pull/56986 Reviewed By: javache Differential Revision: D106846249 Pulled By: christophpurrer fbshipit-source-id: 3393d5d6f31a1412f5d52328c90e51205aa6b153