Compare commits

...
78 Commits
Author SHA1 Message Date
Nicola Corti 2642fe185f [0.65.3] Bump version numbers 2022-11-06 23:12:31 +00:00
Lorenzo Sciandra d5411b30dd [LOCAL] backport from 0.66 the logic to deploy new releases 2022-11-06 23:10:18 +00:00
Lorenzo Sciandra 9548eaea74 Force dependencies resolution to minor series for 0.65 2022-11-06 22:24:09 +00:00
Luna Wei 7eff4b6f8e [0.65.2] Bump version numbers 2021-11-04 00:09:04 -07:00
Brent KellyandLuna Wei b4b285315c Addressing various issues with the Appearance API (#28823) (#29106)
Summary:
This PR fixes a few issues with the Appearance API (as noted here https://github.com/facebook/react-native/issues/28823).

1. For the Appearance API to work correctly on Android you need to call `AppearanceModule.onConfigurationChanged` when the current Activity goes through a configuration change. This was being called in the RNTester app but not in `ReactActivity` so it meant the Appearance API wouldn't work for Android in newly generated RN projects (or ones upgraded to the latest version of RN).

2. The Appearance API wasn't working correctly for brownfield scenarios on Android. It's possible to force an app light or dark natively on Android by calling `AppCompatDelegate.setDefaultNightMode()`. The Appearance API wasn't picking up changes from this function because it was using the Application context instead of the current Activity context.

3. The Appearance API wasn't working correctly for brownfield scenarios on iOS. Just like on Android its possible to force an app light or dark natively by setting `window.overrideUserInterfaceStyle`. The Appearance API didn't work with this override because we were overwriting `_currentColorScheme` back to default as soon as we set it.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

### Fixed

https://github.com/facebook/react-native/issues/28823

* [Android] [Fixed] - Appearance API now works on Android
* [Android] [Fixed] - Appearance API now works correctly when calling `AppCompatDelegate.setDefaultNightMode()`
* [iOS] [Fixed] - Appearance API now works correctly when setting `window.overrideUserInterfaceStyle`

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

Test Plan: Ran RNTester on iOS and Android and verified the Appearance examples still worked [correctly.](url)

Reviewed By: hramos

Differential Revision: D31284331

Pulled By: sota000

fbshipit-source-id: 45bbe33983e506eb177d596d33ddf15f846708fd
2021-11-04 00:08:32 -07:00
Lorenzo Sciandra e4d576f655 [0.65.1] Bump version numbers 2021-08-19 19:14:04 +01:00
peraandLorenzo Sciandra fde90a8020 fix: Resolve NODE_BINARY *after* finding the path to node (#32029)
Summary:
We want to resolve `NODE_BINARY` **after** `find-node.sh` runs and sets up any node version manager that we need to setup, otherwise `NODE_BINARY` is always undefined.

## Changelog

[Internal] [Fixed] - Resolve NODE_BINARY after finding the right path to node

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

Reviewed By: TheSavior

Differential Revision: D30401213

Pulled By: yungsters

fbshipit-source-id: 386ffeff15b5f371a452488ed078d3adebe0f211
2021-08-19 11:35:06 +01:00
DulmandakhandLorenzo Sciandra 8b430e00d8 fix AGP 7 compatibility (#32030)
Summary:
Android Gradle Plugin 7 removed dependency configurations, and it includes compile. Below is a snipped from release notes https://developer.android.com/studio/releases/gradle-plugin

I can confirm that RN 0.65.0 app is running as expected on Android with the patch.

> **compile**
Depending on use case, this has been replaced by api or implementation.
Also applies to *Compile variants, for example: debugCompile.

## Changelog

[Android] [Changed] - Android Gradle Plugin 7 compatibility

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

Test Plan: Create a project with RN 0.65.0 and upgrade Android Gradle Plugin to 7.0.0, and Gradle to 7.0.2. It'll fail to sync. Then apply the change, and it'll sync as normal, and build the app.

Reviewed By: passy, ShikaSD

Differential Revision: D30394238

Pulled By: cortinico

fbshipit-source-id: cabc25754b9cd176a7d6c119d009728f2e5a93d9
2021-08-19 11:34:59 +01:00
hank121314andLorenzo Sciandra 2209bb7b6a Android/ColorProps: ColorProps with value null should be defaultColor instead of transparent (#29830)
Summary:
This pr:
- Fixes: https://github.com/facebook/react-native/issues/30183
- Fixes: https://github.com/facebook/react-native/issues/30056
- Fixes: https://github.com/facebook/react-native/issues/29950
- Fixes: https://github.com/facebook/react-native/issues/29717
- Fixes: https://github.com/facebook/react-native/issues/29495
- Fixes: https://github.com/facebook/react-native/issues/29412
- Fixes: https://github.com/facebook/react-native/issues/29378

Because most of ReactProps(name = ViewProps.COLOR) accept @ Nullable Integer.
For example:
https://github.com/facebook/react-native/blob/abb6433f506851430dffb66f0dd34c1e70a223fe/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java#L472-L479

After update to react-native 0.63.2 to make PlatformColor work, there is a new ColorPropSetter.
https://github.com/facebook/react-native/blob/abb6433f506851430dffb66f0dd34c1e70a223fe/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagersPropertyCache.java#L194-L215

But ColorPropSetter won't return an nullable value with getValueOrDefault, it will always return it's defaultValue which is 0.
And 0 is equal to TRANSPARENT, will cause <Text /> disappear.
## Changelog

[Android] [Fixed] - ColorProps with value null should be defaultColor instead of transparent

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

Test Plan:
Please initiated a new project and replaced the app with the following code:
```
import * as React from 'react';
import {Text, View, TouchableOpacity, PlatformColor} from 'react-native';

export default function App() {
  const [active, setActive] = React.useState(false);

  return (
    <View>
      <Text style={active ? {color: 'green'} : null}>Example</Text>
      <Text
        style={
          active ? {color: PlatformColor('android:color/holo_purple')} : null
        }>
        Example2
      </Text>
      <TouchableOpacity onPress={() => setActive(!active)}>
        <Text>Toggle Active</Text>
      </TouchableOpacity>
    </View>
  );
}
```

Thanks you so much for your code review!

Reviewed By: JoshuaGross

Differential Revision: D30209262

Pulled By: lunaleaps

fbshipit-source-id: bc223f84a92f742266cb7b40eb26722551940d76
2021-08-19 11:34:51 +01:00
Rick HanlonandLorenzo Sciandra 5a1dc1b6be Handle OSS renderers in sync script
Summary: Changelog: [Internal]

Reviewed By: ShikaSD

Differential Revision: D29896358

fbshipit-source-id: 83a9c124a01945706c4bdced8cf6e997e14f831c

# Conflicts:
#	yarn.lock
2021-08-19 11:34:31 +01:00
Lorenzo Sciandra 65dc99b680 [LOCAL] podlock file updates 2021-08-19 11:33:40 +01:00
Lorenzo Sciandra 7473ce1d4e [0.65.0] Bump version numbers 2021-08-17 17:05:11 +01:00
Lorenzo Sciandra 5f0b805b54 [0.65.0-rc.4] Bump version numbers 2021-08-11 17:03:44 +01:00
Lorenzo Sciandra 83d9b9bf78 [LOCAL] yarn lock update 2021-08-11 17:02:42 +01:00
Lorenzo Sciandra e77595784c Revert "fix: Move react-native-codegen to be a direct dependency of react-native (fix for 0.65-stable)"
This reverts commit 98e1734451.
2021-08-11 16:08:34 +01:00
Lorenzo Sciandra 5f7deb5f1d [LOCAL] reintroduce generated codegen files 2021-08-11 14:58:44 +01:00
Lorenzo Sciandra c0df3e040b [LOCAL] autogenerated files 2021-08-11 14:37:15 +01:00
Michał PierzchałaandLorenzo Sciandra 54fbe0d2d6 - Bump CLI to ^6.0.0 (#31971)
Summary:
Upgrade CLI to the v6 stable. [Changelog](https://github.com/react-native-community/cli/releases/tag/v6.0.0)

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Fix] - Bump CLI to ^6.0.0

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

Test Plan: cc kelset grabbou

Reviewed By: TheSavior

Differential Revision: D30158170

Pulled By: ShikaSD

fbshipit-source-id: 392e22cb112a830778149b4a2b4a19198facf42b

# Conflicts:
#	yarn.lock
2021-08-11 12:59:51 +01:00
Héctor RamosandLorenzo Sciandra 5efad924b1 Codegen: Always prepare filesystem
Summary:
For any Pod that uses the codegen, create references to code-gen'd files in local filesystem regardless of Pod install status by invoking the same command used by `prepare_command` whenever `pod install` is run.

This works around the issue where CocoaPods may decide to skip running `prepare_command`. While this is expected CocoaPods behavior, external factors may result in the deletion of the original code-gen'd files in which case we need to make sure that running `pod install` will bring these files back.

See Test Plan for more details on how to reproduce the issue being fixed.

Fixes T97404254.

Changelog:

[Internal] Codegen invoked with every `pod install` regardless of pod install status

Differential Revision: D30116640

fbshipit-source-id: 81db5dff1d4c4f8ae22b5dbe822609c770789ac8
2021-08-11 12:58:34 +01:00
Héctor RamosandLorenzo Sciandra dfd324e52e Extend codegen script to take library name, output dir arguments
Summary:
Extend the codegen script to allow arbitrary library name to be passed along as an argument, as well as the desired output directory for TurboModules and Fabric output.

New arguments:

- `:library_name`
- `:modules_output_dir`
- `:components_output_dir`

These arguments remain optional, and in their absence, the codegen will generate output that should work for the FBReactNativeSpec core native modules use case.

Internally, the script has been updated to use the correct path for the core modules use case as well as third party modules.

Changelog:
[Internal] - Extend the codegen script to take additional parameters

Reviewed By: RSNara

Differential Revision: D29243707

fbshipit-source-id: 1921bd3e5fd62d7cbf4c8b5089acfdd112f4b014
2021-08-11 12:58:12 +01:00
Héctor RamosandLorenzo Sciandra 1b7f95bca4 Reorganize codegen script for clarity
Summary:
This changeset is limited to whitespace and reordering changes that have no effect on the output or execution of the script. The sole purpose of this changeset is to apply these trivial changes prior to making some larger adjustments to the script in a followup.

With these changes, the ordering of statements more closely matches the order they are executed in (e.g. prepare_command before the script_phase).

Changelog:
[Internal]

Reviewed By: RSNara

Differential Revision: D29527804

fbshipit-source-id: d161ed31321d68baf420457c7aa0aa23a6fc98d2
2021-08-11 12:58:01 +01:00
Craig MartinandLorenzo Sciandra 041365eb29 fix: codegen - project paths with spaces (#31141)
Summary:
- Fixed iOS codegen script incorrectly splitting root project paths that contain spaces
https://github.com/react-native-community/releases/issues/214#issuecomment-793089063

iOS builds were failing on 0.64.0-rc.4 for projects that contained spaces in the root directory path. The error logs pointed to the codegen script not being able to find a directory. The path was being split at a space in one of the folder names. This PR modifies the codegen script to include the spaces and use the entire project root path.

## Changelog

[Internal] fix: codegen script failing for iOS builds on projects with spaces in root directory path

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

Test Plan:
Failing Test: Upgrade or init a new project and make sure that the project root directory contains a space (ex: /Users/test/cool projects/app/). With a clean install of node_modules and pods, attempt to build the project with Xcode. The build fails with an error running the script in FBReactNativeSpec (no such file or directory).

Passing Test: Include the changes presented in this PR and rerun the failing test (clean node_modules + PR patch/clean pods). The app should build.

Reviewed By: mdvacca

Differential Revision: D28255539

Pulled By: hramos

fbshipit-source-id: d44011985750639bd2fabfd40ed645d4eb661bd7
2021-08-11 12:57:58 +01:00
Héctor Ramos 98e1734451 fix: Move react-native-codegen to be a direct dependency of react-native (fix for 0.65-stable)
Closes T97407621.

This change is not present in main, and needs to be upstreamed. See T97370374.
2021-08-05 16:17:05 -07:00
Lorenzo Sciandra e8d725a373 [0.65.0-rc.3] Bump version numbers 2021-07-23 16:54:13 +01:00
Thibault MalbrancheandGitHub e40f58272d fix(deps): bump metro to 0.66.2 + dedup (#31886) 2021-07-20 16:25:50 -07:00
e53745ef9a Bump Flipper + Bump hermes (#31872)
* Bump Flipper to 0.93 (#31708)

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

Changelog:
[general][changed] - [iOS] Update Flipper to 0.93.0

Reviewed By: PeteTheHeat

Differential Revision: D29060305

fbshipit-source-id: 2ff109930437bfc90e8ce441fa681de867206397

* Update Podfile.lock

* bump(hermes): bumped hermes to 0.8.1

While current dependencies included the new version in the range, bumping it make sure that no one use the old one because of a lock file

Co-authored-by: Michel Weststrate <mweststrate@fb.com>
2021-07-20 12:50:57 -07:00
Danilo BürgerandMike Grabowski 4476fbc66c Allow PlatformColor to work with RCTView border colors (#29728)
Summary:
# See PR
https://github.com/facebook/react-native/pull/29728

# From PR Author
Using `PlatformColor` with border colors doesn't work currently when switching dark mode as the information is lost when converting to `CGColor`. This change keeps the border colors around as `UIColor` so switching to dark mode works.

```ts
<View
  style={{
    borderColor: DynamicColorIOS({ dark: "yellow", light: "red" }),
    borderWidth: 1,
  }}
>
...
</View>
```
This view will start with a red border (assuming light mode when started), but will not change to a yellow border when switching to dark mode. With this PR, the border color will be correctly set to yellow.

## Changelog

[iOS] [Fixed] - Allow PlatformColor to work with border colors

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

Test Plan:
1. Assign a `PlatformColor` or `DynamicColorIOS` to a view border color.
2. Toggle between dark / light mode. See the colors change.

Reviewed By: lunaleaps

Differential Revision: D29268376

Pulled By: p-sun

fbshipit-source-id: 586545b05be0beb0e6e5ace6e3f74b304620ad94
2021-07-16 15:06:34 +02:00
Tomek ZawadzkiandMike Grabowski 49253dcd97 Fix support for blobs larger than 64 KB on Android (#31789)
Summary:
Fixes https://github.com/facebook/react-native/issues/31774.

This pull request resolves a problem related to accessing blobs greater than 64 KB on Android. When an object URL for such blob is passed as source of `<Image />` component, the image does not load.

This issue was related to the fact that pipe buffer has a limited capacity of 65536 bytes (https://man7.org/linux/man-pages/man7/pipe.7.html, section "Pipe capacity"). If there is more bytes to be written than free space in the buffer left, the write operation blocks and waits until the content is read from the pipe.

The current implementation of `BlobProvider.openFile` first creates a pipe, then writes the blob data to the pipe and finally returns the read side descriptor of the pipe. For blobs larger than 64 KB, the write operation will block forever, because there are no readers to empty the buffer.

https://github.com/facebook/react-native/blob/41ecccefcf16ac8bcf858dd955af709eb20f7e4a/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobProvider.java#L86-L95

This pull request moves the write operation to a separate thread. The read side descriptor is returned immediately so that both writer and reader can work simultaneously. Reading from the pipe empties the buffer and allows the next chunks to be written.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Fixed] - Fix support for blobs larger than 64 KB

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

Test Plan:
A new example has been added to RN Tester app to verify if the new implementation properly loads the image of size 455 KB from a blob via object URL passed as image source.

<img src="https://user-images.githubusercontent.com/20516055/123859163-9eba6d80-d924-11eb-8a09-2b1f353bb968.png" alt="Screenshot_1624996413" width="300" />

Reviewed By: ShikaSD

Differential Revision: D29674273

Pulled By: yungsters

fbshipit-source-id: e0ac3ec0a23690b05ab843061803f95f7666c0db
2021-07-16 14:58:03 +02:00
Agastya DarmaandMike Grabowski 626d25cf84 Android: upgrading to OkHttp from 4.9.0 to 4.9.1 to fix java.lang.NullPointerException: bio == null crash (#31822)
Summary:
Douring our routine crash report check we are occasionally seeing reports of exceptions like this in the wild from our crash stack:

```
java.lang.NullPointerException: bio == null
       at com.android.org.conscrypt.NativeCrypto.SSL_pending_written_bytes_in_BIO(NativeCrypto.java)
       at com.android.org.conscrypt.NativeSsl$BioWrapper.getPendingWrittenBytes(NativeSsl.java:660)
       at com.android.org.conscrypt.ConscryptEngine.pendingOutboundEncryptedBytes(ConscryptEngine.java:566)
       at com.android.org.conscrypt.ConscryptEngineSocket.drainOutgoingQueue(ConscryptEngineSocket.java:584)
       at com.android.org.conscrypt.ConscryptEngineSocket.close(ConscryptEngineSocket.java:480)
       at okhttp3.internal.Util.closeQuietly(Util.kt:501)
       at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFile:245)
       at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFile:106)
       at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFile:74)
       at okhttp3.internal.connection.RealCall.initExchange$okhttp(ExchangeFile:255)
       at okhttp3.internal.connection.ConnectInterceptor.intercept(ExchangeFile:32)
       ...
  ```

![Screen Shot 2021-07-07 at 1 38 23 PM](https://user-images.githubusercontent.com/8868908/124711795-b5fee980-df28-11eb-98c4-9668661340b6.png)

This appears to only be happening on devices running Android 10 and 11. This happens because there is concurrency issue in Conscrypt where two threads race to close an SSLEngine-based SSLSocket and access to the underlying BIO is unsynchronized.

 **The OkHttp team already released a fix for this issue on version 4.9.1** this PR aims to update our OkHttp package to version 4.9.1.

 Related discussion:
 [https://issuetracker.google.com/issues/177450597](https://issuetracker.google.com/issues/177450597)
 [https://publicobject.com/2021/01/30/bio-null/](https://publicobject.com/2021/01/30/bio-null/)

cc dulmandakh fkgozali

## Changelog
[Android] [Changed] - Bumping OkHttp from 4.9.0 to 4.9.1.

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

Test Plan: Manual & Automated from CI

Reviewed By: fkgozali

Differential Revision: D29590198

Pulled By: ShikaSD

fbshipit-source-id: 4228bfd3472114253e13acb436dc1dd9287a148d
2021-07-16 14:57:56 +02:00
Lorenzo Sciandra db7aa7b12c [0.65.0-rc.2] Bump version numbers 2021-06-18 10:19:14 +01:00
Andrei ShikovandLorenzo Sciandra 121a6a49c6 Fix Android build sequencing
Summary:
The native libraries are compiled outside of the usual Android build flow using separate CLI task. Because of that, shared native libraries may not exist when AAR is bundled, resulting in weird sequencing issues.

This change updates gradle dependency graph, executing RN native build before Android part (as it is done in RNTester already).

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D29209249

fbshipit-source-id: 36386c78996b1cd9b1731735e36e571199e9e81b
2021-06-18 09:22:08 +01:00
Lorenzo Sciandra ba4424fcca Revert "Revert "bump buildToolsVersion to 30.0.2 (#31627)""
This reverts commit 0a15927dc1.
2021-06-18 09:21:54 +01:00
Lorenzo Sciandra be9a66999c Revert "Revert "Gradle 6.9, Android Gradle Plugin 4.2.1 (#31593)""
This reverts commit a10a20105b.
2021-06-18 09:21:42 +01:00
Lorenzo Sciandra 0e08b25284 [0.65.0-rc.1] Bump version numbers 2021-06-17 12:11:03 +01:00
Lorenzo Sciandra ca5b943031 [LOCAL] lock files update for 065 branch 2021-06-17 12:06:06 +01:00
Peter ArganyandLorenzo Sciandra a3c53f5785 Workaround failing fmt compilation by locking to v6.2.1
Summary: Updating pods attempts to bump fmt to 7.1.3, which causes CircleCI to fail. [Sample failure](https://app.circleci.com/pipelines/github/facebook/react-native/9422/workflows/f4c9076a-9649-490c-b565-555fecc60957/jobs/205827). Let's temporarily lock to an older version until the [fmt fix](https://github.com/fmtlib/fmt/commit/355be4b13fe340964a1419bd4d4c7e89db5a3174) gets tagged for release.

Reviewed By: JoshuaGross

Differential Revision: D29147585

fbshipit-source-id: b1aca9618586a9d6e4c6d0c2c37b258745e008ee
2021-06-16 18:23:20 +01:00
Michel WeststrateandLorenzo Sciandra d8b115afab Bump Android deps to 0.93 (#31675)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/31675

As requested in parent diff, moved the Android dep bumps into a separate diff.

## Changelog

[general][changed] - [Android] Update Flipper to 0.93.0

Reviewed By: mdvacca, ShikaSD

Differential Revision: D28688486

fbshipit-source-id: c3a8e0edeebdabd490b2885497e261f64bdab4bd
2021-06-16 16:46:49 +01:00
DulmandakhandLorenzo Sciandra 5f1d431227 bump fresco to 2.5.0 (#31699)
Summary:
This PR bumps Fresco to 2.5.0, which is first version on MavenCentral since jCenter announcement.

## Changelog

[Android] [Changed] - Bump Fresco to 2.5.0

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

Test Plan: CI is green

Reviewed By: TheSavior

Differential Revision: D29031847

Pulled By: passy

fbshipit-source-id: 486ffbf5461d07d736c0ebe17c0c7726937db344
2021-06-16 16:46:40 +01:00
Rui YingandLorenzo Sciandra 26bec886ef Fix cli bundle platform for Mac Catalyst in react-native-xcode.sh (#31062)
Summary:
A recent commit https://github.com/facebook/react-native/commit/941bc0ec195716e6a505a3c3a67f97a87ea9bcdc#diff-0eeea47fa4bace26fa6c492a03fa0ea3923a2d8d54b7894f7760cb9131ab65eb on Hermes macOS brings a regression for Mac Catalyst target.

Once hardcoded cli bundle platform `ios` can now be either `ios` or `macos`. However, Mac Catalyst is identified as `macos` rather than `ios`.

This PR should fix it and close https://github.com/facebook/react-native/issues/31061.

## Changelog

[iOS] [Fixed] - Fix cli bundle platform for Mac Catalyst in `react-native-xcode.sh`

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

Test Plan:
1. Build fails on a new RN 0.64-rc.3 project.
2. Apply the fix.
3. Build passes.

Reviewed By: TheSavior

Differential Revision: D29038793

Pulled By: appden

fbshipit-source-id: 29761f887ec7a9cc26f088953c3888c6d19bed71
2021-06-16 16:46:31 +01:00
Birkir GudjonssonandLorenzo Sciandra 6287c447d6 Accessible colors for DynamicColorIOS (#31651)
Summary:
Allow you to harvest the `UIAccessibilityContrastHigh` trait from iOS to show accessible colors when high contrast mode is enabled.

```jsx
// usage

PlatformColorIOS({
  light: '#eeeeee',
  dark: '#333333',
  highContrastLight: '#ffffff',
  highContrastDark: '#000000',
});

// {
//   "dynamic": {
//     "light": "#eeeeee",
//     "dark": "#333333",
//     "highContrastLight": "#ffffff",
//     "highContrastDark": "#000000",
//   }
// }
```

This is how apple's own dynamic system colors work under the hood (https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/color/#dynamic-system-colors)

 ---

The react native docs mention that more keys may become available in the future, which this PR is adding:

> In the future, more keys might become available for different user preferences, like high contrast.

https://reactnative.dev/docs/dynamiccolorios

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Added] - High contrast dynamic color options for dark and light mode.

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

Test Plan: Added unit tests for `normalizeColor` to pass the high contrast colors downstream to RCTConvert

Reviewed By: lunaleaps

Differential Revision: D28922536

Pulled By: p-sun

fbshipit-source-id: f81417f003c3adefac50e994e62b9be14ffa91a1
2021-06-16 16:40:42 +01:00
Danilo BürgerandLorenzo Sciandra 6b5b72c4c3 Find node on m1 via homebrew node managers (#31678)
Summary:
Adds homebrew on m1 to path before evaluating `command -v brew` to support nvm on m1 via homebrew.

## Changelog

[General] [Changed] - Find node on m1 via homebrew node managers

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

Test Plan:
On M1, use nvm via homebrew. Create a RN project and it'll fail to build iOS app. Apply the patch, and build will succeed.

cc: dulmandakh as discussed in https://github.com/facebook/react-native/pull/31622

Reviewed By: ShikaSD

Differential Revision: D28967386

Pulled By: PeteTheHeat

fbshipit-source-id: 3d4a41dd3cc25fbf77778b16468a236b141d1259
2021-06-16 16:40:34 +01:00
fabriziobertoglio1987andLorenzo Sciandra 39e64c01c5 Fix font weight numeric values (#29117)
Summary:
This issue fixes https://github.com/facebook/react-native/issues/25696 fixes https://github.com/facebook/react-native/issues/28854 fixes https://github.com/facebook/react-native/issues/26193
Since Android API 28 it is possible to specify fontWeight with numerical values ranging from 100 to 900

This pr uses the new Typeface.create() method available on Android API 28+ to set font weight value ranging from 100 to 900, while still keeping existing functionalities (custom fonts, bold/italic and other styles).
https://developer.android.com/reference/android/graphics/Typeface#create(android.graphics.Typeface,%20int,%20boolean)

## Changelog

[Android] [Fixed] - Fix font weight numeric values

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

Test Plan:
Works in all scenarios.

**<details><summary>CLICK TO OPEN TESTS RESULTS</summary>**
<p>

| **BEFORE** | **AFTER** |
|:-------------------------:|:-------------------------:|
|  <img src="https://user-images.githubusercontent.com/24992535/84420949-1daa0e80-ac1b-11ea-9a2e-eaac03dc4533.png"  width="300" height="" />| <img src="https://user-images.githubusercontent.com/24992535/84490766-edf31900-aca3-11ea-90d8-7c52d2e2be59.png" width="300" height="" /> |

| **AFTER** | **AFTER** |
|:-------------------------:|:-------------------------:|
|  <img src="https://user-images.githubusercontent.com/24992535/84490768-ee8baf80-aca3-11ea-8d3e-937d87b3c56a.png"  width="300" height="" />| <img src="https://user-images.githubusercontent.com/24992535/84490769-ef244600-aca3-11ea-9dec-5eb70358834b.png" width="300" height="" /> |

| **AFTER** |
|:-------------------------:|
|  <img src="https://user-images.githubusercontent.com/24992535/84490772-f0557300-aca3-11ea-851a-5befc900192c.png"  width="300" height="" />|

</p>
</details>

Reviewed By: lunaleaps

Differential Revision: D28917328

Pulled By: yungsters

fbshipit-source-id: 8b84e855b3a8b87960cb79b9237d452b26974c36
2021-06-16 16:40:26 +01:00
Lorenzo Sciandra 0a15927dc1 Revert "bump buildToolsVersion to 30.0.2 (#31627)"
This reverts commit 37e9f1d36e.
2021-06-16 16:37:57 +01:00
Lorenzo Sciandra a10a20105b Revert "Gradle 6.9, Android Gradle Plugin 4.2.1 (#31593)"
This reverts commit 7599593b30.
2021-06-16 16:37:46 +01:00
Tommy Nguyen 5556968645 [0.65.0-rc.0] Bump version numbers 2021-06-09 15:56:34 +02:00
Tommy Nguyen 5aae7fce0e [LOCAL] unbreak publish-npm.js 2021-06-09 15:55:43 +02:00
Tommy Nguyen 4e9ae4c98a Revert "[0.65.0-rc.0] Bump version numbers"
This reverts commit e324498941.
2021-06-09 15:55:43 +02:00
Tommy Nguyen e324498941 [0.65.0-rc.0] Bump version numbers 2021-06-09 15:26:21 +02:00
Tommy Nguyen f6accd2233 [LOCAL] Fix Buck failing to fetch robolectric 2021-06-09 15:22:49 +02:00
Tommy Nguyen 4b62cbdb48 Revert "[0.65.0-rc.0] Bump version numbers"
This reverts commit 5f30232c45.
2021-06-09 15:22:49 +02:00
Tommy Nguyen 5f30232c45 [0.65.0-rc.0] Bump version numbers 2021-06-09 11:33:52 +02:00
Tommy Nguyen cae0637986 [LOCAL] postfix timestamp to bust yarn cache 2021-06-08 16:47:56 +02:00
Michel WeststrateandTommy Nguyen 5c8c5b6cf5 Bump flipper deps to 0.91 to support XCode 12.5 out of the box (#31562)
Summary:
allow-large-files

This bumps the flipper dependencies to 0.91.

Fresco deps are not in mavenCentral jet, so picked those from bintray, but pinged the team and they'll follow up on it. See also: https://github.com/facebook/fresco/issues/2603

This primarily bumps to the latest pods we have everywhere, which solves several build issues, like reported in https://github.com/facebook/react-native/issues/31480

After this change it should no longer be needed to pass custom version overrides to `use_flipper`, as the defaults will be up to date.

In the template project, I changed the version rangers to exact numbers, so that results of `react-native init` are more consistent / predictable over time, as suggested in the discord channel by Brent

In the long term we are investigating whether we can remove most of the transitive deps by not using RSocket, which is a bigger project plan that should help reduce build issues and times, especially on iOS.

cc priteshrnandgaonkar  passy kelset

## Changelog

[general][changed] - [iOS] Update Flipper to 0.91.1, fixed iOS build support for i386, `use_flipper!()` will no longer need custom overrides to build with XCode 12.5

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

Test Plan:
_N.B. Locally tested in XCode 12.4 only, but bumped versions have been confirmed to work on 12.5 before by others_

* React Native CI
* Flipper CI with same versions of deps: https://github.com/facebook/flipper/actions/runs/863607686
* Was able to connect from both Android and iOS to Flipper. Couldn't really test further due to a bundling error I didn't understand, suggestions welcome

![Screenshot 2021-05-21 at 11 32 52](https://user-images.githubusercontent.com/1820292/119133806-3d090880-ba34-11eb-8c0b-1ede7bc13751.png)
![Screenshot 2021-05-21 at 12 59 13](https://user-images.githubusercontent.com/1820292/119133892-5c079a80-ba34-11eb-9e72-278c427fdeb0.png)

Reviewed By: fkgozali

Differential Revision: D28623601

Pulled By: mweststrate

fbshipit-source-id: 22130d07821569851956453c4ee6a594b6b83928
2021-06-08 15:20:01 +02:00
DulmandakhandTommy Nguyen 37e9f1d36e bump buildToolsVersion to 30.0.2 (#31627)
Summary:
Bump buildToolsVersion to 30.0.2, default version of Android Gradle Plugin 4.2.0. Fixes parity with https://github.com/facebook/react-native/pull/31593

## Changelog

[Android] [Changed] - Bump buildToolsVersion to 30.0.2,

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

Test Plan: Newly created projects will use build tools 30.0.2 to build dependencies.

Reviewed By: yungsters

Differential Revision: D28833598

Pulled By: ShikaSD

fbshipit-source-id: 009472d27ea7103bdc7e5a6a941ab529d982f2da
2021-06-08 15:19:57 +02:00
DulmandakhandTommy Nguyen 0b36e2be1b use maven-publish plugin (#31611)
Summary:
Gradle has been showing below warning for a while, and this PR fixes the warning using maven-publish plugin, thus taking us one step closer to Gradle 7.x.

> The maven plugin has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the maven-publish plugin instead. Consult the upgrading guide for further information: https://docs.gradle.org/6.9/userguide/upgrading_version_5.html#legacy_publication_system_is_deprecated_and_replaced_with_the_publish_plugins

Configured maven-publish plugin according to https://developer.android.com/studio/build/maven-publish-plugin, also added **installArchives** task for backwards compatibility.

## Changelog

[Internal] [Changed] - use maven-publish plugin to build and publish Android artifact

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

Test Plan: ./gradlew :ReactAndroid:installArchives will create **android** directory for local maven repository with **react-native** package.

Reviewed By: yungsters

Differential Revision: D28802435

Pulled By: ShikaSD

fbshipit-source-id: 7bc7650a700e1a61213c5ec238bcb24fdca954db
2021-06-08 15:19:53 +02:00
Håkon KnutzenandTommy Nguyen c299694c87 Custom NSURLSession configuration (#27701)
Summary:
While it is possible in the React Native implementation for Android to provide a custom configuration for HTTP requests, the iOS implementation does not allow for the same customization. As the NSURLSession used for HTTP requests on iOS is configured internally, one may for instance not supply an ephemeral configuration for HTTP requests. Other concerns related to the given problem have been addressed in the community: https://github.com/react-native-community/discussions-and-proposals/issues/166. I did make a PR with an RFC in the community repo, but after some discussion in the said repo, I figured I might as well make a PR with a suggestion :)

## Changelog

[iOS] [Added] - Allow for configuring the NSURLSessionConfiguration

Implement a C function `RCTSetCustomNSURLSessionConfigurationProvider` which gives the app programmer the ability to provide a block which provides an NSURLSessionConfiguration that will be used for all HTTP requests instead of the default configuration. The provided block will be called when the session configuration is needed.

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

Test Plan: Unsure if this can be tested in any other way than uncommenting the example code in `RNTester/RNTester/AppDelegate.mm`.

Reviewed By: yungsters

Differential Revision: D28680384

Pulled By: JoshuaGross

fbshipit-source-id: ae24399955581a1cc9f4202f0f6f497bfe067a5c
2021-06-08 15:19:48 +02:00
Thibault MalbrancheandTommy Nguyen 79ddbfb555 fix(cli + tests): Bump metro to 0.66 + fix test manual script (#31597)
Summary:
Bumped react-native-community/cli to v6 to update metro to 0.66 to fix fast-refresh issues
Also updated the manual test e2e script for easier testing. (using npm install would create a package-lock.json and conflict with yarn.lock)

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[GENERAL] [UPDATE] - updated react-native-community/cli to v6 (hence updating metro to 0.66)

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

Test Plan: I've tested fast-refresh works with / without hermes

Reviewed By: TheSavior

Differential Revision: D28852660

Pulled By: yungsters

fbshipit-source-id: af338e4dd1d52c62949d71f42773963d89bca9db
2021-06-08 15:19:41 +02:00
DulmandakhandTommy Nguyen 30f356cd48 find-node.sh supports Homebrew on M1 (#31622)
Summary:
Homebrew on M1 installs executable binaries in **/opt/homebrew/bin** (See https://brew.sh/2021/02/05/homebrew-3.0.0/), and FBReactNativeSpec.build is failing because it couldn't find node. This PR changes find-node.sh script to add /opt/homebrew/bin into $PATH.

The way **react.gradle** trying to execute node is not using user environment variables, but system defaults, so it couldn't find it. I removed node execution, and hard coded cli path in parity with iOS https://github.com/facebook/react-native/blob/d1ab03235cb4b93304150878d2b9057ab45bba77/scripts/react-native-xcode.sh#L106

Fixes https://github.com/facebook/react-native/issues/31621 https://github.com/facebook/react-native/issues/31592

## Changelog

[General] [Changed] - find-node.sh supports Homebrew on M1

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

Test Plan: On M1, create a RN project and it'll fail to build iOS app. Apply the patch, and build will succeed.

Reviewed By: ShikaSD

Differential Revision: D28808206

Pulled By: hramos

fbshipit-source-id: 8b313b6685462a15e67d99c61a0202d17fece1ec
2021-06-08 15:18:39 +02:00
DulmandakhandTommy Nguyen 9a923be897 remove jcenter (#31609)
Summary:
jcenter is read-only now, and newer versions of dependencies will be published to either MavenCentral or Jitpack. This PR removes jcenter to avoid future issues, then uses MavenCentral and Jitpack as replacement. Current flipper depends on Stetho version that is not available on MavenCentral, so had to exclude and bump the version.

Both Gradle and Buck successfully download all the dependencies.

## Changelog

[Android] [Changed] - Remove jcenter

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

Test Plan: rn-tester builds and runs as expected.

Reviewed By: mdvacca

Differential Revision: D28802444

Pulled By: ShikaSD

fbshipit-source-id: 043ef079d0cda77a1f8dd732678452ed712741a4
2021-06-08 15:18:28 +02:00
Andrei ShikovandTommy Nguyen aa25969c54 Use Maven Central for fbjni artifact
Summary:
FBJNI version have been updated recently and the new version is available on Maven Central, so we can remove this exception.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28355443

fbshipit-source-id: 1b3d88b668fed12deb786d36672f07dc98709aa0
2021-06-08 15:18:15 +02:00
Andrei ShikovandTommy Nguyen bb7541ee3d Use trovej dependency from Maven Central
Summary:
JetBrains [republished](https://youtrack.jetbrains.com/issue/IDEA-261387) trovej to Maven Central, so we can now use that dependency instead

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28355119

fbshipit-source-id: 9dd35b946bf9a09b06d831159be72fa9e5e94837
2021-06-08 15:18:03 +02:00
Simen BekkhusandTommy Nguyen a48d998b3e fix: update to @jest/create-cache-key-function@27 (#30637)
Summary:
API of Jest transformers is changing in Jest 27. The new version of `jest/create-cache-key-function` handles both current versions of the API and the upcoming 27 API.

Ref: https://github.com/facebook/jest/pull/10834

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] [Changed] - Use version of `jest/create-cache-key-function` compatible with upcoming Jest v27 release

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

Test Plan: I've tested locally that it works with both a `jest@latest` and `jest@next` release.

Reviewed By: yungsters

Differential Revision: D28807361

Pulled By: hramos

fbshipit-source-id: 9d9ccb4d7f91b30bcbf3d28202bb74ce7499a91b
2021-06-08 15:12:33 +02:00
DulmandakhandTommy Nguyen 7599593b30 Gradle 6.9, Android Gradle Plugin 4.2.1 (#31593)
Summary:
Bump Gradle to 6.9 which supports Apple Silicon, also Android Gradle Plugin 4.2.1 which defaults to Java 1.8 so no additional config required.

## Changelog

[Android] [Changed] - Bump Gradle to 6.9, Android Gradle Plugin to 4.2.1

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

Test Plan: rn-tester builds and runs as expected

Reviewed By: mdvacca

Differential Revision: D28711942

Pulled By: ShikaSD

fbshipit-source-id: 2a4616cd0f17db7616ab29dea1652717f2cd0f6d
2021-06-08 15:11:10 +02:00
Andrew CoatesandTommy Nguyen 408265dc49 localeIdentifier missing from flow type of I18nManager (#31589)
Summary:
https://github.com/facebook/react-native/commit/23d9bf1a24f80003a8a3c0b82e9b5691e4e6544e looks like it accidently removed `localeIdentifier` from I18nManager.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Fixed] - Re-added localeIdentifier to I18nManager constants

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

Reviewed By: GijsWeterings

Differential Revision: D28690202

Pulled By: fkgozali

fbshipit-source-id: 543a491f89789bca5629e1251c94fd055ec4a801
2021-06-08 15:11:05 +02:00
Kudo ChienandTommy Nguyen f15cd422e6 Upgrade jsc-android to 250230.2.1 (#31304)
Summary:
Upgrade jsc-android to latest stable version. Hopefully this should finally fix https://github.com/facebook/react-native/issues/25494.
Before Hermes totally replaced JSC, it should be worth to have this and make JSC stable

## Changelog

[Android] [Changed] - Upgrade jsc-android to 250230.2.1

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

Test Plan: Launch app with new jsc-android and see everything works fine.

Reviewed By: TheSavior

Differential Revision: D28630503

Pulled By: yungsters

fbshipit-source-id: 84510f91c81d4aaefe265d5492677ad6ff10e0fe
2021-06-08 15:10:59 +02:00
Thibault MalbrancheandTommy Nguyen 48b2b7914b fix(hermes): fixed hermes build on iOS (#31559)
Summary:
While testing 0.65, we noticed issues with hermes on iOS in the template projects
These changes create a subspec to the react-core pod so that it can access hermes header correctly.

## Changelog

Not applicable

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

Test Plan: I've ran e2e manual test. Tested RNTester manually also. Then tested a project inited with hermes and the default template

Reviewed By: mhorowitz

Differential Revision: D28564642

Pulled By: Huxpro

fbshipit-source-id: cfcb3363254f62a0e514ec99159b32f841ee4463
2021-06-08 15:10:50 +02:00
Adrien HARNAYandTommy Nguyen bff03634ac Add onPressIn & onPressOut props to Text (#31288)
Summary:
I added onPressIn & onPressOut props to Text to help implement custom highlighting logic (e.g. when clicking on a Text segment). Since TouchableOpacity can't be nested in Text having custom lineHeights without bugs in some occasions, this modification helps to replicate its behavior.

## Changelog

[General] [Added] - Add onPressIn & onPressOut props to Text

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

Test Plan:
```
const [pressing, setPressing] = useState(false);

<Text
  onPressIn={() => setPressing(true)}
  onPressOut={() => setPressing(false)}
  style={{ opacity: pressing ? 0.5 : 1 }}
/>
```

Thanks in advance!

Reviewed By: yungsters

Differential Revision: D27945133

Pulled By: appden

fbshipit-source-id: 8342ca5f75986b4644a193d2f71eab3bc0ef1a5f
2021-06-08 15:10:27 +02:00
Peter ArganyandLorenzo Sciandra 3aa8399200 Fix Hermes + no Flipper build on Xcode 12.5
Summary:
This is a follow up to my diffs from a couple weeks ago bumping folly version to 2021.04.26. Unfortunately, those diffs did not work when Hermes was enabled, and Flipper was disabled, this fixes that.

I've tested the matrix of Hermes enabled/disabled and Flipper enabled/disabled.

Changelog: [iOS]  Fix Hermes + no Flipper build on Xcode 12.5

Reviewed By: yungsters

Differential Revision: D28325790

fbshipit-source-id: e58e1ba4730e7989c48dfd2aae06d91c1d3687db
2021-05-12 09:27:10 +01:00
David VaccaandLorenzo Sciandra c317f558f7 Refactor UIManagerHelper.getUIManager to return null when there's no UIManager registered
Summary:
This diff refactors the UIManagerHelper.getUIManager method to return null when there's no UIManager registered for the uiManagerType received as a parameter.

This is necessary to workaround: https://github.com/facebook/react-native/issues/31245

changelog: [changed] UIManagerHelper.getUIManager now returns null when there's no UIManager registered for the uiManagerType received as a parameter

Reviewed By: fkgozali

Differential Revision: D28242592

fbshipit-source-id: c3a4979bcf6e547d0f0060737e41bbf19860a984
2021-05-12 09:26:53 +01:00
Peter ArganyandLorenzo Sciandra 867d15ad15 Fix Hermes build on folly 2021.04.26.00
Summary:
This fixes multiple compile errors when building RNTester with Hermes enabled:
- `Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')`
- `'event2/event-config.h' file not found`
- tons of missing files (all added to RCT-Folly/Futures)

Changelog: [iOS] Fix Hermes build on folly version 2021.04.26.00
allow-large-files

Reviewed By: RSNara

Differential Revision: D28128087

fbshipit-source-id: ee7cb6fda72d00d22f6182d958aa8ba55939f158
2021-05-12 09:26:21 +01:00
Riley DulinandLorenzo Sciandra 7a83631282 Implement HeapProfiler.getObjectByHeapObjectId
Summary:
Implement the API for querying the properties of an object found in a
heap snapshot.

Now when you are debugging and take a heap snapshot, you can hover
over an object and inspect it!

Only works for subclasses of JSObject. Doesn't work for stuff like HiddenClass,
PropertyAccessor, native objects like WeakValueMap, etc. Those internal objects
display "Preview is not available" which matches what Chrome prints for its own
internal stuff.

Changelog: [Internal]

Reviewed By: avp

Differential Revision: D27834672

fbshipit-source-id: 607a8984b5a48b76c5ae57f9bd5bf53168f3ec3f
2021-05-12 09:26:11 +01:00
Neal PooleandLorenzo Sciandra d3a0d1e1b9 Update validateBaseUrl to use latest regex
Summary:
Updating the regex to avoid a potential regular expression denial-of-service vulnerability.

Changelog: Update validateBaseUrl to use a more robust regular expression. Fixes CVE-2020-1920, GHSL-2020-293

Reviewed By: lunaleaps

Differential Revision: D25507604

fbshipit-source-id: c36a03c456881bc655c861e1a2c5cd41a7127c9d
2021-05-12 09:26:01 +01:00
Xuan HuangandLorenzo Sciandra f0e529c450 Reflect Hermes release version from HermesBadge
Summary:
Changelog:
[General] - Reflect Hermes release version from HermesBadge

It was a common footgun that an unexpected version of Hermes
engine is used in a RN app. To help with indicating this from
the runtime, Hermes exposes its OSS release version from
`HermesInternal.getRuntimeProperties()` Starting from 0.8.0.

This diff updates the `HermesBadge` used by `NewAppScreen`
header to reflect the version.

Reviewed By: nadiia

Differential Revision: D24436609

fbshipit-source-id: 8ba45be598a7d5af0e38f5044f9370fc7e1eb9a1
2021-05-12 09:25:52 +01:00
Xuan HuangandLorenzo Sciandra c00197e61a Bump Hermes npm to 0.8.0
Summary:
Changelog:
[Breaking][Changed] - Bump Hermes to 0.8.0

allow-large-files

Reviewed By: nadiia

Differential Revision: D28087209

fbshipit-source-id: 2f26901d07ad29093d44e4a71eaa7b7c4ad9afb2
2021-05-12 09:25:44 +01:00
Peter ArganyandLorenzo Sciandra f31c6102cc Bump Flipper-Folly to 2.5.3 and RCT-Folly to 2021.04.26.00
Summary:
This fixes an error where folly fails to build on Xcode 12.5, by bumping the various folly deps in RN to builds with a fix.

Next step is to commit this to 0.64 release branch

allow-large-files

Changelog: [iOS] Fix builds on Xcode 12.5

Reviewed By: fkgozali

Differential Revision: D28071808

fbshipit-source-id: 236b66bf8294db0c76ff25b11632c1bf89525921
2021-05-12 09:25:35 +01:00
Eli WhiteandGitHub 6d31b71ec8 Merge pull request #31492 from nadiia/0.65-stable-roottag-context
[AppContainer] Add back legacy rootTag childContex
2021-05-07 15:37:56 -07:00
nadiia 325aa5f31f [AppContainer] Add back legacy rootTag childContex for 0.65 2021-05-07 11:43:12 -07:00
Xuan Huang 63ddb1db1a Pin hermes-engine to 0.8.x for RN 0.65 2021-04-29 20:51:00 -07:00
112 changed files with 6788 additions and 5079 deletions
-1
View File
@@ -8,7 +8,6 @@
[maven_repositories]
central = https://repo1.maven.org/maven2
google = https://maven.google.com/
jcenter = https://jcenter.bintray.com/
[alias]
rntester = //packages/rn-tester/android/app:app
+1 -1
View File
@@ -618,7 +618,7 @@ jobs:
- ANDROID_HOME: "C:\\Android\\android-sdk"
- ANDROID_NDK: "C:\\Android\\android-sdk\\ndk\\20.1.5948944"
- ANDROID_BUILD_VERSION: 30
- ANDROID_TOOLS_VERSION: 29.0.3
- ANDROID_TOOLS_VERSION: 30.0.2
- GRADLE_OPTS: -Dorg.gradle.daemon=false
- NDK_VERSION: 20.1.5948944
steps:
+3
View File
@@ -13,6 +13,9 @@ indent_size = 2
[*.gradle]
indent_size = 4
[*.kts]
indent_size = 4
[BUCK]
indent_size = 4
-1
View File
@@ -101,7 +101,6 @@ package-lock.json
!/packages/rn-tester/Pods/__offline_mirrors__
# react-native-codegen
/React/FBReactNativeSpec/FBReactNativeSpec
/packages/react-native-codegen/lib
/ReactCommon/react/renderer/components/rncore/
+1 -1
View File
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
Pod::Spec.new do |s|
s.name = "React-RCTBlob"
+1 -1
View File
@@ -105,7 +105,7 @@ export class URLSearchParams {
function validateBaseUrl(url: string) {
// from this MIT-licensed gist: https://gist.github.com/dperini/729294
return /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(
return /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)*(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/.test(
url,
);
}
+4 -4
View File
@@ -1,17 +1,17 @@
/**
* @generated by scripts/bump-oss-version.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @generated by scripts/bump-oss-version.js
* @flow strict
*/
exports.version = {
major: 0,
minor: 0,
patch: 0,
minor: 65,
patch: 3,
prerelease: null,
};
+1 -1
View File
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
Pod::Spec.new do |s|
s.name = "React-RCTImage"
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
Pod::Spec.new do |s|
s.name = "React-RCTLinking"
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
Pod::Spec.new do |s|
s.name = "React-RCTAnimation"
@@ -8,6 +8,11 @@
#import <React/RCTInvalidating.h>
#import <React/RCTURLRequestHandler.h>
typedef NSURLSessionConfiguration* (^NSURLSessionConfigurationProvider)(void);
/**
* The block provided via this function will provide the NSURLSessionConfiguration for all HTTP requests made by the app.
*/
RCT_EXTERN void RCTSetCustomNSURLSessionConfigurationProvider(NSURLSessionConfigurationProvider);
/**
* This is the default RCTURLRequestHandler implementation for HTTP requests.
*/
+19 -7
View File
@@ -18,6 +18,12 @@
@end
static NSURLSessionConfigurationProvider urlSessionConfigurationProvider;
void RCTSetCustomNSURLSessionConfigurationProvider(NSURLSessionConfigurationProvider provider) {
urlSessionConfigurationProvider = provider;
}
@implementation RCTHTTPRequestHandler
{
NSMapTable *_delegates;
@@ -75,14 +81,20 @@ RCT_EXPORT_MODULE()
NSOperationQueue *callbackQueue = [NSOperationQueue new];
callbackQueue.maxConcurrentOperationCount = 1;
callbackQueue.underlyingQueue = [[_moduleRegistry moduleForName:"Networking"] methodQueue];
NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
// Set allowsCellularAccess to NO ONLY if key ReactNetworkForceWifiOnly exists AND its value is YES
if (useWifiOnly) {
configuration.allowsCellularAccess = ![useWifiOnly boolValue];
NSURLSessionConfiguration *configuration;
if (urlSessionConfigurationProvider) {
configuration = urlSessionConfigurationProvider();
} else {
configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
// Set allowsCellularAccess to NO ONLY if key ReactNetworkForceWifiOnly exists AND its value is YES
if (useWifiOnly) {
configuration.allowsCellularAccess = ![useWifiOnly boolValue];
}
[configuration setHTTPShouldSetCookies:YES];
[configuration setHTTPCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
[configuration setHTTPCookieStorage:[NSHTTPCookieStorage sharedHTTPCookieStorage]];
}
[configuration setHTTPShouldSetCookies:YES];
[configuration setHTTPCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
[configuration setHTTPCookieStorage:[NSHTTPCookieStorage sharedHTTPCookieStorage]];
assert(configuration != nil);
_session = [NSURLSession sessionWithConfiguration:configuration
delegate:self
delegateQueue:callbackQueue];
+1 -1
View File
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
Pod::Spec.new do |s|
s.name = "React-RCTNetwork"
@@ -15,6 +15,9 @@ import Colors from './Colors';
const HermesBadge = (): Node => {
const isDarkMode = useColorScheme() === 'dark';
const version =
global.HermesInternal?.getRuntimeProperties?.()['OSS Release Version'] ??
'';
return global.HermesInternal ? (
<View style={styles.badge}>
<Text
@@ -24,7 +27,7 @@ const HermesBadge = (): Node => {
color: isDarkMode ? Colors.light : Colors.dark,
},
]}>
Engine: Hermes
{`Engine: Hermes ${version}`}
</Text>
</View>
) : null;
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
Pod::Spec.new do |s|
s.name = "React-RCTPushNotification"
+15
View File
@@ -14,8 +14,11 @@ import StyleSheet from '../StyleSheet/StyleSheet';
import {type EventSubscription} from '../vendor/emitter/EventEmitter';
import {RootTagContext, createRootTag} from './RootTag';
import type {RootTag} from './RootTag';
import PropTypes from 'prop-types';
import * as React from 'react';
type Context = {rootTag: number | RootTag, ...};
type Props = $ReadOnly<{|
children?: React.Node,
fabric?: boolean,
@@ -43,6 +46,18 @@ class AppContainer extends React.Component<Props, State> {
static getDerivedStateFromError: any = undefined;
static childContextTypes:
| any
| {|rootTag: React$PropType$Primitive<number>|} = {
rootTag: PropTypes.number,
};
getChildContext(): Context {
return {
rootTag: this.props.rootTag,
};
}
componentDidMount(): void {
if (__DEV__) {
if (!global.__RCTProfileIsProfiling) {
+12 -3
View File
@@ -13,12 +13,17 @@ import NativeI18nManager from './NativeI18nManager';
const i18nConstants: {|
doLeftAndRightSwapInRTL: boolean,
isRTL: boolean,
localeIdentifier?: ?string,
|} = getI18nManagerConstants();
function getI18nManagerConstants() {
if (NativeI18nManager) {
const {isRTL, doLeftAndRightSwapInRTL} = NativeI18nManager.getConstants();
return {isRTL, doLeftAndRightSwapInRTL};
const {
isRTL,
doLeftAndRightSwapInRTL,
localeIdentifier,
} = NativeI18nManager.getConstants();
return {isRTL, doLeftAndRightSwapInRTL, localeIdentifier};
}
return {
@@ -28,7 +33,11 @@ function getI18nManagerConstants() {
}
module.exports = {
getConstants: (): {|doLeftAndRightSwapInRTL: boolean, isRTL: boolean|} => {
getConstants: (): {|
doLeftAndRightSwapInRTL: boolean,
isRTL: boolean,
localeIdentifier: ?string,
|} => {
return i18nConstants;
},
+1 -1
View File
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
Pod::Spec.new do |s|
s.name = "React-RCTSettings"
@@ -16,6 +16,8 @@ export opaque type NativeColorValue = {
dynamic?: {
light: ?(ColorValue | ProcessedColorValue),
dark: ?(ColorValue | ProcessedColorValue),
highContrastLight?: ?(ColorValue | ProcessedColorValue),
highContrastDark?: ?(ColorValue | ProcessedColorValue),
},
};
@@ -26,12 +28,21 @@ export const PlatformColor = (...names: Array<string>): ColorValue => {
export type DynamicColorIOSTuplePrivate = {
light: ColorValue,
dark: ColorValue,
highContrastLight?: ColorValue,
highContrastDark?: ColorValue,
};
export const DynamicColorIOSPrivate = (
tuple: DynamicColorIOSTuplePrivate,
): ColorValue => {
return {dynamic: {light: tuple.light, dark: tuple.dark}};
return {
dynamic: {
light: tuple.light,
dark: tuple.dark,
highContrastLight: tuple.highContrastLight,
highContrastDark: tuple.highContrastDark,
},
};
};
export const normalizeColorObject = (
@@ -49,6 +60,8 @@ export const normalizeColorObject = (
dynamic: {
light: normalizeColor(dynamic.light),
dark: normalizeColor(dynamic.dark),
highContrastLight: normalizeColor(dynamic.highContrastLight),
highContrastDark: normalizeColor(dynamic.highContrastDark),
},
};
return dynamicColor;
@@ -67,6 +80,8 @@ export const processColorObject = (
dynamic: {
light: processColor(dynamic.light),
dark: processColor(dynamic.dark),
highContrastLight: processColor(dynamic.highContrastLight),
highContrastDark: processColor(dynamic.highContrastDark),
},
};
return dynamicColor;
@@ -14,8 +14,15 @@ import {DynamicColorIOSPrivate} from './PlatformColorValueTypes';
export type DynamicColorIOSTuple = {
light: ColorValue,
dark: ColorValue,
highContrastLight?: ColorValue,
highContrastDark?: ColorValue,
};
export const DynamicColorIOS = (tuple: DynamicColorIOSTuple): ColorValue => {
return DynamicColorIOSPrivate({light: tuple.light, dark: tuple.dark});
return DynamicColorIOSPrivate({
light: tuple.light,
dark: tuple.dark,
highContrastLight: tuple.highContrastLight,
highContrastDark: tuple.highContrastDark,
});
};
@@ -13,6 +13,8 @@ import type {ColorValue} from './StyleSheet';
export type DynamicColorIOSTuple = {
light: ColorValue,
dark: ColorValue,
highContrastLight?: ColorValue,
highContrastDark?: ColorValue,
};
export const DynamicColorIOS = (tuple: DynamicColorIOSTuple): ColorValue => {
@@ -43,6 +43,25 @@ describe('iOS', () => {
expect(normalizedColor).toEqual(expectedColor);
});
it('should normalize iOS Dynamic colors with accessible colors', () => {
const color = DynamicColorIOS({
light: 'black',
dark: 'white',
highContrastLight: 'red',
highContrastDark: 'blue',
});
const normalizedColor = normalizeColor(color);
const expectedColor = {
dynamic: {
light: 'black',
dark: 'white',
highContrastLight: 'red',
highContrastDark: 'blue',
},
};
expect(normalizedColor).toEqual(expectedColor);
});
it('should normalize iOS Dynamic colors with PlatformColor colors', () => {
const color = DynamicColorIOS({
light: PlatformColor('systemBlackColor'),
+6
View File
@@ -34,6 +34,8 @@ const Text: React.AbstractComponent<
ellipsizeMode,
onLongPress,
onPress,
onPressIn,
onPressOut,
onResponderGrant,
onResponderMove,
onResponderRelease,
@@ -64,9 +66,11 @@ const Text: React.AbstractComponent<
onPress,
onPressIn(event) {
setHighlighted(!suppressHighlighting);
onPressIn?.(event);
},
onPressOut(event) {
setHighlighted(false);
onPressOut?.(event);
},
onResponderTerminationRequest_DEPRECATED: onResponderTerminationRequest,
onStartShouldSetResponder_DEPRECATED: onStartShouldSetResponder,
@@ -78,6 +82,8 @@ const Text: React.AbstractComponent<
pressRetentionOffset,
onLongPress,
onPress,
onPressIn,
onPressOut,
onResponderTerminationRequest,
onStartShouldSetResponder,
suppressHighlighting,
+2
View File
@@ -122,6 +122,8 @@ export type TextProps = $ReadOnly<{|
* See https://reactnative.dev/docs/text.html#onpress
*/
onPress?: ?(event: PressEvent) => mixed,
onPressIn?: ?(event: PressEvent) => mixed,
onPressOut?: ?(event: PressEvent) => mixed,
onResponderGrant?: ?(event: PressEvent) => void,
onResponderMove?: ?(event: PressEvent) => void,
onResponderRelease?: ?(event: PressEvent) => void,
+1 -1
View File
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
Pod::Spec.new do |s|
s.name = "RCTTypeSafety"
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
Pod::Spec.new do |s|
s.name = "React-RCTVibration"
+2 -2
View File
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'
header_subspecs = {
@@ -48,7 +48,7 @@ Pod::Spec.new do |s|
s.header_dir = "React"
s.framework = "JavaScriptCore"
s.library = "stdc++"
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\"", "DEFINES_MODULE" => "YES" }
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\"", "DEFINES_MODULE" => "YES" }
s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""}
s.default_subspec = "Default"
+20 -4
View File
@@ -879,13 +879,29 @@ static NSString *RCTSemanticColorNames()
UIColor *lightColor = [RCTConvert UIColor:light];
id dark = [appearances objectForKey:@"dark"];
UIColor *darkColor = [RCTConvert UIColor:dark];
id highContrastLight = [appearances objectForKey:@"highContrastLight"];
UIColor *highContrastLightColor = [RCTConvert UIColor:highContrastLight];
id highContrastDark = [appearances objectForKey:@"highContrastDark"];
UIColor *highContrastDarkColor = [RCTConvert UIColor:highContrastDark];
if (lightColor != nil && darkColor != nil) {
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
if (@available(iOS 13.0, *)) {
UIColor *color =
[UIColor colorWithDynamicProvider:^UIColor *_Nonnull(UITraitCollection *_Nonnull collection) {
return collection.userInterfaceStyle == UIUserInterfaceStyleDark ? darkColor : lightColor;
}];
UIColor *color = [UIColor colorWithDynamicProvider:^UIColor *_Nonnull(
UITraitCollection *_Nonnull collection) {
if (collection.userInterfaceStyle == UIUserInterfaceStyleDark) {
if (collection.accessibilityContrast == UIAccessibilityContrastHigh && highContrastDarkColor != nil) {
return highContrastDarkColor;
} else {
return darkColor;
}
} else {
if (collection.accessibilityContrast == UIAccessibilityContrastHigh && highContrastLightColor != nil) {
return highContrastLightColor;
} else {
return lightColor;
}
}
}];
return color;
} else {
#endif
+5 -5
View File
@@ -21,11 +21,11 @@ NSDictionary* RCTGetReactNativeVersion(void)
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^(void){
__rnVersion = @{
RCTVersionMajor: @(0),
RCTVersionMinor: @(0),
RCTVersionPatch: @(0),
RCTVersionPrerelease: [NSNull null],
};
RCTVersionMajor: @(0),
RCTVersionMinor: @(65),
RCTVersionPatch: @(3),
RCTVersionPrerelease: [NSNull null],
};
});
return __rnVersion;
}
+3 -1
View File
@@ -89,7 +89,9 @@ RCT_EXPORT_MODULE(Appearance)
RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSString *, getColorScheme)
{
_currentColorScheme = RCTColorSchemePreference(nil);
if (_currentColorScheme == nil) {
_currentColorScheme = RCTColorSchemePreference(nil);
}
return _currentColorScheme;
}
+1 -1
View File
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
Pod::Spec.new do |s|
s.name = "React-CoreModules"
+2 -2
View File
@@ -40,7 +40,7 @@
#import <reactperflogger/BridgeNativeModulePerfLogger.h>
#ifndef RCT_USE_HERMES
#if __has_include(<hermes/hermes.h>)
#if __has_include(<reacthermes/HermesExecutorFactory.h>)
#define RCT_USE_HERMES 1
#else
#define RCT_USE_HERMES 0
@@ -48,7 +48,7 @@
#endif
#if RCT_USE_HERMES
#import <reacthermes/HermesExecutorFactory.h">
#import <reacthermes/HermesExecutorFactory.h>
#else
#import "JSCExecutorFactory.h"
#endif
@@ -18,7 +18,7 @@ else
end
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'
folly_version = '2021.04.26.00'
Pod::Spec.new do |s|
s.name = "FBReactNativeSpec"
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -18,7 +18,7 @@ end
folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
folly_version = '2020.01.13.00'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s|
+7 -7
View File
@@ -82,13 +82,13 @@ extern const UIAccessibilityTraits SwitchAccessibilityTrait;
/**
* Border colors (actually retained).
*/
@property (nonatomic, assign) CGColorRef borderTopColor;
@property (nonatomic, assign) CGColorRef borderRightColor;
@property (nonatomic, assign) CGColorRef borderBottomColor;
@property (nonatomic, assign) CGColorRef borderLeftColor;
@property (nonatomic, assign) CGColorRef borderStartColor;
@property (nonatomic, assign) CGColorRef borderEndColor;
@property (nonatomic, assign) CGColorRef borderColor;
@property (nonatomic, strong) UIColor *borderTopColor;
@property (nonatomic, strong) UIColor *borderRightColor;
@property (nonatomic, strong) UIColor *borderBottomColor;
@property (nonatomic, strong) UIColor *borderLeftColor;
@property (nonatomic, strong) UIColor *borderStartColor;
@property (nonatomic, strong) UIColor *borderEndColor;
@property (nonatomic, strong) UIColor *borderColor;
/**
* Border widths.
+30 -42
View File
@@ -729,28 +729,28 @@ static CGFloat RCTDefaultIfNegativeTo(CGFloat defaultValue, CGFloat x)
const BOOL isRTL = _reactLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft;
if ([[RCTI18nUtil sharedInstance] doLeftAndRightSwapInRTL]) {
const CGColorRef borderStartColor = _borderStartColor ?: _borderLeftColor;
const CGColorRef borderEndColor = _borderEndColor ?: _borderRightColor;
UIColor *borderStartColor = _borderStartColor ?: _borderLeftColor;
UIColor *borderEndColor = _borderEndColor ?: _borderRightColor;
const CGColorRef directionAwareBorderLeftColor = isRTL ? borderEndColor : borderStartColor;
const CGColorRef directionAwareBorderRightColor = isRTL ? borderStartColor : borderEndColor;
UIColor *directionAwareBorderLeftColor = isRTL ? borderEndColor : borderStartColor;
UIColor *directionAwareBorderRightColor = isRTL ? borderStartColor : borderEndColor;
return (RCTBorderColors){
_borderTopColor ?: _borderColor,
directionAwareBorderLeftColor ?: _borderColor,
_borderBottomColor ?: _borderColor,
directionAwareBorderRightColor ?: _borderColor,
(_borderTopColor ?: _borderColor).CGColor,
(directionAwareBorderLeftColor ?: _borderColor).CGColor,
(_borderBottomColor ?: _borderColor).CGColor,
(directionAwareBorderRightColor ?: _borderColor).CGColor,
};
}
const CGColorRef directionAwareBorderLeftColor = isRTL ? _borderEndColor : _borderStartColor;
const CGColorRef directionAwareBorderRightColor = isRTL ? _borderStartColor : _borderEndColor;
UIColor *directionAwareBorderLeftColor = isRTL ? _borderEndColor : _borderStartColor;
UIColor *directionAwareBorderRightColor = isRTL ? _borderStartColor : _borderEndColor;
return (RCTBorderColors){
_borderTopColor ?: _borderColor,
directionAwareBorderLeftColor ?: _borderLeftColor ?: _borderColor,
_borderBottomColor ?: _borderColor,
directionAwareBorderRightColor ?: _borderRightColor ?: _borderColor,
(_borderTopColor ?: _borderColor).CGColor,
(directionAwareBorderLeftColor ?: _borderLeftColor ?: _borderColor).CGColor,
(_borderBottomColor ?: _borderColor).CGColor,
(directionAwareBorderRightColor ?: _borderRightColor ?: _borderColor).CGColor,
};
}
@@ -902,19 +902,18 @@ static void RCTUpdateShadowPathForView(RCTView *view)
#pragma mark Border Color
#define setBorderColor(side) \
-(void)setBorder##side##Color : (CGColorRef)color \
{ \
if (CGColorEqualToColor(_border##side##Color, color)) { \
return; \
} \
CGColorRelease(_border##side##Color); \
_border##side##Color = CGColorRetain(color); \
[self.layer setNeedsDisplay]; \
#define setBorderColor(side) \
-(void)setBorder##side##Color : (UIColor *)color \
{ \
if ([_border##side##Color isEqual:color]) { \
return; \
} \
_border##side##Color = color; \
[self.layer setNeedsDisplay]; \
}
setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom) setBorderColor(Left)
setBorderColor(Start) setBorderColor(End)
setBorderColor(Start) setBorderColor(End)
#pragma mark - Border Width
@@ -928,8 +927,8 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
[self.layer setNeedsDisplay]; \
}
setBorderWidth() setBorderWidth(Top) setBorderWidth(Right) setBorderWidth(Bottom) setBorderWidth(Left)
setBorderWidth(Start) setBorderWidth(End)
setBorderWidth() setBorderWidth(Top) setBorderWidth(Right) setBorderWidth(Bottom) setBorderWidth(Left)
setBorderWidth(Start) setBorderWidth(End)
#pragma mark - Border Radius
@@ -943,9 +942,9 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
[self.layer setNeedsDisplay]; \
}
setBorderRadius() setBorderRadius(TopLeft) setBorderRadius(TopRight) setBorderRadius(TopStart)
setBorderRadius(TopEnd) setBorderRadius(BottomLeft) setBorderRadius(BottomRight)
setBorderRadius(BottomStart) setBorderRadius(BottomEnd)
setBorderRadius() setBorderRadius(TopLeft) setBorderRadius(TopRight) setBorderRadius(TopStart)
setBorderRadius(TopEnd) setBorderRadius(BottomLeft) setBorderRadius(BottomRight)
setBorderRadius(BottomStart) setBorderRadius(BottomEnd)
#pragma mark - Border Style
@@ -959,17 +958,6 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
[self.layer setNeedsDisplay]; \
}
setBorderStyle()
setBorderStyle()
- (void)dealloc
{
CGColorRelease(_borderColor);
CGColorRelease(_borderTopColor);
CGColorRelease(_borderRightColor);
CGColorRelease(_borderBottomColor);
CGColorRelease(_borderLeftColor);
CGColorRelease(_borderStartColor);
CGColorRelease(_borderEndColor);
}
@end
@end
+2 -2
View File
@@ -261,7 +261,7 @@ RCT_CUSTOM_VIEW_PROPERTY(borderRadius, CGFloat, RCTView)
RCT_CUSTOM_VIEW_PROPERTY(borderColor, CGColor, RCTView)
{
if ([view respondsToSelector:@selector(setBorderColor:)]) {
view.borderColor = json ? [RCTConvert CGColor:json] : defaultView.borderColor;
view.borderColor = json ? [RCTConvert UIColor:json] : defaultView.borderColor;
} else {
view.layer.borderColor = json ? [RCTConvert CGColor:json] : defaultView.layer.borderColor;
}
@@ -303,7 +303,7 @@ RCT_CUSTOM_VIEW_PROPERTY(hitSlop, UIEdgeInsets, RCTView)
RCT_CUSTOM_VIEW_PROPERTY(border##SIDE##Color, UIColor, RCTView) \
{ \
if ([view respondsToSelector:@selector(setBorder##SIDE##Color:)]) { \
view.border##SIDE##Color = json ? [RCTConvert CGColor:json] : defaultView.border##SIDE##Color; \
view.border##SIDE##Color = json ? [RCTConvert UIColor:json] : defaultView.border##SIDE##Color; \
} \
}
+1 -1
View File
@@ -8,5 +8,5 @@
// LICENSE file in the root directory of this source tree.
//
HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_63_0 $(SRCROOT)/../third-party/folly-2020.01.13.00 $(SRCROOT)/../third-party/glog-0.3.5/src
HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_63_0 $(SRCROOT)/../third-party/folly-2021.04.26.00 $(SRCROOT)/../third-party/glog-0.3.5/src
OTHER_CFLAGS = -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1
+58 -13
View File
@@ -8,7 +8,7 @@
plugins {
id("com.android.library")
id("com.facebook.react.codegen")
id("maven")
id("maven-publish")
id("de.undercouch.download")
}
@@ -18,6 +18,7 @@ import de.undercouch.gradle.tasks.download.Download
import org.apache.tools.ant.taskdefs.condition.Os
import org.apache.tools.ant.filters.ReplaceTokens
def AAR_OUTPUT_URL = "file://${projectDir}/../android"
// We download various C++ open-source dependencies into downloads.
// We then copy both the downloaded code and our custom makefiles and headers into third-party-ndk.
// After that we build native code from src/main/jni with module path pointing at third-party-ndk.
@@ -377,13 +378,13 @@ task extractJNIFiles {
}
}
task installArchives {
dependsOn("publishReleasePublicationToNpmRepository")
}
android {
compileSdkVersion 30
ndkVersion ANDROID_NDK_VERSION
compileOptions {
sourceCompatibility(JavaVersion.VERSION_1_8)
targetCompatibility(JavaVersion.VERSION_1_8)
}
defaultConfig {
minSdkVersion(21)
@@ -415,11 +416,7 @@ android {
}
}
tasks.withType(JavaCompile) {
compileTask ->
compileTask.dependsOn(packageReactNdkLibs)
}
preBuild.dependsOn(packageReactNdkLibs)
clean.dependsOn(cleanReactNdkLib)
lintOptions {
@@ -440,7 +437,7 @@ android {
dependencies {
api("com.facebook.infer.annotation:infer-annotation:0.11.2")
api("com.facebook.yoga:proguard-annotations:1.17.0")
api("com.facebook.yoga:proguard-annotations:1.19.0")
api("javax.inject:javax.inject:1")
api("androidx.appcompat:appcompat:1.0.2")
api("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
@@ -472,8 +469,6 @@ dependencies {
androidTestImplementation("org.mockito:mockito-core:${MOCKITO_CORE_VERSION}")
}
apply(from: "release.gradle")
react {
// TODO: The library name is chosen for parity with Fabric components & iOS
// This should be changed to a more generic name, e.g. `ReactCoreSpec`.
@@ -482,3 +477,53 @@ react {
reactNativeRootDir = file("$projectDir/..")
useJavaGenerator = System.getenv("USE_CODEGEN_JAVAPOET") ?: false
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release
// You can then customize attributes of the publication as shown below.
artifactId = POM_ARTIFACT_ID
groupId = GROUP
version = VERSION_NAME
pom {
name = POM_NAME
description = "A framework for building native apps with React"
url = "https://github.com/facebook/react-native"
developers {
developer {
id = "facebook"
name = "Facebook"
}
}
licenses {
license {
name = "MIT License"
url = "https://github.com/facebook/react-native/blob/master/LICENSE"
distribution = "repo"
}
}
scm {
url = "https://github.com/facebook/react-native.git"
connection = "scm:git:https://github.com/facebook/react-native.git"
developerConnection = "scm:git:git@github.com:facebook/react-native.git"
}
}
}
}
repositories {
maven {
name = "npm"
url = AAR_OUTPUT_URL
}
}
}
}
+4 -4
View File
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-master
VERSION_NAME=0.65.3
GROUP=com.facebook.react
POM_NAME=ReactNative
@@ -11,9 +11,9 @@ ROBOLECTRIC_VERSION=4.4
JUNIT_VERSION=4.12
ANDROIDX_TEST_VERSION=1.1.0
FRESCO_VERSION=2.3.0
OKHTTP_VERSION=4.9.0
SO_LOADER_VERSION=0.9.0
FRESCO_VERSION=2.5.0
OKHTTP_VERSION=4.9.1
SO_LOADER_VERSION=0.10.1
BOOST_VERSION=1_63_0
DOUBLE_CONVERSION_VERSION=1.1.6
-87
View File
@@ -1,87 +0,0 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
apply(plugin: "maven")
apply(plugin: "signing")
ext {
AAR_OUTPUT_URL = "file://${projectDir}/../android"
}
// Gradle tasks for publishing to maven
// 1) To install in local maven repo use :installArchives task
// 2) To upload artifact to maven central use: :uploadArchives (you'd need to have the permission to do that)
def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}
def configureReactNativePom(def pom) {
pom.project {
name(POM_NAME)
artifactId(POM_ARTIFACT_ID)
packaging(POM_PACKAGING)
description("A framework for building native apps with React")
url("https://github.com/facebook/react-native")
scm {
url("https://github.com/facebook/react-native.git")
connection("scm:git:https://github.com/facebook/react-native.git")
developerConnection("scm:git:git@github.com:facebook/react-native.git")
}
licenses {
license {
name("MIT License")
url("https://github.com/facebook/react-native/blob/master/LICENSE")
distribution("repo")
}
}
developers {
developer {
id("facebook")
name("Facebook")
}
}
}
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption("Xdoclint:none", "-quiet")
}
}
}
afterEvaluate { project ->
android.libraryVariants.all { variant ->
def name = variant.name.capitalize()
task "jar${name}"(type: Jar, dependsOn: variant.javaCompileProvider.get()) {
from(variant.javaCompileProvider.get().destinationDir)
}
}
version = VERSION_NAME
group = GROUP
signing {
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") }
sign(configurations.archives)
}
task installArchives(type: Upload) {
configuration = configurations.archives
repositories.mavenDeployer {
// Deploy to react-native/android, ready to publish to npm
repository(url: AAR_OUTPUT_URL)
configureReactNativePom(pom)
}
}
}
@@ -9,8 +9,8 @@ rn_prebuilt_jar(
fb_native.remote_file(
name = "annotations-binary.jar",
sha1 = "95ff77fd4870136a0454dd7ccad8813db87bd9ab",
url = "https://jcenter.bintray.com/com/facebook/yoga/proguard-annotations/1.17.0/proguard-annotations-1.17.0.jar",
sha1 = "fcbbb39052e6490eaaf6a6959c49c3a4fbe87c63",
url = "mvn:com.facebook.yoga:proguard-annotations:jar:1.19.0",
)
rn_android_library(
@@ -8,6 +8,7 @@
package com.facebook.react;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.KeyEvent;
import androidx.annotation.Nullable;
@@ -120,6 +121,12 @@ public abstract class ReactActivity extends AppCompatActivity
mDelegate.onWindowFocusChanged(hasFocus);
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
mDelegate.onConfigurationChanged(newConfig);
}
protected final ReactNativeHost getReactNativeHost() {
return mDelegate.getReactNativeHost();
}
@@ -11,6 +11,7 @@ import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.view.KeyEvent;
@@ -154,6 +155,12 @@ public class ReactActivityDelegate {
}
}
public void onConfigurationChanged(Configuration newConfig) {
if (getReactNativeHost().hasInstance()) {
getReactInstanceManager().onConfigurationChanged(getContext(), newConfig);
}
}
@TargetApi(Build.VERSION_CODES.M)
public void requestPermissions(
String[] permissions, int requestCode, PermissionListener listener) {
@@ -7,6 +7,7 @@
package com.facebook.react.modules.appearance;
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import androidx.annotation.Nullable;
@@ -74,7 +75,15 @@ public class AppearanceModule extends NativeAppearanceSpec {
@Override
public String getColorScheme() {
mColorScheme = colorSchemeForCurrentConfiguration(getReactApplicationContext());
// Attempt to use the Activity context first in order to get the most up to date
// scheme. This covers the scenario when AppCompatDelegate.setDefaultNightMode()
// is called directly (which can occur in Brownfield apps for example).
Activity activity = getCurrentActivity();
mColorScheme =
colorSchemeForCurrentConfiguration(
activity != null ? activity : getReactApplicationContext());
return mColorScheme;
}
@@ -20,9 +20,15 @@ import com.facebook.react.bridge.ReactContext;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public final class BlobProvider extends ContentProvider {
private static final int PIPE_CAPACITY = 65536;
private ExecutorService executor = Executors.newSingleThreadExecutor();
@Override
public boolean onCreate() {
return true;
@@ -72,7 +78,7 @@ public final class BlobProvider extends ContentProvider {
throw new RuntimeException("No blob module associated with BlobProvider");
}
byte[] data = blobModule.resolve(uri);
final byte[] data = blobModule.resolve(uri);
if (data == null) {
throw new FileNotFoundException("Cannot open " + uri.toString() + ", blob not found.");
}
@@ -84,12 +90,34 @@ public final class BlobProvider extends ContentProvider {
return null;
}
ParcelFileDescriptor readSide = pipe[0];
ParcelFileDescriptor writeSide = pipe[1];
final ParcelFileDescriptor writeSide = pipe[1];
try (OutputStream outputStream = new ParcelFileDescriptor.AutoCloseOutputStream(writeSide)) {
outputStream.write(data);
} catch (IOException exception) {
return null;
if (data.length <= PIPE_CAPACITY) {
// If the blob length is less than or equal to pipe capacity (64 KB),
// we can write the data synchronously to the pipe buffer.
try (OutputStream outputStream = new ParcelFileDescriptor.AutoCloseOutputStream(writeSide)) {
outputStream.write(data);
} catch (IOException exception) {
return null;
}
} else {
// For blobs larger than 64 KB, a synchronous write would fill up the whole buffer
// and block forever, because there are no readers to empty the buffer.
// Writing from a separate thread allows us to return the read side descriptor
// immediately so that both writer and reader can work concurrently.
// Reading from the pipe empties the buffer and allows the next chunks to be written.
Runnable writer =
new Runnable() {
public void run() {
try (OutputStream outputStream =
new ParcelFileDescriptor.AutoCloseOutputStream(writeSide)) {
outputStream.write(data);
} catch (IOException exception) {
// no-op
}
}
};
executor.submit(writer);
}
return readSide;
@@ -16,7 +16,7 @@ import java.util.Map;
public class ReactNativeVersion {
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
"major", 0,
"minor", 0,
"patch", 0,
"minor", 65,
"patch", 3,
"prerelease", null);
}
@@ -82,9 +82,18 @@ public class UIManagerHelper {
}
}
CatalystInstance catalystInstance = context.getCatalystInstance();
return uiManagerType == FABRIC
? (UIManager) catalystInstance.getJSIModule(JSIModuleType.UIManager)
: catalystInstance.getNativeModule(UIManagerModule.class);
try {
return uiManagerType == FABRIC
? (UIManager) catalystInstance.getJSIModule(JSIModuleType.UIManager)
: catalystInstance.getNativeModule(UIManagerModule.class);
} catch (IllegalArgumentException ex) {
// TODO T67518514 Clean this up once we migrate everything over to bridgeless mode
ReactSoftException.logSoftException(
"UIManagerHelper",
new ReactNoCrashSoftException(
"Cannot get UIManager for UIManagerType: " + uiManagerType));
return catalystInstance.getNativeModule(UIManagerModule.class);
}
}
/**
@@ -325,6 +325,21 @@ import java.util.Map;
}
}
private static class BoxedColorPropSetter extends PropSetter {
public BoxedColorPropSetter(ReactProp prop, Method setter) {
super(prop, "mixed", setter);
}
@Override
protected @Nullable Object getValueOrDefault(Object value, Context context) {
if (value != null) {
return ColorPropConverter.getColor(value, context);
}
return null;
}
}
/*package*/ static Map<String, String> getNativePropsForView(
Class<? extends ViewManager> viewManagerTopClass,
Class<? extends ReactShadowNode> shadowNodeTopClass) {
@@ -418,7 +433,7 @@ import java.util.Map;
return new BoxedBooleanPropSetter(annotation, method);
} else if (propTypeClass == Integer.class) {
if ("Color".equals(annotation.customType())) {
return new ColorPropSetter(annotation, method);
return new BoxedColorPropSetter(annotation, method);
}
return new BoxedIntPropSetter(annotation, method);
} else if (propTypeClass == ReadableArray.class) {
@@ -9,13 +9,16 @@ package com.facebook.react.views.text;
import android.content.res.AssetManager;
import android.graphics.Typeface;
import android.os.Build;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.react.bridge.ReadableArray;
import java.util.ArrayList;
import java.util.List;
public class ReactTypefaceUtils {
private static final String TAG = "ReactTypefaceUtils";
public static final int UNSET = -1;
public static int parseFontWeight(@Nullable String fontWeightString) {
@@ -23,8 +26,8 @@ public class ReactTypefaceUtils {
fontWeightString != null ? parseNumericFontWeight(fontWeightString) : UNSET;
int fontWeight = fontWeightNumeric != UNSET ? fontWeightNumeric : Typeface.NORMAL;
if (fontWeight == 700 || "bold".equals(fontWeightString)) fontWeight = Typeface.BOLD;
else if (fontWeight == 400 || "normal".equals(fontWeightString)) fontWeight = Typeface.NORMAL;
if ("bold".equals(fontWeightString)) fontWeight = Typeface.BOLD;
else if ("normal".equals(fontWeightString)) fontWeight = Typeface.NORMAL;
return fontWeight;
}
@@ -81,34 +84,50 @@ public class ReactTypefaceUtils {
AssetManager assetManager) {
int oldStyle;
if (typeface == null) {
oldStyle = 0;
oldStyle = Typeface.NORMAL;
} else {
oldStyle = typeface.getStyle();
}
int want = 0;
if ((weight == Typeface.BOLD)
|| ((oldStyle & Typeface.BOLD) != 0 && weight == ReactTextShadowNode.UNSET)) {
want |= Typeface.BOLD;
int newStyle = oldStyle;
boolean italic = false;
if (weight == UNSET) weight = Typeface.NORMAL;
if (style == Typeface.ITALIC) italic = true;
boolean UNDER_SDK_28 = Build.VERSION.SDK_INT < Build.VERSION_CODES.P;
boolean applyNumericValues = !(weight < (Typeface.BOLD_ITALIC + 1) || family != null);
boolean numericBold = UNDER_SDK_28 && weight > 699 && applyNumericValues;
boolean numericNormal = UNDER_SDK_28 && weight < 700 && applyNumericValues;
if (weight == Typeface.BOLD) {
newStyle = (newStyle == Typeface.ITALIC) ? Typeface.BOLD_ITALIC : Typeface.BOLD;
typeface = Typeface.create(typeface, newStyle);
}
if ((style == Typeface.ITALIC)
|| ((oldStyle & Typeface.ITALIC) != 0 && style == ReactTextShadowNode.UNSET)) {
want |= Typeface.ITALIC;
if (weight == Typeface.NORMAL) {
typeface = Typeface.create(typeface, Typeface.NORMAL);
newStyle = Typeface.NORMAL;
}
if (style == Typeface.ITALIC) {
newStyle = (newStyle == Typeface.BOLD) ? Typeface.BOLD_ITALIC : Typeface.ITALIC;
typeface = Typeface.create(typeface, newStyle);
}
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.O_MR1 && weight > Typeface.BOLD_ITALIC) {
typeface = Typeface.create(typeface, weight, italic);
}
if (family != null && UNDER_SDK_28 && weight > Typeface.BOLD_ITALIC) {
FLog.d(
TAG,
"Support for numeric font weight numeric values with custom fonts under Android API 28 Pie is not yet supported in ReactNative.");
}
if (family != null) {
typeface = ReactFontManager.getInstance().getTypeface(family, want, weight, assetManager);
} else if (typeface != null) {
// TODO(t9055065): Fix custom fonts getting applied to text children with different style
typeface = Typeface.create(typeface, want);
typeface = ReactFontManager.getInstance().getTypeface(family, newStyle, weight, assetManager);
}
if (typeface != null) {
return typeface;
} else {
return Typeface.defaultFromStyle(want);
if (numericBold || numericNormal) {
newStyle = numericBold ? Typeface.BOLD : Typeface.NORMAL;
typeface = Typeface.create(typeface, newStyle);
FLog.d(
TAG,
"Support for numeric font weight numeric values available only from Android API 28 Pie. Android device lower then API 28 will use normal or bold.");
}
return typeface;
}
/**
@@ -9,8 +9,8 @@ rn_android_prebuilt_aar(
fb_native.remote_file(
name = "fresco-binary-aar",
sha1 = "fbc98413bb32eefe882a07cc556c7a1224dc9f24",
url = "mvn:com.facebook.fresco:fresco:aar:2.3.0",
sha1 = "b768459446d166d148aaf3b8edcdcecd59381190",
url = "mvn:com.facebook.fresco:fresco:aar:2.5.0",
)
rn_android_prebuilt_aar(
@@ -21,8 +21,8 @@ rn_android_prebuilt_aar(
fb_native.remote_file(
name = "drawee-binary-aar",
sha1 = "1cff917b6f19efe7a21ca542c8b8bed18d0d9779",
url = "mvn:com.facebook.fresco:drawee:aar:2.3.0",
sha1 = "06971aca0134eafa61c1b81714c0954cb4eb4e10",
url = "mvn:com.facebook.fresco:drawee:aar:2.5.0",
)
rn_android_library(
@@ -51,8 +51,8 @@ rn_android_prebuilt_aar(
fb_native.remote_file(
name = "imagepipeline-base-aar",
sha1 = "ed3c290961f4c20fffa0ce35c098714c1934523d",
url = "mvn:com.facebook.fresco:imagepipeline-base:aar:2.3.0",
sha1 = "6839693f5d3b6697cfabbf159d004dae2f465126",
url = "mvn:com.facebook.fresco:imagepipeline-base:aar:2.5.0",
)
rn_android_prebuilt_aar(
@@ -63,8 +63,8 @@ rn_android_prebuilt_aar(
fb_native.remote_file(
name = "imagepipeline-aar",
sha1 = "579954628c8e1da96e1585741f5dae08f282ce3e",
url = "mvn:com.facebook.fresco:imagepipeline:aar:2.3.0",
sha1 = "dd62dd1607ade4532c1240f137ac3c2d7920c134",
url = "mvn:com.facebook.fresco:imagepipeline:aar:2.5.0",
)
rn_android_prebuilt_aar(
@@ -75,8 +75,8 @@ rn_android_prebuilt_aar(
remote_file(
name = "nativeimagefilters-aar",
sha1 = "1f4d81f8f6e2706ae848124d454c99cadd85496c",
url = "mvn:com.facebook.fresco:nativeimagefilters:aar:2.3.0",
sha1 = "4a30438df8d960000b37b1f8cdba9d7996d57ea9",
url = "mvn:com.facebook.fresco:nativeimagefilters:aar:2.5.0",
)
rn_android_prebuilt_aar(
@@ -87,8 +87,8 @@ rn_android_prebuilt_aar(
remote_file(
name = "nativeimagetranscoder-aar",
sha1 = "1b74432d16db744719dfe1d03d4d93850e061d08",
url = "mvn:com.facebook.fresco:nativeimagetranscoder:aar:2.3.0",
sha1 = "7db353c68b41e2ad502a959c554387d59e75eb75",
url = "mvn:com.facebook.fresco:nativeimagetranscoder:aar:2.5.0",
)
rn_prebuilt_jar(
@@ -111,8 +111,8 @@ rn_android_prebuilt_aar(
fb_native.remote_file(
name = "fbcore-aar",
sha1 = "6d568ce3e1a5377c390dbde6f150884fecd61bd0",
url = "mvn:com.facebook.fresco:fbcore:aar:2.3.0",
sha1 = "ffe378b572055e0600377c000d390fb46bf278a5",
url = "mvn:com.facebook.fresco:fbcore:aar:2.5.0",
)
rn_android_prebuilt_aar(
@@ -123,8 +123,8 @@ rn_android_prebuilt_aar(
fb_native.remote_file(
name = "imagepipeline-native-binary-aar",
sha1 = "705a3629cfba16ab8c9b2765058380276514342c",
url = "mvn:com.facebook.fresco:imagepipeline-native:aar:2.3.0",
sha1 = "f8e65e897a883ac4f754d57897aaba0016c8beba",
url = "mvn:com.facebook.fresco:imagepipeline-native:aar:2.5.0",
)
rn_android_prebuilt_aar(
@@ -135,8 +135,8 @@ rn_android_prebuilt_aar(
fb_native.remote_file(
name = "imagepipeline-okhttp3-binary-aar",
sha1 = "1065513f02b97ee46601d92105151ae9e2111bfc",
url = "mvn:com.facebook.fresco:imagepipeline-okhttp3:aar:2.3.0",
sha1 = "8e274a77ffbe9f8334e09855b2a811b2a63a5708",
url = "mvn:com.facebook.fresco:imagepipeline-okhttp3:aar:2.5.0",
)
rn_android_prebuilt_aar(
@@ -147,8 +147,8 @@ rn_android_prebuilt_aar(
remote_file(
name = "memory-type-ashmem-aar",
sha1 = "d0e2ab70d5d35d08de81d3917b0f5d7bbf4fa82c",
url = "mvn:com.facebook.fresco:memory-type-ashmem:aar:2.3.0",
sha1 = "b43b53aca89569fd2e8e964b71dc7afbf62204e8",
url = "mvn:com.facebook.fresco:memory-type-ashmem:aar:2.5.0",
)
rn_android_prebuilt_aar(
@@ -159,8 +159,8 @@ rn_android_prebuilt_aar(
remote_file(
name = "memory-type-java-aar",
sha1 = "5e8adc594bc9d8f4e8d794dff23c70882fb98e65",
url = "mvn:com.facebook.fresco:memory-type-java:aar:2.3.0",
sha1 = "57537a8b69dbad44fafdaea3067a776e11586465",
url = "mvn:com.facebook.fresco:memory-type-java:aar:2.5.0",
)
rn_android_prebuilt_aar(
@@ -171,8 +171,8 @@ rn_android_prebuilt_aar(
remote_file(
name = "memory-type-native-aar",
sha1 = "72bb5626d508587cb9d96beb0e2b61ac36a2c63d",
url = "mvn:com.facebook.fresco:memory-type-native:aar:2.3.0",
sha1 = "7eb7c52ee2a4d40b7f706c90069549410236aaa5",
url = "mvn:com.facebook.fresco:memory-type-native:aar:2.5.0",
)
rn_android_prebuilt_aar(
@@ -183,6 +183,6 @@ rn_android_prebuilt_aar(
remote_file(
name = "ui-common-aar",
sha1 = "0ce37a495f0f37165e3ede1c4cb927b0b55856be",
url = "mvn:com.facebook.fresco:ui-common:aar:2.3.0",
sha1 = "224851cf4c074aeff5dc42861b557870459a9d28",
url = "mvn:com.facebook.fresco:ui-common:aar:2.5.0",
)
@@ -28,17 +28,17 @@ fb_native.android_prebuilt_aar(
fb_native.remote_file(
name = "annotation-binary.jar",
sha1 = "dc58463712cb3e5f03d8ee5ac9743b9ced9afa77",
url = "mvn:com.facebook.soloader:annotation:jar:0.9.0",
url = "mvn:com.facebook.soloader:annotation:jar:0.10.1",
)
fb_native.remote_file(
name = "nativeloader-binary.jar",
sha1 = "677c7fbfcc847d7eb6082048d07b10afd4cff898",
url = "mvn:com.facebook.soloader:nativeloader:jar:0.9.0",
sha1 = "ba1b31b4b9f65494a90de7c2728b57155344a858",
url = "mvn:com.facebook.soloader:nativeloader:jar:0.10.1",
)
fb_native.remote_file(
name = "soloader-binary-aar",
sha1 = "6e138af1dd29ceabf5bace2d24dc4333f304d104",
url = "mvn:com.facebook.soloader:soloader:aar:0.9.0",
sha1 = "78e5537c0cdf7c190f6cad9a2490f9f84ee8f041",
url = "mvn:com.facebook.soloader:soloader:aar:0.10.1",
)
+4 -4
View File
@@ -30,8 +30,8 @@ rn_prebuilt_jar(
fb_native.remote_file(
name = "okhttp3-binary.jar",
sha1 = "08e17601d3bdc8cf57902c154de021931d2c27c1",
url = "mvn:com.squareup.okhttp3:okhttp:jar:4.9.0",
sha1 = "51215279c3fe472c59b6b7dd7491e6ac2e28a81b",
url = "mvn:com.squareup.okhttp3:okhttp:jar:4.9.1",
)
rn_prebuilt_jar(
@@ -41,6 +41,6 @@ rn_prebuilt_jar(
fb_native.remote_file(
name = "okhttp3-urlconnection-binary.jar",
sha1 = "94f82aaabdf53e48d7a1c515bf89ce60dcebfbeb",
url = "mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:4.9.0",
sha1 = "f45e809215bd0961350148cf5b78707865084e6f",
url = "mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:4.9.1",
)
+2 -2
View File
@@ -19,6 +19,6 @@ rn_prebuilt_jar(
fb_native.remote_file(
name = "okio-binary.jar",
sha1 = "0dcc813b08ce5933f8bdfd1dfbab4ad4bd170e7a",
url = "mvn:com.squareup.okio:okio:jar:2.9.0",
sha1 = "accaddddbb597fb70290fd40358b1ce66b8c2b3d",
url = "mvn:com.squareup.okio:okio:jar:2.10.0",
)
+1 -1
View File
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
folly_dep_name = 'RCT-Folly/Fabric'
boost_compiler_flags = '-Wno-documentation'
+1 -1
View File
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s|
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s|
+1 -1
View File
@@ -18,7 +18,7 @@ else
end
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'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s|
+2 -2
View File
@@ -16,8 +16,8 @@ namespace facebook::react {
constexpr struct {
int32_t Major = 0;
int32_t Minor = 0;
int32_t Patch = 0;
int32_t Minor = 65;
int32_t Patch = 3;
std::string_view Prerelease = "";
} ReactNativeVersion;
+4 -4
View File
@@ -16,8 +16,8 @@ else
source[:tag] = "v#{version}"
end
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'
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s|
@@ -36,7 +36,7 @@ Pod::Spec.new do |s|
s.public_header_files = "executor/HermesExecutorFactory.h"
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/libevent/include\"",
"GCC_PREPROCESSOR_DEFINITIONS" => "HERMES_ENABLE_DEBUGGER=1",
}
s.header_dir = "reacthermes"
@@ -46,8 +46,8 @@ Pod::Spec.new do |s|
s.dependency "React-jsinspector", version
s.dependency "React-perflogger", version
s.dependency "RCT-Folly", folly_version
s.dependency "RCT-Folly/Futures", folly_version
s.dependency "DoubleConversion"
s.dependency "glog"
s.dependency "RCT-Folly/Futures", folly_version
s.dependency "hermes-engine"
end
@@ -9,6 +9,7 @@
#include <cstdlib>
#include <mutex>
#include <sstream>
#include <folly/Conv.h>
#include <folly/Executor.h>
@@ -96,6 +97,9 @@ class Connection::Impl : public inspector::InspectorObserver,
void handle(const m::heapProfiler::StartSamplingRequest &req) override;
void handle(const m::heapProfiler::StopSamplingRequest &req) override;
void handle(const m::heapProfiler::CollectGarbageRequest &req) override;
void handle(
const m::heapProfiler::GetObjectByHeapObjectIdRequest &req) override;
void handle(const m::heapProfiler::GetHeapObjectIdRequest &req) override;
void handle(const m::runtime::EvaluateRequest &req) override;
void handle(const m::runtime::GetPropertiesRequest &req) override;
void handle(const m::runtime::RunIfWaitingForDebuggerRequest &req) override;
@@ -637,6 +641,76 @@ void Connection::Impl::handle(
.thenError<std::exception>(sendErrorToClient(req.id));
}
void Connection::Impl::handle(
const m::heapProfiler::GetObjectByHeapObjectIdRequest &req) {
uint64_t objID = atoi(req.objectId.c_str());
folly::Optional<std::string> group = req.objectGroup;
auto remoteObjPtr = std::make_shared<m::runtime::RemoteObject>();
inspector_
->executeIfEnabled(
"HeapProfiler.getObjectByHeapObjectId",
[this, remoteObjPtr, objID, group](const debugger::ProgramState &) {
jsi::Runtime *rt = &getRuntime();
if (auto *hermesRT = dynamic_cast<HermesRuntime *>(rt)) {
jsi::Value val = hermesRT->getObjectForID(objID);
if (val.isNull()) {
return;
}
*remoteObjPtr = m::runtime::makeRemoteObject(
getRuntime(), val, objTable_, group.value_or(""));
}
})
.via(executor_.get())
.thenValue([this, id = req.id, remoteObjPtr](auto &&) {
if (!remoteObjPtr->type.empty()) {
m::heapProfiler::GetObjectByHeapObjectIdResponse resp;
resp.id = id;
resp.result = *remoteObjPtr;
sendResponseToClient(resp);
} else {
sendResponseToClient(m::makeErrorResponse(
id, m::ErrorCode::ServerError, "Object is not available"));
}
})
.thenError<std::exception>(sendErrorToClient(req.id));
}
void Connection::Impl::handle(
const m::heapProfiler::GetHeapObjectIdRequest &req) {
// Use a shared_ptr because the stack frame will go away.
std::shared_ptr<uint64_t> snapshotID = std::make_shared<uint64_t>(0);
inspector_
->executeIfEnabled(
"HeapProfiler.getHeapObjectId",
[this, req, snapshotID](const debugger::ProgramState &) {
if (const jsi::Value *valuePtr = objTable_.getValue(req.objectId)) {
jsi::Runtime *rt = &getRuntime();
if (auto *hermesRT = dynamic_cast<HermesRuntime *>(rt)) {
*snapshotID = hermesRT->getUniqueID(*valuePtr);
}
}
})
.via(executor_.get())
.thenValue([this, id = req.id, snapshotID](auto &&) {
if (*snapshotID) {
m::heapProfiler::GetHeapObjectIdResponse resp;
resp.id = id;
// std::to_string is not available on Android, use a std::ostream
// instead.
std::ostringstream stream;
stream << *snapshotID;
resp.heapSnapshotObjectId = stream.str();
sendResponseToClient(resp);
} else {
sendResponseToClient(m::makeErrorResponse(
id, m::ErrorCode::ServerError, "Object is not available"));
}
})
.thenError<std::exception>(sendErrorToClient(req.id));
}
void Connection::Impl::handle(const m::runtime::EvaluateRequest &req) {
auto remoteObjPtr = std::make_shared<m::runtime::RemoteObject>();
@@ -1,5 +1,5 @@
// Copyright 2004-present Facebook. All Rights Reserved.
// @generated SignedSource<<f195ef454dab0ca2be532d6cdb2ebd0a>>
// @generated SignedSource<<522f29c54f207a4f7b5c33af07cf64d0>>
#include "MessageTypes.h"
@@ -46,6 +46,10 @@ std::unique_ptr<Request> Request::fromJsonThrowOnError(const std::string &str) {
{"Debugger.stepOver", makeUnique<debugger::StepOverRequest>},
{"HeapProfiler.collectGarbage",
makeUnique<heapProfiler::CollectGarbageRequest>},
{"HeapProfiler.getHeapObjectId",
makeUnique<heapProfiler::GetHeapObjectIdRequest>},
{"HeapProfiler.getObjectByHeapObjectId",
makeUnique<heapProfiler::GetObjectByHeapObjectIdRequest>},
{"HeapProfiler.startSampling",
makeUnique<heapProfiler::StartSamplingRequest>},
{"HeapProfiler.startTrackingHeapObjects",
@@ -730,6 +734,65 @@ void heapProfiler::CollectGarbageRequest::accept(
handler.handle(*this);
}
heapProfiler::GetHeapObjectIdRequest::GetHeapObjectIdRequest()
: Request("HeapProfiler.getHeapObjectId") {}
heapProfiler::GetHeapObjectIdRequest::GetHeapObjectIdRequest(const dynamic &obj)
: Request("HeapProfiler.getHeapObjectId") {
assign(id, obj, "id");
assign(method, obj, "method");
dynamic params = obj.at("params");
assign(objectId, params, "objectId");
}
dynamic heapProfiler::GetHeapObjectIdRequest::toDynamic() const {
dynamic params = dynamic::object;
put(params, "objectId", objectId);
dynamic obj = dynamic::object;
put(obj, "id", id);
put(obj, "method", method);
put(obj, "params", std::move(params));
return obj;
}
void heapProfiler::GetHeapObjectIdRequest::accept(
RequestHandler &handler) const {
handler.handle(*this);
}
heapProfiler::GetObjectByHeapObjectIdRequest::GetObjectByHeapObjectIdRequest()
: Request("HeapProfiler.getObjectByHeapObjectId") {}
heapProfiler::GetObjectByHeapObjectIdRequest::GetObjectByHeapObjectIdRequest(
const dynamic &obj)
: Request("HeapProfiler.getObjectByHeapObjectId") {
assign(id, obj, "id");
assign(method, obj, "method");
dynamic params = obj.at("params");
assign(objectId, params, "objectId");
assign(objectGroup, params, "objectGroup");
}
dynamic heapProfiler::GetObjectByHeapObjectIdRequest::toDynamic() const {
dynamic params = dynamic::object;
put(params, "objectId", objectId);
put(params, "objectGroup", objectGroup);
dynamic obj = dynamic::object;
put(obj, "id", id);
put(obj, "method", method);
put(obj, "params", std::move(params));
return obj;
}
void heapProfiler::GetObjectByHeapObjectIdRequest::accept(
RequestHandler &handler) const {
handler.handle(*this);
}
heapProfiler::StartSamplingRequest::StartSamplingRequest()
: Request("HeapProfiler.startSampling") {}
@@ -1071,6 +1134,42 @@ dynamic debugger::SetInstrumentationBreakpointResponse::toDynamic() const {
return obj;
}
heapProfiler::GetHeapObjectIdResponse::GetHeapObjectIdResponse(
const dynamic &obj) {
assign(id, obj, "id");
dynamic res = obj.at("result");
assign(heapSnapshotObjectId, res, "heapSnapshotObjectId");
}
dynamic heapProfiler::GetHeapObjectIdResponse::toDynamic() const {
dynamic res = dynamic::object;
put(res, "heapSnapshotObjectId", heapSnapshotObjectId);
dynamic obj = dynamic::object;
put(obj, "id", id);
put(obj, "result", std::move(res));
return obj;
}
heapProfiler::GetObjectByHeapObjectIdResponse::GetObjectByHeapObjectIdResponse(
const dynamic &obj) {
assign(id, obj, "id");
dynamic res = obj.at("result");
assign(result, res, "result");
}
dynamic heapProfiler::GetObjectByHeapObjectIdResponse::toDynamic() const {
dynamic res = dynamic::object;
put(res, "result", result);
dynamic obj = dynamic::object;
put(obj, "id", id);
put(obj, "result", std::move(res));
return obj;
}
heapProfiler::StopSamplingResponse::StopSamplingResponse(const dynamic &obj) {
assign(id, obj, "id");
@@ -1,5 +1,5 @@
// Copyright 2004-present Facebook. All Rights Reserved.
// @generated SignedSource<<0961e921eb7c5201466836c8ce82de73>>
// @generated SignedSource<<a541d174394c8959b9fb6a7c575e7040>>
#pragma once
@@ -72,6 +72,11 @@ using UnserializableValue = std::string;
namespace heapProfiler {
struct AddHeapSnapshotChunkNotification;
struct CollectGarbageRequest;
struct GetHeapObjectIdRequest;
struct GetHeapObjectIdResponse;
struct GetObjectByHeapObjectIdRequest;
struct GetObjectByHeapObjectIdResponse;
using HeapSnapshotObjectId = std::string;
struct HeapStatsUpdateNotification;
struct LastSeenObjectIdNotification;
struct ReportHeapSnapshotProgressNotification;
@@ -107,6 +112,9 @@ struct RequestHandler {
virtual void handle(const debugger::StepOutRequest &req) = 0;
virtual void handle(const debugger::StepOverRequest &req) = 0;
virtual void handle(const heapProfiler::CollectGarbageRequest &req) = 0;
virtual void handle(const heapProfiler::GetHeapObjectIdRequest &req) = 0;
virtual void handle(
const heapProfiler::GetObjectByHeapObjectIdRequest &req) = 0;
virtual void handle(const heapProfiler::StartSamplingRequest &req) = 0;
virtual void handle(
const heapProfiler::StartTrackingHeapObjectsRequest &req) = 0;
@@ -138,6 +146,9 @@ struct NoopRequestHandler : public RequestHandler {
void handle(const debugger::StepOutRequest &req) override {}
void handle(const debugger::StepOverRequest &req) override {}
void handle(const heapProfiler::CollectGarbageRequest &req) override {}
void handle(const heapProfiler::GetHeapObjectIdRequest &req) override {}
void handle(
const heapProfiler::GetObjectByHeapObjectIdRequest &req) override {}
void handle(const heapProfiler::StartSamplingRequest &req) override {}
void handle(
const heapProfiler::StartTrackingHeapObjectsRequest &req) override {}
@@ -464,6 +475,27 @@ struct heapProfiler::CollectGarbageRequest : public Request {
void accept(RequestHandler &handler) const override;
};
struct heapProfiler::GetHeapObjectIdRequest : public Request {
GetHeapObjectIdRequest();
explicit GetHeapObjectIdRequest(const folly::dynamic &obj);
folly::dynamic toDynamic() const override;
void accept(RequestHandler &handler) const override;
runtime::RemoteObjectId objectId{};
};
struct heapProfiler::GetObjectByHeapObjectIdRequest : public Request {
GetObjectByHeapObjectIdRequest();
explicit GetObjectByHeapObjectIdRequest(const folly::dynamic &obj);
folly::dynamic toDynamic() const override;
void accept(RequestHandler &handler) const override;
heapProfiler::HeapSnapshotObjectId objectId{};
folly::Optional<std::string> objectGroup;
};
struct heapProfiler::StartSamplingRequest : public Request {
StartSamplingRequest();
explicit StartSamplingRequest(const folly::dynamic &obj);
@@ -602,6 +634,22 @@ struct debugger::SetInstrumentationBreakpointResponse : public Response {
debugger::BreakpointId breakpointId{};
};
struct heapProfiler::GetHeapObjectIdResponse : public Response {
GetHeapObjectIdResponse() = default;
explicit GetHeapObjectIdResponse(const folly::dynamic &obj);
folly::dynamic toDynamic() const override;
heapProfiler::HeapSnapshotObjectId heapSnapshotObjectId{};
};
struct heapProfiler::GetObjectByHeapObjectIdResponse : public Response {
GetObjectByHeapObjectIdResponse() = default;
explicit GetObjectByHeapObjectIdResponse(const folly::dynamic &obj);
folly::dynamic toDynamic() const override;
runtime::RemoteObject result{};
};
struct heapProfiler::StopSamplingResponse : public Response {
StopSamplingResponse() = default;
explicit StopSamplingResponse(const folly::dynamic &obj);
@@ -22,6 +22,7 @@
#include <hermes/DebuggerAPI.h>
#include <hermes/hermes.h>
#include <hermes/inspector/chrome/MessageTypes.h>
#include <jsi/instrumentation.h>
namespace facebook {
namespace hermes {
@@ -2512,6 +2513,86 @@ TEST(ConnectionTests, heapProfilerSampling) {
expectNotification<m::debugger::ResumedNotification>(conn);
}
TEST(ConnectionTests, heapSnapshotRemoteObject) {
TestContext context;
AsyncHermesRuntime &asyncRuntime = context.runtime();
std::shared_ptr<HermesRuntime> runtime = asyncRuntime.runtime();
SyncConnection &conn = context.conn();
int msgId = 1;
send<m::debugger::EnableRequest>(conn, msgId++);
expectExecutionContextCreated(conn);
asyncRuntime.executeScriptAsync(R"(
storeValue([1, 2, 3]);
debugger;
)");
expectNotification<m::debugger::ScriptParsedNotification>(conn);
// We should get a pause before the first statement.
expectNotification<m::debugger::PausedNotification>(conn);
{
// Take a heap snapshot first to assign IDs.
m::heapProfiler::TakeHeapSnapshotRequest req;
req.id = msgId++;
req.reportProgress = false;
// We don't need the response because we can directly query for object IDs
// from the runtime.
send(conn, req);
}
const uint64_t globalObjID = runtime->getUniqueID(runtime->global());
jsi::Value storedValue = asyncRuntime.awaitStoredValue();
const uint64_t storedObjID =
runtime->getUniqueID(storedValue.asObject(*runtime));
auto testObject = [&msgId, &conn](
uint64_t objID,
const char *type,
const char *className,
const char *description,
const char *subtype) {
// Get the object by its snapshot ID.
m::heapProfiler::GetObjectByHeapObjectIdRequest req;
req.id = msgId++;
req.objectId = std::to_string(objID);
auto resp = send<
m::heapProfiler::GetObjectByHeapObjectIdRequest,
m::heapProfiler::GetObjectByHeapObjectIdResponse>(conn, req);
EXPECT_EQ(resp.result.type, type);
EXPECT_EQ(resp.result.className, className);
EXPECT_EQ(resp.result.description, description);
if (subtype) {
EXPECT_EQ(resp.result.subtype, subtype);
}
// Check that fetching the object by heap snapshot ID works.
m::heapProfiler::GetHeapObjectIdRequest idReq;
idReq.id = msgId++;
idReq.objectId = resp.result.objectId.value();
auto idResp = send<
m::heapProfiler::GetHeapObjectIdRequest,
m::heapProfiler::GetHeapObjectIdResponse>(conn, idReq);
EXPECT_EQ(atoi(idResp.heapSnapshotObjectId.c_str()), objID);
};
// Test once before a collection.
testObject(globalObjID, "object", "Object", "Object", nullptr);
testObject(storedObjID, "object", "Array", "Array(3)", "array");
// Force a collection to move the heap.
runtime->instrumentation().collectGarbage("test");
// A collection should not disturb the unique ID lookup, and it should be the
// same object as before. Note that it won't have the same remote ID, because
// Hermes doesn't do uniquing.
testObject(globalObjID, "object", "Object", "Object", nullptr);
testObject(storedObjID, "object", "Array", "Array(3)", "array");
// Resume and exit.
send<m::debugger::ResumeRequest>(conn, msgId++);
expectNotification<m::debugger::ResumedNotification>(conn);
}
} // namespace chrome
} // namespace inspector
} // namespace hermes
@@ -26,6 +26,8 @@ HeapProfiler.startSampling
HeapProfiler.stopSampling
HeapProfiler.heapStatsUpdate
HeapProfiler.lastSeenObjectId
HeapProfiler.getObjectByHeapObjectId
HeapProfiler.getHeapObjectId
Runtime.consoleAPICalled
Runtime.evaluate
Runtime.executionContextCreated
+1 -1
View File
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s|
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s|
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s|
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s|
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s|
+3 -16
View File
@@ -10,15 +10,10 @@ buildscript {
mavenLocal()
google()
mavenCentral()
jcenter {
content {
includeModule("org.jetbrains.trove4j", "trove4j")
}
}
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
classpath("de.undercouch:gradle-download-task:4.0.2")
classpath("com.android.tools.build:gradle:4.2.1")
classpath("de.undercouch:gradle-download-task:4.1.1")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -38,18 +33,10 @@ allprojects {
mavenLocal()
google()
mavenCentral()
jcenter {
content {
includeModule("org.jetbrains.trove4j", "trove4j")
includeModule("com.facebook.yoga", "proguard-annotations")
includeModule("com.facebook.fbjni", "fbjni-java-only")
includeModule("com.facebook.fresco", "stetho")
}
}
}
// used to override ndk path on CI
if (System.getenv("LOCAL_ANDROID_NDK_VERSION") != null) {
setProperty("ANDROID_NDK_VERSION", System.getenv("LOCAL_ANDROID_NDK_VERSION"))
setProperty("ANDROID_NDK_VERSION", System.getenv("LOCAL_ANDROID_NDK_VERSION"))
}
}
+1
View File
@@ -5,3 +5,4 @@ org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.parallel=true
ANDROID_NDK_VERSION=20.1.5948944
android.useAndroidX=true
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+15 -19
View File
@@ -1,7 +1,6 @@
{
"name": "react-native",
"private": true,
"version": "1000.0.0",
"version": "0.65.3",
"bin": "./cli.js",
"description": "A framework for building native apps using React",
"license": "MIT",
@@ -81,18 +80,14 @@
"test-ios-e2e": "detox test -c ios.sim.release packages/rn-tester/e2e",
"test-ios": "./scripts/objc-test.sh test"
},
"workspaces": [
"packages/!(eslint-config-react-native-community)",
"repo-config"
],
"peerDependencies": {
"react": "17.0.2"
},
"dependencies": {
"@jest/create-cache-key-function": "^26.5.0",
"@react-native-community/cli": "^5.0.1-alpha.0",
"@react-native-community/cli-platform-android": "^5.0.1-alpha.0",
"@react-native-community/cli-platform-ios": "^5.0.1-alpha.0",
"@jest/create-cache-key-function": "^27.0.1",
"@react-native-community/cli": "^6.0.0",
"@react-native-community/cli-platform-android": "^6.0.0",
"@react-native-community/cli-platform-ios": "^6.0.0",
"@react-native/assets": "1.0.0",
"@react-native/normalize-color": "1.0.0",
"@react-native/polyfills": "1.0.0",
@@ -100,13 +95,13 @@
"anser": "^1.4.9",
"base64-js": "^1.1.2",
"event-target-shim": "^5.0.1",
"hermes-engine": "~0.7.0",
"hermes-engine": "~0.8.1",
"invariant": "^2.2.4",
"jsc-android": "^245459.0.0",
"metro-babel-register": "0.66.0",
"metro-react-native-babel-transformer": "0.66.0",
"metro-runtime": "0.66.0",
"metro-source-map": "0.66.0",
"jsc-android": "^250230.2.1",
"metro-babel-register": "0.66.2",
"metro-react-native-babel-transformer": "0.66.2",
"metro-runtime": "0.66.2",
"metro-source-map": "0.66.2",
"nullthrows": "^1.1.1",
"pretty-format": "^26.5.2",
"promise": "^8.0.3",
@@ -114,7 +109,7 @@
"react-devtools-core": "^4.6.0",
"react-refresh": "^0.4.0",
"regenerator-runtime": "^0.13.2",
"scheduler": "^0.20.1",
"scheduler": "^0.20.2",
"stacktrace-parser": "^0.1.3",
"use-subscription": "^1.0.0",
"whatwg-fetch": "^3.0.0",
@@ -122,7 +117,8 @@
},
"devDependencies": {
"flow-bin": "^0.149.0",
"react": "17.0.2"
"react": "17.0.2",
"shelljs": "^0.7.8"
},
"detox": {
"test-runner": "jest",
@@ -161,4 +157,4 @@
}
}
}
}
}
@@ -60,7 +60,6 @@ module.exports = {
const properties = args[0].properties;
if (
!(
properties.length === 2 &&
properties[0].type === 'Property' &&
properties[0].key.name === 'light' &&
properties[1].type === 'Property' &&
@@ -12,14 +12,9 @@ buildscript {
mavenLocal()
google()
mavenCentral()
jcenter {
content {
includeGroup("org.jetbrains.trove4j")
}
}
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
classpath("com.android.tools.build:gradle:4.2.1")
}
}
@@ -28,11 +23,6 @@ allprojects {
mavenLocal()
google()
mavenCentral()
jcenter {
content {
includeGroup("org.jetbrains.trove4j")
}
}
}
}
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
@@ -10,10 +10,5 @@ allprojects {
mavenLocal()
google()
mavenCentral()
jcenter {
content {
includeGroup("org.jetbrains.trove4j")
}
}
}
}
@@ -19,7 +19,7 @@ gradlePlugin {
}
dependencies {
implementation 'com.android.tools.build:gradle:4.1.0'
implementation 'com.android.tools.build:gradle:4.2.1'
// Use the same Gson version that `com.android.tools.build:gradle` depends on.
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.guava:guava:29.0-jre'
@@ -8,12 +8,12 @@
plugins {
`java-gradle-plugin`
`kotlin-dsl`
kotlin("jvm") version "1.4.21"
kotlin("jvm") version "1.4.20"
}
repositories {
google()
jcenter()
mavenCentral()
}
gradlePlugin {
@@ -26,5 +26,5 @@ gradlePlugin {
}
dependencies {
implementation("com.android.tools.build:gradle:4.1.0")
implementation("com.android.tools.build:gradle:4.2.1")
}
File diff suppressed because it is too large Load Diff
@@ -17,7 +17,7 @@ else
end
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'
folly_version = '2021.04.26.00'
Pod::Spec.new do |s|
s.name = "React-RCTTest"
+1 -1
View File
@@ -8,7 +8,7 @@
#import "AppDelegate.h"
#ifndef RCT_USE_HERMES
#if __has_include(<hermes/hermes.h>)
#if __has_include(<reacthermes/HermesExecutorFactory.h>)
#define RCT_USE_HERMES 1
#else
#define RCT_USE_HERMES 0
@@ -13,12 +13,12 @@
2DDEF0101F84BF7B00DBDF73 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2DDEF00F1F84BF7B00DBDF73 /* Images.xcassets */; };
383889DA23A7398900D06C3E /* RCTConvert_UIColorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 383889D923A7398900D06C3E /* RCTConvert_UIColorTests.m */; };
3D2AFAF51D646CF80089D1A3 /* legacy_image@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3D2AFAF41D646CF80089D1A3 /* legacy_image@2x.png */; };
520C5A8AC8F3317FF11A0299 /* libPods-RNTesterIntegrationTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D10F3BDF53B33A1EB00EE9CB /* libPods-RNTesterIntegrationTests.a */; };
5C60EB1C226440DB0018C04F /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C60EB1B226440DB0018C04F /* AppDelegate.mm */; };
5CB07C9B226467E60039471C /* RNTesterTurboModuleProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5CB07C99226467E60039471C /* RNTesterTurboModuleProvider.mm */; };
682424F330D42708B52AA9A8 /* libPods-RNTester.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 88EFE7E584B42816405BA434 /* libPods-RNTester.a */; };
7B37A0C3E18EDC90CCD01CA2 /* libPods-RNTesterIntegrationTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E6D00D70BA38970C7995F0A3 /* libPods-RNTesterIntegrationTests.a */; };
8145AE06241172D900A3F8DA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8145AE05241172D900A3F8DA /* LaunchScreen.storyboard */; };
DCB59B3E303512590BDA64B9 /* libPods-RNTesterUnitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6362DCCAA386FBF557077739 /* libPods-RNTesterUnitTests.a */; };
8D4B1343F60604EF446CC080 /* libPods-RNTester.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A2761C5B113B3D40AF16CE65 /* libPods-RNTester.a */; };
B1AFC227D5A47B418C146713 /* libPods-RNTesterUnitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C7A1A01E448D8DE741561F44 /* libPods-RNTesterUnitTests.a */; };
E7C1241A22BEC44B00DA25C0 /* RNTesterIntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E7C1241922BEC44B00DA25C0 /* RNTesterIntegrationTests.m */; };
E7DB20D122B2BAA6005AC45F /* RCTBundleURLProviderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E7DB20A922B2BAA3005AC45F /* RCTBundleURLProviderTests.m */; };
E7DB20D222B2BAA6005AC45F /* RCTModuleInitNotificationRaceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E7DB20AA22B2BAA3005AC45F /* RCTModuleInitNotificationRaceTests.m */; };
@@ -77,6 +77,7 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
08F86C404A9AC0D6490154A9 /* Pods-RNTester.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTester.debug.xcconfig"; path = "Target Support Files/Pods-RNTester/Pods-RNTester.debug.xcconfig"; sourceTree = "<group>"; };
0CC3BE1A25DDB68A0033CAEB /* RNTester.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = RNTester.entitlements; path = RNTester/RNTester.entitlements; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* RNTester.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RNTester.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = RNTester/AppDelegate.h; sourceTree = "<group>"; };
@@ -87,20 +88,18 @@
27F441E81BEBE5030039B79C /* FlexibleSizeExampleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FlexibleSizeExampleView.m; path = RNTester/NativeExampleViews/FlexibleSizeExampleView.m; sourceTree = "<group>"; };
27F441EA1BEBE5030039B79C /* FlexibleSizeExampleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlexibleSizeExampleView.h; path = RNTester/NativeExampleViews/FlexibleSizeExampleView.h; sourceTree = "<group>"; };
2DDEF00F1F84BF7B00DBDF73 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = RNTester/Images.xcassets; sourceTree = "<group>"; };
34028D6B10F47E490042EB27 /* Pods-RNTesterUnitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterUnitTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.debug.xcconfig"; sourceTree = "<group>"; };
383889D923A7398900D06C3E /* RCTConvert_UIColorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTConvert_UIColorTests.m; sourceTree = "<group>"; };
3D2AFAF41D646CF80089D1A3 /* legacy_image@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "legacy_image@2x.png"; path = "RNTester/legacy_image@2x.png"; sourceTree = "<group>"; };
5BEC8567F3741044B6A5EFC5 /* Pods-RNTester.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTester.release.xcconfig"; path = "Pods/Target Support Files/Pods-RNTester/Pods-RNTester.release.xcconfig"; sourceTree = "<group>"; };
5BE0342E9DA8A3ABC8F5385D /* Pods-RNTester.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTester.release.xcconfig"; path = "Target Support Files/Pods-RNTester/Pods-RNTester.release.xcconfig"; sourceTree = "<group>"; };
5C60EB1B226440DB0018C04F /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = RNTester/AppDelegate.mm; sourceTree = "<group>"; };
5CB07C99226467E60039471C /* RNTesterTurboModuleProvider.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RNTesterTurboModuleProvider.mm; path = RNTester/RNTesterTurboModuleProvider.mm; sourceTree = "<group>"; };
5CB07C9A226467E60039471C /* RNTesterTurboModuleProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNTesterTurboModuleProvider.h; path = RNTester/RNTesterTurboModuleProvider.h; sourceTree = "<group>"; };
6362DCCAA386FBF557077739 /* libPods-RNTesterUnitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTesterUnitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7D51F73F0DA20287418D98BD /* Pods-RNTesterIntegrationTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterIntegrationTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests.release.xcconfig"; sourceTree = "<group>"; };
8145AE05241172D900A3F8DA /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = RNTester/LaunchScreen.storyboard; sourceTree = "<group>"; };
88EFE7E584B42816405BA434 /* libPods-RNTester.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTester.a"; sourceTree = BUILT_PRODUCTS_DIR; };
972A459EE6CF8CC63531A088 /* Pods-RNTesterIntegrationTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterIntegrationTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests.debug.xcconfig"; sourceTree = "<group>"; };
98233960D1D6A1977D1C7EAF /* Pods-RNTester.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTester.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RNTester/Pods-RNTester.debug.xcconfig"; sourceTree = "<group>"; };
E6D00D70BA38970C7995F0A3 /* libPods-RNTesterIntegrationTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTesterIntegrationTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
8F19D6BD4CD78909D2F98903 /* Pods-RNTesterUnitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterUnitTests.debug.xcconfig"; path = "Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.debug.xcconfig"; sourceTree = "<group>"; };
A2761C5B113B3D40AF16CE65 /* libPods-RNTester.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTester.a"; sourceTree = BUILT_PRODUCTS_DIR; };
C2B61E33EB2F45BD80651FCC /* Pods-RNTesterUnitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterUnitTests.release.xcconfig"; path = "Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.release.xcconfig"; sourceTree = "<group>"; };
C7A1A01E448D8DE741561F44 /* libPods-RNTesterUnitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTesterUnitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
D10F3BDF53B33A1EB00EE9CB /* libPods-RNTesterIntegrationTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNTesterIntegrationTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E771AEEA22B44E3100EA1189 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RNTester/Info.plist; sourceTree = "<group>"; };
E7C1241922BEC44B00DA25C0 /* RNTesterIntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNTesterIntegrationTests.m; sourceTree = "<group>"; };
E7DB209F22B2BA84005AC45F /* RNTesterUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RNTesterUnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -173,7 +172,8 @@
E7DB216022B2F3EC005AC45F /* RNTesterSnapshotTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNTesterSnapshotTests.m; sourceTree = "<group>"; };
E7DB216122B2F3EC005AC45F /* RCTRootViewIntegrationTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTRootViewIntegrationTests.m; sourceTree = "<group>"; };
E7DB218B22B41FCD005AC45F /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = XCTest.framework; sourceTree = DEVELOPER_DIR; };
E9618482EC8608D4872A6E28 /* Pods-RNTesterUnitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterUnitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests.release.xcconfig"; sourceTree = "<group>"; };
EE652446BDB43FBB2746A813 /* Pods-RNTesterIntegrationTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterIntegrationTests.release.xcconfig"; path = "Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests.release.xcconfig"; sourceTree = "<group>"; };
FC457E5CADD102016429C92B /* Pods-RNTesterIntegrationTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNTesterIntegrationTests.debug.xcconfig"; path = "Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -181,7 +181,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
682424F330D42708B52AA9A8 /* libPods-RNTester.a in Frameworks */,
8D4B1343F60604EF446CC080 /* libPods-RNTester.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -191,7 +191,7 @@
files = (
E7DB213122B2C649005AC45F /* JavaScriptCore.framework in Frameworks */,
E7DB213222B2C67D005AC45F /* libOCMock.a in Frameworks */,
DCB59B3E303512590BDA64B9 /* libPods-RNTesterUnitTests.a in Frameworks */,
B1AFC227D5A47B418C146713 /* libPods-RNTesterUnitTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -201,7 +201,7 @@
files = (
E7DB218C22B41FCD005AC45F /* XCTest.framework in Frameworks */,
E7DB216722B2F69F005AC45F /* JavaScriptCore.framework in Frameworks */,
7B37A0C3E18EDC90CCD01CA2 /* libPods-RNTesterIntegrationTests.a in Frameworks */,
520C5A8AC8F3317FF11A0299 /* libPods-RNTesterIntegrationTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -272,26 +272,13 @@
E7DB211822B2BD53005AC45F /* libReact-RCTText.a */,
E7DB211A22B2BD53005AC45F /* libReact-RCTVibration.a */,
E7DB212222B2BD53005AC45F /* libyoga.a */,
88EFE7E584B42816405BA434 /* libPods-RNTester.a */,
E6D00D70BA38970C7995F0A3 /* libPods-RNTesterIntegrationTests.a */,
6362DCCAA386FBF557077739 /* libPods-RNTesterUnitTests.a */,
A2761C5B113B3D40AF16CE65 /* libPods-RNTester.a */,
D10F3BDF53B33A1EB00EE9CB /* libPods-RNTesterIntegrationTests.a */,
C7A1A01E448D8DE741561F44 /* libPods-RNTesterUnitTests.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
571A4A20844C3BA40A3D302B /* Pods */ = {
isa = PBXGroup;
children = (
98233960D1D6A1977D1C7EAF /* Pods-RNTester.debug.xcconfig */,
5BEC8567F3741044B6A5EFC5 /* Pods-RNTester.release.xcconfig */,
972A459EE6CF8CC63531A088 /* Pods-RNTesterIntegrationTests.debug.xcconfig */,
7D51F73F0DA20287418D98BD /* Pods-RNTesterIntegrationTests.release.xcconfig */,
34028D6B10F47E490042EB27 /* Pods-RNTesterUnitTests.debug.xcconfig */,
E9618482EC8608D4872A6E28 /* Pods-RNTesterUnitTests.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
680759612239798500290469 /* Fabric */ = {
isa = PBXGroup;
children = (
@@ -299,6 +286,20 @@
name = Fabric;
sourceTree = "<group>";
};
6DC9CB22934497EC8CDB0BD8 /* Pods */ = {
isa = PBXGroup;
children = (
08F86C404A9AC0D6490154A9 /* Pods-RNTester.debug.xcconfig */,
5BE0342E9DA8A3ABC8F5385D /* Pods-RNTester.release.xcconfig */,
FC457E5CADD102016429C92B /* Pods-RNTesterIntegrationTests.debug.xcconfig */,
EE652446BDB43FBB2746A813 /* Pods-RNTesterIntegrationTests.release.xcconfig */,
8F19D6BD4CD78909D2F98903 /* Pods-RNTesterUnitTests.debug.xcconfig */,
C2B61E33EB2F45BD80651FCC /* Pods-RNTesterUnitTests.release.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup;
children = (
@@ -307,7 +308,7 @@
E7DB215422B2F332005AC45F /* RNTesterIntegrationTests */,
83CBBA001A601CBA00E9B192 /* Products */,
2DE7E7D81FB2A4F3009E225D /* Frameworks */,
571A4A20844C3BA40A3D302B /* Pods */,
6DC9CB22934497EC8CDB0BD8 /* Pods */,
);
indentWidth = 2;
sourceTree = "<group>";
@@ -401,14 +402,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RNTester" */;
buildPhases = (
F9CB97B0D9633939D43E75E0 /* [CP] Check Pods Manifest.lock */,
8FBA37A5A7720F537D5096B3 /* [CP] Check Pods Manifest.lock */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
68CD48B71D2BCB2C007E06A9 /* Build JS Bundle */,
5CF0FD27207FC6EC00C13D65 /* Start Metro */,
CD2B49A7F80C8171E7A5B233 /* [CP] Copy Pods Resources */,
FCBC860F39D3E385BA7C6FF7 /* [CP] Embed Pods Frameworks */,
11C8C367B5AE5CE68420F0F5 /* [CP] Embed Pods Frameworks */,
ED7305C9A668EAE86E6BEB22 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -423,11 +424,11 @@
isa = PBXNativeTarget;
buildConfigurationList = E7DB20A622B2BA84005AC45F /* Build configuration list for PBXNativeTarget "RNTesterUnitTests" */;
buildPhases = (
64C8C8D2305EEDFDE304A0E6 /* [CP] Check Pods Manifest.lock */,
1A0EBCA8D423BF7BD689C3A8 /* [CP] Check Pods Manifest.lock */,
E7DB209B22B2BA84005AC45F /* Sources */,
E7DB209C22B2BA84005AC45F /* Frameworks */,
E7DB209D22B2BA84005AC45F /* Resources */,
71ADC6D58A978687B97C823F /* [CP] Copy Pods Resources */,
D1DD941CFAC4C518C421DF62 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -443,11 +444,11 @@
isa = PBXNativeTarget;
buildConfigurationList = E7DB215A22B2F332005AC45F /* Build configuration list for PBXNativeTarget "RNTesterIntegrationTests" */;
buildPhases = (
56D84768A7BBB2750D674CF3 /* [CP] Check Pods Manifest.lock */,
C68A15BF396EBF6908EA859E /* [CP] Check Pods Manifest.lock */,
E7DB214F22B2F332005AC45F /* Sources */,
E7DB215022B2F332005AC45F /* Frameworks */,
E7DB215122B2F332005AC45F /* Resources */,
87FAF758B87BEA78F26A2B92 /* [CP] Copy Pods Resources */,
38616D09A9447C97ADDDB269 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -526,44 +527,24 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
56D84768A7BBB2750D674CF3 /* [CP] Check Pods Manifest.lock */ = {
11C8C367B5AE5CE68420F0F5 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RNTesterIntegrationTests-checkManifestLockResult.txt",
"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
5CF0FD27207FC6EC00C13D65 /* Start Metro */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Start Metro";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../../scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../../scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
showEnvVarsInLog = 0;
};
64C8C8D2305EEDFDE304A0E6 /* [CP] Check Pods Manifest.lock */ = {
1A0EBCA8D423BF7BD689C3A8 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -585,38 +566,7 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
68CD48B71D2BCB2C007E06A9 /* Build JS Bundle */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Build JS Bundle";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\n\nexport NODE_BINARY=node\nexport PROJECT_ROOT=\"$SRCROOT/../../\"\nexport SOURCEMAP_FILE=../sourcemap.ios.map\n# export FORCE_BUNDLING=true\n\"$SRCROOT/../../scripts/react-native-xcode.sh\" $SRCROOT/../../packages/rn-tester/js/RNTesterApp.ios.js\n";
};
71ADC6D58A978687B97C823F /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
87FAF758B87BEA78F26A2B92 /* [CP] Copy Pods Resources */ = {
38616D09A9447C97ADDDB269 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -633,7 +583,97 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterIntegrationTests/Pods-RNTesterIntegrationTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
CD2B49A7F80C8171E7A5B233 /* [CP] Copy Pods Resources */ = {
5CF0FD27207FC6EC00C13D65 /* Start Metro */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Start Metro";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../../scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../../scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
showEnvVarsInLog = 0;
};
68CD48B71D2BCB2C007E06A9 /* Build JS Bundle */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Build JS Bundle";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\n\nexport NODE_BINARY=node\nexport PROJECT_ROOT=\"$SRCROOT/../../\"\nexport SOURCEMAP_FILE=../sourcemap.ios.map\n# export FORCE_BUNDLING=true\n\"$SRCROOT/../../scripts/react-native-xcode.sh\" $SRCROOT/../../packages/rn-tester/js/RNTesterApp.ios.js\n";
};
8FBA37A5A7720F537D5096B3 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RNTester-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
C68A15BF396EBF6908EA859E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RNTesterIntegrationTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
D1DD941CFAC4C518C421DF62 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTesterUnitTests/Pods-RNTesterUnitTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
ED7305C9A668EAE86E6BEB22 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -650,41 +690,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-resources.sh\"\n";
showEnvVarsInLog = 0;
};
F9CB97B0D9633939D43E75E0 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RNTester-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
FCBC860F39D3E385BA7C6FF7 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNTester/Pods-RNTester-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -766,7 +771,7 @@
/* Begin XCBuildConfiguration section */
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 98233960D1D6A1977D1C7EAF /* Pods-RNTester.debug.xcconfig */;
baseConfigurationReference = 08F86C404A9AC0D6490154A9 /* Pods-RNTester.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = RNTester/RNTester.entitlements;
@@ -799,7 +804,7 @@
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 5BEC8567F3741044B6A5EFC5 /* Pods-RNTester.release.xcconfig */;
baseConfigurationReference = 5BE0342E9DA8A3ABC8F5385D /* Pods-RNTester.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = RNTester/RNTester.entitlements;
@@ -993,7 +998,7 @@
};
E7DB20A722B2BA84005AC45F /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 34028D6B10F47E490042EB27 /* Pods-RNTesterUnitTests.debug.xcconfig */;
baseConfigurationReference = 8F19D6BD4CD78909D2F98903 /* Pods-RNTesterUnitTests.debug.xcconfig */;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
@@ -1029,7 +1034,7 @@
};
E7DB20A822B2BA84005AC45F /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = E9618482EC8608D4872A6E28 /* Pods-RNTesterUnitTests.release.xcconfig */;
baseConfigurationReference = C2B61E33EB2F45BD80651FCC /* Pods-RNTesterUnitTests.release.xcconfig */;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
@@ -1065,7 +1070,7 @@
};
E7DB215B22B2F332005AC45F /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 972A459EE6CF8CC63531A088 /* Pods-RNTesterIntegrationTests.debug.xcconfig */;
baseConfigurationReference = FC457E5CADD102016429C92B /* Pods-RNTesterIntegrationTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
@@ -1103,7 +1108,7 @@
};
E7DB215C22B2F332005AC45F /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7D51F73F0DA20287418D98BD /* Pods-RNTesterIntegrationTests.release.xcconfig */;
baseConfigurationReference = EE652446BDB43FBB2746A813 /* Pods-RNTesterIntegrationTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
+1 -4
View File
@@ -131,10 +131,7 @@ def useIntlJsc = false
android {
compileSdkVersion 29
ndkVersion ANDROID_NDK_VERSION
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
javaMaxHeapSize "4g"
}
@@ -10,4 +10,4 @@ android.useAndroidX=true
android.enableJetifier=true
# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.75.1
FLIPPER_VERSION=0.93.0
@@ -52,6 +52,11 @@
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<provider
android:name="com.facebook.react.modules.blob.BlobProvider"
android:authorities="@string/blob_provider_authority"
android:exported="false"
/>
</application>
</manifest>
@@ -7,12 +7,10 @@
package com.facebook.react.uiapp;
import android.content.res.Configuration;
import android.os.Bundle;
import androidx.annotation.Nullable;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactRootView;
public class RNTesterActivity extends ReactActivity {
@@ -64,14 +62,4 @@ public class RNTesterActivity extends ReactActivity {
protected String getMainComponentName() {
return "RNTesterApp";
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
ReactInstanceManager instanceManager = getReactInstanceManager();
if (instanceManager != null) {
instanceManager.onConfigurationChanged(this, newConfig);
}
}
}
@@ -1,3 +1,4 @@
<resources>
<string name="app_name">RNTester App</string>
<string name="blob_provider_authority">com.facebook.react.uiapp.blobs</string>
</resources>
@@ -32,6 +32,58 @@ type ImageSource = $ReadOnly<{|
uri: string,
|}>;
type BlobImageState = {|
objectURL: ?string,
|};
type BlobImageProps = $ReadOnly<{|
url: string,
|}>;
class BlobImage extends React.Component<BlobImageProps, BlobImageState> {
state = {
objectURL: null,
};
UNSAFE_componentWillMount() {
(async () => {
const result = await fetch(this.props.url);
const blob = await result.blob();
const objectURL = URL.createObjectURL(blob);
this.setState({objectURL});
})();
}
render() {
return this.state.objectURL !== null ? (
<Image source={{uri: this.state.objectURL}} style={styles.base} />
) : (
<Text>Object URL not created yet</Text>
);
}
}
type BlobImageExampleState = {||};
type BlobImageExampleProps = $ReadOnly<{|
urls: string[],
|}>;
class BlobImageExample extends React.Component<
BlobImageExampleProps,
BlobImageExampleState,
> {
render() {
return (
<View style={styles.horizontal}>
{this.props.urls.map(url => (
<BlobImage key={url} url={url} />
))}
</View>
);
}
}
type NetworkImageCallbackExampleState = {|
events: Array<string>,
startLoadPrefetched: boolean,
@@ -608,6 +660,21 @@ exports.examples = [
return <Image source={fullImage} style={styles.base} />;
},
},
{
title: 'Plain Blob Image',
description: ('If the `source` prop `uri` property is an object URL, ' +
'then it will be resolved using `BlobProvider` (Android) or `RCTBlobManager` (iOS).': string),
render: function(): React.Node {
return (
<BlobImageExample
urls={[
'https://www.facebook.com/favicon.ico',
'https://www.facebook.com/ads/pics/successstories.png',
]}
/>
);
},
},
{
title: 'Plain Static Image',
description: ('Static assets should be placed in the source code tree, and ' +
@@ -236,6 +236,20 @@ function DynamicColorsExample() {
}}
/>
</View>
<View style={styles.row}>
<Text style={styles.labelCell}>
DynamicColorIOS({'{\n'}
{' '}light: 'red', dark: 'blue'{'\n'}
{'}'})
</Text>
<View
style={{
...styles.colorCell,
borderColor: DynamicColorIOS({light: 'red', dark: 'blue'}),
borderWidth: 1,
}}
/>
</View>
<View style={styles.row}>
<Text style={styles.labelCell}>
DynamicColorIOS({'{\n'}
@@ -383,6 +383,15 @@ class TextExample extends React.Component<{...}> {
<RNTesterBlock title="Font Weight">
<Text style={{fontWeight: 'bold'}}>Move fast and be bold</Text>
<Text style={{fontWeight: 'normal'}}>Move fast and be normal</Text>
<Text style={{fontWeight: '900'}}>FONT WEIGHT 900</Text>
<Text style={{fontWeight: '800'}}>FONT WEIGHT 800</Text>
<Text style={{fontWeight: '700'}}>FONT WEIGHT 700</Text>
<Text style={{fontWeight: '600'}}>FONT WEIGHT 600</Text>
<Text style={{fontWeight: '500'}}>FONT WEIGHT 500</Text>
<Text style={{fontWeight: '400'}}>FONT WEIGHT 400</Text>
<Text style={{fontWeight: '300'}}>FONT WEIGHT 300</Text>
<Text style={{fontWeight: '200'}}>FONT WEIGHT 200</Text>
<Text style={{fontWeight: '100'}}>FONT WEIGHT 100</Text>
</RNTesterBlock>
<RNTesterBlock title="Font Style">
<Text style={{fontStyle: 'italic'}}>Move fast and be italic</Text>
@@ -603,21 +603,17 @@ exports.examples = [
render: function(): React.Node {
return (
<View>
<Text style={{fontSize: 20, fontWeight: '100'}}>
Move fast and be ultralight
</Text>
<Text style={{fontSize: 20, fontWeight: '200'}}>
Move fast and be light
</Text>
<Text style={{fontSize: 20, fontWeight: 'normal'}}>
Move fast and be normal
</Text>
<Text style={{fontSize: 20, fontWeight: 'bold'}}>
Move fast and be bold
</Text>
<Text style={{fontSize: 20, fontWeight: '900'}}>
Move fast and be ultrabold
</Text>
<Text style={{fontWeight: 'bold'}}>Move fast and be bold</Text>
<Text style={{fontWeight: 'normal'}}>Move fast and be normal</Text>
<Text style={{fontWeight: '900'}}>FONT WEIGHT 900</Text>
<Text style={{fontWeight: '800'}}>FONT WEIGHT 800</Text>
<Text style={{fontWeight: '700'}}>FONT WEIGHT 700</Text>
<Text style={{fontWeight: '600'}}>FONT WEIGHT 600</Text>
<Text style={{fontWeight: '500'}}>FONT WEIGHT 500</Text>
<Text style={{fontWeight: '400'}}>FONT WEIGHT 400</Text>
<Text style={{fontWeight: '300'}}>FONT WEIGHT 300</Text>
<Text style={{fontWeight: '200'}}>FONT WEIGHT 200</Text>
<Text style={{fontWeight: '100'}}>FONT WEIGHT 100</Text>
</View>
);
},
+17 -9
View File
@@ -28,17 +28,11 @@ def detectCliPath(config) {
if (config.cliPath) {
return config.cliPath
}
def cliPath = ["node", "-e", "console.log(require('react-native/cli').bin);"].execute([], projectDir).text.trim()
if (cliPath) {
return cliPath
} else if (new File("${projectDir}/../../node_modules/react-native/cli.js").exists()) {
if (new File("${projectDir}/../../node_modules/react-native/cli.js").exists()) {
return "${projectDir}/../../node_modules/react-native/cli.js"
} else {
throw new Exception("Couldn't determine CLI location. " +
"Please set `project.ext.react.cliPath` to the path of the react-native cli.js");
}
throw new Exception("Couldn't determine CLI location. " +
"Please set `project.ext.react.cliPath` to the path of the react-native cli.js");
}
def composeSourceMapsPath = config.composeSourceMapsPath ?: "node_modules/react-native/scripts/compose-source-maps.js"
@@ -363,3 +357,17 @@ afterEvaluate {
}
}
}
// Patch needed for https://github.com/facebook/react-native/issues/35210
// This is a patch to short-circuit the "+" dependencies inside the
// users' app/build.gradle file and the various .gradle files of libraries.
// As using plain "+" dependencies causes Gradle to always download the latest,
// this logic forces Gradle to use latest release in the minor series.
project.rootProject.allprojects {
configurations.all {
resolutionStrategy {
force "com.facebook.react:react-native:0.65.+"
force "com.facebook.react:hermes-engine:0.65.+"
}
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
## ANDROID ##
# Android SDK Build Tools revision
export ANDROID_SDK_BUILD_TOOLS_REVISION=29.0.3
export ANDROID_SDK_BUILD_TOOLS_REVISION=30.0.2
# Android API Level we build with
export ANDROID_SDK_BUILD_API_LEVEL="28"
# Google APIs for Android level
+43 -22
View File
@@ -19,6 +19,7 @@
const fs = require('fs');
const {cat, echo, exec, exit, sed} = require('shelljs');
const yargs = require('yargs');
const {parseVersion} = require('./version-utils');
let argv = yargs
.option('r', {
@@ -29,17 +30,27 @@ let argv = yargs
alias: 'nightly',
type: 'boolean',
default: false,
})
.option('v', {
alias: 'to-version',
type: 'string',
})
.option('l', {
alias: 'latest',
type: 'boolean',
default: false,
}).argv;
const nightlyBuild = argv.nightly;
const version = argv.toVersion;
let version, branch;
if (nightlyBuild) {
const currentCommit = exec('git rev-parse HEAD', {
silent: true,
}).stdout.trim();
version = `0.0.0-${currentCommit.slice(0, 9)}`;
} else {
if (!version) {
echo('You must specify a version using -v');
exit(1);
}
let branch;
if (!nightlyBuild) {
// Check we are in release branch, e.g. 0.33-stable
branch = exec('git symbolic-ref --short HEAD', {
silent: true,
@@ -55,24 +66,24 @@ if (nightlyBuild) {
// - check that argument version matches branch
// e.g. 0.33.1 or 0.33.0-rc4
version = argv._[0];
if (!version || version.indexOf(versionMajor) !== 0) {
if (version.indexOf(versionMajor) !== 0) {
echo(
`You must pass a tag like 0.${versionMajor}.[X]-rc[Y] to bump a version`,
`You must specify a version tag like 0.${versionMajor}.[X]-rc[Y] to bump a version`,
);
exit(1);
}
}
// Generate version files to detect mismatches between JS and native.
let match = version.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);
if (!match) {
echo(
`You must pass a correctly formatted version; couldn't parse ${version}`,
);
let major,
minor,
patch,
prerelease = -1;
try {
({major, minor, patch, prerelease} = parseVersion(version));
} catch (e) {
echo(e.message);
exit(1);
}
let [, major, minor, patch, prerelease] = match;
fs.writeFileSync(
'ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java',
@@ -149,17 +160,26 @@ if (
exec(`node scripts/set-rn-template-version.js ${version}`);
// Verify that files changed, we just do a git diff and check how many times version is added across files
const filesToValidate = [
'package.json',
'ReactAndroid/gradle.properties',
'template/package.json',
];
let numberOfChangedLinesWithNewVersion = exec(
`git diff -U0 | grep '^[+]' | grep -c ${version} `,
`git diff -U0 ${filesToValidate.join(
' ',
)}| grep '^[+]' | grep -c ${version} `,
{silent: true},
).stdout.trim();
// Release builds should commit the version bumps, and create tags.
// Nightly builds do not need to do that.
if (!nightlyBuild) {
if (+numberOfChangedLinesWithNewVersion !== 3) {
if (+numberOfChangedLinesWithNewVersion !== filesToValidate.length) {
echo(
'Failed to update all the files. package.json and gradle.properties must have versions in them',
`Failed to update all the files: [${filesToValidate.join(
', ',
)}] must have versions in them`,
);
echo('Fix the issue, revert and try again');
exec('git diff');
@@ -186,8 +206,9 @@ if (!nightlyBuild) {
let remote = argv.remote;
exec(`git push ${remote} v${version}`);
// Tag latest if doing stable release
if (version.indexOf('rc') === -1) {
// Tag latest if doing stable release.
// This will also tag npm release as `latest`
if (prerelease == null && argv.latest) {
exec('git tag -d latest');
exec(`git push ${remote} :latest`);
exec('git tag latest');
+6
View File
@@ -6,6 +6,12 @@
set -e
# Support Homebrew on M1
HOMEBREW_M1_BIN=/opt/homebrew/bin
if [[ -d $HOMEBREW_M1_BIN && ! $PATH =~ $HOMEBREW_M1_BIN ]]; then
export PATH="$HOMEBREW_M1_BIN:$PATH"
fi
# Define NVM_DIR and source the nvm.sh setup script
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
+2 -1
View File
@@ -27,13 +27,14 @@ set -e
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
TEMP_DIR=$(mktemp -d /tmp/react-native-codegen-XXXXXXXX)
RN_DIR=$(cd "$THIS_DIR/.." && pwd)
NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}"
USE_FABRIC="${USE_FABRIC:-0}"
# Find path to Node
# shellcheck source=/dev/null
source "$RN_DIR/scripts/find-node.sh"
NODE_BINARY="${NODE_BINARY:-$(command -v node || true)}"
cleanup () {
set +e
rm -rf "$TEMP_DIR"

Some files were not shown because too many files have changed in this diff Show More