react-native-macos 0.77.5 → 0.77.6
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.
- package/Libraries/Blob/RCTBlobManager.h +0 -0
- package/Libraries/Blob/RCTBlobManager.mm +0 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +0 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/StyleSheet/normalizeColor.js +0 -0
- package/React/Base/RCTJavaScriptLoader.h +0 -0
- package/React/Base/RCTJavaScriptLoader.mm +0 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTDevLoadingView.mm +1 -1
- package/React/CoreModules/RCTLogBoxView.mm +4 -1
- package/React/DevSupport/RCTPausedInDebuggerOverlayController.mm +82 -14
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/local-cli/cli.js +0 -0
- package/package.json +3 -3
- package/scripts/compose-source-maps.js +0 -0
- package/scripts/featureflags/README.md +156 -0
- package/scripts/featureflags/index.js +39 -0
- package/scripts/ios-configure-glog.sh +0 -0
- package/scripts/node-binary.sh +0 -0
- package/scripts/packager.sh +0 -0
- package/scripts/react-native-xcode.sh +0 -0
- package/scripts/react_native_pods_utils/script_phases.sh +0 -0
- package/scripts/xcode/ccache-clang++.sh +0 -0
- package/scripts/xcode/ccache-clang.sh +0 -0
- package/scripts/xcode/with-environment.sh +0 -0
- package/scripts/cocoapods/autolinking.rb +0 -206
- package/scripts/cocoapods/autolinking_utils.rb +0 -25
- package/scripts/cocoapods/codegen.rb +0 -59
- package/scripts/cocoapods/codegen_script_phase_extractor.rb +0 -13
- package/scripts/cocoapods/codegen_utils.rb +0 -389
- package/scripts/cocoapods/fabric.rb +0 -18
- package/scripts/cocoapods/helpers.rb +0 -150
- package/scripts/cocoapods/jsengine.rb +0 -33
- package/scripts/cocoapods/local_podspec_patch.rb +0 -51
- package/scripts/cocoapods/new_architecture.rb +0 -194
- package/scripts/cocoapods/privacy_manifest_utils.rb +0 -194
- package/scripts/cocoapods/runtime.rb +0 -18
- package/scripts/cocoapods/spm.rb +0 -94
- package/scripts/cocoapods/utils.rb +0 -729
- package/scripts/codegen/codegen-utils.js +0 -51
- package/scripts/codegen/generate-artifacts-executor.js +0 -982
- package/scripts/codegen/generate-specs-cli-executor.js +0 -128
- package/scripts/codegen/templates/RCTAppDependencyProviderH.template +0 -25
- package/scripts/codegen/templates/RCTAppDependencyProviderMM.template +0 -55
- package/scripts/codegen/templates/RCTModulesConformingToProtocolsProviderH.template +0 -18
- package/scripts/codegen/templates/RCTModulesConformingToProtocolsProviderMM.template +0 -33
- package/scripts/codegen/templates/RCTThirdPartyComponentsProviderH.template +0 -16
- package/scripts/codegen/templates/RCTThirdPartyComponentsProviderMM.template +0 -23
- package/scripts/codegen/templates/ReactAppDependencyProvider.podspec.template +0 -34
- package/sdks/hermes-engine/hermes-engine.podspec +0 -168
- package/sdks/hermes-engine/hermes-utils.rb +0 -341
- package/sdks/hermes-engine/utils/build-apple-framework.sh +0 -225
- package/sdks/hermes-engine/utils/build-hermes-xcode.sh +0 -100
- package/sdks/hermes-engine/utils/build-hermesc-xcode.sh +0 -18
- package/sdks/hermes-engine/utils/build-ios-framework.sh +0 -90
- package/sdks/hermes-engine/utils/build-mac-framework.sh +0 -22
- package/sdks/hermes-engine/utils/copy-hermes-xcode.sh +0 -7
- package/sdks/hermes-engine/utils/create-dummy-hermes-xcframework.sh +0 -32
- 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,168 +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
|
-
version = findMatchingHermesVersion(package) # [macOS] Use special logic instead of just package['version']
|
|
25
|
-
|
|
26
|
-
source_type = hermes_source_type(version, react_native_path)
|
|
27
|
-
source = podspec_source(source_type, version, react_native_path)
|
|
28
|
-
|
|
29
|
-
version = version || package['version'] # [macOS] If version is nil, fall back to package version so CocoaPods doesn't fail
|
|
30
|
-
|
|
31
|
-
Pod::Spec.new do |spec|
|
|
32
|
-
spec.name = "hermes-engine"
|
|
33
|
-
spec.version = version
|
|
34
|
-
spec.summary = "Hermes is a small and lightweight JavaScript engine optimized for running React Native."
|
|
35
|
-
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."
|
|
36
|
-
spec.homepage = "https://hermesengine.dev"
|
|
37
|
-
spec.license = package['license']
|
|
38
|
-
spec.author = "Facebook"
|
|
39
|
-
spec.source = source
|
|
40
|
-
spec.platforms = { :osx => "10.13", :ios => "15.1", :visionos => "1.0", :tvos => "15.1" }
|
|
41
|
-
|
|
42
|
-
spec.preserve_paths = '**/*.*'
|
|
43
|
-
spec.source_files = ''
|
|
44
|
-
|
|
45
|
-
spec.pod_target_xcconfig = {
|
|
46
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
|
47
|
-
"CLANG_CXX_LIBRARY" => "compiler-default",
|
|
48
|
-
"GCC_WARN_INHIBIT_ALL_WARNINGS" => "YES" # Disable warnings because we don't control this library
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
spec.ios.vendored_frameworks = "destroot/Library/Frameworks/ios/hermes.framework"
|
|
52
|
-
spec.tvos.vendored_frameworks = "destroot/Library/Frameworks/tvos/hermes.framework"
|
|
53
|
-
spec.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermes.framework"
|
|
54
|
-
spec.visionos.vendored_frameworks = "destroot/Library/Frameworks/xros/hermes.framework"
|
|
55
|
-
|
|
56
|
-
if HermesEngineSourceType::isPrebuilt(source_type) then
|
|
57
|
-
|
|
58
|
-
spec.subspec 'Pre-built' do |ss|
|
|
59
|
-
ss.preserve_paths = ["destroot/bin/*"].concat(["**/*.{h,c,cpp}"])
|
|
60
|
-
ss.source_files = "destroot/include/hermes/**/*.h"
|
|
61
|
-
ss.header_mappings_dir = "destroot/include"
|
|
62
|
-
ss.ios.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
|
|
63
|
-
ss.visionos.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
|
|
64
|
-
ss.tvos.vendored_frameworks = "destroot/Library/Frameworks/universal/hermes.xcframework"
|
|
65
|
-
ss.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermes.framework"
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
# Right now, even reinstalling pods with the PRODUCTION flag turned on, does not change the version of hermes that is downloaded
|
|
70
|
-
# To remove the PRODUCTION flag, we want to download the right version of hermes on the flight
|
|
71
|
-
# we do so in a pre-build script we invoke from the Xcode build pipeline
|
|
72
|
-
# We use this only for Apps created using the template. RNTester and Nightlies should not be used to build for Release.
|
|
73
|
-
# 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
|
|
74
|
-
# test something specific for that tarball.
|
|
75
|
-
if source_type == HermesEngineSourceType::DOWNLOAD_PREBUILD_RELEASE_TARBALL
|
|
76
|
-
spec.script_phase = {
|
|
77
|
-
:name => "[Hermes] Replace Hermes for the right configuration, if needed",
|
|
78
|
-
:execution_position => :before_compile,
|
|
79
|
-
:script => <<-EOS
|
|
80
|
-
. "$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh"
|
|
81
|
-
|
|
82
|
-
CONFIG="Release"
|
|
83
|
-
if echo $GCC_PREPROCESSOR_DEFINITIONS | grep -q "DEBUG=1"; then
|
|
84
|
-
CONFIG="Debug"
|
|
85
|
-
fi
|
|
86
|
-
|
|
87
|
-
"$NODE_BINARY" "$REACT_NATIVE_PATH/sdks/hermes-engine/utils/replace_hermes_version.js" -c "$CONFIG" -r "#{version}" -p "$PODS_ROOT"
|
|
88
|
-
EOS
|
|
89
|
-
}
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
elsif HermesEngineSourceType::isFromSource(source_type) then
|
|
93
|
-
|
|
94
|
-
spec.subspec 'Hermes' do |ss|
|
|
95
|
-
ss.source_files = ''
|
|
96
|
-
ss.public_header_files = 'API/hermes/*.h'
|
|
97
|
-
ss.header_dir = 'hermes'
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
spec.subspec 'cdp' do |ss|
|
|
101
|
-
ss.source_files = ''
|
|
102
|
-
ss.public_header_files = 'API/hermes/cdp/*.h'
|
|
103
|
-
ss.header_dir = 'hermes/cdp'
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
spec.subspec 'inspector' do |ss|
|
|
107
|
-
ss.source_files = ''
|
|
108
|
-
ss.public_header_files = 'API/hermes/inspector/*.h'
|
|
109
|
-
ss.header_dir = 'hermes/inspector'
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
spec.subspec 'inspector_chrome' do |ss|
|
|
113
|
-
ss.source_files = ''
|
|
114
|
-
ss.public_header_files = 'API/hermes/inspector/chrome/*.h'
|
|
115
|
-
ss.header_dir = 'hermes/inspector/chrome'
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
spec.subspec 'Public' do |ss|
|
|
119
|
-
ss.source_files = ''
|
|
120
|
-
ss.public_header_files = 'public/hermes/Public/*.h'
|
|
121
|
-
ss.header_dir = 'hermes/Public'
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
hermesc_path = "${PODS_ROOT}/hermes-engine/build_host_hermesc"
|
|
125
|
-
|
|
126
|
-
if ENV.has_key?('HERMES_OVERRIDE_HERMESC_PATH') && File.exist?(ENV['HERMES_OVERRIDE_HERMESC_PATH']) then
|
|
127
|
-
hermesc_path = ENV['HERMES_OVERRIDE_HERMESC_PATH']
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
spec.user_target_xcconfig = {
|
|
131
|
-
'HERMES_CLI_PATH' => "#{hermesc_path}/bin/hermesc"
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
spec.prepare_command = ". '#{react_native_path}/sdks/hermes-engine/utils/create-dummy-hermes-xcframework.sh'"
|
|
135
|
-
|
|
136
|
-
# This podspec is also run in CI to build Hermes without using Pod install
|
|
137
|
-
# and sometimes CI fails because `Pod::Executable` does not exist if it is not run with Pod Install.
|
|
138
|
-
if defined?(Pod::Executable.to_s)
|
|
139
|
-
CMAKE_BINARY = Pod::Executable::which!('cmake')
|
|
140
|
-
# NOTE: Script phases are sorted alphabetically inside Xcode project
|
|
141
|
-
spec.script_phases = [
|
|
142
|
-
{
|
|
143
|
-
:name => '[RN] [1] Build Hermesc',
|
|
144
|
-
:output_files => [
|
|
145
|
-
"#{hermesc_path}/ImportHermesc.cmake"
|
|
146
|
-
],
|
|
147
|
-
:script => <<-EOS
|
|
148
|
-
. "${REACT_NATIVE_PATH}/scripts/xcode/with-environment.sh"
|
|
149
|
-
export CMAKE_BINARY=${CMAKE_BINARY:-#{CMAKE_BINARY}}
|
|
150
|
-
. ${REACT_NATIVE_PATH}/sdks/hermes-engine/utils/build-hermesc-xcode.sh #{hermesc_path} ${REACT_NATIVE_PATH}/ReactCommon/jsi
|
|
151
|
-
EOS
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
:name => '[RN] [2] Build Hermes',
|
|
155
|
-
:input_files => ["#{hermesc_path}/ImportHermesc.cmake"],
|
|
156
|
-
:output_files => [
|
|
157
|
-
"${PODS_ROOT}/hermes-engine/build/iphonesimulator/API/hermes/hermes.framework/hermes"
|
|
158
|
-
],
|
|
159
|
-
:script => <<-EOS
|
|
160
|
-
. "${REACT_NATIVE_PATH}/scripts/xcode/with-environment.sh"
|
|
161
|
-
export CMAKE_BINARY=${CMAKE_BINARY:-#{CMAKE_BINARY}}
|
|
162
|
-
. ${REACT_NATIVE_PATH}/sdks/hermes-engine/utils/build-hermes-xcode.sh #{version} #{hermesc_path}/ImportHermesc.cmake ${REACT_NATIVE_PATH}/ReactCommon/jsi
|
|
163
|
-
EOS
|
|
164
|
-
}
|
|
165
|
-
]
|
|
166
|
-
end
|
|
167
|
-
end
|
|
168
|
-
end
|