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

17559 Коммитов

Автор SHA1 Сообщение Дата
Valentin Shergin 2ec8ec050f Fabric: Removing `SharedAccessibilityProps` and some code style changes
Summary: Trivial.

Reviewed By: sammy-SC

Differential Revision: D16139594

fbshipit-source-id: 300b7a2cd24c56dc5b9dee4a0248dda1b388589e
2019-07-10 19:26:50 -07:00
Blair Vanderhoof 45b0907f61 Fix ScrollView context warning in Modal.js
Summary: This fixes the following warning from appearing when you have a FlatList render a Modal where the content of the Modal also contains a FlatList: https://fburl.com/p953k985.  Spencer addressed an issue similar to this in D7863625, but we still get a yellow box due to the fact that `scrollContext` still exists, but `this.context.virtualizedList` is null from this line in Modal.js https://fburl.com/nqc261a1.

Reviewed By: cpojer

Differential Revision: D16160666

fbshipit-source-id: ba222d3eef234f4c8c4c2bddbc71bec27df81e0a
2019-07-10 12:43:13 -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
Valentin Shergin 27009c1031 Fabric: More precondition asserts in ConcreteShadowNode
Summary: That should help to fail early in situations when we lose critical class data members.

Reviewed By: sammy-SC

Differential Revision: D16179539

fbshipit-source-id: da73b81568c2f3657b9bc2bd1cc7ee6624e75626
2019-07-10 08:48:38 -07:00
Valentin Shergin e97a2a8535 Fabric: Proper node construction in ComponentDescriptorRegistry
Summary: This is a very similar mechanism that we use in UIManager and it should be eventually unified.

Reviewed By: sammy-SC

Differential Revision: D16179524

fbshipit-source-id: 7c8c45b7581ac4a1db3a773d62004ff368f18321
2019-07-10 08:48:38 -07:00
Sidharth Guglani 12ca9830c8 add baseline start and baseline end events
Summary: Adds Baseline start and end events to be handled later for instrumentation

Reviewed By: davidaurelio

Differential Revision: D16048790

fbshipit-source-id: 8409dbb633168753a7bf8fab20bc6551d113ddd6
2019-07-10 08:48:37 -07:00
Sidharth Guglani fdf3873281 move YGMarkerLayout to event based system
Summary: Using layoutPassStart and LayoutPassEnd events instead of YGMarkerLayout for instrumentation

Reviewed By: davidaurelio

Differential Revision: D16048789

fbshipit-source-id: 041a35bc2cb1b7281ca83cf9d35041b4011cfeb9
2019-07-10 08:48:37 -07:00
Valentin Shergin fda3ca1311 Fabric: `contentInsetAdjustmentBehavior=never` for ScrollView
Summary: We have exactly same code in classic RCTScrollView component. We need that to not interfere with iOS automagical behaviours.

Reviewed By: sammy-SC

Differential Revision: D16160846

fbshipit-source-id: 5b5affcc64abe5e3204f619216412f9da5b03b78
2019-07-10 08:42:44 -07:00
Christoph Nakazawa ba03e4e7bb Use babel-core 7.5+ in new RN Apps
Summary:
We are running into some problems with the spread operator. The solution is to ask for a newer minimum babel version.

See https://github.com/babel/babel/issues/10179

Note: this doesn't actually change behavior. When creating a new app a new babel version will already be used. This simply ensures that the minimum version fulfills the requirements.

Reviewed By: axe-fb

Differential Revision: D16181111

fbshipit-source-id: f5207318b3a7bd9f092c0e64a8065d0f713012da
2019-07-10 07:12:58 -07:00
Michał Osadnik 0b5aa39671 Minor fixes in Flow parser
Summary:
This diff includes minor codestyle changes.
All these fixes was discussed with Rick.

Reviewed By: rickhanlonii

Differential Revision: D16169332

