react-native-macos 0.78.3 → 0.78.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/Libraries/Blob/RCTBlobManager.h +0 -0
  2. package/Libraries/Blob/RCTBlobManager.mm +0 -0
  3. package/Libraries/Components/TextInput/TextInputState.js +5 -1
  4. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +0 -0
  5. package/Libraries/Core/ReactNativeVersion.js +1 -1
  6. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  7. package/Libraries/Lists/FillRateHelper.js +3 -3
  8. package/Libraries/Lists/FlatList.d.ts +1 -1
  9. package/Libraries/Lists/FlatList.js +2 -2
  10. package/Libraries/Lists/SectionList.d.ts +1 -1
  11. package/Libraries/Lists/SectionList.js +2 -2
  12. package/Libraries/Lists/SectionListModern.js +2 -2
  13. package/Libraries/Lists/ViewabilityHelper.js +3 -3
  14. package/Libraries/Lists/VirtualizeUtils.js +2 -2
  15. package/Libraries/Lists/VirtualizedList.js +3 -3
  16. package/Libraries/Lists/VirtualizedListContext.js +2 -2
  17. package/Libraries/Lists/VirtualizedSectionList.js +3 -3
  18. package/Libraries/Modal/Modal.js +1 -1
  19. package/Libraries/StyleSheet/normalizeColor.js +0 -0
  20. package/Libraries/Text/Text.d.ts +1 -0
  21. package/Libraries/Text/TextInput/Singleline/RCTUITextField.mm +1 -1
  22. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  23. package/React/Base/RCTJavaScriptLoader.h +0 -0
  24. package/React/Base/RCTJavaScriptLoader.mm +0 -0
  25. package/React/Base/RCTVersion.m +1 -1
  26. package/React/CoreModules/RCTDevLoadingView.mm +1 -1
  27. package/React/CoreModules/RCTLogBoxView.mm +4 -1
  28. package/React/DevSupport/RCTPausedInDebuggerOverlayController.mm +82 -14
  29. package/React/Views/RCTViewKeyboardEvent.m +24 -0
  30. package/ReactAndroid/gradle.properties +1 -1
  31. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  32. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  33. package/local-cli/cli.js +0 -0
  34. package/package.json +5 -4
  35. package/scripts/compose-source-maps.js +0 -0
  36. package/scripts/featureflags/README.md +156 -0
  37. package/scripts/featureflags/index.js +39 -0
  38. package/scripts/ios-configure-glog.sh +0 -0
  39. package/scripts/node-binary.sh +0 -0
  40. package/scripts/packager.sh +0 -0
  41. package/scripts/react-native-xcode.sh +0 -0
  42. package/scripts/react_native_pods_utils/script_phases.sh +0 -0
  43. package/scripts/xcode/ccache-clang++.sh +0 -0
  44. package/scripts/xcode/ccache-clang.sh +0 -0
  45. package/scripts/xcode/with-environment.sh +0 -0
  46. package/types/index.d.ts +1 -1
  47. package/scripts/cocoapods/autolinking.rb +0 -206
  48. package/scripts/cocoapods/autolinking_utils.rb +0 -25
  49. package/scripts/cocoapods/codegen.rb +0 -59
  50. package/scripts/cocoapods/codegen_script_phase_extractor.rb +0 -13
  51. package/scripts/cocoapods/codegen_utils.rb +0 -389
  52. package/scripts/cocoapods/fabric.rb +0 -18
  53. package/scripts/cocoapods/helpers.rb +0 -150
  54. package/scripts/cocoapods/jsengine.rb +0 -33
  55. package/scripts/cocoapods/local_podspec_patch.rb +0 -51
  56. package/scripts/cocoapods/new_architecture.rb +0 -194
  57. package/scripts/cocoapods/privacy_manifest_utils.rb +0 -194
  58. package/scripts/cocoapods/runtime.rb +0 -18
  59. package/scripts/cocoapods/spm.rb +0 -94
  60. package/scripts/cocoapods/utils.rb +0 -724
  61. package/scripts/codegen/codegen-utils.js +0 -51
  62. package/scripts/codegen/generate-artifacts-executor.js +0 -982
  63. package/scripts/codegen/generate-specs-cli-executor.js +0 -128
  64. package/scripts/codegen/templates/RCTAppDependencyProviderH.template +0 -25
  65. package/scripts/codegen/templates/RCTAppDependencyProviderMM.template +0 -55
  66. package/scripts/codegen/templates/RCTModulesConformingToProtocolsProviderH.template +0 -18
  67. package/scripts/codegen/templates/RCTModulesConformingToProtocolsProviderMM.template +0 -33
  68. package/scripts/codegen/templates/RCTThirdPartyComponentsProviderH.template +0 -16
  69. package/scripts/codegen/templates/RCTThirdPartyComponentsProviderMM.template +0 -23
  70. package/scripts/codegen/templates/ReactAppDependencyProvider.podspec.template +0 -34
  71. package/sdks/hermes-engine/hermes-engine.podspec +0 -169
  72. package/sdks/hermes-engine/hermes-utils.rb +0 -289
  73. package/sdks/hermes-engine/utils/build-apple-framework.sh +0 -225
  74. package/sdks/hermes-engine/utils/build-hermes-xcode.sh +0 -100
  75. package/sdks/hermes-engine/utils/build-hermesc-xcode.sh +0 -18
  76. package/sdks/hermes-engine/utils/build-ios-framework.sh +0 -90
  77. package/sdks/hermes-engine/utils/build-mac-framework.sh +0 -22
  78. package/sdks/hermes-engine/utils/copy-hermes-xcode.sh +0 -7
  79. package/sdks/hermes-engine/utils/create-dummy-hermes-xcframework.sh +0 -32
  80. package/sdks/hermes-engine/utils/replace_hermes_version.js +0 -106
