Граф коммитов

532 Коммитов

Автор SHA1 Сообщение Дата
Spencer Ahrens 7104c1f3ce Fix warning in FlatListExample
Summary: Stop rendering outer ScrollView.

Reviewed By: PeteTheHeat

Differential Revision: D16217349

fbshipit-source-id: 2ffcd7f35f5dd9020ca8f234f05a5d5393552d96
2019-07-15 13:31:48 -07:00
Samuel Susla 631992b093 Back out "[react-native][PR] Use CALayers to draw text"
Summary:
Original commit changeset: c45409a8413e

I was unable to find the cause of the problem.

Reviewed By: yungsters

Differential Revision: D16240754

fbshipit-source-id: c1e3f0aa615422f1156706f919e8f851f82c18b0
2019-07-13 09:00:51 -07:00
Kevin Gozali 3b6f6ca4d5 iOS: Added missing React-jsi dep for FBReactNativeSpec target
Summary: Added missing React-jsi dep for FBReactNativeSpec target.

Reviewed By: hramos

Differential Revision: D16231696

fbshipit-source-id: 66b051ab54f97da9b71f9479ccd5d59f757d524c
2019-07-12 22:44:21 -07:00
Kevin Gozali c1b0f398e6 TM iOS: move jscallinvoker under ReactCommon podspec
Summary:
This essentially changes the header namespace to `<ReactCommon/`
Relevant efforts:
https://github.com/facebook/react-native/pull/25619
https://github.com/facebook/react-native/pull/25393

Reviewed By: PeteTheHeat

Differential Revision: D16233125

fbshipit-source-id: 83eda4cc50ebb01efd1ce3eb18f47c97a049cffa
2019-07-12 22:44:20 -07:00
Kevin Gozali 394c9a55be TM iOS: deprecate RN_TURBO_MODULE_ENABLED compiler flag
Summary:
It was added due to missing TM support in .xcodeproj, but since .xcodeproj has been deprecated, we don't need this flag anymore.

Relevant efforts:
https://github.com/facebook/react-native/pull/25619
https://github.com/facebook/react-native/pull/25393

Reviewed By: hramos

Differential Revision: D16231698

fbshipit-source-id: b3276d1fc64394624e5110f2ecd31acc2bb2d240
2019-07-12 22:44:20 -07:00
Kevin Gozali 6e7ce9c082 TM iOS: refactor header dir for TM
Summary:
For better cocoapods compatibility, refactored TM podspec to be a subspec of ReactCommon, then use `<ReactCommon/` header prefix for all TM files.

Relevant efforts:
https://github.com/facebook/react-native/pull/25619
https://github.com/facebook/react-native/pull/25393

Reviewed By: hramos

Differential Revision: D16231697

fbshipit-source-id: 38d3418b19978ff54aa0c61b064ac45ac0e1c36c
2019-07-12 22:44:20 -07:00
David Vacca 1914d9a4c0 Use AndroidX GuardedBy annotation in favor of Javax GuardedBy annotation
Summary: Use AndroidX GuardedBy annotation in favor of Javax GuardedBy annotation

Reviewed By: ejanzer

Differential Revision: D16234167

fbshipit-source-id: 7f818d20b332a866926f80275b4c8a7489d4c6d3
2019-07-12 18:51:39 -07:00
Kevin Gozali 0c8c95f4ae iOS: Use RCTTypeSafety header namespace instead of React
Summary: For better compatibility re: https://github.com/facebook/react-native/pull/25393, this target should just use `RCTTypeSafety`

Reviewed By: PeteTheHeat

Differential Revision: D16210888

