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

622 Коммитов

Автор SHA1 Сообщение Дата
Valentin Shergin d0871d0a9a Clang format for all React Native files
Summary:
Buckle up, this enables clang-format prettifier for all files in React Native opensource repo.

Changelog: [Internal] Clang-format codemod.

Reviewed By: mdvacca

Differential Revision: D20331210

fbshipit-source-id: 8da0f94700be0c35bfd399e0c48f1706de04f5b1
2020-03-08 23:01:17 -07:00
Peter Argany 824e171117 Refactor HotModuleReloadClient setup call from bridge to RCTDevSettings
Summary:
This refactors some logic which sets up HMRClient in JS. The logic should live in RCTDevSettings, so it is shared in bridge/bridgeless mode.

This also means the logic will be compiled out when `RCT_DEV_MENU` is false.

Reviewed By: RSNara

Differential Revision: D19563629

fbshipit-source-id: 5c2553be9fd686a2a178f03bb5eed7a82cbadb1b
2020-02-13 12:27:47 -08:00
Marcus Zarra 30790be1b5 Adding [super initialize] to correct misreporting by MDCD
Summary:
In working to remove dead code from the code base, we identified that a number of classes that subclassed `RCTEventEmitter` were being reported as unused when they are in active use.  That was due to a lack of a `[super initialize]`.  This diff adds the call to super.

Changelog:
[General] [Added] - Call to `super` in `+initialize` of `RCTEventEmitter`

Reviewed By: javache

Differential Revision: D19727783