fbshipit-source-id: e561e2f2b116b6fdf8434c3dfc20c3e610d7ecad
2019-07-10 06:47:18 -07:00
Michał Osadnik fb7b2d3533 Change returning value of DirectEventHandler and BubblingEventHandler to void
Summary:
returning type of Bubbling and Direct Event should be always void of Promise (if async). Other situations shouldn't be permitted.
Reformated all cases when it the function wasn't void.

Reviewed By: rickhanlonii

Differential Revision: D16165962

fbshipit-source-id: 7c1377c3ed4bd54a431a13e5bcda4f7ec0adf4dc
2019-07-10 05:40:20 -07:00
Oleksandr Melnykov 8e4b2e7448 Use try-with-resource to prevent output stream to be leaked in BlobProvider
Summary: This diff fixes a potential memory leak which can occur if an exception is thrown inside the try block and `outputStream.close()` is not called. By wrapping `outputStream.write(data)` inside try-with-resource we guarantee that outputStream will be closed regardless of whether the try statement completes normally or abruptly.

Reviewed By: sammy-SC

Differential Revision: D16148850

fbshipit-source-id: c5c0a78b36375857f6e717bb581e8686a4a94bb9
2019-07-10 02:34:52 -07:00
Christoph Nakazawa ddd7775b38 Back out "[react-native][PR] Set collapse property before starting an animation that uses the native driver"
Summary:
Original commit changeset: 1d790fbddc31

This fixes an issue reported in AMA: t46804879

Reviewed By: mmmulani

Differential Revision: D16163296

