react-native/React/Modules
Christian Brevik 684e03590b Support native ViewManager inheritance on iOS
Summary:
**Motivation**
This is a re-worked version of #14260, by shergin's suggestion.

For iOS, if you want to inherit from a native ViewManagers, your custom ViewManager will not automatically export the parents' props. So the only way to do this today, is to basically copy/paste the parent ViewManager-file, and add your own custom logic.

With this PR, this is made more extensible by exporting the `baseModuleName` (i.e. the iOS `superclass` of the ViewManager), and then using that value to re-establish the inheritance relationship in `requireNativeComponent`.

**Test plan**
I've run this with a test project, and it works fine there. But needs more testing.

Opened this PR as [per shergin's suggestion](https://github.com/facebook/react-native/pull/10946#issuecomment-311860545) though, so we can discuss approach.

**Discussion**
* Android already supports inheritance, so this change should be compatible with that. But, not every prop available on `UIManager.RCTView.NativeProps` is actually exported by every ViewManager. So should `UIManager.RCTView.NativeProps` still be merged with `viewConfig.NativeProps`, even if the individual ViewManager does not export/use them to begin with?
* Does this break other platforms? [UWP](https://github.com/Microsoft/react-native-windows)?
Closes https://github.com/facebook/react-native/pull/14775

Differential Revision: D5392953

Pulled By: shergin

fbshipit-source-id: 5212da616acfba50cc285e2997d183cf8b2cd09f
2017-07-10 16:01:12 -07:00
..
RCTAccessibilityManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTAccessibilityManager.m iOS: Introduce API for making screen reader announcements 2017-05-30 04:46:08 -07:00
RCTAlertManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTAlertManager.m Add one more parameter(keyboardType) to AlertIOS.promot(). 2017-01-19 14:43:37 -08:00
RCTAppState.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTAppState.m iOS: Provide correct initial value for AppState.currentState 2016-07-12 23:28:22 -07:00
RCTAsyncLocalStorage.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTAsyncLocalStorage.m Enforcing semi-colon consistency between dev and release modes when calling RCTLog* 2016-11-16 07:28:32 -08:00
RCTClipboard.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTClipboard.m remove unused includes in fbobjc/Libraries 2017-02-19 18:33:49 -08:00
RCTDevSettings.h Merge RCTPackagerClient into RCTPackagerConnection 2017-05-05 08:49:28 -07:00
RCTDevSettings.mm Fix Travis podspec CI for Cxx bridge 2017-07-07 02:32:07 -07:00
RCTDeviceInfo.h Introduce `DeviceInfo` as a new native module 2017-03-17 17:01:57 -07:00
RCTDeviceInfo.m Fix Apple TV compile errors 2017-06-21 15:16:31 -07:00
RCTEventEmitter.h Only start observing in requestPermissions() if not already observing 2017-04-19 11:30:36 -07:00
RCTEventEmitter.m Eagerly change the listeners count 2017-03-20 12:49:00 -07:00
RCTExceptionsManager.h Cleanup initialization of native modules in FBReactModule 2017-05-26 04:17:19 -07:00
RCTExceptionsManager.m Cleanup initialization of native modules in FBReactModule 2017-05-26 04:17:19 -07:00
RCTI18nManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTI18nManager.m Provide forceRTL for LTR language to test 2016-08-04 12:28:30 -07:00
RCTI18nUtil.h Provide forceRTL for LTR language to test 2016-08-04 12:28:30 -07:00
RCTI18nUtil.m enable RTL layout by default for all apps 2016-09-06 17:58:47 -07:00
RCTJSCSamplingProfiler.h Rename JSCSamplingProfiler to RCTJSCSamplingProfiler 2017-04-18 13:22:01 -07:00
RCTJSCSamplingProfiler.m Rename JSCSamplingProfiler to RCTJSCSamplingProfiler 2017-04-18 13:22:01 -07:00
RCTKeyboardObserver.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTKeyboardObserver.m Apple TV support 1: existing Objective C code should compile for tvOS 2016-09-27 06:28:33 -07:00
RCTLayoutAnimation.h RCTAnimation & RCTLayoutAnimation were decoupled from RCTUIManager 2017-07-03 16:15:50 -07:00
RCTLayoutAnimation.m RCTAnimation & RCTLayoutAnimation were decoupled from RCTUIManager 2017-07-03 16:15:50 -07:00
RCTLayoutAnimationGroup.h RCTAnimation & RCTLayoutAnimation were decoupled from RCTUIManager 2017-07-03 16:15:50 -07:00
RCTLayoutAnimationGroup.m RCTAnimation & RCTLayoutAnimation were decoupled from RCTUIManager 2017-07-03 16:15:50 -07:00
RCTRedBox.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTRedBox.m Show redbox window on JS errors for debug builds 2017-04-11 06:00:42 -07:00
RCTSourceCode.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTSourceCode.m Cleanup RCTSourceCode 2016-11-18 05:13:31 -08:00
RCTStatusBarManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTStatusBarManager.m Replacing all instances of [UIApplication sharedApplication] wi… 2017-04-01 03:34:41 -07:00
RCTTVNavigationEventEmitter.h Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTVNavigationEventEmitter.m Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTiming.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTiming.m Update native references to JSTimers 2017-06-22 09:52:33 -07:00
RCTUIManager.h RCTAnimation & RCTLayoutAnimation were decoupled from RCTUIManager 2017-07-03 16:15:50 -07:00
RCTUIManager.m Support native ViewManager inheritance on iOS 2017-07-10 16:01:12 -07:00
RCTUIManagerObserverCoordinator.h RCTUIManagerObserverCoordinator: new way to subscribe for granular notifications from UI Manager 2017-05-08 12:52:09 -07:00
RCTUIManagerObserverCoordinator.m RCTUIManagerObserverCoordinator: new way to subscribe for granular notifications from UI Manager 2017-05-08 12:52:09 -07:00