react-native/React/Base
Neil Sarkar 00d5674474 Remove deprecation warning for RCTExecuteOnMainThread
Summary:
As per janicduplessis recommendation, provide a new synchronous method to replace the necessary synchronous calls and use a warning in the comments (and method name).

**Motivation**

There are currently a number of XCode warnings that show up in a fresh 0.40 install of a react native project. While the project can still be run, this contributes negatively to the development experience -- valid warnings may be ignored and new ones may be added as per https://en.wikipedia.org/wiki/Broken_windows_theory

This addresses one of the warnings, by providing the functionality of a deprecated method in two specific cases where we can't avoid doing synchronous work on the main queue. See https://github.com/facebook/react-native/issues/11736 for more context.

**Test plan (required)**

I ran a project that relied on screen size and it didn't crash...happy to do more involved testing if someone can share better methodology.
Closes https://github.com/facebook/react-native/pull/11817

Differential Revision: D4402911

fbshipit-source-id: 9fd8b3f50d34984b765fe22b1f4512e103ba55a9
2017-01-10 23:13:33 -08:00
..
RCTAssert.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTAssert.m Display JS exceptions and stacks in a red box. 2016-06-30 19:43:28 -07:00
RCTBatchedBridge.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTBridge+Private.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTBridge.h Adding support in the new RN bridge on iOS 2017-01-10 11:28:44 -08:00
RCTBridge.m Refactor reload command in React Native 2016-12-07 20:13:22 -08:00
RCTBridgeDelegate.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTBridgeMethod.h Support sync method calls in the objc bridge 2016-09-05 07:44:00 -07:00
RCTBridgeModule.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTBundleURLProvider.h allow fetching any resource under js folder via packager 2016-10-20 11:43:44 -07:00
RCTBundleURLProvider.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTConvert.h Rename directories 2016-12-07 05:14:12 -08:00
RCTConvert.m Add baseline alignment support 2017-01-08 04:43:31 -08:00
RCTDefines.h Add RCT_PROFILE define 2016-06-13 04:28:38 -07:00
RCTDisplayLink.h Pull CADisplayLink into a separate file 2016-03-29 19:53:20 -07:00
RCTDisplayLink.m Remove last arg from RCTProfileEnd, make macro's function-like 2016-09-05 11:13:33 -07:00
RCTErrorCustomizer.h Add ability to customize error messages and stacks within the iOS redbox 2016-07-18 11:28:36 -07:00
RCTErrorInfo.h Add ability to customize error messages and stacks within the iOS redbox 2016-07-18 11:28:36 -07:00
RCTErrorInfo.m Add ability to customize error messages and stacks within the iOS redbox 2016-07-18 11:28:36 -07:00
RCTEventDispatcher.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTEventDispatcher.m Dispatch native handled events to JS 2016-11-23 05:43:35 -08:00
RCTFrameUpdate.h Pause JS DisplayLink if nothing to process. 2015-09-29 09:22:10 -07:00
RCTFrameUpdate.m Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
RCTImageSource.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageSource.m Support bundle argument for image loading 2016-08-31 17:43:49 -07:00
RCTInvalidating.h
RCTJSStackFrame.h Class for JS stack frames instead of dictionaries 2016-07-11 06:13:32 -07:00
RCTJSStackFrame.m Fix crash in RCTJSStackFrame 2016-08-26 09:58:47 -07:00
RCTJavaScriptExecutor.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTJavaScriptLoader.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTJavaScriptLoader.mm Fix comparison between NSNumber* and int 2017-01-03 10:28:29 -08:00
RCTKeyCommands.h Add Shortcut "Double R" to Reload JS in iOS 2016-06-01 03:43:27 -07:00
RCTKeyCommands.m Cleanup warnings 2016-07-12 05:59:12 -07:00
RCTLog.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTLog.mm Cleanup display of C++ stack frames in redbox 2016-11-14 04:59:13 -08:00
RCTModuleData.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTModuleData.mm Modules export constants if any superclass exports them (2nd try) 2016-10-31 04:58:50 -07:00
RCTModuleMethod.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTModuleMethod.m Fail-Fast on Redundant Callback Invokes 2016-12-08 13:43:38 -08:00
RCTMultipartDataTask.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTMultipartDataTask.m Fix some warnings in React.xcodeproj 2016-10-27 04:29:01 -07:00
RCTMultipartStreamReader.h Add multipart response stream reader 2016-10-03 18:13:36 -07:00
RCTMultipartStreamReader.m Add multipart response download task (2nd edition) 2016-10-11 12:28:42 -07:00
RCTNullability.h Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTParserUtils.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTParserUtils.m Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTPerformanceLogger.h Refactor measuring native requires 2016-09-09 15:28:44 -07:00
RCTPerformanceLogger.m Refactor measuring native requires 2016-09-09 15:28:44 -07:00
RCTPlatform.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTPlatform.m Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTReloadCommand.h Refactor reload command in React Native 2016-12-07 20:13:22 -08:00
RCTReloadCommand.m Refactor reload command in React Native 2016-12-07 20:13:22 -08:00
RCTRootView.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTRootView.m Nobody outside RCTTouchHandler should treat it as UIGestureRecognizer subclass 2017-01-09 00:13:33 -08:00
RCTRootViewDelegate.h Prevent RCTRootView delegate call 2015-11-13 08:28:28 -08:00
RCTRootViewInternal.h Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTVRemoteHandler.h Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTVRemoteHandler.m Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTouchEvent.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTouchEvent.m Set viewTag for RCTTouchEvent to avoid EventID conflict 2016-09-16 16:13:47 -07:00
RCTTouchHandler.h Nobody outside RCTTouchHandler should treat it as UIGestureRecognizer subclass 2017-01-09 00:13:33 -08:00
RCTTouchHandler.m Nobody outside RCTTouchHandler should treat it as UIGestureRecognizer subclass 2017-01-09 00:13:33 -08:00
RCTURLRequestDelegate.h
RCTURLRequestHandler.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTUtils.h Remove deprecation warning for RCTExecuteOnMainThread 2017-01-10 23:13:33 -08:00
RCTUtils.m Remove deprecation warning for RCTExecuteOnMainThread 2017-01-10 23:13:33 -08:00
RCTWebSocketObserverProtocol.h Expose more of RCTWebSocketObserver 2016-12-08 07:44:38 -08:00