fbshipit-source-id: 6a55d631453cc420909247a7d5a64379587225b7
2019-07-12 14:30:11 -07:00
Kevin Gozali 79a7828b91 deprecate iOS .xcodeproj (#25583)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/25583

We now use CocoaPods for better maintainability.

Reviewed By: hramos

Differential Revision: D16193719

fbshipit-source-id: 26382f2da4eaba14a71771540b587fdc80b41108
2019-07-11 12:02:39 -07:00
Kevin Gozali 549c46975e iOS: suppress nullability completeness warning in TM generated spec file
Summary: For now, suppress this warning - they are harmless.

Reviewed By: mdvacca

Differential Revision: D16198994

fbshipit-source-id: b167d0e98bbc4abcd0461d50f01f364d8d560aec
2019-07-11 12:02:39 -07:00
Kevin Gonzales b8ccb260ac Added button with accessibility action example and support for Touchables (#25582)
Summary:
We added a test to make sure button and accessibility actions would not have unwanted behavior. Additionally we added support for accessibility actions for all touchables. However we discovered that RCTTextView and possibly anything else that does not derive from RCTView does not support accessibility actions and need to be children off a component that does support it for it to not crash in ios. This became noticeable when TouchableWithoutFeedback only worked if text is a child of view on ios.

In a local branch we where able to modify RCTTextView to support accessibility actions and text no longer needed to be a child of view for it to work.

## Changelog

[General] [Added] - Button test with accessibility actions
[General] [Added] - Support for accessibility actions to all Touchables. With TouchableWithoutFeedback being a special case where text must be a child of view. (See AccessibilityExample.js for an example)
Pull Request resolved: https://github.com/facebook/react-native/pull/25582

Test Plan:
Test plan is testing in RNTester making sure the examples work

## Open Question
What would you say is the best practice for adding accessibility action support for all the components that do not extended from RCTView?

Reviewed By: cpojer

Differential Revision: D16192919

Pulled By: osdnk

fbshipit-source-id: 7d4e186ba1f30393f2b4d08a0e227b960f83586c
2019-07-11 01:38:18 -07:00
David Vacca 458c06b8e7 Back out "[RN][iOS] Remove definition of viewIsDescendantOf method in RN iOS code"
Summary:
Adding viewIsDescendantOf back again, more context 9ae7f0c7da
This method might no not be implemented in Fabric

Reviewed By: fkgozali

Differential Revision: D16186406

fbshipit-source-id: 9cd4c9e20c01713d4e8608a54c6f54082067e27f
2019-07-10 20:56:39 -07:00
Kevin Gozali 7dc0d4bfee iOS: removed turbo_modules_enabled from autolink
Summary: TurboModule is now included by default, so no need to have a toggle in autolink script anymore.

Reviewed By: mdvacca

Differential Revision: D16173820

fbshipit-source-id: 215ce7d188ce526b5a71df881bdc992c1ef34b34
2019-07-10 10:21:38 -07:00
James Treanor 6ef91061e8 CocoaPods frameworks compatibility: Step 1 (#25496)
Summary:
This is the first step towards fixing https://github.com/facebook/react-native/issues/25349. These are the changes to the podspec to correctly update dependencies and build config that will cause any breaking change for users or libraries.

I am breaking these changes out from https://github.com/facebook/react-native/pull/25393 as suggested by fkgozali in https://github.com/facebook/react-native/pull/25393#issuecomment-508322884.

These are the changes:

- Made C++ headers in `React-Core` private by default so that ObjC files can import the module without failures.
- Reduced the number of `yoga` headers that are exposed for the same reason as above. As far as I can see this doesn't cause issues but we can find another solution if it does.
- Adding some missing dependencies to fix undefined symbols errors.
- Added `DoubleConversion` to `HEADER_SEARCH_PATHS` where it was missing.

## Changelog

[iOS] [Fixed] - Updated podspecs for improved compatibility with different install types.
Pull Request resolved: https://github.com/facebook/react-native/pull/25496

Test Plan:
Everything should work exactly as before. I have a branch on my [sample project](https://github.com/jtreanor/react-native-cocoapods-frameworks) here which points at this branch to show that it is still working `Podfile` to demonstrate this is fixed.

You can see that it works with these steps:

1. `git clone git@github.com:jtreanor/react-native-cocoapods-frameworks.git`
2. `git checkout podspec-updates`
3. `cd ios && pod install`
4. `cd .. && react-native run-ios`

The sample app will build and run successfully.

Reviewed By: mmmulani

Differential Revision: D16167346

Pulled By: fkgozali

fbshipit-source-id: 1917b2f8779cb172362a457fb3fce686c55056d3
2019-07-10 10:21:38 -07:00
Oleksandr Melnykov 88e18b6c8d Release underlying resources when JS instance is GC'ed on Android
Summary:
[Android] [Added] - Release underlying resources when JS instance is GC'ed on Android

D15826082 was reverted because it introduced a crash in Ads Manager for Android (see P67222724).

This diff fixes the crash and re-applies D15826082. The problem was that `jni::findClassStatic` in the destructor of BlobCollector.cpp couldn't find the Java class `com/facebook/react/modules/blob/BlobModule` and crashed the app.

JNI didn't seem to have access to the Java class loader probably because the destructor was called from a non-Java thread (https://our.intern.facebook.com/intern/wiki/Fbjni/environment-and-thread-management/?vitals_event=wiki_click_navigation_link#threads). The fix is to wrap the code in the destructor inside `ThreadScope::WithClassLoader `, which will allow to run code that has full access to Java as though you were running in a Java thread.

Reviewed By: shergin

Differential Revision: D16122059

fbshipit-source-id: 12f14fa4a58218242a482c2c3e2149bb6770e8ec
2019-07-09 02:20:55 -07:00
Kevin Gozali 9c56be2721 TM iOS: Introduce OSS-compatible RCTCoreModulesClassProvider()
Summary: To look up TurboModule Class based on its name, this new function `RCTCoreModulesClassProvider()` can be used to find a TurboModule impl in the app. For now this is manually maintained and sync'ed with FB internal version. Only modules that live under React/CoreModules/ should be handled here.

Reviewed By: PeteTheHeat

Differential Revision: D16100291

fbshipit-source-id: 6b7556dec1fa83d1e081c7e8c0fe295187934274
2019-07-04 11:21:55 -07:00
Radosław Pietruszewski 3724810d21 Initial UIKitForMac support (#25427)
Summary:
This PR adds initial support for Project Catalyst a.k.a. UIKitForMac. This is not yet meant for production, but this is enough for RNTester to successfully compile and mostly work :)

Some APIs are not supported on the Mac -- e.g. telephony, and deprecated APIs are removed on Mac ���-- those had to be ifdef'd out via platform checks.

The biggest limitation right now is that I couldn't get Web Socket code to successfully compile, and so there are a lot of temporary platform checks  for that , and the RCTWebSocket.xcodeproj is marked as not supporting UIKitForMac. Again -- temporary, until someone with more knowledge knows how to fix this.

https://github.com/react-native-community/discussions-and-proposals/issues/131

## Changelog

[iOS] [Added] - Fixed compilation for macOS (Project Catalyst) -- not meant for production use yet
Pull Request resolved: https://github.com/facebook/react-native/pull/25427

Test Plan:
- Open RNTester/RNTester.xcodeproj with Xcode 10.2, run it like a normal iOS app -- make sure it compiles and runs correctly (no regression)
- Open the same project with Xcode 11 beta 2 (or higher) on macOS Catalina beta, select "My Mac" as device target, and run -- see that it actually compiles and runs. **Note** there are unfortunately some required steps:
   - change build configuration to Release (because packager doesn't work correctly yet)
   - change development team to yours if Xcode tells you to
   - go to RNTester project → Build phases → Link binary with libraries, and change `platforms` for `libRCTWebSocket.a` to `iOS` (without Mac compatibility). I can't commit that change because it breaks compatibility with earlier Xcode versions

The two extra steps for successful compile will disappear once web socket compilation for Catalyst is fixed

Reviewed By: mmmulani

Differential Revision: D16088263

Pulled By: sammy-SC

fbshipit-source-id: 9c0b932b048e50a8e0f336eaa0612851b1909cae
2019-07-04 10:30:33 -07:00
Oleksandr Melnykov 6c0f73b322 Format Java code in xplat/js/react-native-github
Summary:
This diff formats the Java class files inside xplat/js/react-native-github. Since google-java-format was enabled in D16071401 we want to codemode the existing code so that users don't have to deal with formatter lint noise at diff-time.

```arc f --paths-cmd 'hg files -I "**/*.java"'```

drop-conflicts

Reviewed By: cpojer

Differential Revision: D16071725

fbshipit-source-id: fc6e3852e45742c109f0c5ac4065d64201c74204
2019-07-02 04:16:46 -07:00
Kevin Gozali cde1a99940 TM iOS: Make RCTPlatform a TurboModule
Summary: First attempt to make RCTPlatform module implement the generated specs for TurboModule.

Reviewed By: PeteTheHeat

Differential Revision: D16001262

fbshipit-source-id: 24067c2840b9aa2be224c0c7c82fe7edc98d40d9
2019-07-01 15:20:02 -07:00
Kevin Gozali fde8a4cf93 TM iOS: Set up CocoaPods specs for the TM specs
Summary: This defines various sub specs to support building TurboModules that implement the codegen'ed specs.

Reviewed By: PeteTheHeat

Differential Revision: D16043221

fbshipit-source-id: 27ed532be929c11c8fe648632da8a72061cbc8b0
2019-07-01 15:20:01 -07:00
Héctor Ramos 9ece5bda9b Use CocoaPods-based RNTesterPods for iOS tests (#25416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/25416

Use CocoaPods-based RNTesterPods workspace to run iOS unit tests and integration tests.

This is necessary as new iOS projects now use CocoaPods by default. CocoaPods also powers the new package auto-linking feature.

In order to provide test coverage for this new default configuration, our iOS tests are being migrated to use a CocoaPods-managed RNTester workspace. This applies to both Circle CI, and Sandcastle.

Changelog:

[iOS] [Changed] - Use RNTesterPods for iOS Tests

Reviewed By: fkgozali

Differential Revision: D16052466

fbshipit-source-id: 724b0c51008882d3c06a9074693fe23e74abe86b
2019-06-28 19:18:10 -07:00
radex c1845810a8 Commit IDEWorkspaceChecks.plist [trivial] (#25424)
Summary:
According to Apple documentation: https://developer.apple.com/library/archive/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-DontLinkElementID_7 - IDEWorkspaceChecks.plist ought to be committed to the repository. This is a trivial change and shouldn't have any functional effect other than performance & future resilience

## Changelog

[Internal] [Changed] Commit IDEWorkspaceChecks.plist
Pull Request resolved: https://github.com/facebook/react-native/pull/25424

Test Plan: no functional change

Differential Revision: D16061985

Pulled By: hramos

fbshipit-source-id: 18aea596d86a7759f5af0b4ea5594bb60f3f33a5
2019-06-28 16:43:17 -07:00
Daryl Johnas Sison 64282fd5b9 Revert D15958209: [RN] [RNTesterPods 5] Use CocoaPods-based RNTesterPods for iOS tests
Differential Revision:
D15958209

Original commit changeset: b51fb907812c

fbshipit-source-id: f0c499d8720ac91d5933c560281788e123269478
2019-06-28 00:57:57 -07:00
Héctor Ramos 39ab66793b Use CocoaPods-based RNTesterPods for iOS tests (#25416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/25416

Use CocoaPods-based RNTesterPods workspace to run iOS unit tests and integration tests.

This is necessary as new iOS projects now use CocoaPods by default. CocoaPods also powers the new package auto-linking feature.

In order to provide test coverage for this new default configuration, our iOS tests are being migrated to use a CocoaPods-managed RNTester workspace. This applies to both Circle CI, and Sandcastle.

Reviewed By: fkgozali

Differential Revision: D15958209

fbshipit-source-id: b51fb907812cb2d4d78cce445d39bc253ae5acf8
2019-06-27 23:57:45 -07:00
radex bd29112a69 Add TurboModules (jsireact) to Xcode project (#25031)
Summary:
TurboModules seem to be pretty much done, but there's no easy way to reference them on iOS side if you're linking the React project (the classic, non-CocoaPods way). So I added it.

Also updated RNTester (non-CP based) to compile TM samples

## Changelog

[iOS] [Added] - RCTTurboModule now available from RCTTurboModules.xcodeproj
Pull Request resolved: https://github.com/facebook/react-native/pull/25031

Test Plan:
~~1. Add `#import <jsireact/TurboCxxModule.h>` to a `.h` file on iOS project -- see if it compiles correctly~~

1. Open RNTester/RNTester.xcodeproj, compile, and see if TurboModule sample works

Reviewed By: hramos

Differential Revision: D16019600

Pulled By: fkgozali

fbshipit-source-id: 53c691f035a4e02abd7569840137705f3862be81
2019-06-27 13:02:03 -07:00
David Vacca 9ae7f0c7da Remove definition of viewIsDescendantOf method in RN iOS code
Summary: The viewIsDescendantOf method is not required anymore, deleting code in RN iOS

Reviewed By: JoshuaGross

Differential Revision: D16014665

fbshipit-source-id: fab63973cfa4340f4f8d91d8bce41defc81486e6
2019-06-26 18:47:13 -07:00
Eli White 84330f36de Add ScrollViewExample to RNTester on Android
Summary: This view exists on RNTester for iOS. It appears to not be registered.

Reviewed By: PeteTheHeat

Differential Revision: D16010940

fbshipit-source-id: b30b347b688352f74a596eb2f75bedae70be80c2
2019-06-26 16:19:28 -07:00
Héctor Ramos cf5addc2f5 Move Pods to react-native-github
Summary: Now that the Pods/ directory is excluded by ShipIt from GitHub, we can move the Pods/ directory into react-native-github.

Reviewed By: fkgozali

Differential Revision: D15944730

fbshipit-source-id: b8165abbb4e6fef5ad4311da3885187b84ad1b20
2019-06-26 10:05:37 -07:00
Janic Duplessis 690e85db04 Use CALayers to draw text (#24387)
Summary:
The current technique we use to draw text uses linear memory, which means that when text is too long the UIView layer is unable to draw it. This causes the issue described [here](https://github.com/facebook/react-native/issues/19453). On an iOS simulator the bug happens at around 500 lines which is quite annoying. It can also happen on a real device but requires a lot more text.

To be more specific the amount of text doesn't actually matter, it is the size of the UIView that we use to draw the text. When we use `[drawRect:]` the view creates a bitmap to send to the gpu to render, if that bitmap is too big it cannot render.

To fix this we can use `CATiledLayer` which will split drawing into smaller parts, that gets executed when the content is about to be visible. This drawing is also async which means the text can seem to appear during scroll. See https://developer.apple.com/documentation/quartzcore/calayer?language=objc.

`CATiledLayer` also adds some overhead that we don't want when rendering small amount of text. To fix this we can use either a regular `CALayer` or a `CATiledLayer` depending on the size of the view containing the text. I picked 1024 as the threshold which is about 1 screen and a half, and is still smaller than the height needed for the bug to occur when using a regular `CALayer` on a iOS simulator.

Also found this which addresses the problem in a similar manner and took some inspiration from the code linked there https://github.com/GitHawkApp/StyledTextKit/issues/14#issuecomment-395234885

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

## Changelog

[iOS] [Fixed] - Use CALayers to draw text, fixes rendering for long text
Pull Request resolved: https://github.com/facebook/react-native/pull/24387

Test Plan:
- Added the example I was using to verify the fix to RNTester.
- Made sure all other examples are still rendering properly.
- Tested text selection

Reviewed By: shergin

Differential Revision: D15918277

Pulled By: sammy-SC

fbshipit-source-id: c45409a8413e6e3ad272be39ba527a4e8d349e28
2019-06-24 02:59:31 -07:00
Dulmandakh 3915c0fa61 custom fontWeight numeric values for Text on Android (#25341)
Summary:
I found that on Android we only support 2 fontWeight options, either **normal** or **bold**, even developer can set any numeric value. But iOS supports all possible numeric values. This PR tries to add support for all possible numeric values on Android, even if it's supported only on Android P(28) and above.

This change might break texts where fontWeight use improperly, because this PR removes conversion of values above 500 to BOLD and below 500 to normal.

FYI, also moved **mCustomTypefaceCache** usage up because it was working after unnecessary mFontCache usage.

## Changelog

[Android] [Changed] - add custom font weight support to Text component on Android, only on P(API 28) and above versions.
Pull Request resolved: https://github.com/facebook/react-native/pull/25341

Test Plan: RNTester app's Text examples will show Rubik Regular, Rubik Light, Rubik Bold, Rubik Medium and Rubik Medium Italic texts in corresponding font family, style and weights.

Differential Revision: D15956350

Pulled By: mdvacca

fbshipit-source-id: 61079d953c65fb34ab4497d44c22317912a5a616
2019-06-21 22:58:32 -07:00
Oleksandr Melnykov a15eecf6bd Back out "[RN][Android] Release underlying resources when JS instance is GC'ed on Android"
Summary:
Since Ads Manager for Android is crashing when a user tries to log in, I'm reverting D15826082 for now. Will investigate the reason of the crash later.

Crashlog: P67222724

Reviewed By: cpojer

Differential Revision: D15939152

fbshipit-source-id: bc1276e6057418821e1ebd90203bea586943b633
2019-06-21 05:28:43 -07:00
Janic Duplessis 1fb4b6caa0 Native Animated - Support events using RCT{Direct|Bubbling}EventBlock on iOS (#25317)
Summary:
Reland https://github.com/facebook/react-native/issues/15611 and added the gcc warning that was different from fb internal config. The original PR missed the static keyword for the `RCTNormalizeAnimatedEventName` function which triggered the gcc warning internally but not with the OSS xcode config.

When calling a prop of type `RCTDirectEventBlock` or `RCTBubblingEventBlock` it uses a completely different code path than events using `[RCTEventDispatcher sendEvent:]` and those were not dispatched to the `RCTEventDispatcherListener`s. We also do some event name normalization which caused issues between the JS and native event names. To fix that I simply remove the parts we normalize from the event key.

## Changelog:

[iOS] [Fixed] - Support events using RCT{Direct|Bubbling}EventBlock
Pull Request resolved: https://github.com/facebook/react-native/pull/25317

Test Plan: Added a Slider (it uses RCTBubblingEventBlock for its onValueChange event) that can control a native animated value in RNTester to reproduce the bug and made sure this diff fixes it.

Differential Revision: D15938856

Pulled By: cpojer

fbshipit-source-id: 7e7a3459e2a2e8b1254a2f1ec8153a159ea73eed
2019-06-21 03:05:59 -07:00
Oleksandr Melnykov 3a8b988cb2 Release underlying resources when JS instance is GC'ed on Android
Summary:
[Android] [Added] - Release underlying resources when JS instance is GC'ed on Android

D15279651 introduced a crash for Oculus Twilight on Android (T45199437), so it was reverted by D15611385.

This diff fixes the crash and re-applies D15279651. The problem was that ProGuard renamed BlobModule.remove() to BlobModule.release(), but the C++ code in `BlobCollector.cpp` still expected the old name. I confirmed this by looking at the Extracted Symbols file for the build which introduces the crash (https://fburl.com/mobile/ud40od3i):

```
com.facebook.react.modules.blob.BlobModule -> com.facebook.react.modules.blob.BlobModule:
...
8190:8193:void remove(java.lang.String):190:193 -> release
...
```

See the full log file here: https://fburl.com/pn02bwkb.

The solution is to annotate the method with `DoNotStrip` so that ProGuard doesn't rename it.

Reviewed By: mdvacca, cpojer

Differential Revision: D15826082

fbshipit-source-id: f7470d394666cd34c1acae5c6ffaecc84d5ca5a3
2019-06-20 02:49:19 -07:00
Anton Domashnev 0f03086e72 Revert D15896806: [react-native][PR] Native Animated - Support events using RCT{Direct|Bubbling}EventBlock on iOS
Differential Revision:
D15896806

Original commit changeset: c0ae463f4c3f

fbshipit-source-id: be534e8abe5fa0d7afb4f05012f32db00774fc65
2019-06-19 02:57:44 -07:00
Janic Duplessis 083f835c9f Native Animated - Support events using RCT{Direct|Bubbling}EventBlock on iOS (#15611)
Summary:
When calling a prop of type `RCTDirectEventBlock` or `RCTBubblingEventBlock` it uses a completely different code path than events using `[RCTEventDispatcher sendEvent:]` and those were not dispatched to the `RCTEventDispatcherListener`s. We also do some event name normalization which caused issues between the JS and native event names. To fix that I simply remove the parts we normalize from the event key.

## Changelog:

[iOS] [Fixed] - Support events using RCT{Direct|Bubbling}EventBlock
Pull Request resolved: https://github.com/facebook/react-native/pull/15611

Test Plan: Added a Slider (it used RCTBubblingEventBlock for it's onValueChange event) that can control a native animated value in RNTester to reproduce the bug and made sure this diff fixes it.

Differential Revision: D15896806

Pulled By: cpojer

fbshipit-source-id: c0ae463f4c3f890062238575e813ed7ab3b7a7e6
2019-06-19 01:42:54 -07:00
Mehdi Mulani 46bdb4161c Delete fishhook
Summary: Fishhook was used to try to hide the log messages from RCTReconnectingWebSocket but that doesn't really work anymore. Deleting it now to unblock people trying to build for iOS 13.

Reviewed By: cpojer

Differential Revision: D15779390

fbshipit-source-id: ef18575d5d92ac374e189b1267dee3a9befc3551
2019-06-12 06:19:32 -07:00
Christoph Nakazawa f8a400a53f Move ViewPagerAndroid JS code to FB Internal
Summary:
This module is being removed from React Native via Lean Core. This diff moves all the related JS files to FB internal.

Note: I removed two references to previously removed modules from some files in this diff. I hope you don't mind.

Reviewed By: TheSavior

Differential Revision: D15714919

fbshipit-source-id: 88ea406396b31f5c255e06d9c92b67127c81db4a
2019-06-11 00:29:27 -07:00
Mikael Sand bdc530b9bb Fix connection of animated nodes and scroll offset with useNativeDriver. (#24177)
Summary:
Add example showing regression before this fix is applied.

https://github.com/facebook/react-native/pull/18187 Was found to introduce a regression in some internal facebook code-base end to end test which couldn't be shared. I was able to create a reproducible demo of a regression I found, and made a fix for it. Hopefully this will fix the internal test, such that the pr can stay merged.

## Changelog

[GENERAL] [Fixed] - Fix connection of animated nodes and scroll offset with useNativeDriver.
Pull Request resolved: https://github.com/facebook/react-native/pull/24177

Reviewed By: rickhanlonii

Differential Revision: D14845617

Pulled By: cpojer

fbshipit-source-id: 1f121dbe773b0cde2adf1ee5a8c3c0266034e50d
2019-06-06 04:52:19 -07:00
Kody Greenbaum 7cf939b0ad Back out "[react-native][PR] [Blob] Release underlying resources when JS instance is GC'ed on Android"
Summary: Testing if reverting this fixes the android instacrash. Original commit changeset: 2bbdc4bbcbea

Reviewed By: cpojer

Differential Revision: D15611385

fbshipit-source-id: 396fc0698e1056c93dbb154f95c8cc13924d5495
2019-06-05 01:49:54 -07:00
spdr admin 93dc403e1b Fix RNTest TVOS target (#25110)
Summary:
I noticed that the RNTester-tvOS target is not compilable when I wanted to test the TVOS capacity of React Native.

More specifically, the changes included in this PR are:
### RNTester-tvOS target
1. Add `AppDelegate.mm` to the target.
2. Add `.m` files under `turbomodule` to the target.
3. Add the following directories to **header search path**.
```
$(SRCROOT)/../third-party/boost_1_63_0
$(SRCROOT)/../third-party/folly-2018.10.22.00
$(SRCROOT)/../third-party/glog-0.3.5/src
```
4. Add `RN_BUNDLE_PREFIX` to the scheme argument.
5. Add `RN_BUNDLE_PREFIX` entry to the plist file.

### React-tvOS target
1. Add `RCTCxxBridgeDelegate.h` and `JSCExecutorFactory.h` to the **Copy headers**.

## Changelog

[iOS] [Fixed] - Fixed the issue that the RNTester-tvOS is not compilable.
Pull Request resolved: https://github.com/facebook/react-native/pull/25110

Differential Revision: D15602450

Pulled By: cpojer

fbshipit-source-id: e7eda18c8193b7d88355feafa69043ffef4a8edb
2019-06-03 07:35:40 -07:00
Janic Duplessis a4f7e17a4f Release underlying resources when JS instance is GC'ed on Android (#24767)
Summary:
Android followup for #24745. This adds a jsi object that removes blobs when it is gc'ed. We don't have many modules with native code on Android so I've added the native code directly in the blob package as a separate .so. I used a similar structure as the turbomodule package.

## Changelog

[Android] [Fixed] - [Blob] Release underlying resources when JS instance is GC'ed on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/24767

Differential Revision: D15279651

Pulled By: cpojer

fbshipit-source-id: 2bbdc4bbcbeae8945588ac5e3e895c49e6ac9e1a
2019-05-31 03:55:27 -07:00
Tom Sanderson 7fd08e1461 add spec for PlatformConstants (#24928)
Summary:
part of #24875.

## Changelog

[General] [Added] - add TM spec for PlatformConstants
Pull Request resolved: https://github.com/facebook/react-native/pull/24928

Reviewed By: RSNara

Differential Revision: D15551340

Pulled By: fkgozali

fbshipit-source-id: 9de15ff4cfe717f963332868bd873d5147a37506
2019-05-30 14:29:42 -07:00
Sam Goldman 87b31bccdf @allow-large-files Deploy Flow v0.99.0 to xplat/js
Reviewed By: dsainati1

Differential Revision: D15541620

fbshipit-source-id: e19795e13d47dca58c5603b308b7cd60ba67ef86
2019-05-29 18:11:43 -07:00
Emily Janzer 96a5001024 Add spec for DeviceInfo module
Summary: Adding flow types for DeviceInfo module and migrating our codebase over to using `DeviceInfo.getConstants()`

Reviewed By: fkgozali

Differential Revision: D14645744

fbshipit-source-id: e30a060c6dc92938cd1420ba11a1d837c79d1e32
2019-05-29 16:37:15 -07:00
AndreiCalazans 3945f10561 - Update folder structure of RNTester's JS directory. (#25013)
Summary:
Changes RNTester, first attempt in the direction of improving the RNTester overall. Related ticket: #24647

Changed the `js` directory of the RNTester to have the following structure:
```
- js
    - assets
    - components
    - examples
    - types
    - utils
```
* **assets**
_Any images, gifs, and media content_

* **components**
_All shared components_

* **examples**
_Example View/Components to be rendered by the App_

 * **types**
_Shared flow types_

 * **utils**
_Shared utilities_

## Changelog

[General] [Changed] - Update folder structure of RNTester's JS directory.
Pull Request resolved: https://github.com/facebook/react-native/pull/25013

Differential Revision: D15515773

Pulled By: cpojer

fbshipit-source-id: 0e4b6386127f338dca0ffe8c237073be53a9e221
2019-05-28 08:39:18 -07:00
zhongwuzw 141a3041e0 Fixes wrong headers import (#25002)
Summary:
Issue imported from e1102b43ff for Android TM support.
Fixes wrong headers import in iOS.

## Changelog

[iOS] [Fixed] - [TM] Fixes wrong headers import
Pull Request resolved: https://github.com/facebook/react-native/pull/25002

Differential Revision: D15501594

Pulled By: cpojer

fbshipit-source-id: 45ea2986963ff4937c473464f0befc1f5bcfe115
2019-05-24 14:06:52 -07:00
Christoph Nakazawa 3f04cfecda Move CameraRoll JS to FB internal
Summary: Moves relevant JS files to fb internal, removes stuff we don't need in the RN repo any more. Android and iOS will happen in a follow-up.

Reviewed By: rickhanlonii

Differential Revision: D15468419

fbshipit-source-id: 39fffc22f87534e557788e398bbae575043353b6
2019-05-23 07:06:21 -07:00
Marc Mulcahy 099be9b356 New Accessibility states API. (#24608)
Summary:
As currently defined, accessibilityStates is an array of strings, which represents the state of an object. The array of strings notion doesn't well encapsulate how various states are related, nor enforce any level of correctness.

This PR converts accessibilityStates to an object with a specific definition. So, rather than:

<View
...
accessibilityStates={['unchecked']}>

We have:

<View
accessibilityStates={{'checked': false}}>

And specifically define the checked state to either take a boolean or the "mixed" string (to represent mixed checkboxes).

We feel this API is easier to understand an implement, and provides better semantic definition of the states themselves, and how states are related to one another.

## Changelog

[general] [change] - Convert accessibilityStates to an object instead of an array of strings.
Pull Request resolved: https://github.com/facebook/react-native/pull/24608

Differential Revision: D15467980

Pulled By: cpojer

fbshipit-source-id: f0414c0ef6add3f10f7f551d323d82d978754278
2019-05-23 05:37:33 -07:00
Eric Lewis 82771f4c62 Remove ToolbarAndroid (#24999)
Summary:
This replaces ToolbarAndroid with a cleaner, but very similar design and paves the path for removing ToolbarAndroid from core.

## Changelog

[Internal] [Removed] - ToolbarAndroid removed from RNTester
Pull Request resolved: https://github.com/facebook/react-native/pull/24999

Differential Revision: D15468053

Pulled By: cpojer

fbshipit-source-id: 21a58558b9ec371689bc994c2d888b81cff01126
2019-05-23 03:39:52 -07:00
James Ide a7a7970e54 Replace more Haste imports with path-based imports (#25001)
Summary:
This is another step in moving RN towards standard path-based requires, updating more code to use path-based requires. See the umbrella issue at https://github.com/facebook/react-native/issues/24316 for more detail.

## Changelog

[General] [Changed] - Replace more Haste imports with path-based imports
Pull Request resolved: https://github.com/facebook/react-native/pull/25001

Differential Revision: D15467829

Pulled By: cpojer

fbshipit-source-id: 58c364bb4c1c757689907d5ed0d0f3fac0e22f3f
2019-05-23 00:51:31 -07:00