Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from upstream 0.64-stable to v0.64.0 #863

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
2313d45
chore: ignore broken Hermes job
grabbou Nov 4, 2020
06fedcd
Upgrade metro to 0.64.0
Nov 6, 2020
fb2991e
Build rn-codegen in a temporary directory (#30292)
janicduplessis Nov 12, 2020
0f5fb5e
Android OSS: fixed unbound variable error for codegen build script
fkgozali Nov 12, 2020
68110d4
Use codegen from source in default iOS template apps
fkgozali Nov 13, 2020
9f49f8a
Fix :ReactAndroid:androidJavadoc task (#30417)
NickGerleman Nov 18, 2020
e79ecb5
fix android npm (#30452)
dulmandakh Nov 21, 2020
727d755
fix: pin hermes-engine to 0.7.x
grabbou Nov 19, 2020
65003d7
Use [email protected] in new app template
hramos Nov 21, 2020
f7d0b83
chore: updated url of deprecated modules (#30422)
Naturalclar Nov 20, 2020
017dc45
Add possibility to disable buttons in action sheet ios (#28979)
lukewalczak Nov 19, 2020
0117077
[0.64.0-rc.0] Bump version numbers
grabbou Nov 23, 2020
9f0f8a5
chore: revert changes to test-manual-e2e.sh
grabbou Nov 24, 2020
e2be26a
fix: android artifacts in publish-npm.js
grabbou Nov 25, 2020
cda29d2
chore: Bump CLI to ^5.0.1-alpha.0 (#30420)
thymikee Nov 19, 2020
d197e95
[0.64.0-rc.1] Bump version numbers
grabbou Nov 25, 2020
a99676e
Fix cannot working Modal's onDismiss. (#29882)
kkoudev Nov 14, 2020
d8a0a9b
Integrate Native Module codegen into Xcode build pipeline (#30449)
hramos Dec 2, 2020
d823aef
Fix Circle CI iOS Tests: Make FBReactNativeSpec dir as needed
hramos Dec 3, 2020
15f2413
Fix path to react-native-codegen
hramos Dec 3, 2020
fffa4d1
Update template devDependencies (#30489)
Bardiamist Dec 8, 2020
eb85d1d
Add instructions to template/ios/Podfile for enabling hermes (#30461)
SConaway Dec 4, 2020
52129b2
Bump Hermes to 0.7.2
Huxpro Dec 10, 2020
2ba3ef5
fix: default template on iOS (#30571)
grabbou Dec 15, 2020
5c09b3f
fix: building in release mode for simulator (#30543)
grabbou Dec 14, 2020
ed237b4
Exclude `i386` from valid architectures when building with Hermes on …
grabbou Dec 15, 2020
4481d09
Fix infinite loop in KeyboardAvoidingView
sammy-SC Dec 15, 2020
1eb7d4a
[0.64.0-rc.2] Bump version numbers
grabbou Dec 18, 2020
70ba9ac
Expose the testID to black-box testing frameworks on Android (#29610)
jdeff Jan 6, 2021
052447c
Remove dependency on Folly in TurboModuleUtils.h (#30672)
vmoroz Jan 4, 2021
7ec38b9
Avoid eating clicks/taps into ScrollView when using physical keyboard…
NickGerleman Nov 19, 2020
224c85a
Update iOS Fabric-related files to compile on OSS (#29810)
empyrical Dec 22, 2020
0636c45
Use Fabric builds in iOS tests (#30639)
hramos Dec 24, 2020
e5888de
Add use_react_native_codegen!
hramos Dec 30, 2020
937ced3
Optionally override codegen script defaults via envvars
hramos Jan 4, 2021
5ada078
Make codegen more reliable on iOS (#30792)
janicduplessis Feb 1, 2021
7004cac
Invoke `node` directly in generate-specs.sh (#30781)
ivanmoskalev Feb 2, 2021
c023a40
chore: bump codegen script
grabbou Feb 5, 2021
e846740
[0.64.0-rc.3] Bump version numbers
grabbou Feb 5, 2021
7159bcb
Update flipper in RNTester and template (#31010)
janicduplessis Feb 24, 2021
4b68734
Generalize node search logic
grabbou Mar 1, 2021
14db556
fix: React Native CodeGen integration for 0.64-stable (#31027)
grabbou Mar 1, 2021
e7e4b00
fix: disable fabric
grabbou Mar 1, 2021
48a97d7
chore: fix conflict in Podfile.lock
grabbou Mar 1, 2021
1aa4f47
[0.64.0-rc.4] Bump version numbers
grabbou Mar 1, 2021
7f3f80f
Fix RefreshControl layout when removed from window (#31024)
janicduplessis Feb 23, 2021
138fdbc
fix: restore refresh control fix
grabbou Mar 11, 2021
8a6ac1f
chore: Update React.podspec to require cocoapods >= 1.10.1
grabbou Mar 11, 2021
728d55a
Fixing the git attrs for all the people and all the files and all fut…
grabbou Mar 11, 2021
ace025d
[0.64.0] Bump version numbers
grabbou Mar 12, 2021
e3c07de
Merge commit '06fedcd32d645c4685a6fa8398901c73183fd3bd' into amgleitm…
amgleitman Oct 21, 2021
a03619c
Merge commit 'e79ecb51222a39e661171ed31aef163a8f6fb236' into amgleitm…
amgleitman Oct 21, 2021
733f94e
Merge commit '017dc45c62ecb7cf872e4935544a269a5b51ca43' into amgleitm…
amgleitman Oct 21, 2021
a538390
Upgrade react-hooks rules
amgleitman Oct 21, 2021
8960e85
Some more changes for bringing up RN64 in devmain Android (#861)
mganandraj Oct 22, 2021
8b8bb85
Merge commit '0117077b9572f5b674578e19073e31e4693e9d41' into amgleitm…
amgleitman Oct 22, 2021
74aa912
Merge commit 'e2be26a68ff26bac6a48b6fdce12761d7a11c3e6' into amgleitm…
amgleitman Oct 22, 2021
264e9e4
Merge commit 'cda29d212487493c469d72b7f11c01116389f360' into amgleitm…
amgleitman Oct 22, 2021
762592a
Add explicit dependency on fbjs to RNTester
amgleitman Oct 22, 2021
a11f320
Merge commit '52129b235aa96e2a89f601ca800f55bfe9db2a7b' into amgleitm…
amgleitman Oct 22, 2021
855ac68
Merge commit '4481d09865c728f08017687f9f2bbb0399d48e45' into amgleitm…
amgleitman Oct 23, 2021
38e0fa6
Merge commit '1eb7d4aef78ddfd8e975bfd6d279398366f37edf' into amgleitm…
amgleitman Oct 23, 2021
7726590
Merge commit '1aa4f47e2f119c447b4de42808653df080d95fe9' into amgleitm…
amgleitman Oct 23, 2021
3266212
Merge commit 'ace025d2cbcc06ef076cbf460be445b18baddcc7' into amgleitm…
amgleitman Oct 23, 2021
f9f7f8d
Fix for submit button disappearing bug in comments (#862)
msgharpu Oct 25, 2021
b544204
Update Android patches
amgleitman Oct 25, 2021
358a3a2
Merge branch 'master' into amgleitman/0.64-merge-0.64.0
amgleitman Oct 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .ado/android-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,24 @@ jobs:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
githubApiToken: $(githubApiToken)

- task: CmdLine@2
displayName: gradlew clean
inputs:
script: ./gradlew clean
# In RN64 "clean" task tries to run the build again. It is reproing in 0.64-stable branch but fixed in 0.65-stable.
# I can't zero on the exact cause .. but turns out the issue is with rntester clean task.
#
# mganandraj@RNDroid:~/github/rnm-64$ ./gradlew :packages:rn-tester:android:app:clean --dry-run
# :packages:react-native-codegen:android:buildCodegenCLI SKIPPED
# :packages:rn-tester:android:app:generateCodegenSchemaFromJavaScript SKIPPED
# :packages:rn-tester:android:app:generateCodegenArtifactsFromSchema SKIPPED
# :ReactAndroid:extractAARHeaders SKIPPED
# :ReactAndroid:extractJNIFiles SKIPPED
# :ReactAndroid:generateCodegenSchemaFromJavaScript SKIPPED
# :ReactAndroid:generateCodegenArtifactsFromSchema SKIPPED
# :ReactAndroid:prepareBoost SKIPPED
# :ReactAndroid:createNativeDepsDirectories SKIPPED
# ..
# - task: CmdLine@2
# displayName: gradlew clean
# inputs:
# script: ./gradlew clean

- task: PublishBuildArtifacts@1
displayName: 'Publish final artifacts'
Expand Down
21 changes: 19 additions & 2 deletions .ado/templates/android-build-office.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,29 @@ steps:
inputs:
script: yarn install --frozen-lockfile

# scripts/bump-oss-version.js
#
# update the following files to the commit id.
# package.json (-> npm package version)
# gradle.properties (-> aar version)
# gradle.properties (-> aar version)
#
# The following files are updated for runtime version checking.
# ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java
# React/Base/RCTVersion.m
# ReactCommon/cxxreact/ReactNativeVersion.h
# Libraries/Core/ReactNativeVersion.js
#
# --nightly => version = `0.0.0-${currentCommit.slice(0, 9)}`;
# When on master branch or non-stable branch.
- task: CmdLine@2
displayName: Bump canary package version
inputs:
script: node scripts/bump-oss-version.js --nightly
condition: eq(variables['Build.SourceBranchName'], 'master')

condition: or(eq(variables['Build.SourceBranchName'], 'master'), not(contains(variables['Build.SourceBranchName'], '-stable')))

# TODO: We don't seem to be running bump-oss-version.js for stable branches, hence we would end up publishing using the values in the repository.

- task: CmdLine@2
displayName: nuget restore
inputs:
Expand Down
2 changes: 1 addition & 1 deletion .ado/templates/apple-droid-node-patching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ steps:
- task: CmdLine@2
displayName: Apply Android specific patches for Office consumption
inputs:
script: node $(System.DefaultWorkingDirectory)/android-patches/bundle/bundle.js patch $(System.DefaultWorkingDirectory) Build OfficeRNHost V8 Focus --patch-store $(System.DefaultWorkingDirectory)/android-patches/patches --log-folder $(System.DefaultWorkingDirectory)/android-patches/logs --confirm ${{ parameters.apply_office_patches }}
script: node $(System.DefaultWorkingDirectory)/android-patches/bundle/bundle.js patch $(System.DefaultWorkingDirectory) Build OfficeRNHost V8 Focus MAC ImageColor --patch-store $(System.DefaultWorkingDirectory)/android-patches/patches --log-folder $(System.DefaultWorkingDirectory)/android-patches/logs --confirm ${{ parameters.apply_office_patches }}
18 changes: 10 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ jobs:
steps:
- run:
name: Generate RNTesterPods Workspace
command: cd packages/rn-tester && bundle exec pod install --verbose
command: cd packages/rn-tester && USE_FABRIC=1 bundle exec pod install --verbose

# -------------------------
# Runs iOS unit tests
Expand Down Expand Up @@ -790,13 +790,15 @@ workflows:
run_unit_tests: true
requires:
- setup_ios
- test_ios:
name: test_ios_unit_frameworks_hermes
use_hermes: true
use_frameworks: true
run_unit_tests: true
requires:
- setup_ios
# Hermes doesn't support dynamic frameworks right now.
# The following configuration will fail.
# - test_ios:
# name: test_ios_unit_frameworks_hermes
# use_hermes: true
# use_frameworks: true
# run_unit_tests: true
# requires:
# - setup_ios
# - test_ios:
# name: test_ios_detox
# run_detox_tests: true
Expand Down
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ indent_size = 4

[BUCK]
indent_size = 4

# Windows files
[*.bat]
end_of_line = crlf
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Windows files should use crlf line endings
# https://help.github.com/articles/dealing-with-line-endings/
*.bat text eol=crlf
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ package-lock.json

# Libs that shouldn't have Xcode project
/Libraries/FBLazyVector/**/*.xcodeproj
/Libraries/FBReactNativeSpec/**/*.xcodeproj
/Libraries/RCTRequired/**/*.xcodeproj
/React/CoreModules/**/*.xcodeproj
/React/FBReactNativeSpec/**/*.xcodeproj
/packages/react-native-codegen/**/*.xcodeproj

# CocoaPods
Expand All @@ -109,10 +109,8 @@ package-lock.json
!/packages/rn-tester/Pods/__offline_mirrors__

# react-native-codegen
/Libraries/FBReactNativeSpec/FBReactNativeSpec
/packages/react-native-codegen/lib
/ReactCommon/fabric/components/rncore/
/schema-rncore.json
/ReactCommon/react/renderer/components/rncore/

# Visual studio
.vscode
Expand Down
2 changes: 2 additions & 0 deletions Libraries/ActionSheetIOS/ActionSheetIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const ActionSheetIOS = {
* - `destructiveButtonIndex` (int or array of ints) - index or indices of destructive buttons in `options`
* - `title` (string) - a title to show above the action sheet
* - `message` (string) - a message to show below the title
* - `disabledButtonIndices` (array of numbers) - a list of button indices which should be disabled
*
* The 'callback' function takes one parameter, the zero-based index
* of the selected item.
Expand All @@ -49,6 +50,7 @@ const ActionSheetIOS = {
+anchor?: ?number,
+tintColor?: ColorValue | ProcessedColorValue,
+userInterfaceStyle?: string,
+disabledButtonIndices?: Array<number>,
|},
callback: (buttonIndex: number) => void,
) {
Expand Down
1 change: 1 addition & 0 deletions Libraries/ActionSheetIOS/NativeActionSheetManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface Spec extends TurboModule {
+anchor?: ?number,
+tintColor?: ?number,
+userInterfaceStyle?: ?string,
+disabledButtonIndices?: Array<number>,
|},
callback: (buttonIndex: number) => void,
) => void;
Expand Down
5 changes: 4 additions & 1 deletion Libraries/Components/Keyboard/KeyboardAvoidingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,16 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
};

_onLayout = (event: ViewLayoutEvent) => {
const wasFrameNull = this._frame == null;
this._frame = event.nativeEvent.layout;
if (!this._initialFrameHeight) {
// save the initial frame height, before the keyboard is visible
this._initialFrameHeight = this._frame.height;
}

this._updateBottomIfNecesarry();
if (wasFrameNull) {
this._updateBottomIfNecesarry();
}
};

_updateBottomIfNecesarry = () => {
Expand Down
32 changes: 28 additions & 4 deletions Libraries/Components/ScrollResponder.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const ScrollResponderMixin = {

if (
this.props.keyboardShouldPersistTaps === 'handled' &&
currentlyFocusedInput != null &&
this.scrollResponderKeyboardIsDismissible() &&
e.target !== currentlyFocusedInput
) {
return true;
Expand Down Expand Up @@ -223,7 +223,6 @@ const ScrollResponderMixin = {
// and a new touch starts with a non-textinput target (in which case the
// first tap should be sent to the scroll view and dismiss the keyboard,
// then the second tap goes to the actual interior view)
const currentlyFocusedTextInput = TextInputState.currentlyFocusedInput();
const {keyboardShouldPersistTaps} = this.props;
const keyboardNeverPersistTaps =
!keyboardShouldPersistTaps || keyboardShouldPersistTaps === 'never';
Expand All @@ -240,7 +239,7 @@ const ScrollResponderMixin = {

if (
keyboardNeverPersistTaps &&
currentlyFocusedTextInput != null &&
this.scrollResponderKeyboardIsDismissible() &&
e.target != null &&
!TextInputState.isTextInput(e.target)
) {
Expand All @@ -250,6 +249,31 @@ const ScrollResponderMixin = {
return false;
},

/**
* Do we consider there to be a dismissible soft-keyboard open?
*/
scrollResponderKeyboardIsDismissible: function(): boolean {
const currentlyFocusedInput = TextInputState.currentlyFocusedInput();

// We cannot dismiss the keyboard without an input to blur, even if a soft
// keyboard is open (e.g. when keyboard is open due to a native component
// not participating in TextInputState). It's also possible that the
// currently focused input isn't a TextInput (such as by calling ref.focus
// on a non-TextInput).
const hasFocusedTextInput =
currentlyFocusedInput != null &&
TextInputState.isTextInput(currentlyFocusedInput);

// Even if an input is focused, we may not have a keyboard to dismiss. E.g
// when using a physical keyboard. Ensure we have an event for an opened
// keyboard, except on Android where setting windowSoftInputMode to
// adjustNone leads to missing keyboard events.
const softKeyboardMayBeOpen =
this.keyboardWillOpenTo != null || Platform.OS === 'android';

return hasFocusedTextInput && softKeyboardMayBeOpen;
},

/**
* Invoke this from an `onResponderReject` event.
*
Expand Down Expand Up @@ -324,7 +348,7 @@ const ScrollResponderMixin = {
if (
this.props.keyboardShouldPersistTaps !== true &&
this.props.keyboardShouldPersistTaps !== 'always' &&
currentlyFocusedTextInput != null &&
this.scrollResponderKeyboardIsDismissible() &&
e.target !== currentlyFocusedTextInput &&
!this.state.observedScrollSinceBecomingResponder &&
!this.state.becameResponderWhileAnimating
Expand Down
2 changes: 2 additions & 0 deletions Libraries/Components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,8 @@ function InternalTextInput(props: Props): React.Node {
// Therefore, we ignore selections and pass them through until the selection event has
// been sent.
// Note that this mitigation is NOT needed for Fabric.
// discovered when upgrading react-hooks
// eslint-disable-next-line react-hooks/exhaustive-deps
let selection: ?Selection =
props.selection == null
? null
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Core/ReactNativeVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

exports.version = {
major: 0,
minor: 63,
patch: 3,
minor: 64,
patch: 0,
prerelease: null,
};
2 changes: 1 addition & 1 deletion Libraries/Modal/RCTModalHostViewNativeComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ type NativeProps = $ReadOnly<{|
* The `onDismiss` prop allows passing a function that will be called once
* the modal has been dismissed.
*
* See https://facebook.github.io/react-native/docs/modal.html#ondismiss
* See https://reactnative.dev/docs/modal.html#ondismiss
*/
onDismiss?: ?BubblingEventHandler<null>,

Expand Down
1 change: 1 addition & 0 deletions React-Core.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Pod::Spec.new do |s|
ss.exclude_files = "React/CoreModules/**/*",
"React/DevSupport/**/*",
"React/Fabric/**/*",
"React/FBReactNativeSpec/**/*",
"React/Inspector/**/*",
"React/Tests/**/*",
"React/CxxBridge/HermesExecutorFactory.*" # TODO(macOS GH#214)
Expand Down
2 changes: 1 addition & 1 deletion React.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Pod::Spec.new do |s|
s.platforms = { :ios => "10.0", :osx => "10.14" } # TODO(macOS GH#214)
s.source = source
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.cocoapods_version = ">= 1.2.0"
s.cocoapods_version = ">= 1.10.1"

s.dependency "React-Core", version
s.dependency "React-Core/DevSupport", version
Expand Down
4 changes: 2 additions & 2 deletions React/Base/RCTVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
dispatch_once(&onceToken, ^(void){
__rnVersion = @{
RCTVersionMajor: @(0),
RCTVersionMinor: @(63),
RCTVersionPatch: @(3),
RCTVersionMinor: @(64),
RCTVersionPatch: @(0),
RCTVersionPrerelease: [NSNull null],
};
});
Expand Down
18 changes: 18 additions & 0 deletions React/CoreModules/RCTActionSheetManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,15 @@ - (void)presentViewController:(UIViewController *)alertController
NSArray<NSString *> *buttons = RCTConvertOptionalVecToArray(options.options(), ^id(NSString *element) {
return element;
});
NSArray<NSNumber *> *disabledButtonIndices;
NSInteger cancelButtonIndex =
options.cancelButtonIndex() ? [RCTConvert NSInteger:@(*options.cancelButtonIndex())] : -1;
NSArray<NSNumber *> *destructiveButtonIndices;
if (options.disabledButtonIndices()) {
disabledButtonIndices = RCTConvertVecToArray(*options.disabledButtonIndices(), ^id(double element) {
return @(element);
});
}
if (options.destructiveButtonIndices()) {
destructiveButtonIndices = RCTConvertVecToArray(*options.destructiveButtonIndices(), ^id(double element) {
return @(element);
Expand All @@ -120,6 +126,7 @@ - (void)presentViewController:(UIViewController *)alertController
@"destructiveButtonIndices" : destructiveButtonIndices,
@"anchor" : anchor,
@"tintColor" : tintColor,
@"disabledButtonIndices" : disabledButtonIndices,
});
return;
}
Expand Down Expand Up @@ -155,6 +162,17 @@ - (void)presentViewController:(UIViewController *)alertController
index++;
}

if (disabledButtonIndices) {
for (NSNumber *disabledButtonIndex in disabledButtonIndices) {
if ([disabledButtonIndex integerValue] < buttons.count) {
[alertController.actions[[disabledButtonIndex integerValue]] setEnabled:false];
} else {
RCTLogError(@"Index %@ from `disabledButtonIndices` is out of bounds. Maximum index value is %@.", @([disabledButtonIndex integerValue]), @(buttons.count - 1));
return;
}
}
}

alertController.view.tintColor = tintColor;
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \
__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,13 @@ package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
version = package['version']

source = { :git => 'https://github.com/facebook/react-native.git' }
codegen_path_prefix = ".."
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
source[:commit] = `git rev-parse HEAD`.strip
codegen_path_prefix = "packages"
else
source[:tag] = "v#{version}"
end

react_native_path = File.join(__dir__, "..", "..")
srcs_dir = File.join(__dir__, "..")
codegen_script_path = File.join(react_native_path, "scripts", "generate-native-modules-specs.sh")
codegen_path = File.join(react_native_path, codegen_path_prefix, "react-native-codegen")
output_dir = File.join(__dir__, "FBReactNativeSpec")
generated_files = [File.join(output_dir, "FBReactNativeSpec.h"), File.join(output_dir, "FBReactNativeSpec-generated.mm")]
codegen_command = "CODEGEN_PATH=#{codegen_path} sh '#{codegen_script_path}' | tee \"${SCRIPT_OUTPUT_FILE_0}\""

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2020.01.13.00'

Expand All @@ -46,7 +36,7 @@ Pod::Spec.new do |s|
s.pod_target_xcconfig = {
"USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/Libraries/FBReactNativeSpec\" \"$(PODS_ROOT)/RCT-Folly\""
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/React/FBReactNativeSpec\" \"$(PODS_ROOT)/RCT-Folly\""
}

s.dependency "RCT-Folly", folly_version
Expand All @@ -56,12 +46,5 @@ Pod::Spec.new do |s|
s.dependency "React-jsi", version
s.dependency "ReactCommon/turbomodule/core", version

s.prepare_command = "mkdir -p #{output_dir} && touch #{generated_files.reduce() { |str, file| str + " " + file }}"
s.script_phase = {
:name => 'Generate Native Modules Code',
:input_files => [srcs_dir],
:output_files => ["$(DERIVED_FILE_DIR)/FBReactNativeSpec-codegen.log"],
:script => codegen_command,
:execution_position => :before_compile
}
use_react_native_codegen! (s)
end
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#import <react/renderer/components/rncore/EventEmitters.h>
#import <react/renderer/components/rncore/Props.h>

#import "FBRCTFabricComponentsPlugins.h"
#import "RCTFabricComponentsPlugins.h"

using namespace facebook::react;

Expand Down
Loading