@@ -1,128 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @format
8
- */
9
-
10
- 'use strict';
11
-
12
- const utils = require('./codegen-utils');
13
- const fs = require('fs');
14
- const path = require('path');
15
-
16
- const GENERATORS = {
17
- all: {
18
- android: ['componentsAndroid', 'modulesAndroid', 'modulesCxx'],
19
- ios: ['componentsIOS', 'modulesIOS', 'modulesCxx'],
20
- },
21
- components: {
22
- android: ['componentsAndroid'],
23
- ios: ['componentsIOS'],
24
- },
25
- modules: {
26
- android: ['modulesAndroid', 'modulesCxx'],
27
- ios: ['modulesIOS', 'modulesCxx'],
28
- },
29
- };
30
-
31
- function createOutputDirectoryIfNeeded(outputDirectory, libraryName) {
32
- if (!outputDirectory) {
33
- outputDirectory = path.resolve(__dirname, '..', 'Libraries', libraryName);
34
- }
35
- fs.mkdirSync(outputDirectory, {recursive: true});
36
- }
37
-
38
- /**
39
- * This function read a JSON schema from a path and parses it.
40
- * It throws if the schema don't exists or it can't be parsed.
41
- *
42
- * @parameter schemaPath: the path to the schema
43
- * @return a valid schema
44
- * @throw an Error if the schema doesn't exists in a given path or if it can't be parsed.
45
- */
46
- function readAndParseSchema(schemaPath) {
47
- const schemaText = fs.readFileSync(schemaPath, 'utf-8');
48
-
49
- if (schemaText == null) {
50
- throw new Error(`Can't find schema at ${schemaPath}`);
51
- }
52
-
53
- try {
54
- return JSON.parse(schemaText);
55
- } catch (err) {
56
- throw new Error(`Can't parse schema to JSON. ${schemaPath}`);
57
- }
58
- }
59
-
60
- function validateLibraryType(libraryType) {
61
- if (GENERATORS[libraryType] == null) {
62
- throw new Error(`Invalid library type. ${libraryType}`);
63
- }
64
- }
65
-
66
- function generateSpecFromInMemorySchema(
67
- platform,
68
- schema,
69
- outputDirectory,
70
- libraryName,
71
- packageName,
72
- libraryType,
73
- useLocalIncludePaths,
74
- ) {
75
- validateLibraryType(libraryType);
76
- createOutputDirectoryIfNeeded(outputDirectory, libraryName);
77
- utils.getCodegen().generate(
78
- {
79
- libraryName,
80
- schema,
81
- outputDirectory,
82
- packageName,
83
- assumeNonnull: platform === 'ios',
84
- useLocalIncludePaths,
85
- },
86
- {
87
- generators: GENERATORS[libraryType][platform],
88
- },
89
- );
90
-
91
- if (platform === 'android') {
92
- // Move all components C++ files to a structured jni folder for now.
93
- // Note: this should've been done by RNCodegen's generators, but:
94
- // * the generators don't support platform option yet
95
- // * this subdir structure is Android-only, not applicable to iOS
96
- const files = fs.readdirSync(outputDirectory);
97
- const jniOutputDirectory = `${outputDirectory}/jni/react/renderer/components/${libraryName}`;
98
- fs.mkdirSync(jniOutputDirectory, {recursive: true});
99
- files
100
- .filter(f => f.endsWith('.h') || f.endsWith('.cpp'))
101
- .forEach(f => {
102
- fs.renameSync(`${outputDirectory}/${f}`, `${jniOutputDirectory}/${f}`);
103
- });
104
- }
105
- }
106
-
107
- function generateSpec(
108
- platform,
109
- schemaPath,
110
- outputDirectory,
111
- libraryName,
112
- packageName,
113
- libraryType,
114
- ) {
115
- generateSpecFromInMemorySchema(
116
- platform,
117
- readAndParseSchema(schemaPath),
118
- outputDirectory,
119
- libraryName,
120
- packageName,
121
- libraryType,
122
- );
123
- }
124
-
125
- module.exports = {
126
- execute: generateSpec,
127
- generateSpecFromInMemorySchema: generateSpecFromInMemorySchema,
128
- };
@@ -1,25 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
-
9
- #import <Foundation/Foundation.h>
10
-
11
- #if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
12
- #import <React-RCTAppDelegate/RCTDependencyProvider.h>
13
- #elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
14
- #import <React_RCTAppDelegate/RCTDependencyProvider.h>
15
- #else
16
- #import "RCTDependencyProvider.h"
17
- #endif
18
-
19
- NS_ASSUME_NONNULL_BEGIN
20
-
21
- @interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
22
-
23
- @end
24
-
25
- NS_ASSUME_NONNULL_END
@@ -1,55 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #import "RCTAppDependencyProvider.h"
9
- #import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
10
- #import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
11
-
12
- @implementation RCTAppDependencyProvider {
13
- NSArray<NSString *> * _URLRequestHandlerClassNames;
14
- NSArray<NSString *> * _imageDataDecoderClassNames;
15
- NSArray<NSString *> * _imageURLLoaderClassNames;
16
- NSDictionary<NSString *,Class<RCTComponentViewProtocol>> * _thirdPartyFabricComponents;
17
- }
18
-
19
- - (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
20
- static dispatch_once_t requestUrlToken;
21
- dispatch_once(&requestUrlToken, ^{
22
- self->_URLRequestHandlerClassNames = RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
23
- });
24
-
25
- return _URLRequestHandlerClassNames;
26
- }
27
-
28
- - (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
29
- static dispatch_once_t dataDecoderToken;
30
- dispatch_once(&dataDecoderToken, ^{
31
- _imageDataDecoderClassNames = RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
32
- });
33
-
34
- return _imageDataDecoderClassNames;
35
- }
36
-
37
- - (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
38
- static dispatch_once_t urlLoaderToken;
39
- dispatch_once(&urlLoaderToken, ^{
40
- _imageURLLoaderClassNames = RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
41
- });
42
-
43
- return _imageURLLoaderClassNames;
44
- }
45
-
46
- - (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
47
- static dispatch_once_t nativeComponentsToken;
48
- dispatch_once(&nativeComponentsToken, ^{
49
- _thirdPartyFabricComponents = RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
50
- });
51
-
52
- return _thirdPartyFabricComponents;
53
- }
54
-
55
- @end
@@ -1,18 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #import <Foundation/Foundation.h>
9
-
10
- @interface RCTModulesConformingToProtocolsProvider: NSObject
11
-
12
- +(NSArray<NSString *> *)imageURLLoaderClassNames;
13
-
14
- +(NSArray<NSString *> *)imageDataDecoderClassNames;
15
-
16
- +(NSArray<NSString *> *)URLRequestHandlerClassNames;
17
-
18
- @end
@@ -1,33 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #import "RCTModulesConformingToProtocolsProvider.h"
9
-
10
- @implementation RCTModulesConformingToProtocolsProvider
11
-
12
- +(NSArray<NSString *> *)imageURLLoaderClassNames
13
- {
14
- return @[
15
- {imageURLLoaderClassNames}
16
- ];
17
- }
18
-
19
- +(NSArray<NSString *> *)imageDataDecoderClassNames
20
- {
21
- return @[
22
- {imageDataDecoderClassNames}
23
- ];
24
- }
25
-
26
- +(NSArray<NSString *> *)URLRequestHandlerClassNames
27
- {
28
- return @[
29
- {requestHandlersClassNames}
30
- ];
31
- }
32
-
33
- @end
@@ -1,16 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- #import <Foundation/Foundation.h>
9
-
10
- @protocol RCTComponentViewProtocol;
11
-
12
- @interface RCTThirdPartyComponentsProvider: NSObject
13
-
14
- + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
15
-
16
- @end
@@ -1,23 +0,0 @@
1
- /*
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
-
9
- #import <Foundation/Foundation.h>
10
-
11
- #import "RCTThirdPartyComponentsProvider.h"
12
- #import <React/RCTComponentViewProtocol.h>
13
-
14
- @implementation RCTThirdPartyComponentsProvider
15
-
16
- + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
17
- {
18
- return @{
19
- {thirdPartyComponentsMapping}
20
- };
21
- }
22
-
23
- @end
@@ -1,34 +0,0 @@
1
- # Copyright (c) Meta Platforms, Inc. and affiliates.
2
- #
3
- # This source code is licensed under the MIT license found in the
4
- # LICENSE file in the root directory of this source tree.
5
-
6
- version = "{react-native-version}"
7
- source = { :git => 'https://github.com/facebook/react-native.git' }
8
- if version == '1000.0.0'
9
- # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
10
- source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
11
- else
12
- source[:tag] = "v#{version}"
13
- end
14
-
15
- Pod::Spec.new do |s|
16
- s.name = "ReactAppDependencyProvider"
17
- s.version = version
18
- s.summary = "The third party dependency provider for the app"
19
- s.homepage = "https://reactnative.dev/"
20
- s.documentation_url = "https://reactnative.dev/"
21
- s.license = "{react-native-licence}"
22
- s.author = "Meta Platforms, Inc. and its affiliates"
23
- s.platforms = min_supported_versions
24
- s.source = source
25
- s.source_files = "**/RCTAppDependencyProvider.{h,mm}"
26
-
27
- # This guard prevent to install the dependencies when we run `pod install` in the old architecture.
28
- s.pod_target_xcconfig = {
29
- "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
30
- "DEFINES_MODULE" => "YES"
31
- }
32
-
33
- s.dependency "ReactCodegen"
34
- end
@@ -1,169 +0,0 @@
1
- # Copyright (c) Meta Platforms, Inc. and affiliates.
2
- #
3
- # This source code is licensed under the MIT license found in the
4
- # LICENSE file in the root directory of this source tree.
5
-
6
- require "json"
7
- require_relative "./hermes-utils.rb"
8
-
9
- # [macOS]
10
- begin
11
- react_native_path = File.dirname(Pod::Executable.execute_command('node', ['-p',
12
- 'require.resolve(
13
- "react-native-macos",
14
- {paths: [process.argv[1]]},
15
- )', __dir__]).strip
16
- )
17
- rescue => e
18
- # Fallback to the parent directory if the above command fails (e.g when building locally in OOT Platform)
19
- react_native_path = File.join(__dir__, "..", "..")
20
- end
21
-
22
- # package.json
23
- package = JSON.parse(File.read(File.join(react_native_path, "package.json")))
24
- # [macOS
25
- rn_version = package['version']
26
- version = findLastestVersionWithArtifact(rn_version) || rn_version
27
- # macOS]
28
-
29
- source_type = hermes_source_type(version, react_native_path)
30
- source = podspec_source(source_type, version, react_native_path)
31
-
32
- Pod::Spec.new do |spec|
33
- spec.name = "hermes-engine"
34
- spec.version = version
35
- spec.summary = "Hermes is a small and lightweight JavaScript engine optimized for running React Native."
36
- spec.description = "Hermes is a JavaScript engine optimized for fast start-up of React Native apps. It features ahead-of-time static optimization and compact bytecode."
37
- spec.homepage = "https://hermesengine.dev"
38
- spec.license = package['license']
39
- spec.author = "Facebook"
40
- spec.source = source
41
- spec.platforms = { :osx => "10.13", :ios => "15.1", :visionos => "1.0", :tvos => "15.1" }
42
-
43
- spec.preserve_paths = '**/*.*'
44
- spec.source_files = ''
45
-
46
- spec.pod_target_xcconfig = {
47
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
48
- "CLANG_CXX_LIBRARY" => "compiler-default",
49
- "GCC_WARN_INHIBIT_ALL_WARNINGS" => "YES" # Disable warnings because we don't control this library
50
- }
51
-
52
- spec.ios.vendored_frameworks = "destroot/Library/Frameworks/ios/hermes.framework"
53
- spec.tvos.vendored_frameworks = "destroot/Library/Frameworks/tvos/hermes.framework"
54
- spec.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermes.framework"
55
- spec.visionos.vendored_frameworks = "destroot/Library/Frameworks/xros/hermes.framework"
56
-
57
- if HermesEngineSourceType::isPrebuilt(source_type) then
58
-
59
- spec.subspec 'Pre-built' do |ss|
60
- ss.preserve_paths = ["destroot/bin/*"].concat(["**/*.{h,c,cpp}"])
61
- ss.source_files = "destroot/include/hermes/**/*.h"
62
- ss.header_mappings_dir = "destroot/include"
63
- ss.ios.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
64
- ss.visionos.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
65
- ss.tvos.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
66
- ss.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermes.framework"
67
- end
68
-
69
-
70
- # Right now, even reinstalling pods with the PRODUCTION flag turned on, does not change the version of hermes that is downloaded
71
- # To remove the PRODUCTION flag, we want to download the right version of hermes on the flight
72
- # we do so in a pre-build script we invoke from the Xcode build pipeline
73
- # We use this only for Apps created using the template. RNTester and Nightlies should not be used to build for Release.
74
- # We ignore this if we provide a specific tarball: the assumption here is that if you are providing a tarball, is because you want to
75
- # test something specific for that tarball.
76
- if source_type == HermesEngineSourceType::DOWNLOAD_PREBUILD_RELEASE_TARBALL
77
- spec.script_phase = {
78
- :name => "[Hermes] Replace Hermes for the right configuration, if needed",
79
- :execution_position => :before_compile,
80
- :script => <<-EOS
81
- . "$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh"
82
-
83
- CONFIG="Release"
84
- if echo $GCC_PREPROCESSOR_DEFINITIONS | grep -q "DEBUG=1"; then
85
- CONFIG="Debug"
86
- fi
87
-
88
- "$NODE_BINARY" "$REACT_NATIVE_PATH/sdks/hermes-engine/utils/replace_hermes_version.js" -c "$CONFIG" -r "#{version}" -p "$PODS_ROOT"
89
- EOS
90
- }
91
- end
92
-
93
- elsif HermesEngineSourceType::isFromSource(source_type) then
94
-
95
- spec.subspec 'Hermes' do |ss|
96
- ss.source_files = ''
97
- ss.public_header_files = 'API/hermes/*.h'
98
- ss.header_dir = 'hermes'
99
- end
100
-
101
- spec.subspec 'cdp' do |ss|
102
- ss.source_files = ''
103
- ss.public_header_files = 'API/hermes/cdp/*.h'
104
- ss.header_dir = 'hermes/cdp'
105
- end
106
-
107
- spec.subspec 'inspector' do |ss|
108
- ss.source_files = ''
109
- ss.public_header_files = 'API/hermes/inspector/*.h'
110
- ss.header_dir = 'hermes/inspector'
111
- end
112
-
113
- spec.subspec 'inspector_chrome' do |ss|
114
- ss.source_files = ''
115
- ss.public_header_files = 'API/hermes/inspector/chrome/*.h'
116
- ss.header_dir = 'hermes/inspector/chrome'
117
- end
118
-
119
- spec.subspec 'Public' do |ss|
120
- ss.source_files = ''
121
- ss.public_header_files = 'public/hermes/Public/*.h'
122
- ss.header_dir = 'hermes/Public'
123
- end
124
-
125
- hermesc_path = "${PODS_ROOT}/hermes-engine/build_host_hermesc"
126
-
127
- if ENV.has_key?('HERMES_OVERRIDE_HERMESC_PATH') && File.exist?(ENV['HERMES_OVERRIDE_HERMESC_PATH']) then
128
- hermesc_path = ENV['HERMES_OVERRIDE_HERMESC_PATH']
129
- end
130
-
131
- spec.user_target_xcconfig = {
132
- 'HERMES_CLI_PATH' => "#{hermesc_path}/bin/hermesc"
133
- }
134
-
135
- spec.prepare_command = ". '#{react_native_path}/sdks/hermes-engine/utils/create-dummy-hermes-xcframework.sh'"
136
-
137
- # This podspec is also run in CI to build Hermes without using Pod install
138
- # and sometimes CI fails because `Pod::Executable` does not exist if it is not run with Pod Install.
139
- if defined?(Pod::Executable.to_s)
140
- CMAKE_BINARY = Pod::Executable::which!('cmake')
141
- # NOTE: Script phases are sorted alphabetically inside Xcode project
142
- spec.script_phases = [
143
- {
144
- :name => '[RN] [1] Build Hermesc',
145
- :output_files => [
146
- "#{hermesc_path}/ImportHermesc.cmake"
147
- ],
148
- :script => <<-EOS
149
- . "${REACT_NATIVE_PATH}/scripts/xcode/with-environment.sh"
150
- export CMAKE_BINARY=${CMAKE_BINARY:-#{CMAKE_BINARY}}
151
- . ${REACT_NATIVE_PATH}/sdks/hermes-engine/utils/build-hermesc-xcode.sh #{hermesc_path} ${REACT_NATIVE_PATH}/ReactCommon/jsi
152
- EOS
153
- },
154
- {
155
- :name => '[RN] [2] Build Hermes',
156
- :input_files => ["#{hermesc_path}/ImportHermesc.cmake"],
157
- :output_files => [
158
- "${PODS_ROOT}/hermes-engine/build/iphonesimulator/API/hermes/hermes.framework/hermes"
159
- ],
160
- :script => <<-EOS
161
- . "${REACT_NATIVE_PATH}/scripts/xcode/with-environment.sh"
162
- export CMAKE_BINARY=${CMAKE_BINARY:-#{CMAKE_BINARY}}
163
- . ${REACT_NATIVE_PATH}/sdks/hermes-engine/utils/build-hermes-xcode.sh #{version} #{hermesc_path}/ImportHermesc.cmake ${REACT_NATIVE_PATH}/ReactCommon/jsi
164
- EOS
165
- }
166
- ]
167
- end
168
- end
169
- end