mirror of
https://github.com/facebook/react-native.git
synced 2026-04-01 07:08:03 +00:00
Summary: This change refactors the script to prebuild ios dependencies by: - factoring out the constants - factoring out the flow type definitions - factoring out the .gitignore bypass-github-export-check ## Changelog: [INTERNAL] - Factor out flow types, constants and gitignore Pull Request resolved: https://github.com/facebook/react-native/pull/49614 Test Plan: Tested in this `AppDelegate.mm`: Imports: ```obj-c #import "AppDelegate.h" #import <glog/logging.h> #import <double-conversion.h> #include <fmt/core.h> #include <boost/assert.hpp> #include <fast_float/fast_float.h> #include <string> #import <SocketRocket/SRWebSocket.h> ``` Code: ```obj-c - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { std::string input = "3.1416 xyz "; double_conversion::DoubleToStringConverter::EcmaScriptConverter(); LOG(INFO) << "Hello from GLOG"; fmt::print("Hello, world from FMT!\n"); BOOST_ASSERT(100 == 100); double result; fast_float::from_chars(input.data(), input.data() + input.size(), result); LOG(INFO) << "Answer :" << result; NSArray *frameworks = [NSBundle allFrameworks]; for (NSBundle *framework in frameworks) { NSString *frameworkName = framework.bundleURL.lastPathComponent; if ([frameworkName isEqualToString: @"ReactNativeDependencies.framework"]) { NSBundle *bundle = [NSBundle bundleWithURL:[framework bundleURL]]; NSURL *bundleURL = [bundle URLForResource:@"ReactNativeDependencies_glog" withExtension:@"bundle"]; NSBundle *resourceBundle = [NSBundle bundleWithURL:bundleURL]; NSURL* url = [resourceBundle URLForResource:@"PrivacyInfo" withExtension:@"xcprivacy"]; if (url == nil) { throw [NSException exceptionWithName:@"ResourceNotFoundException" reason:@"Could not find PrivacyInfo.xcprivacy in ReactNativeDependencies_glog bundle" userInfo:nil]; } break; } } return YES; } ``` Reviewed By: cortinico Differential Revision: D70172536 Pulled By: cipolleschi fbshipit-source-id: 91589693fd24e2b0d6d67759fb9fbc86841f4d13
4.0 KiB
4.0 KiB