Commit Graph

27235 Commits

Author SHA1 Message Date
Rob Hogan ddff36f770 Update Metro to ^0.76.9, CLI to ^11.4.0 2024-02-08 16:56:04 +00:00
Blake Friedman 08fd9170fc Avoid using Cocoapods 1.15 until it fixes an issue affection RN. (#42702)
Summary:
Cocoapods 1.15 (https://github.com/facebook/react-native/issues/42698) current breaks the build, limit to version >= 1.13 & < 1.15

This is currently broken and affecting users, we'll remove this limit once Cocopods fixes the regression.  It's currently blocking 0.73.3.

## Changelog:
[iOS][Fixed] don't allow cocoapods 1.15.
2024-01-29 14:06:16 +00:00
Distiller 19f3ddd5c1 [0.72.10] Bump version numbers v0.72.10 2024-01-18 15:48:24 +00:00
Alex Hunt 1f70f58aa4 [LOCAL] Fix min ios version regression and update podfile.lock
Manually applied version of https://github.com/facebook/react-native/pull/42232
2024-01-15 15:46:01 +00:00
Oscar Franco 91872826f3 Unhandled promise rejection - attach non-standard Error object stack info if possible (#42079)
Summary:
This is a continuation of my [last PR](https://github.com/facebook/react-native/pull/40914) which improved the symbolication of unhandled promise rejections.

While I was developing another library I noticed I still got an error stack of the log adding and not of the error itself. The library I'm trying to debug does not throw a standard error object but rather a custom one, but it still contains the stack field. By passing this stack field to the logbox call I was able to get a better symbolicated stack trace. The exact line of the failure is not displayed but at least the correct file is.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[GENERAL] [ADDED] - Unhandled promise rejection - attach non-standard Error object stack info if possible

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/42079

Test Plan:
Test any unhandled promise rejection with a non-standard error (line 23, toString must not return `[object Error]`) and see if the correct (or at least a better) stack trace is shown.

Here is the one I got before and after this change:

<img src="https://github.com/facebook/react-native/assets/1634213/3d07faad-9535-42c9-8032-b4d8fe407e88" width="200" />

<img src="https://github.com/facebook/react-native/assets/1634213/2c39bd82-c7a1-4f58-8ac4-5c479bb96b6e" width="200" />

Reviewed By: huntie

Differential Revision: D52431711

Pulled By: cipolleschi

fbshipit-source-id: be2172d3b1e2fc3f72812faac372c83bc6dface2
2024-01-15 15:46:01 +00:00
Riccardo Cipolleschi 89ef9cb81d Disable Hermes Bitcode from 0.72 2024-01-15 15:45:41 +00:00
Alex Hunt cb25ab9fa7 Update Podfile.lock 2024-01-15 13:03:39 +00:00
Riccardo Cipolleschi 565281105e [RN][iOS] Fix flags 2024-01-15 12:57:58 +00:00
Distiller 7b20c5b5e5 [0.72.9] Bump version numbers v0.72.9 2024-01-08 13:28:02 +00:00
Riccardo Cipolleschi d62d714ada [RN][General] Fix boost link (#42175) 2024-01-08 12:08:23 +01:00
Tommy Nguyen b7c1a40db4 Fix New Arch build failing with -std=c++20 (#42138) 2024-01-05 17:47:13 -08:00
Riccardo Cipolleschi 7c7baad7bd [LOCAL] Fix ruby tests 2024-01-05 14:13:03 +01:00
Riccardo Cipolleschi 34da08755d [LOCAL] Bump Podfile.lock and try to fix Hermes update 2024-01-04 15:23:14 +01:00
Distiller f63a721e89 [0.72.8] Bump version numbers v0.72.8 2023-12-20 08:24:00 +00:00
Luna Wei e5e15a8115 [LOCAL] Add missing sed import to test script 2023-12-19 10:46:54 -08:00
fortmarek 0db45a5590 bumped packages versions
#publish-packages-to-npm
2023-12-19 14:58:38 +01:00
Marek Fořt c3c6cf4646 Prevent LogBox from crashing on long messages (#38005) (#41989)
* Prevent LogBox from crashing on long messages (#38005)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38005

Fixes https://github.com/facebook/react-native/issues/32093 by guarding the expensive `BABEL_CODE_FRAME_ERROR_FORMAT` regex with a cheaper initial scan. (Longer term, we should reduce our reliance on string parsing and propagate more structured errors.)

Changelog: [General][Fixed] Prevent LogBox from crashing on very long messages

Reviewed By: GijsWeterings

Differential Revision: D46892454

fbshipit-source-id: 3afadcdd75969c2589bbb06f47d1c4c1c2690abd

* Update RNTester Podfile.lock

* Check for major ruby version

---------

Co-authored-by: Moti Zilberman <moti@meta.com>
2023-12-19 14:55:11 +01:00
Riccardo Cipolleschi ed5a798932 Install bundler versions depending on Ruby version (#41962)
Summary:
Since yesterday evening (why it is always friday evening???) CircleCI or Gem decided to update the default bundler version that is installed with `gem bundle install`.
Therefore, CI for iOS stopped working.

This change installs bundler's versions so that they are compatible with the Ruby version.

[Internal] - Fix CI for iOS installing versions of bundler that are compatible with Ruby

Pull Request resolved: https://github.com/facebook/react-native/pull/41962

Test Plan: CircleCI is green

Reviewed By: GijsWeterings

Differential Revision: D52230544

Pulled By: cipolleschi

fbshipit-source-id: 2f96e16ecb94159953056e8de757ea4d249f80f0
2023-12-19 10:25:47 +01:00
Pieter De Baets 99cdaaacce Call invalidate on ViewManager on context destroy (#37481)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37481

ViewManagers inherit from BaseJavaModule so we should honour the same lifecycle  for them as we do for native modules, which is to call `invalidate` / `onCatalystInstanceDestroy` when the ReactContext is destroyed. This allows the ViewManager to do any cleanup which cannot happen at the View level.

Changelog: [Android][Fixed] ViewManagers now receive an invalidate callback

Reviewed By: cortinico

Differential Revision: D45945678

fbshipit-source-id: 27c26d951b50a734c42eb033a46e599ef939e29f
2023-12-19 10:17:43 +01:00
Tommy Nguyen e70166a3a8 Fix build_codegen! not finding @react-native/codegen in pnpm setups (#41456)
`build_codegen!` currently assumes that `@react-native/codegen` gets
installed next to `react-native`. In a pnpm setup, it's found under
`/~/react-native/node_modules/@react-native/codegen` instead.

However, as @dmytrorykun pointed out, we don't actually need to build
it outside of this repository.
2023-12-07 15:56:24 +01:00
Tommy Nguyen df2bbba50b Correctly declare runtime dependencies (#41445)
In pnpm setups, codegen will fail during build because it cannot find
its dependencies. Some of the dependencies it relies on at runtime are
currently declared under `devDependencies`. This change moves them to
`dependencies`.
2023-12-07 15:55:38 +01:00
Distiller 52904ffc42 [0.72.7] Bump version numbers v0.72.7 2023-11-14 10:56:06 +00:00
Marek Fořt 55c2c33b46 Symbolicate unhandled promise rejections (#40914) (#41377)
Summary:
For a very long time when a promise rejects without an attached catch we get this warning screen without a correct stack trace, only some internal calls to the RN internals.

<img src="https://github.com/facebook/react-native/assets/1634213/75aa7615-ee3e-4229-80d6-1744130de6e5" width="200" />

I created [an issue for discussion](https://github.com/react-native-community/discussions-and-proposals/discussions/718) in the react-native-community repo and we figured out it was only a matter of symbolication. While it cannot be done on release without external packages and source maps, at least while developing we can provide a symbolicated stack-trace so developers can better debug the source of rejected promise.

I got the stack trace symbolicated and the correct code frame. I'm missing some help trying to display it in the warning view but at the very least I can now correctly show the line of the error and log the codeframe to the console.

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[GENERAL] [FIXED] - Show correct stack frame on unhandled promise rejections on development mode.

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/40914

Test Plan:
I simply created a throwing function on a dummy app, and checked the output of the console and the warning view:

```ts
import React from 'react';
import {SafeAreaView, Text} from 'react-native';

async function throwme() {
  throw new Error('UNHANDLED');
}

function App(): JSX.Element {
  throwme();

  return (
    <SafeAreaView>
      <Text>Throw test</Text>
    </SafeAreaView>
  );
}

export default App;
```

Here is the output

<img src="https://github.com/facebook/react-native/assets/1634213/2c100e4d-618e-4143-8d64-4095e8370f4f" width="200" />

Edit: I got the warning window working properly:

<img src="https://github.com/facebook/react-native/assets/1634213/f02a2568-da3e-4daa-8132-e05cbe591737" width="200" />

Reviewed By: yungsters

Differential Revision: D50324344

Pulled By: javache

fbshipit-source-id: 66850312d444cf1ae5333b493222ae0868d47056

Co-authored-by: Oscar Franco <ospfranco@gmail.com>
2023-11-10 14:48:39 +01:00
Marek Fořt f399afc395 Fix RNTestProject testing on Android (#41378)
* Fix RNTestProject testing on Android (#41172)

Summary:
While releasing RN 0.73.0-RC3, we relaized that the e2e test script was bugged for Android when used to test RNTestProject with the `-c` option.

There  were 2 problems:
- The downloaded maven-local was not actually used because it doesn't work with a zip. (We were always downloading a version from Maven)
- The versions of React Native between maven-local and the locally packaged React Native were different.

This change fixes the script by:
- Downloading maven-local
- Unzipping maven-local and passing the new folder to the Android app
- Downloading the React Native version that has been packaged in CI

By unzipping maven-local and using the unzipped folder, we make sure that Android is actually using the local repository.
By downloading both the packaged react native and the maven-local from the same CI workflow, we ensure that the versions are aligned.

This also speeds-up further the Android testing.

While running this change, we also moved the `pod install` step inside the `if (iOS)` branch, so we do not install Cocoapods if we need to test
Android.

[Internal] - Fix Android E2E test script when downloading artefacts from CI

Pull Request resolved: https://github.com/facebook/react-native/pull/41172

Test Plan: Tested locally on both main and 0.73-stable, on both Android and iOS

Reviewed By: cortinico

Differential Revision: D50651448

Pulled By: cipolleschi

fbshipit-source-id: 70a9ed19072119d19c5388e8a4309d7333a08e13

* Backport e2e script changes to main (#41332)

Summary:
Last week, I modified the e2e script to make sure it was working properly with 0.73.
This change backport those changes in main

## Changelog:
[Internal] - Backport e2e script changes

Pull Request resolved: https://github.com/facebook/react-native/pull/41332

Test Plan: Tested locally

Reviewed By: dmytrorykun

Differential Revision: D51025796

Pulled By: cipolleschi

fbshipit-source-id: 89ecd3701eaac4ba4bdde2c640df45a158329158

* Use old REACT_NATIVE_MAVEN_LOCAL_REPO env var

* prettier

---------

Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>
Co-authored-by: Riccardo Cipolleschi <cipolleschi@meta.com>
2023-11-10 14:44:14 +01:00
Marek Fořt a304cb43c6 Make the interop-layer work with components with custom name (#41376)
* Make the interop-layer work with components with custom name (#41207)

Summary:
This should fix
https://github.com/facebook/react-native/issues/37905#issuecomment-1774851214

When working on react-native-fast-image, we realized that the interop layer does not work for components where the exported name is different from the iOS class.

To fix this, we can use the Bridge to retrieve the actual view manager, given the component name.

This solution should be much more robust than making assumptions on the ViewManager name, given the ComponentName.

On top of that, we realized tha the interop layer was not calling `didSetProps` after setting the props, so we are invoking that.

bypass-github-export-checks

[iOS][Fixed] - Add support for Components with custom names in the interop layer.

Pull Request resolved: https://github.com/facebook/react-native/pull/41207

Test Plan: Tested locally on an app created in 0.72 and 0.73 in Bridge and Bridgeless mode.

Reviewed By: cortinico

Differential Revision: D50698172

Pulled By: cipolleschi

fbshipit-source-id: 49aee905418515b0204febbbe6a67c0114f37029

* Remove references to RCTBridgeProxy

---------

Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com>
Co-authored-by: Riccardo Cipolleschi <cipolleschi@meta.com>
2023-11-10 14:43:11 +01:00
Riccardo Cipolleschi 5858fd768e Fix unstable RCTAppDelegate podspec (#41009)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41009

This change should fix [#39971](https://github.com/facebook/react-native/issues/39971), computing the relative path from the App path to the pod installation root and using that instead of the absolute path to the `react-native.config.js` file

## Changelog
[Internal] - Stabilize RCTAppDelegate podspec

Reviewed By: cortinico

Differential Revision: D50323710

fbshipit-source-id: e29e62228d08c752e822d7a9ab5b1a2b5dcd6eb4
2023-11-08 10:35:08 +01:00
Ivan Alexandrov 2f08813bc7 Fix android platform border color (#39893)
Summary:
If you try to apply PlatformColor to borders on Android app will crash with the next error:

"Error while updating property 'borderColor' of a view managed by: RCTView"

## Changelog:

[ANDROID] [FIXED] - Fix android crash when apply PlatformColor to borders

Pull Request resolved: https://github.com/facebook/react-native/pull/39893

Test Plan:
In RNTester example, go to APIs -> PlatformColor
|    Before  | After |
| ----------- | ----------- |
|  <img src="https://github.com/facebook/react-native/assets/70860930/66ac2880-53da-4438-bd9a-332f8ea40645" alt="drawing" width="200"/>    | <img src="https://github.com/facebook/react-native/assets/70860930/151f58a1-d857-4b3d-9ec6-de74eb065127" alt="drawing" width="200"/>      |

Reviewed By: NickGerleman

Differential Revision: D50011758

Pulled By: javache

fbshipit-source-id: ea06c18c6aef4b6731e9b9b87422a1e0d13de208
2023-11-08 10:33:11 +01:00
Pieter De Baets 981a0a08de Fix normalization of degrees in AnimatedInterpolation (#36645)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36645

This broke while changing the AnimatedInterpolation back in D40571873 and D40632443, as I assumed the native side would be able to correctly handle values such as '1rad'. However these were being sent over as strings, and were thus using the string interpolation path, which does not work here.

Instead, handle both `deg` and `rad` explicitly when generating the config in JS.

Resolves issue https://github.com/facebook/react-native/issues/36608

Changelog: [General][Fixed] Resolves Animated.Value.interpolate results in NaN when output is in radians

Reviewed By: yungsters

Differential Revision: D44406034

fbshipit-source-id: fe0f3df16f2b8ec6c31f9359e4706cacc72b9951
2023-11-08 10:32:53 +01:00
Szymon Rybczak e844a62ce9 Bump CLI to v11.3.10 (#41316) 2023-11-06 16:42:05 +01:00
Riccardo Cipolleschi 3e23e14763 Update node installation on debian (#41276)
Co-authored-by: fortmarek <marekfort@me.com>
2023-11-03 16:23:45 +01:00
Marek Fořt 945c429b6a Bump Podfile.lock for 0.72 (#41303)
* Update Podfile.lock after the latest release

* Change nodejs version for test_windows
2023-11-03 13:55:30 +01:00
Nicola Corti 3a4d79e775 Fix broken Loading/Refreshing indicator on Android
Summary:
The Loading.../Refreshing... indicator is currently broken on Android.
The reason is related to D42599220
We used to have a Toast shown to users on Android as a fallback, but as the
DevLoadingView is not always loaded as a module in the core package, this ends up in the banner never beign shown to the user (on RN Tester or template apps).

Changelog:
[Android] [Fixed] - Fix broken Loading/Refreshing indicator on Android

Reviewed By: cipolleschi

Differential Revision: D49876757

fbshipit-source-id: 400e002327ebca908e3e7a7f81c5066888ac4e9b
2023-10-13 15:56:10 +01:00
Alex Hunt e031c05cdc Bump deprecated-react-native-prop-types to ^4.2.3
This version correctly sets a dependency on `"@react-native/normalize-colors": "<0.73.0"` (from `"*"`), preventing future unwanted breakages.
2023-10-12 16:45:38 +01:00
Distiller 4fd3da2a87 [0.72.6] Bump version numbers v0.72.6 2023-10-12 15:02:49 +00:00
Riccardo Cipolleschi 6e3a130860 [Local] Fix CI for 0.72, with Acitve Support and Xcode15 (#40855) 2023-10-12 13:49:58 +01:00
Tim Yung 9b3bd63723 RN: Switch EventEmitter to Array.from(...) (#39525)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39525

Switches `EventEmitter#emit` to use `Array.from` instead of the spread operator.

This should be functionally identical (with marginally less overhead of the runtime having to determine the type of `registrations`), but there seems to be [some unexpected Babel configurations in the community](https://github.com/facebook/react-native/issues/35577#issuecomment-1723218934) that causes this line of code to do the wrong things.

Although we should independently root cause the Babel plugin configuration problems, this change might provide immediate relief and is also not any worse (e.g. in terms of code readability). This also adds a descriptive comment explaining the intention of the call to `Array.from`.

Changelog:
[Fixed][General] - Fix a potential bug in `EventEmitter` when used with certain Babel configurations that incorrectly polyfill the spread operator for iterables.

Reviewed By: javache

Differential Revision: D49389813

fbshipit-source-id: 7caf63734fc047496afe2f1ed6d918c22747258a
2023-10-11 11:56:19 +01:00
Riccardo Cipolleschi 785f91b67a Fix Gemfile, setting Active support to < 7.1.0 (#39828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39828

Active Suppert released a new Gem which is incompatible with Cocoapods 1.13.0, the latest release, as they removed a method used by cocoapods.

This fix ensures that we install compatible versions of the Gem.

## Changelog:
[iOS][Fixed] - Set the max version of Active support to 7.0.8

Reviewed By: hoxyq

Differential Revision: D49949782

fbshipit-source-id: 278097502d3a416567cc8c0b90090fee4fb21503

# Conflicts:
#	Gemfile
2023-10-11 11:56:19 +01:00
Riccardo Cipolleschi 355025dae4 Update Xcode 15 patches to be more robust (#39710)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39710

Last week Apple released Xcode 15, which required us to ship a workaround for the new linker.
Unfortunately, the previous fix was not good enough and there were some edge cases that were not covered.
For example, in some occasions the flags are read as an array and the `-Wl` and the `-ld_classic` flags were separated and not properly removed when moving from Xcode 15 to Xcpde 14.3.1.

This change fixes those edge cases, with a more robust solution where:
- We convert the flags to a string.
- We trim the string and the values properly.
- We add the flags when running `pod install` with Xcode 15 as the default iOS toolchain.
- We remove the flags when running `pod install` with Xcode <15 as the default iOS toolchain.

## Changelog:
[Internal] - Make the Xcode 15 workaround more robust.

Reviewed By: dmytrorykun

Differential Revision: D49748844

fbshipit-source-id: 34976d148f123c5aacba6487a500874bb938fe99

# Conflicts:
#	packages/react-native/scripts/cocoapods/__tests__/utils-test.rb
#	packages/react-native/scripts/cocoapods/utils.rb
2023-10-11 11:56:19 +01:00
Riccardo Cipolleschi 3c4cc59542 Move hermes-engine.podspec and hermes-utils.rb from hermes-engine to hermes folders when building (#39575) 2023-10-02 10:09:10 +02:00
Distiller 1e38d4d4b1 [0.72.5] Bump version numbers v0.72.5 2023-09-25 04:32:45 +00:00
Riccardo Cipolleschi 2a041cb967 Add ld_classic flag to Hermes when building for Xcode 15 (#39516)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39516

With Xcode15, Apple rewrote the C++ linker.
This is a breaking change that does not work with weak symbols.
As a workaround, apple is suggesting to add `-ld_classic` to the linker in order to readd support for weak symbols. The flag does not exists for Xcode 14.3 or lower, so we need to add it conditionally.

With this change, we introduce a couple of checks in the Hermes build logic:
1. Detect the version of Xcode that is used
2. Add the new flag to `HERMES_EXTRA_LINKER_FLAGS` if Xcode version is 15.

[Internal] - Make hermes build properly with Xcode 15

Reviewed By: cortinico, dmytrorykun

Differential Revision: D49368675

fbshipit-source-id: 62d8ed81855c426f56ed94b6a2d6da2eb882b355
2023-09-19 13:20:07 +02:00
Riccardo Cipolleschi 8ccdb2cbe6 Fix Xcode 15 RC issues (#39474)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39474

When it comes to Xcode 15 RC, we are aware of two issues:
1. `unary_function` and `binary_function` not available in Cxx17
2. [Weak linking](https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking) is not supported anymore.

This change should fix both of the issues, adding the flags to allow for `unary_function`and `binary_function` to be called and adding the `-Wl -ld_classic` flag to `OTHER_LDFLAGS` in case Xcode 15 is detected.

[Internal] - add the `_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION` and the `-Wl -ld_classic` flags to projects when needed

Reviewed By: dmytrorykun

Differential Revision: D49319256

fbshipit-source-id: bb895f1e60db915db79684f71fa436ce80b42111
2023-09-19 13:19:23 +02:00
Riccardo Cipolleschi a5e110adcf Bump IPHONEOS_DEPLOYMENT_TARGET to 13.4 for 3rd party pods (#39478)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39478

When testing Xcode 15, we realized that a few pods we do not control directly have the IPHONEOS_DEPLOYMENT_TARGET set to old versions of iOS.
We can update that setting to silence the warning with Cocoapods and this is what this script does.

Notice that bumping that setting generated other warning as some APIs have been deprecated.

[Internal] - Bump min IPHONEOS_DEPLOYMENT_TARGET for 3rd party pods

Reviewed By: dmytrorykun

Differential Revision: D49274837

fbshipit-source-id: 584d105c76d654daa2ecf5eb2f1b9381e70f567a
2023-09-19 13:16:38 +02:00
zhongwuzw f6fd6b8db0 【iOS】Fix timer background state when App is launched from background (#39347)
Summary:
Fixes https://github.com/facebook/react-native/issues/38711

## Changelog:

[IOS] [FIXED] - Fix timer background state when App is launched from background

Pull Request resolved: https://github.com/facebook/react-native/pull/39347

Test Plan: Please see https://github.com/facebook/react-native/issues/38711

Reviewed By: cipolleschi

Differential Revision: D49101979

Pulled By: dmytrorykun

fbshipit-source-id: e25b182539f39e4465fa40e51288d88c68967b31
2023-09-11 15:42:49 +02:00
Thibault Malbranche 4da991407d bumped packages versions
#publish-packages-to-npm
2023-09-11 15:29:31 +02:00
Alex Hunt 6f02d55deb Bump CLI to 11.3.7 (#39280) 2023-09-06 08:24:31 +01:00
Saad Najmi a8ec20db21 Allow RCTBundleURLProvider to request an inline source map (#37878) (#39033)
Summary:
See: http://blog.nparashuram.com/2019/10/debugging-react-native-ios-apps-with.html
When using direct debugging with JavaScriptCore, Safari Web Inspector doesn't pick up the source map over the network. Instead, as far as I can tell, it expects you to pass the source URL at the time you load your bundle:  https://developer.apple.com/documentation/javascriptcore/jscontext/1451384-evaluatescript?language=objc . This leads to a very sub-par developer experience debugging the JSbundle directly. It will however, pick up an inline source map. Therefore, let's add a way to have React Native tell metro to request an inline source map.

I did this by modifying `RCTBundleURLProvider` to have a new query parameter for `inlineSourceMap`, and set to true by default for JSC.

[IOS] [ADDED] - Added support to inline the source map via RCTBundleURLProvider

Pull Request resolved: https://github.com/facebook/react-native/pull/37878

Test Plan:
I can put a breakpoint in RNTester, via Safari Web Inspector, in human readable code :D

<img width="1728" alt="Screenshot 2023-06-14 at 4 09 03 AM" src="https://github.com/facebook/react-native/assets/6722175/055277fa-d887-4566-9dc6-3ea07a1a60b0">

Reviewed By: motiz88

Differential Revision: D46855418

Pulled By: huntie

fbshipit-source-id: 2134cdbcd0a3e81052d26ed75f83601ae4ddecfe
2023-09-04 18:23:02 +02:00
Ales Pergl f77e9af761 Fix building Android on Windows (#39190)
Summary:
Currently Android fails to build on Windows, because CMake cannot work with
native Windows paths that are passed to it as build arguments. This change
converts the input paths to the CMake format.

## Changelog:

[Android] [Fixed] - Fix building Android on Windows.

Pull Request resolved: https://github.com/facebook/react-native/pull/39190

Test Plan: Build the React Native Android project on Windows. It should complete successfully.

Reviewed By: NickGerleman

Differential Revision: D48948140

Pulled By: cortinico

fbshipit-source-id: 6d584c2a10e683cdb6df0dd6dcd5875da7e06e2b
2023-09-04 18:20:35 +02:00
Koen Punt e9eca07f52 Revert "Fix build failure on iOS with pnpm and use_frameworks! (#38158)" (#39177)
Summary:
This partially reverts commit 58adc5e4b9.

Using an absolute path in a podspec is wrong, and causes checksum issues when installs are ran on different systems.

Example:

`pod install --deployment --clean-install` breaks on non-matching checksums on CI because the absolute path is not the same in that environment.

```
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
Verifying no changes
[!] There were changes to the lockfile in deployment mode:
SPEC CHECKSUMS:
  React-debug:
    New Lockfile: 419922cde6c58cd5b9d43e4a09805146a7dd13a8
    Old Lockfile: 1ce329843d8f9a9cbe0cdd9de264b20e89586734
  React-NativeModulesApple:
    New Lockfile: a683b0c999e76b7d15ad9d5eaf8b6308e710a93e
    Old Lockfile: f82356d67a137295d098a98a03be5ee35871b5a5
  React-runtimescheduler:
    New Lockfile: 79f8dff11acbe36aaeece63553680d7a8272af96
    Old Lockfile: 16c5282d43a0df50d7c68ebf0218aeeb642a7086
  React-utils:
    New Lockfile: 4fabb3cba786651e35bc41e610b0698fa24cecff
    Old Lockfile: e7e9118d0e85b107bb06d1a5f72ec5db6bddb911
  ReactCommon:
    New Lockfile: af30fb021799e18c85a8e30ce799e15607e82212
    Old Lockfile: f04f86f33c22e05dbf875789ea522ee486dace78
```

And even tho the change fixed an issue with pnpm, the issue it introduces with cocoapods I think is a bigger one.

## Changelog:

[INTERNAL] - Revert commit that makes podfile unstable

Pull Request resolved: https://github.com/facebook/react-native/pull/39177

Test Plan: Tested locally that the hashes are stable

Reviewed By: NickGerleman

Differential Revision: D48773887

Pulled By: cipolleschi

fbshipit-source-id: 96bcdbadc17a24fa9a8669f569d004bee6a03521
2023-09-04 18:20:07 +02:00
Dr. Sergey Pogodin 66441e7e5d A fix in Codegen for Windows build host (#36542)
Summary:
Android builds with new arch fail on Windows build host (https://github.com/facebook/react-native/issues/36475). This tiny correction fixes generation of `schema.json` (without it codegen failed to find any files, and generated empty schema). Unfortunately, does not fixes the issue with Windows host entirely, as builds still fail later (on ninja build step).

## Changelog:
[Android] [Fixed] - A bug fix for Android builds with new arch on Windows host.

Pull Request resolved: https://github.com/facebook/react-native/pull/36542

Reviewed By: NickGerleman

Differential Revision: D48563587

Pulled By: cortinico

fbshipit-source-id: acd510308ce9768fb17d3a33c7927de3237748ac
2023-09-04 18:19:56 +02:00