mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
279cfec55f
Summary: Currently, RCTBlobManager (the native module for Blob support) cannot be loaded on iOS when the new architecture is enabled. ## Changelog [General] [Added] - `BlobModule` to `RCTCoreModulesClassProvider` Pull Request resolved: https://github.com/facebook/react-native/pull/35047 Test Plan: The snippet below can be used to test Blob support with the new architecture enabled. ``` // App.tsx import { useEffect } from 'react'; import { View } from 'react-native'; function uriToBlob(uri: any) { return new Promise((resolve, reject) => { const xhr = new XMLHttpRequest(); xhr.responseType = 'blob'; xhr.onload = () => { const blob = xhr.response; resolve(blob); }; xhr.onerror = err => { reject(err); }; xhr.open('GET', uri); xhr.send(); }); } export default function App() { useEffect(() => { uriToBlob('https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png'); }); return <View />; } ``` Related issue: https://github.com/facebook/react-native/issues/35042 Reviewed By: NickGerleman Differential Revision: D40716048 Pulled By: cipolleschi fbshipit-source-id: 17643d230fa7ea83baee363d137d51f87818baa8
66 lines
2.2 KiB
Objective-C
66 lines
2.2 KiB
Objective-C
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @generated by an internal plugin build system
|
|
*/
|
|
|
|
#ifdef RN_DISABLE_OSS_PLUGIN_HEADER
|
|
|
|
// FB Internal: FBCoreModulesPlugins.h is autogenerated by the build system.
|
|
#import <React/FBCoreModulesPlugins.h>
|
|
|
|
#else
|
|
|
|
// OSS-compatibility layer
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#pragma GCC diagnostic push
|
|
#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
// RCTTurboModuleManagerDelegate should call this to resolve module classes.
|
|
Class RCTCoreModulesClassProvider(const char *name);
|
|
|
|
// Lookup functions
|
|
Class RCTAccessibilityManagerCls(void) __attribute__((used));
|
|
Class RCTAppearanceCls(void) __attribute__((used));
|
|
Class RCTDeviceInfoCls(void) __attribute__((used));
|
|
Class RCTExceptionsManagerCls(void) __attribute__((used));
|
|
Class RCTPlatformCls(void) __attribute__((used));
|
|
Class RCTClipboardCls(void) __attribute__((used));
|
|
Class RCTI18nManagerCls(void) __attribute__((used));
|
|
Class RCTSourceCodeCls(void) __attribute__((used));
|
|
Class RCTActionSheetManagerCls(void) __attribute__((used));
|
|
Class RCTAlertManagerCls(void) __attribute__((used));
|
|
Class RCTAsyncLocalStorageCls(void) __attribute__((used));
|
|
Class RCTTimingCls(void) __attribute__((used));
|
|
Class RCTStatusBarManagerCls(void) __attribute__((used));
|
|
Class RCTKeyboardObserverCls(void) __attribute__((used));
|
|
Class RCTAppStateCls(void) __attribute__((used));
|
|
Class RCTPerfMonitorCls(void) __attribute__((used));
|
|
Class RCTDevMenuCls(void) __attribute__((used));
|
|
Class RCTDevSettingsCls(void) __attribute__((used));
|
|
Class RCTRedBoxCls(void) __attribute__((used));
|
|
Class RCTLogBoxCls(void) __attribute__((used));
|
|
Class RCTWebSocketExecutorCls(void) __attribute__((used));
|
|
Class RCTWebSocketModuleCls(void) __attribute__((used));
|
|
Class RCTDevLoadingViewCls(void) __attribute__((used));
|
|
Class RCTDevSplitBundleLoaderCls(void) __attribute__((used));
|
|
Class RCTEventDispatcherCls(void) __attribute__((used));
|
|
Class RCTBlobManagerCls(void) __attribute__((used));
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#pragma GCC diagnostic pop
|
|
|
|
#endif // RN_DISABLE_OSS_PLUGIN_HEADER
|