fbshipit-source-id: 19c6c7f08e7a8b2f764988fdfcd70f92dbf1b74b
2020-02-05 09:26:56 -08:00
Nicolas Charpentier 56dfc86d64 Enable dev keyboard shortcuts on Mac Catalyst (#27479)
Summary:
This enables the dev menu to bo opened from keyboard shortcuts in dev from a Mac Catalyst app.

cc TheSavior andymatuschak radex

## Changelog

[iOS] [Fixed] - Enable dev keyboard shortcuts on Mac Catalyst
Pull Request resolved: https://github.com/facebook/react-native/pull/27479

Test Plan:
It depends on https://github.com/facebook/react-native/issues/27469 (to have working WebSocket in debug).

![image](https://user-images.githubusercontent.com/7189823/70629346-d3a68880-1bf7-11ea-8949-7553157a2f9c.png)

Differential Revision: D19576528

Pulled By: shergin

fbshipit-source-id: 32b4f8424fb7d270640af4bc50dba24f488bef4f
2020-01-26 19:57:18 -08:00
Valentin Shergin 5e6c61e449 Fabric: Fixing incorrect retaining policy for RCTSurfacePreseter (crash in RCTNativeAnimatedModule)
Summary:
This fixing a crash in RCTNativeAnimatedModule caused by accessing an `RCTSurfacePreseter` instance as "Objective-C runtime associated object" which was retained with `OBJC_ASSOCIATION_ASSIGN` policy. The documentation for `OBJC_ASSOCIATION_ASSIGN` says "Specifies a weak reference to the associated object." but it's a lie ( https://stackoverflow.com/questions/16569840/using-objc-setassociatedobject-with-weak-references) ). The policy is actually `ASSIGN` (aka `unsafe-unretained`).
That's why it's crashing.

We change that to `OBJC_ASSOCIATION_RETAIN` to retain the object (which meets the expectation of the interface of the category).

We also should not have over-retaining issues because:
* SurfacePresenter does not retain a Bridge or any object that can retain a Bridge;
* SurfacePresenter is a long-living object, we don't recreate it during bridge reloading or stuff like that.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D19333869

fbshipit-source-id: 1ff03659a880f2742b909c5668c47144719eeee2
2020-01-13 13:36:36 -08:00
Peter Argany 2c40cc714c Make RCTEventEmitter a RCTJSInvokerModule [2/n]
Summary:
Diff 1/N explained how calls to `[_bridge enqueueJSCall:]` can be replaced with `_invokeJS` in a bridgeless world.

This diff replaces RCTEventEmitter's usage of `enqueueJSCall` if the bridge isn't available.

Changelog: [Internal][iOS] Make RCTEventEmitter a RCTJSInvokerModule

Reviewed By: RSNara

Differential Revision: D18941955

fbshipit-source-id: 1b81e46585432e005cff5aa0ab4d151f50ea051b
2019-12-23 13:52:03 -08:00
Kevin Gozali 446705df33 iOS: attach rootTag to the native component instance for easy access
Summary:
Changelog: [Internal]

The main use-case here is to get the rootTag off RCTImageView, for image loading instrumentation. The fact is, each RCTView subclass already has `reactTag` attached today. We already have the `rootTag` when the view is created by the UIManager, so why not just attach it like reactTag? If we don't, looking up the rootTag from the native component is non-trivial and extremely inefficient (have to jump to shadow queue, back to main queue, etc).

Reviewed By: sammy-SC

Differential Revision: D18497002

fbshipit-source-id: 8409e3a1c95e09accedd959592cbf178fab0b2c3
2019-11-16 00:13:48 -08:00
Samuel Susla 620f83aae5 Fix crash when accessing _viewRegistry
Summary:
Changelog: [internal] Fixes fabric specific crash

`_viewRegistry` is not thread safe and accessing it on another thread can cause a crash.
Calling it inside `RCTUnsafeExecuteOnMainQueueSync` shouldn't degrade performance because it is only used as a fallback.

Changelog: [Internal]

Reviewed By: rickhanlonii

Differential Revision: D18421789

fbshipit-source-id: 2adff434afe0a3c19318c95b051ee91ccf6293e5
2019-11-11 03:01:26 -08:00
Ramanpreet Nara 3beb8341fd Make RCTTVNavigationEventEmitter TurboModule-compatible
Summary:
See title.

Changelog:
[iOS][Added] - Make RCTTVNavigationEventEmitter TurboModule-compatible

Reviewed By: shergin

Differential Revision: D18142252

fbshipit-source-id: c633a5a0abd9e980346379921b34219228153348
2019-11-04 16:07:24 -08:00
Ramanpreet Nara 7e5de4e241 Make RedBox TurboModule-compatible
Summary:
See title.

Changelog:
[iOS][Added] - Make RedBox TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D18142255

fbshipit-source-id: 2d130aca93a88ac7c983ce0e4848955ffb0be518
2019-11-04 16:07:23 -08:00
Ramanpreet Nara fe3ae9dce8 Make RCTDevMenu and RCTDevSettings TurboModule-compatible
Summary:
Changelog:
[iOS][Added] - Make RCTDevMenu and RCTDevSettings TurboModule-compatible

Reviewed By: shergin

Differential Revision: D18148890

fbshipit-source-id: bd4f0b2797e299cd963e34fa47044a9e1232efe0
2019-11-04 16:07:23 -08:00
Peter Argany dc3b5ad275 Remove unneeded NSNotification center removeObserver
Summary:
A very common pattern I've seen in RN codebase:

     - (instancetype) init {
        [[NSNotificationCenter defaultCenter] addObserver:self ...]
      }

    - (void) dealloc {
       [[NSNotificationCenter defaultCenter] removeObserver:self ...]
     }

From Apple:

https://developer.apple.com/documentation/foundation/nsnotificationcenter/1413994-removeobserver?language=objc

> If your app targets iOS 9.0 and later or macOS 10.11 and later, you don't need to unregister an observer in its dealloc method.

RN targets iOS9+

Changelog: [Internal][Cleanup] Remove unneeded NSNotification center removeObserver

Reviewed By: shergin

Differential Revision: D18264235

fbshipit-source-id: 684e5f5555cec96b055b13cd83daaeb393f4fac9
2019-11-04 10:19:30 -08:00
Ramanpreet Nara 7233ae4f11 Make RCTAppState TurboModule-compatible
Summary:
See title.

Changelog:
[iOS][Added] - Make RCTAppState TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D18142253

fbshipit-source-id: 5bd8afa6e3ee98f92aac3b2ebdfe63b9f7afc775
2019-11-01 12:06:21 -07:00
Ramanpreet Nara 6481a124da Make RCTKeyboardObserver TurboModule-compatible
Summary:
See title.

Changelog:
[iOS][Added] - Make RCTKeyboardObserver TurboModule-compatible

Reviewed By: shergin

Differential Revision: D18130902

fbshipit-source-id: 79dff2aeede7cb2485d48597a1f80e546c107e7a
2019-11-01 12:06:20 -07:00
Ramanpreet Nara dc12676e3a Make RCTStatusBarManager TurboModule-compatible
Summary:
See title.

Changelog:
[iOS][Added] - Make RCTStatusBarManager TurboModule-compatible

Reviewed By: shergin

Differential Revision: D18130374

fbshipit-source-id: 3ec226bcff17e47ffd9eba05e32c1eb68d6135b2
2019-11-01 12:06:20 -07:00
Peter Argany 2a13f12106 Re-implement reload reason [7/n]
Summary:
This diff adds back RN reload reason, which was removed earlier in the stack. cc/Rick

For callsites which already had a reason, I kept the string exactly the same. For callsites which didn't have a reason, I made up something reasonable.

Changelog: [Internal][Fixed] Re-implemented bridge reload reason text.

Reviewed By: RSNara

Differential Revision: D18074478

fbshipit-source-id: 64a3cd7718674a7ba7228a80e34791ce9f153f9f
2019-10-30 12:23:25 -07:00
Peter Argany d98cd7d3a1 Migrate bridge reload to RCTReloadCommand [2/n]
Summary:
Motivation described in diff 1/N.

This diff replaces calls to `[bridge reload]` with calls to `RCTReloadCommand`. This shouldn't have any change in behaviour since RCTBridge listens to RCTReloadCommand and calls `[bridge reload]` [here](https://fburl.com/diffusion/kemzkrei).

It will allow us to customize who listens and reacts to RN lifecycle.

Changelog: [Internal][Changed] - Migrated [bridge reload] calls to RCTReloadCommand

Reviewed By: shergin

Differential Revision: D17880909

fbshipit-source-id: 80b26c6badd4b216656fed6dd04554e9877f4bb7
2019-10-30 12:23:24 -07:00
Moti Zilberman 468d1a2d2e Render collapsed frames in RedBox
Summary:
Renders frames in RedBox in a greyed-out style when their `collapse` field is set to `true`. This avoids outright hiding information in the stack trace while still drawing attention to frames that are likely to be more meaningful.

Changelog: [General] [Changed] - Render collapsed JavaScript frames in RedBox

Reviewed By: rickhanlonii

Differential Revision: D18039438

fbshipit-source-id: 527588f11c0bff495842be7036cd1293bab65eb9
2019-10-22 11:05:36 -07:00
Ramanpreet Nara 2b5f4de7eb Make RCTTiming TurboModule-compatible
Summary: Changelog: [iOS][Added] Make RCTTiming TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D17891665

fbshipit-source-id: e0d36ccfb4f3f1d428668836a8b66698d51bdeaf
2019-10-16 19:00:26 -07:00
Andres Suarez 3b31e69e28 Tidy up license headers [2/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952694

fbshipit-source-id: 17c87de7ebb271fa2ac8d00af72a4d1addef8bd0
2019-10-16 10:06:34 -07:00
Mehdi Mulani fc80a51457 Make RCTRedBox customizable
Summary:
Adds the ability to add extra buttons and renders them along with the other buttons.

Changelog: [iOS] [Added] - RCTRedBox ability to add extra buttons

Reviewed By: PeteTheHeat

Differential Revision: D17935352

fbshipit-source-id: f8fb28653e535cd2c098566afbc639eb5c196228
2019-10-15 20:09:39 -07:00
Mehdi Mulani ef3f80abc1 Refactor RCTRedBox button creation
Summary:
@public
A lot of this code was duplicated, so move it all into one method.
Later in this stack, I will make custom red box buttons which will need to reuse this method.

Changelog: [iOS] [Changed] - Refactor RCTRedBox button creation

Reviewed By: PeteTheHeat

Differential Revision: D17915485

fbshipit-source-id: ede649862556b057779e0267118799c63f0215b8
2019-10-15 20:09:39 -07:00
Ramanpreet Nara 2b62bd7695 Make RCTAsyncLocalStorage TurboModule-compatible
Summary:
**Note:** This was landed in D17724498 but reverted in D17855088. The revert had nothing to do with this NativeModule.

Changelog: [iOS][Added] Make RCTAsyncLocalStorage TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D17917841

fbshipit-source-id: 0f9dd5f592180d6512ca560007daa531a4da5b59
2019-10-15 09:16:56 -07:00
Ramanpreet Nara da6274ba76 Make RCTAlertManager TurboModule-compatible
Summary:
**Note:** This was landed in D17722913, but reverted in D17855088. The revert had nothing to do with this NativeModule.

Changelog: [iOS][Added] Make RCTAlertManager TurboModule-compatible

Reviewed By: PeteTheHeat

Differential Revision: D17917827

fbshipit-source-id: d86ea2cddddd9535d656709296c74aebd6f45793
2019-10-15 09:16:56 -07:00
Samuel Susla ffc7ec992c Add support for ScrollView.onScroll animations
Summary: To enable onScroll animations with Fabric's scrollView on iOS, we dispatch onScroll event to Paper's eventDispatcher as well as to Fabric's one. One we have a proper NativeAnimationDriver in place, we will get rid of this.

Reviewed By: shergin

Differential Revision: D17814260

fbshipit-source-id: f04faf59cdfd4ea5cede513388e30500b4cb2ad5
2019-10-11 06:55:21 -07:00
Ashok Menon df96de78bb Back out D17720575 -- D17724498
Summary: This stack caused FB4A builds to start failing, complaining about `RCTImageApple`.

Reviewed By: RSNara

Differential Revision: D17855088

fbshipit-source-id: 21ecedc3725dde65fab20f414d07b32c3548447c
2019-10-10 09:41:33 -07:00
Mehdi Mulani c30f895da5 Allow enabling RCTDevSettings outside of dev mode
Summary: This make RCTDevSettings configurable like RCTRedBox.

Reviewed By: RSNara

Differential Revision: D17798517

fbshipit-source-id: 3717e0aed27b2a6951b402641f589d472f45243e
2019-10-09 12:55:22 -07:00
Ramanpreet Nara 7eb7c84a09 Make RCTAsyncLocalStorage TurboModule-compatible
Summary: See title.

Reviewed By: PeteTheHeat

Differential Revision: D17724498

fbshipit-source-id: 738fdd1e4db3b435029b8300d426cca1242c1587
2019-10-09 12:34:00 -07:00
Ramanpreet Nara 60321a78ad Make RCTAlertManager TurboModule-compatible
Summary: See title.

Reviewed By: PeteTheHeat

Differential Revision: D17722913

fbshipit-source-id: cb78b9ea1bf497d27b19255e48809850e698ba0d
2019-10-09 12:34:00 -07:00
Mehdi Mulani 0a98be65e3 Try to lazily load RCTRedBox
Summary: I made a mistake earlier and somehow prevented RCTRedBox showing up. Not sure why this didn't prevent them from showing up in dev mode.

Reviewed By: RSNara

Differential Revision: D17798516

fbshipit-source-id: 48bf0523124ad3fd96d626281390bbafc62f3390
2019-10-08 07:38:17 -07:00
Mehdi Mulani 12d60c1049 iOS: Allow redbox to be toggled in debug builds
Summary: This adds the option to enable or disable the redbox.

Reviewed By: JoshuaGross

Differential Revision: D17720770

fbshipit-source-id: b9e9c948d53f7f284a48b6bd182dc2da47874d1c
2019-10-02 14:43:32 -07:00
Mehdi Mulani 7da85ef4cc iOS: Change RCTLog red box behaviour to a runtime check
Summary:
This changes RCTLog to look for RCTRedBox at runtime and if so, send a log message to it.
This allows people to add their own redbox customizations that could be present at non-debug time.

Reviewed By: PeteTheHeat

Differential Revision: D17718913

fbshipit-source-id: e4545e112af2ff2ad197a0a82551ae4c6911ece9
2019-10-02 14:43:32 -07:00
Rick Hanlon 2d95668aa8 Add fastRefresh to NativeDevSettings
Summary: This diff adds a method to call whenever a fast refresh happens. Right now this is only useful for reporting.

Reviewed By: cpojer

Differential Revision: D17528033

fbshipit-source-id: 17e82abe7a3e2bab6829de5adecda853fe5335c5
2019-09-30 07:03:51 -07:00
Rick Hanlon 2ccc8fbc28 Add and use reloadWithReason to iOS
Summary:
This diff adds a new reloading method reloadWithReason that allows callers to provide a reason for why a reload was requested.

This reason is useful for understanding why users are reloading, and why Fast Refresh is bailing out to a full reload. I also updated the places we reload with the reasons listed below.

**Standard native reasons:**
- Redbox
- Command
- Global hotkey
- Profiling controls
- Dev menu - reload
- Dev menu - reset to default
- Dev menu - apply changes

**From JavaScript (added in a later diff):**
- Fast Refresh - Unrecoverable
- Fast Refresh - No root boundary
- Fast Refresh - Invalidated boundary
- Fast Refresh - Invalidated root boundary

**Misc reasons and fallback for when a reason is unavailable:**
- Unknown from JS
- Uncategorized from JS
- Unknown from bridge
- Unknown from cxx bridge
- Requested from bridge
- Custom executor class reset

Reviewed By: cpojer

Differential Revision: D17499339

fbshipit-source-id: 12a21ffa05708c9b921d93911f190cdffc5c78d5
2019-09-30 07:03:50 -07:00
Peter Argany a6a6dbe05c Split up createTimer into two methods, createTimer and createTimerForNextFrame
Summary:
This diff adds nuance to timer creation.  Imagine the following bit of JS:

```
    setTimeout(() => {
      console.log("Timeout")
    }, 0);
    setImmediate(() => {
      setNine("Immediate");
    });
```

In classic RN, `setTimeout` will be called async by the bridge, immediate is implemented in JS, so the ordering of logs will be:

1. Immediate
2. Timeout

In bridgeless RN `setTimeout` is called sync, so the ordering of the logs is:

1. Timeout
2. Immediate

In order to preserve ordering, this diff adds a timer creation method which doesn't immediately invoke it, but waits one frame to do so.

This PR does the same thing for android, and explains the reasoning for preserving behaviour (some products may rely on this behaviour) f054928124

Reviewed By: ejanzer

Differential Revision: D17535639

fbshipit-source-id: 3f734c420a6a95be2ee10e8d6ac48adc79ef1c96
2019-09-25 15:31:26 -07:00
Ramanpreet Nara f5ab719445 Make RCTClipboard, RCTI18nManager, and RCTSourceCode TurboModule-compatible
Summary: These NativeModules were easy to convert, since no other NativeModules in `React/Modules` depend on them.

Reviewed By: PeteTheHeat

Differential Revision: D16817959

fbshipit-source-id: 1036c2d437e1275776a185bf68c450c6454985df
2019-09-23 15:25:30 -07:00
Peter Argany 33e65c6fd4 Create a new Timers class to reuse old RCTTiming Native Module [2/N]
Summary:
Similar to Android Venice impl, I plan to reuse old Timing native module because it's quite complex, and there's not much to gain from re-writing it. When we delete bridge access from it, we can remove any cruft, but IMO it's quite lean already.

The name of this class is a little confusing IMO, I originally had it because it was similar to `Timers.java` but then Emily renamed :p Here's the architecture drawn out:

{F209114665}

If anyone has a better name I'm all ears.

Reviewed By: RSNara

Differential Revision: D17376028

fbshipit-source-id: 066ae0b379cd00538021a1327a4dd63d5a828608
2019-09-20 18:28:38 -07:00
Peter Argany 77c9c95840 Refactor RCTTiming to work without the bridge [1/N]
Summary:
Instead of relying on the bridge to do module setup, allow for regular initialization.

Instead of relying on the bridge to execute timers, allow for a delegate to do the work.

Reviewed By: RSNara

Differential Revision: D17375924

fbshipit-source-id: 83adabf8c962a5d90a4ea623618903cd9fb79a99
2019-09-20 18:28:38 -07:00
Janic Duplessis cc068b0551 Export the DevSettings module, add `addMenuItem` method (#25848)
Summary:
I wanted to configure the RN dev menu without having to write native code. This is pretty useful in a greenfield app since it avoids having to write a custom native module for both platforms (and might enable the feature for expo too).

This ended up a bit more involved than planned since callbacks can only be called once. I needed to convert the `DevSettings` module to a `NativeEventEmitter` and use events when buttons are clicked. This means creating a JS wrapper for it. Currently it does not export all methods, they can be added in follow ups as needed.

## Changelog

[General] [Added] - Export the DevSettings module, add `addMenuItem` method
Pull Request resolved: https://github.com/facebook/react-native/pull/25848

Test Plan:
Tested in an app using the following code.

```js
if (__DEV__) {
 DevSettings.addMenuItem('Show Dev Screen', () => {
    dispatchNavigationAction(
      NavigationActions.navigate({
        routeName: 'dev',
      }),
    );
  });
}
```

Added an example in RN tester

![devmenu](https://user-images.githubusercontent.com/2677334/62000297-71624680-b0a1-11e9-8403-bc95c4747f0c.gif)

Differential Revision: D17394916

Pulled By: cpojer

fbshipit-source-id: f9d2c548b09821c594189d1436a27b97cf5a5737
2019-09-17 06:38:10 -07:00
gaodeng 796b3a1f88 iOS13 status bar has now 3 styles (#26294)
Summary:
iOS13 status bar has now 3 styles
UIStatusBarStyleDefault, UIStatusBarStyleLightContent, UIStatusBarStyleDarkContent

UIStatusBarStyleDefault now acts as an automatic style which will set it’s value dynamically based on the the userinterfacestyle(One of the traits) of the viewcontroller that controls the status bar appearance.

## Changelog

[iOS] [Fixed] - iOS13 new status bar style UIStatusBarStyleDarkContent
Pull Request resolved: https://github.com/facebook/react-native/pull/26294

Differential Revision: D17314054

Pulled By: cpojer

fbshipit-source-id: ea109e729bb551dff314bc00a056860a8febb0e9
2019-09-11 05:13:01 -07:00
Alec Larson 021cbccbf2 fix: use proper timestamp in frameElapsed calculation (#26114)
Summary:
Fix a bug where `CACurrentMediaTime` was being used to calculate the elapsed frame time, even though it's not comparable to `NSDate.timeIntervalSince1970` time.

## Changelog

[iOS] [Fixed] - callIdleCallbacks deadline calculation
Pull Request resolved: https://github.com/facebook/react-native/pull/26114

Test Plan: None

Differential Revision: D17314125

Pulled By: cpojer

fbshipit-source-id: 5061a3954371df2134f0c77dc260228668abe747
2019-09-11 04:54:21 -07:00
Moti Zilberman 850a8352c9 Manage redbox updates by comparing exception IDs
Summary:
Refines the condition for ignoring updates to an already-open redbox on iOS.

Previously we would only update the stack trace if the message string in the update was exactly the same as in the initial redbox. With this diff we rely on the `exceptionId` parameter instead, and only fall back to string comparison if it's omitted (i.e. for non-JS uses of redbox on iOS).

NOTE: `exceptionId` is part of the existing ExceptionsManager API and is already supported on Android.

Reviewed By: sammy-SC

Differential Revision: D17226179

fbshipit-source-id: 5940110bf4e4358a8a1b3477e8d2cf8b224dd9f8
2019-09-06 10:13:05 -07:00
Christoph Nakazawa 90a8e3012c Remove live reloading option from RN iOS
Summary: See previous diff in this stack

Reviewed By: motiz88

Differential Revision: D17156649

fbshipit-source-id: 12bdba248481258b9c6ca001472a41ca19fb4b6f
2019-09-06 03:48:49 -07:00
Mehdi Mulani d2cb52beee Allow RCTDevMenu to be enabled separately from RCT_DEV flag
Summary:
@public
RCTDevMenu and RCTDevSettings are used to display the dev menu you see when you shake the device.
With this change in build flags, it's possible to build them into a production version of the app without pulling in all the RCT_DEV logic.

Reviewed By: shergin

Differential Revision: D17116992

fbshipit-source-id: 71458c49affe5bb94c52c9d8bb0f793b16d35828
2019-09-03 15:54:11 -07:00
Peter Argany f229d67498 Make RCTAccessibilityManger a TurboModule
Summary:
Move RCTAccessibilityManager to CoreModules (since that's the only dir that supports TM).

Fixup some variable names to match spec.

Reviewed By: RSNara

Differential Revision: D16861739

fbshipit-source-id: a0a53b221dcc172979d1f2c83851ab92e23f2333
2019-08-23 12:01:52 -07:00
Anatolii Shevchenko d8e335df0e Remove ; from method implementation definition
Summary: Removing excessive semicolon ";" symbol from method implementation definition.

Reviewed By: adamjernst

Differential Revision: D16912006

fbshipit-source-id: 9c3e778a107e8fd0055f40a95ea9ca58d461e1c5
2019-08-21 15:49:16 -07:00
Peter Argany 685c15a955 Make RCTDeviceInfo a TurboModule
Summary: Follow pattern laid out by Kevin in D16001262 to convert a Core OSS native module to use TM generated spec.

Reviewed By: RSNara

Differential Revision: D16016391

fbshipit-source-id: f517777be44c68367d786f04c50cf12f240eed00
2019-08-21 14:31:02 -07:00
Peter Argany 6991e28653 Move RCTExceptionsManager to CoreModules and make it conform to spec
Summary:
`NativeExceptionsManager.js` contains the JS spec for this native module. This diff moves the objc code to CoreModules (since it's the only directory that supports TM at the moment) and makes it conform to the spec.

NOTE: I will update podfiles after this diff is reviewed, before I land. Adding those generated changes makes it really hard to review.

Reviewed By: RSNara

Differential Revision: D16812212

fbshipit-source-id: 38b6e9a20ce15e7e9995df34493b37ed7adb2911
2019-08-15 20:25:23 -07:00
Kevin Gozali d2e18a1c5c iOS: Revert RCT->RN prefix renaming to avoid confusion
Summary: The previous rename from RCT->RN prefix ended up causing some confusions on which prefix to use for which files and under what circumstances. To avoid further confusion before we're done with the re-architecture project, let's keep them as RCT.

Reviewed By: mdvacca

Differential Revision: D16705566

fbshipit-source-id: 395bff771c84e5ded6b2261a84c7549df1e6c5e5
2019-08-08 07:21:25 -07:00
Kevin Gozali 9420de6860 iOS: codemod react-native-github: RCT->RN prefix for Fabric
Summary: Fabric ObjC(++) files will be prefixed by RN* for the time being, this codemod is a simple rename. This includes `interface` and `protocol` definition

Reviewed By: PeteTheHeat, yungsters

Differential Revision: D16611524

fbshipit-source-id: 868d2571ea2414dde4cbb3b75b1334b779b5d832
2019-08-01 20:06:04 -07:00