react-native/React/Base
Janic Duplessis ef23d2bdcf Show bundle download progress on iOS
Summary:
This shows progress for the download of the JS bundle (different from the packager transform progress that we show already). This is useful especially when loading the JS bundle from a remote source or when developing on device (on simulator + localhost it pretty much just downloads instantly). This will be nice for the expo client since all bundles are loaded over the network and can take several seconds to load.

This depends on https://github.com/facebook/metro-bundler/pull/28 to work but won't crash or anything without it, it just won't show the progress percentage.

![img_05070155d2cc-1](https://user-images.githubusercontent.com/2677334/28293828-2c08d974-6b24-11e7-9334-e106ef3326d9.jpeg)

**Test plan**
Tested that bundle download progress is shown properly in RNTester on both localhost + simulator and on real device with network conditionner to simulate a slow loading bundle.

Tested that it doesn't cause issues if the packager doesn't send the Content-Length header.
Closes https://github.com/facebook/react-native/pull/15066

Differential Revision: D5449073

Pulled By: shergin

fbshipit-source-id: 43a8fb559393bbdc04f77916500e21898695bac5
2017-08-14 11:05:35 -07:00
..
RCTAssert.h Remove deprecated RCTAssert aliases 2017-07-07 12:21:59 -07:00
RCTAssert.m Display JS exceptions and stacks in a red box. 2016-06-30 19:43:28 -07:00
RCTBatchedBridge.mm Add deprecation warning to RCTBatchedBridge 2017-08-04 07:56:14 -07:00
RCTBridge+Private.h Implement lazy discovery scaffolding for loading NativeModules on demand. 2017-08-11 06:41:33 -07:00
RCTBridge.h Add JSC utility header to RCTBridge 2017-04-07 11:16:59 -07:00
RCTBridge.m Force the debugger to disconnect before a bundle reload 2017-08-14 08:16:52 -07:00
RCTBridgeDelegate.h Implement lazy discovery scaffolding for loading NativeModules on demand. 2017-08-11 06:41:33 -07:00
RCTBridgeMethod.h Replace exported method registration with statically allocated struct 2017-07-24 07:01:53 -07:00
RCTBridgeModule.h Allow native modules to customize the main-thread init behaviour 2017-08-07 07:04:36 -07: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 Add a type cast to RCT_ENUM_CONVERTER for C++ compatibility 2017-06-15 19:07:21 -07:00
RCTConvert.m Fix crash when converting NSNull values 2017-08-09 03:35:16 -07:00
RCTCxxConvert.h Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07:00
RCTCxxConvert.m Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07:00
RCTDefines.h Replace exported method registration with statically allocated struct 2017-07-24 07:01:53 -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 Revert D5197885 to unbreak Internal App 2017-06-23 13:05:49 -07:00
RCTInvalidating.h Remove isValid from RCTInvalidating 2015-08-14 01:57:18 -08:00
RCTJSCErrorHandling.h Tease apart React and RCTBatchedBridge targets 2017-03-21 18:31:23 -07:00
RCTJSCErrorHandling.mm More verbose error messages for iOS 2017-04-18 14:19:13 -07:00
RCTJSEnvironment.h Make RCTSamplingProfilerPackagerMethod not depend on RCTBridge 2017-06-15 12:07:34 -07:00
RCTJSStackFrame.h Class for JS stack frames instead of dictionaries 2016-07-11 06:13:32 -07:00
RCTJSStackFrame.m Report JS errors in debug console 2017-04-05 19:51:03 -07:00
RCTJavaScriptExecutor.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTJavaScriptLoader.h JavaScriptLoader BCBundle version check 2017-01-11 22:28:43 -08:00
RCTJavaScriptLoader.mm Show bundle download progress on iOS 2017-08-14 11:05:35 -07: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 Replacing all instances of [UIApplication sharedApplication] wi… 2017-04-01 03:34:41 -07:00
RCTLog.mm Replacing all instances of [UIApplication sharedApplication] wi… 2017-04-01 03:34:41 -07:00
RCTManagedPointer.h Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07:00
RCTManagedPointer.mm Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07:00
RCTModuleData.h Merge allowOffMainQueueRegistration and requiresMainQueueSetup 2017-07-17 03:45:30 -07:00
RCTModuleData.mm Allow native modules to customize the main-thread init behaviour 2017-08-07 07:04:36 -07:00
RCTModuleMethod.h Replace exported method registration with statically allocated struct 2017-07-24 07:01:53 -07:00
RCTModuleMethod.mm Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07:00
RCTMultipartDataTask.h Show bundle download progress on iOS 2017-08-14 11:05:35 -07:00
RCTMultipartDataTask.m Show bundle download progress on iOS 2017-08-14 11:05:35 -07:00
RCTMultipartStreamReader.h Show bundle download progress on iOS 2017-08-14 11:05:35 -07:00
RCTMultipartStreamReader.m Show bundle download progress on iOS 2017-08-14 11:05:35 -07:00
RCTNullability.h Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTParserUtils.h Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07:00
RCTParserUtils.m Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07: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 Configure requiresMainQueueSetup for core modules 2017-08-07 07:04:36 -07: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
RCTRootContentView.h Immediately trigger renderApplication from RCTRootView init 2017-04-21 07:04:57 -07:00
RCTRootContentView.m Immediately trigger renderApplication from RCTRootView init 2017-04-21 07:04:57 -07:00
RCTRootView.h Clean up -[RCTRootView cancelTouches] header docs 2017-07-11 11:06:21 -07:00
RCTRootView.m Removed unused ivar (`_launchOptions`) from `RCTRootView` 2017-07-24 09:42:06 -07:00
RCTRootViewDelegate.h RCTRootView's `intrinsicSize` property was deprecated in favour of `intrinsicContentSize` 2017-02-27 14:04:58 -08:00
RCTRootViewInternal.h RCTRootView's `intrinsicSize` property was deprecated in favour of `intrinsicContentSize` 2017-02-27 14:04:58 -08:00
RCTTVRemoteHandler.h Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTVRemoteHandler.m Fix podspec test 2017-08-09 07:04:59 -07:00
RCTTouchEvent.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTouchEvent.m New way to handle simultaneously active gesture recognizers in RCTTouchHandler 2017-01-12 12:13:28 -08:00
RCTTouchHandler.h Nobody outside RCTTouchHandler should treat it as UIGestureRecognizer subclass 2017-01-09 00:13:33 -08:00
RCTTouchHandler.m Do not warn if `touch.force` is NaN 2017-04-26 15:16:16 -07:00
RCTURLRequestDelegate.h Refactored networking logic out into RCTDownloadTask 2015-07-23 04:00:31 -08:00
RCTURLRequestHandler.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTUtils.h Improve definition of RCTNilIfNull 2017-08-09 03:35:16 -07:00
RCTUtils.m Fix references to deprecated assets in separate bundles 2017-06-30 07:00:12 -07:00