fbshipit-source-id: e487ef079b2146704b0d16dbc0471504e4066f9c
2019-07-10 02:28:40 -07:00
Cory Reed a0acbd638b Export Modal’s Flow types (#25554)
Summary:
I'd like to use `Modal`’s flow types in my application to make a reusable component.

## Changelog

[JavaScript] [Added] - Exported `Modal`’s types
Pull Request resolved: https://github.com/facebook/react-native/pull/25554

Test Plan: n/a

Differential Revision: D16180231

Pulled By: cpojer

fbshipit-source-id: 9cfd5163a187954783102bfe4d9b4d1dbc8c6e6d
2019-07-10 02:22:08 -07:00
Michał Osadnik dc52f8c2e6 Force property to be optional if value has WithDefault
Summary: It's pointless to handle non optional key if value has withDefaul so I'm adding a rule into parser preventing from such cases

Reviewed By: lunaleaps

Differential Revision: D16166709

fbshipit-source-id: 38cef522b217917a3a4886d857720932f2ebb475
2019-07-09 14:44:43 -07:00
thecodrr a162554f5d Remove unnecessary flag when running JS server (#25517)
Summary:
This removes the `--projectRoot` flag in `launchPackager.bat` as it was removed,  fixing [this bundler not opening issue on cli repo](https://github.com/react-native-community/cli/issues/484) when `yarn react-native run-android` is run.

This is Windows related only so should be only tested on Windows.

## Changelog

[Internal] [Fixed] - Fixed Metro Bundler not opening when running `yarn react-native run-android`
Pull Request resolved: https://github.com/facebook/react-native/pull/25517

Test Plan:
1. Create a new repo using `react-native init`
2. Edit the `launchPackager.bat` file
3. Run `yarn react-native run-android`

Differential Revision: D16162108

Pulled By: cpojer

fbshipit-source-id: c12d9853ad49f00d56b9a8254a5b2c40a358cb2e
2019-07-09 03:53:26 -07:00
Michał Pierzchała 5b448eca4f - Bump CLI to ^2.2.0 (#25555)
Summary:
We've released a bunch of versions since the initial 2.0 release, with a lot of bug fixes (especially for Windows) and some features added.

Changes since 2.0: https://github.com/react-native-community/cli/compare/v2.0.1...v2.2.0
Latest release: https://github.com/react-native-community/cli/releases/tag/v2.2.0

## Changelog

[Internal] [Changed] - Bump CLI to ^2.2.0
Pull Request resolved: https://github.com/facebook/react-native/pull/25555

Test Plan: None

Differential Revision: D16161897

Pulled By: cpojer

fbshipit-source-id: 542c4bffa7c6b0537f1c7135f43c98dd3db358e4
2019-07-09 03:42:19 -07:00
Christoph Nakazawa a622421634 Add `registerEntryPoint` to HmrServer
Summary: This diff changes a few things around so that a diff coming on top of this stack will be smaller. The aim of this change is to add a method `registerEntryPoint` which will allow a client to subscribe to updates for multiple bundles.

Reviewed By: gaearon

Differential Revision: D16131963

fbshipit-source-id: d460d6647b15a711021c7a3a51f52486a1aea535
2019-07-09 03:21:25 -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
Valentin Shergin d656878e0d Fabric: Removing AccessibleShadowNode
Summary: Accessibility is essential but seems we don't have any use of AccessibleShadowNode in Fabric.

Reviewed By: sammy-SC

Differential Revision: D16139595

fbshipit-source-id: a6aec6d22c4a6050d7ee5e6b21ef4ad04d80ffce
2019-07-08 21:10:48 -07:00
Valentin Shergin 2111f205ae Fabric: Removing `SharedYogaStylableProps` and small codestyle changes
Summary: Trivial. We don't use it.

Reviewed By: sammy-SC

Differential Revision: D16139556

fbshipit-source-id: bac282c1aa228c10d27ebd636cf71fcc33b322e9
2019-07-08 21:10:47 -07:00
Ashok Menon 424f93022d Use iosfwd instead of iostream
Summary:
The instrumentation header only needs the forward declarations for ostream, so
we can use just include `iosfwd`, as suggested by Riley in an earlier diff.

Reviewed By: kodafb

Differential Revision: D16152451

fbshipit-source-id: 2afbc40e623b180dfc5917fc8093ab15bf647968
2019-07-08 14:56:44 -07:00
Moti Zilberman 1a2937151b Make writable arrays and maps only shallowly writable
Summary:
@public

The `WritableArray` and `WritableMap` interfaces currently require that nested arrays and maps also be writable. Nothing in our code actually relies on this, so we can relax this restriction and get useful properties.

For instance, it is now possible to construct a `JavaOnlyMap` (or array) that reuses `ReadableMap` and `ReadableArray` values by reference ( = structural sharing) instead of forcing a deep copy.

Reviewed By: kathryngray

Differential Revision: D16132580

fbshipit-source-id: 9f41189ebea2a82e775a7a4da8c357a5ce9c5b9d
2019-07-08 13:25:02 -07:00
Moti Zilberman e0ae655787 Remove JsonWriter, support bridge types in JsonWriterHelper
Summary:
@public

* Removes `JsonWriter`; it's apparently a buggy fork of [`android.util.JsonWriter`](https://developer.android.com/reference/android/util/JsonWriter) which has existed since API level 11. Our version doesn't insert commas before objects or arrays within an array. Instead of fixing it, we can just use the Android one.
* Extends `JsonWriterHelper` to support serialising `ReadableMap`, `ReadableArray` and `Dynamic` values into a `JsonWriter`.

Reviewed By: kathryngray

Differential Revision: D16131713

fbshipit-source-id: d258af42b669f10218cae8b086e7adc3226d16c0
2019-07-08 13:25:01 -07:00
Michał Osadnik a269c1f6c2 Add support for callback
Summary: This part of writing codegen was straightforward. I've added check for 'FunctionTypeAnnotation' and then reuse exisiting methods' parser for generating schema for callback.

Reviewed By: TheSavior

Differential Revision: D16131213

fbshipit-source-id: 2ec0e241f2174dee3a93857563db0626013d004e
2019-07-08 09:40:21 -07:00
Michał Osadnik a7664dbaf1 Add support for nullable params
Summary:
I'm not very confident with this part, but actually in existing codegen we wrap param into another object marked as `NullableTypeAnnotion`. It makes logic a little  more complicated. Also it allows for multiple `?` before type which is useless in code generation as well as nullable types inside arrays which also does not have impact on a final code generation.
I suggest adding `nullable` field into param which covers all existing cases (and probably all cases needed).

Reviewed By: TheSavior

Differential Revision: D16121609

fbshipit-source-id: 6e086d4d26bbd0aab3015ec7ecae106ebbaa5a2c
2019-07-08 09:40:21 -07:00
Michał Osadnik 233c64c675 Add support for complex objects
Summary: Add support for Object reusing mostly the code for arrays

Reviewed By: TheSavior

Differential Revision: D16122314

fbshipit-source-id: c1b201c659e6fdc98bed553fb16280ed5ce9e647
2019-07-08 09:40:20 -07:00
Michał Osadnik 702489caa8 Add support for basic objects
Summary: This implementation is a bit different than current one since previously object annotation was always wrapped into `GenericTypeAnnotation` object which is not needed in every of current use cases.

Reviewed By: TheSavior

Differential Revision: D16121727

fbshipit-source-id: e0de1852e13c66f459efd7a3bcde449e412d8b95
2019-07-08 09:40:20 -07:00
Michał Osadnik b848af3b08 Add support for optional methods
Summary:
This diff adds an optional property.

#Facebook
Following this doc: https://our.intern.facebook.com/intern/wiki/React_Native/rctexport-interface-support/?vitals_event=wiki_click_navigation_link
I suppose it's vital to support this property as well. However i don't know if it's really useful, so thus I made a separated diff for it.

Reviewed By: TheSavior

Differential Revision: D16121408

fbshipit-source-id: 15491575e999ee4fcddfd176f52d927789458061
2019-07-08 06:24:19 -07:00
Michał Osadnik 929c5d7c10 Add support for promises
Summary:
This diff add support for promises. It wraps promise's type into a special type annotation.

#Facebook
Currently the shape of promises parsing is:

```
{
  name: 'getValueWithPromise',
  optional: false,
  typeAnnotation: {
    type: 'FunctionTypeAnnotation',
    params: [
      {
        name: 'error',
        typeAnnotation: {
          type: 'BooleanTypeAnnotation',
        },
      },
    ],
    returnTypeAnnotation: {
      type: 'GenericTypeAnnotation',
      typeId: {
        hasteModuleName: 'NativeSampleTurboModule',
        name: 'Promise',
      },
      typeParameters: [
        {
          type: 'StringTypeAnnotation',
        },
      ],
    },
    returnTypeNameOverride: null,
  },
  rawTypeAnnotation: '(error: boolean) => Promise<string>',
  documentation: null,
};

```

which is a bit unclear for me. I suggest sth way more easier:

```
{
  "modules": {
    "SampleTurboModule": {
      "nativeModules": {
        "SampleTurboModule": {
          "properties": [
            {
              "name": "getValueWithPromise",
              "typeAnnotation": {
                "type": "FunctionTypeAnnotation",
                "returnTypeAnnotation": {
                  "type": "PromiseTypeAnnotation",
                  "resolvingType": {
                    "type": "StringTypeAnnotation"
                  }
                },
                "params": [
                  {
                    "name": "error",
                    "typeAnnotation": {
                      "type": "BooleanTypeAnnotation"
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    }
  }
}
```

However, I'd be happy to see some feedback / other solutions as well!

Reviewed By: TheSavior

Differential Revision: D16130941

fbshipit-source-id: c7dfd3f260b7c3028ce0e6208e96c62bd099ca7b
2019-07-08 06:13:05 -07:00
Michał Osadnik 690bcdf45e Add suport for array as a param and returning value
Summary: Now `Array<T>` is supported as a returning values or a param of function's definition. Also, Array of Array is allowed.

Reviewed By: TheSavior

Differential Revision: D16121246

fbshipit-source-id: 59c484120c4025a152e3ba8044eecf11dbbea1f7
2019-07-08 04:54:04 -07:00
Samuel Susla faf9130560 fabric: Migrate ModalHostView
Summary: Implements `ModalHostView` in Fabric.

Reviewed By: shergin

Differential Revision: D16090949

fbshipit-source-id: fe2c87063863e7f3c6c8dcc934a2cdb0b1aedaac
2019-07-08 03:56:31 -07:00
Samuel Susla db17e969fa codegen: fix array of enums generation
Summary: While working on D16090949 I discovered that the code being generated for an array of enums was not correctly converted to mask. The type that holds the mask can't be enum class but other container type, I used `uint32_t`.

Reviewed By: shergin

Differential Revision: D16109338

fbshipit-source-id: 237077adaafe631eda973bc76cefa49035bbcd66
2019-07-08 03:56:31 -07:00
Michał Osadnik 59b8ee86c8 Prepare generic mechanism for extracting types from external type definitions
Summary: This diff a adds generic mechansm for extracting types from types' difinitions defined in other part of the file.

Reviewed By: TheSavior

Differential Revision: D16131742

fbshipit-source-id: 006b6980fa9f6a064d5bb8734ba2740b802b6989
2019-07-08 03:23:20 -07:00
Valentin Shergin 06ce568155 Fabric: Use state in Paragraph component
Summary:
All props to Eric Lewis! cc ericlewis

This revert of revert of land of changes originally published in #24873 (with some slight fixes). The change removes usage of LocalData from the `<Text>` component.

After this change we only have ---one (maybe two)--- three components left using LocalData.

Reviewed By: mdvacca

Differential Revision: D15962376

fbshipit-source-id: 19f41109ce9d71ce30d618a45eb2b547a11f29a2
2019-07-07 22:46:21 -07:00
Valentin Shergin 71f0079809 Fabric: New extendend signature of `ViewManager::updateState()`
Summary: Now, the signature of `updateState` method practically copies the signature of `updateLocalData`. We need that to support all features that `updateLocalData` does support now (to migrate from it).

Reviewed By: mdvacca

Differential Revision: D15962377

fbshipit-source-id: 61e0af6c191e0c6a358c5859613e9c512f91d29a
2019-07-07 22:46:20 -07:00
Valentin Shergin 142af1751b Fabric: Unconditional state management in Binding::schedulerDidFinishTransaction
Summary: Originally, moving the mount instruction generation under the `if` was a perf optimization but now, since we converge `LocalData` and `State`, this is no longer possible (because we need to treat State as LocalData in some cases).

Reviewed By: mdvacca

Differential Revision: D15962378

fbshipit-source-id: 37f9fadb72ac53450c2d499452610d9835f2964d
2019-07-07 22:46:20 -07:00
Dan Abramov abc663dd5a Add a shim for HMRClient in prod bundles
Summary:
Running a PROD JS bundle with a DEV binary used to redbox with Fast Refresh on. The error said "HMRClient is not a registered callable module".

This isn't a new issue: https://www.google.com/search?q=%22hmrclient%20is%20not%20a%20registered%22. However, now it happens every time because `setup()` is now called unconditionally in a DEV native build.

Because a combination of DEV binary + PROD JS is technically possible, I'm adding a tiny shim that will make it a no-op instead of crashing. It will also explain what's wrong if you *intentionally* try to turn on Fast Refresh.

Reviewed By: sahrens

Differential Revision: D16145378

fbshipit-source-id: 0b9c0a6f30c02ca7f4a0133048450bdde3576ad2
2019-07-07 13:25:10 -07:00
Ram N 8e3ccaadf2 Re-add Start/Stop Sampling profiler in Dev Menu for Android
Reviewed By: yinghuitan

Differential Revision: D16069122

fbshipit-source-id: 179ba7ec709731f4b861dc4367df357e93e025f2
2019-07-06 11:23:58 -07:00
Michał Osadnik e8c5495961 Add support for primitive returning type
Summary:
In this I add support for primitive types as return
- String
- Number
- Boolean
- Any
- Void

Reviewed By: TheSavior

Differential Revision: D16108273

fbshipit-source-id: 2dbd1d5a852a8cf5baf378a73d860492fe2f87cb
2019-07-05 13:15:54 -07:00
Michał Osadnik 3a5bdc17bb Add support for primitive types parsing for params
Summary:
In this diff I add handling basic primitives:
- Bool
- Number
- String

as params basing on prev schema.

Also, added flow types.

Reviewed By: TheSavior

Differential Revision: D16107737

fbshipit-source-id: 82b1534667e5cfe5b91a3306fdb6d0db44cd3a62
2019-07-05 13:15:53 -07:00
Mehdi Mulani 3468af54ce Android support for changing bundle location
Summary: With this, you can load the bundle from another server on the fly. This makes it much easier to hit a named server.

Reviewed By: makovkastar

Differential Revision: D16076020

fbshipit-source-id: 46d78ccd55b9b11481628f4585030494f9282003
2019-07-05 08:44:25 -07:00
Bruno Lemos 10d80b8a78 Move inline static styles at VirtualizedList to StyleSheet.create (#25501)
Summary:
I know StyleSheet.create doesn’t do anything special on react-native yet but it does on react-native-web and possibly other targets.

This small change is mainly so react-native-web don’t need to keep making this change on their code base when updating the rn version.

## Changelog

[Internal] [Changed] - Move inline static styles at VirtualizedList to StyleSheet.create
Pull Request resolved: https://github.com/facebook/react-native/pull/25501

Test Plan:
It’s basically the same code, just moved.
Also it’s the same change that it’s on react-native-web project: 45f94eb43d/packages/react-native-web/src/vendor/react-native/VirtualizedList/index.js (L1650-L1654)

Differential Revision: D16130700

Pulled By: cpojer

fbshipit-source-id: 20639e2e1a795ff4819c16af15569bf12759a62c
2019-07-05 02:42:12 -07:00
Yike Xue 169beaa7c2 remove duplicate lines in xplat/js/react-native-github/React/React.xcodeproj/project.pbxproj
Summary: D14477611. The duplicat line may cause the test failure in T46242216 : https://fburl.com/9svdqopu

Reviewed By: sammy-SC, cpojer

Differential Revision: D16082601

fbshipit-source-id: fbd4f4b1ffe6b08faff4b65d7fd44faffc611393
2019-07-04 14:36:28 -07:00
Kevin Gozali 6853b9bdfa Fixed iOS Podfile template to add React-CoreModules and its deps
Summary:
With React-CoreModules separated from React-Core, the Podfile needs updating to sync with https://github.com/facebook/react-native/blob/master/scripts/autolink-ios.rb
See fde8a4cf93 for the original change.

Note: the template Podfile should be updated to use the same autolink scripts

This fixes the CI failure like this: https://circleci.com/gh/facebook/react-native/99956

Reviewed By: hramos

Differential Revision: D16114264

fbshipit-source-id: d75dff570310f21eb8fbdf030439532a0abe978d
2019-07-04 11:21:56 -07:00
Kevin Gozali 987e5197f0 TM iOS: autogenerate plugins map based on FB build system
Summary: This adds internal script to automatically sync the plugins definition. For github consumption, the CoreModulesPlugins.* will stay checked in, nothing change.

Reviewed By: RSNara

Differential Revision: D16102352

fbshipit-source-id: 8f74ea9dde046183ae620682fd7e181b4cc95a94
2019-07-04 11:21:56 -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
Kevin Gozali 5275f150b8 Use @generated in header comment so IDE can notify developers
Summary: These files are generated by tool, not for manual edit. So let this marker tell IDEs so.

Reviewed By: hramos, cpojer

Differential Revision: D16097171

fbshipit-source-id: 1f98a4d4e21acca0a7fbd386ff174dd9197c2129
2019-07-04 11:21:55 -07:00
Kevin Gozali 737b784b8c TM iOS: removed CoreModulesAppleHeader BUCK workaround
Summary:
We should be able to just use `header_path_prefix` and normal `glob(["**/*.h"])` patterns, and that should be compatible with the build system.
This also allows `RCTPlatform.mm` to import `"RCTPlatform.h"` directly without any namespace.

Reviewed By: RSNara

Differential Revision: D16096779

fbshipit-source-id: b17b79baf958f1e9a63085a928b64663cb29bbbb
2019-07-04 11:21:55 -07:00