Commit Graph

8204 Commits

Author SHA1 Message Date
Pieter De Baets af3f656d97 Modules export constants if any superclass exports them
Reviewed By: fkgozali

Differential Revision: D4081915

fbshipit-source-id: 3a99033cd156c1393f7c8bbbb45f43772eb3a8df
2016-10-27 04:29:01 -07:00
Pieter De Baets 8bc30af6c8 Fix some warnings in React.xcodeproj
Reviewed By: majak

Differential Revision: D4081860

fbshipit-source-id: 4b503df3c4e8b6e06b04613919a4a3405bf01171
2016-10-27 04:29:01 -07:00
Pieter De Baets 384ea330c8 Move Platform constants to RCTPlatform
Reviewed By: majak

Differential Revision: D4081849

fbshipit-source-id: bee08af2f68dcc1af424f382f960ff897ba11945
2016-10-27 04:29:00 -07:00
Konstantin Raev a743fbe73e added semicolon which broke in #8040
Summary:
Fixes internal CI break t14126367 after #8040
Closes https://github.com/facebook/react-native/pull/10589

Differential Revision: D4088099

fbshipit-source-id: a8816e39d795406f59d2a12b9c7fc0fd4ddda69b
2016-10-27 03:13:43 -07:00
Douglas Lowder bdff1c3f02 Fix timing issues in RCTLoggingTests.m
Summary:
**Motivation**

If there are any console log messages that come in on initialization (as will happen right now in tvOS), the RCTLoggingTests can fail intermittently.  This change delays the start of the logging test to allow time for initial console messages to come in.
Closes https://github.com/facebook/react-native/pull/10568

Differential Revision: D4087974

Pulled By: bestander

fbshipit-source-id: 2b0f4a88a74bc6121133317dd909d5bd1f10789b
2016-10-27 01:43:34 -07:00
Jonathan Stanton e000b71845 Remote notification completion handler
Summary:
**Motivation**
To allow handling of remote notifications using the preferred delegate [application:didReceiveRemoteNotification:fetchCompletionHandler](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/#//apple_ref/occ/intfm/UIApplicationDelegate/application:didReceiveRemoteNotification:fetchCompletionHandler:).

React native right now is setup to use [application:didReceiveRemoteNotification](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/#//apple_ref/occ/intfm/UIApplicationDelegate/application:didReceiveRemoteNotification:) which doesn't give the engineer the option to call back to the app via a completion handler and inform the app that it is done with handling the push notification.

The primary reason to use the `fetchCompletionHandler` would be to wake up the app to fetch updates so the next time the user opens the app it will be up to date.

A new method will be exposed: `PushNotificationIOS#
Closes https://github.com/facebook/react-native/pull/8040

Differential Revision: D4081766

Pulled By: bestander

fbshipit-source-id: 2819061bd3a926cb1c9c743af5aabab8c0faec3d
2016-10-26 21:43:48 -07:00
Mehdi AHRAOUI a16d72842d debuggerWorker.js contains code incompatible with node 5
Summary:
Hi,

This is a small fix for issue #10564.
Closes https://github.com/facebook/react-native/pull/10571

Differential Revision: D4086542

fbshipit-source-id: a50b4b3afdefe4abfe64869768ce51c6c628708a
2016-10-26 19:28:38 -07:00
Pieter De Baets 82911a8204 s/CGFloat/float in RCTShadowView
Reviewed By: emilsjolander

Differential Revision: D4081788

fbshipit-source-id: 91da6af0fff1317ff4661572e8e7c1cc5594f810
2016-10-26 13:13:47 -07:00
Pieter De Baets 4ea359a4f3 Remove getter for RCTShadowView flex
Reviewed By: emilsjolander

Differential Revision: D4081779

fbshipit-source-id: 4e2a1780738423396111c7cfde2fe12010ad0e93
2016-10-26 13:13:47 -07:00
Steven Goff 633781a58d Fixing typo in Accessibility documentation
Summary:
Currently there is a typo in Accessibility.md which will result in an invalid prop type warning if directly adhered to.  The instance of `no-hide-descendant` should instead be updated to `no-hide-descendants` (plural) in the documentation.
Closes https://github.com/facebook/react-native/pull/10566

Differential Revision: D4082750

Pulled By: lacker

fbshipit-source-id: 18e2d9db6004767903e9308a2c0a900d2d9055fc
2016-10-26 11:58:57 -07:00
Kevin Lacker 22eaf2d7ba Added a couple of articles/prepositions that were missing
Summary:
Simple documentation errata.
Closes https://github.com/facebook/react-native/pull/10098

Differential Revision: D4082724

Pulled By: lacker

fbshipit-source-id: 5b4df66472b37b643ced62fafefe461c0c2c86c7
2016-10-26 11:58:56 -07:00
Martin Konicek b28c0bb7db Followup: Apply the User-Agent header correctly to Android WebView
Summary:
Followup for #5822, addressing nits.

**Test Plan**

Travis CI (the author of #5822 tested the change).
Closes https://github.com/facebook/react-native/pull/10563

Differential Revision: D4081826

fbshipit-source-id: f3a2e1996bf02f81fecea6e53fe1c522b8c85689
2016-10-26 10:13:40 -07:00
Giuseppe Ottaviano dc02907039 Fix a folly::dynamic deprecated pattern
Reviewed By: javache

Differential Revision: D4075622

fbshipit-source-id: 4a6b6c4068d762dce2b1535bfd9630e185f5489f
2016-10-26 09:43:56 -07:00
Emil Sjolander d8e77f0c76 Reset java state in jni reset method
Differential Revision: D4081049

fbshipit-source-id: 0b9ad70339ad906ad5219ad2679329cfe2fd7abc
2016-10-26 07:28:48 -07:00
Nikhilesh Sigatapu c67225818d Add a way to access the underlying JavaScriptCore context
Summary:
**Motivation**

I'm working on a project that uses React Native and needs to add direct synchronous bindings to native stuff through the JavaScriptCore C API. This is because it's performance-sensitive and would benefit from the quickest JS->C path. It does this using cross-platform C++ code that works on both iOS and Android. Most of the infrastructure for getting access to the JSC context is already in React Native actually, just had to add a few more things.

(lexs you mentioned to tag you in this pull request)

**Test plan**

Modify the JavaScriptCore context through the `JSContextRef` returned (eg. add an object at global scope) and verify that it exists in JavaScript.
Closes https://github.com/facebook/react-native/pull/10399

Differential Revision: D4080945

Pulled By: lexs

fbshipit-source-id: 6659b7a01e09fd84475adde183c1d3aca2d4cf09
2016-10-26 03:43:44 -07:00
Douglas Lowder 0698b2beca Integration test stability: add delay before starting TimersTest
Summary:
* Motivation

Locally I'm seeing consistent failures in IntegrationTests/TimersTest.js.  Adding a little delay before starting the first test seems to make these issues go away.
Closes https://github.com/facebook/react-native/pull/10548

Differential Revision: D4080920

Pulled By: bestander

fbshipit-source-id: 2dec86073786658f24b809284123815e77fbbd99
2016-10-26 03:14:00 -07:00
Emil Sjolander 2df4faaf15 Dont go down through JNI to figure out that no margin/padding/border/position was set
Differential Revision: D4080909

fbshipit-source-id: 7eb1885c615191055aa21e3435c6fbc652b883ae
2016-10-26 02:58:40 -07:00
Neil Sarkar c144bbfb7e Allow serializing underlying NSError objects, closes #10506
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?

See https://github.com/facebook/react-native/issues/10506. A native `NSError` with `NSUnderlyingErrorKey` set causes a JSON stringify error from the websocket dispatcher if remote debugging is enabled.

**Test plan (required)**

I'm not familiar with the react native testing framework. Happy to add a test for this if someone can point me to where this part of the codebase is exercised :)

I did some spot checks with nil user dictionaries and nil underlying errors here. The case that this solves is testable using https://github.com/superseriouscompany/react-native-error-repro, specifically:

```objective-c
NSError *underlyingError = [NSError errorWithDomain:@"underlyingDomain" code:421 userInfo:nil];
NSError *err = [NSError errorWithDomain:@"domain" code:68 userInfo:@{@"NSUnderlyingError": underlyingError}];

reject(@"foo", @"bar", err);
```
Closes https://github.com/facebook/react-native/pull/10507

Differential Revision: D4080802

Pulled By: lacker

fbshipit-source-id: 93a41d9e9a710e406a6ccac214a5617271b4bede
2016-10-26 01:43:39 -07:00
d.chernyatiev f64538943e Navigator - Fix wrong scene transformation after pop
Summary:
Fixes #9485
Closes https://github.com/facebook/react-native/pull/9516

Differential Revision: D4080618

Pulled By: lacker

fbshipit-source-id: 296c209a0438c4a06b3b3556d7084c5435d60c72
2016-10-26 00:13:35 -07:00
leeight f9e36a08a8 Make sure xhr req header's value is String type
Summary:
In the `NetworkingModule.java`, `header.getString(1)` was
called, so the value must be String type.

FIX #10198
Closes https://github.com/facebook/react-native/pull/10222

Differential Revision: D4080319

Pulled By: lacker

fbshipit-source-id: 85234a2bbf90e5b9e0e65ceadbfabb330b2d1322
2016-10-25 22:29:35 -07:00
Gan Jian Wei c9d8e233aa Update IntegrationWithExistingApps.md for Swift 3
Summary:
Update integrating with existing Swift App code for Swift 3.
Closes https://github.com/facebook/react-native/pull/10547

Differential Revision: D4079631

Pulled By: lacker

fbshipit-source-id: 7a493ca7131a10a2466816b104b9cb4f1ff369f5
2016-10-25 18:43:44 -07:00
Kevin Lacker b6b0e57546 Update GettingStarted.md if user using zsh filename should be .zshrc
Summary:
Small contribution for MacOS users:

For those users who using zsh with their Mac OS filename to place variables should be different
Closes https://github.com/facebook/react-native/pull/10432

Differential Revision: D4078102

Pulled By: lacker

fbshipit-source-id: 6cbfb81a472f37bfda85964e929c99b438348fd8
2016-10-25 18:28:32 -07:00
littlesome 49667db1c8 Fix Alert memory leak
Summary:
1. Using weak container to hold the currently opened alerts.
2. Using weak reference to alertController in action handler block.
3. BTW,  remove the unused vars: _alertCallbacks, _alertButtonKeys.

Test plan (required)

```
- (void)invalidate
{
  for (UIAlertController *alertController in _alertControllers) {
    [alertController.presentingViewController dismissViewControllerAnimated:YES completion:nil];
  }
}
```
Since we use weak container, _alertControllers should only contains the currently opened alerts.

I test this way: Put a breakpoint in invalidate, open the UIExplorer play with the 'Alert' & 'AlertIOS' examples, then fire a reload and see if _alertControllers contains the expected values.
Closes https://github.com/facebook/react-native/pull/10407

Differential Revision: D4078649

Pulled By: lacker

fbshipit-source-id: 8509e7e7142379a81d5b28c9067c085bad8bb5cb
2016-10-25 17:28:49 -07:00
Scott Wolchok d932c96ddc Don't preallocate child lists
Reviewed By: emilsjolander

Differential Revision: D4078012

fbshipit-source-id: 7cdcab03ec4067550a5fee5e1baea14344f3a8f9
2016-10-25 17:13:36 -07:00
Emil Sjolander 942f724166 Suggest the compiler to inline smaller functions
Reviewed By: gkassabli

Differential Revision: D4074580

fbshipit-source-id: 69b63fadf2011cb688af58f09d67c2cb711a0e20
2016-10-25 10:43:41 -07:00
Héctor Ramos 770a9f20a2 0.36: Headless JS, the Keyboard API, & more
Summary:
This is a draft for an upcoming blog post scheduled for October 24, 2016. Do not merge into `master` before that date.
Closes https://github.com/facebook/react-native/pull/10447

Differential Revision: D4074879

Pulled By: hramos

fbshipit-source-id: b1a0f2c274c0ebc4678a4e058592e1f389079417
2016-10-25 10:13:53 -07:00
Kazuki Sakamoto 31d3926784 Update CSSNodeFree for C#, Java and Objective-C
Reviewed By: emilsjolander

Differential Revision: D4069655

fbshipit-source-id: 1fd764059784d7968af38b6aaf7fb6f70fdee8ee
2016-10-25 07:43:44 -07:00
Emil Sjolander 3c5a7ae859 Fix bug in canUseCachedMeasurement causing unneeded double measure
Reviewed By: gkassabli

Differential Revision: D4071621

fbshipit-source-id: 19d87d939051ddf8ee2e1c6e60efee22d173bbb9
2016-10-25 07:43:44 -07:00
Andrew Y. Chen 3af104fbd3 Fix memory leak in HeadlessJsTaskContext
Reviewed By: foghina, AaaChiuuu

Differential Revision: D4068078

fbshipit-source-id: a45ad83e9ecd8455558968089d80f94ec104c2ef
2016-10-25 07:13:51 -07:00
Charles Dick 6ddf8a8795 refactor aggrow to make adding new sources of data easier
Reviewed By: michalgr

Differential Revision: D3961648

fbshipit-source-id: 3c77d3c1352fd89e12163eee393ffcebe09ea8e3
2016-10-25 07:13:51 -07:00
Mike Lambert cd6f9f95d2 Simplify react-native overrides when building from source
Summary:
You may want to double-check that this works perfectly (I am trying to move away from RN-from-source, since my changes were upstreamed), but it seems to build without errors for me. And this has the advantage of working seamlessly with "rnpm", which isn't smart enough to add these excludes when linking modules.
Closes https://github.com/facebook/react-native/pull/9954

Differential Revision: D4074059

fbshipit-source-id: e152945ea66605698c18c1d0d078fbf312f1658e
2016-10-25 04:43:34 -07:00
Anthony Sherbondy f930270b00 Fix for TouchableNativeFeedback having Animated.Component direct child
Summary:
Fixes #7996.
Test included.
Not sure this is the best way to go, just a simple solution since the TouchableNativeFeedback is trying to clone the component with a Native component, then seems like it should wrap it with Animated.Component if the incoming child was.
Closes https://github.com/facebook/react-native/pull/10081

Differential Revision: D4073603

fbshipit-source-id: 7827198a3e4697c14e37762cdca93f46a5a1d716
2016-10-25 00:28:37 -07:00
Michał Gregorczyk cfebad97b2 Synchronize before acquiring file lock
Reviewed By: dcaspi

Differential Revision: D4071662

fbshipit-source-id: 3458ff103fddb82a7588d7890f8bc931c0e19e14
2016-10-24 23:14:08 -07:00
Kevin Lacker 5f15554100 Fix a typo
Summary:
node_nodules => node_modules
Closes https://github.com/facebook/react-native/pull/10529

Differential Revision: D4072000

Pulled By: JoelMarcey

fbshipit-source-id: dcac771c3b960330535c459ddcc9eb6b18a30841
2016-10-24 17:43:37 -07:00
Kevin Lacker 2fc9d7ee43 Update the issue template
Summary:
I notice most people filing issues are ignoring the issue template. I think we should try making it more concise, in particular asking people to provide a rnplay.org reproduction if it is possible.
Closes https://github.com/facebook/react-native/pull/10526

Differential Revision: D4070980

Pulled By: hramos

fbshipit-source-id: 0781fb9e410d50f8000b6c8cacfd5e5f9e881317
2016-10-24 15:43:34 -07:00
aleclarson 178a19f3da Fix 'mapHeaderSearchPaths'
Summary:
👍
Closes https://github.com/facebook/react-native/pull/9976

Differential Revision: D4070412

fbshipit-source-id: fc0a1d10606faa117d46eeab62669c62923ce935
2016-10-24 15:13:30 -07:00
Kevin Lacker c4aa29c753 Update Android support URL
Summary:
> Explain the **motivation** for making this change. What existing problem does the pull request solve?

There's no longer a seaprate page for Android setup instructions, it just redirects to the getting started page, where you have to navigate futher.

**Test plan (required)**

None.
Closes https://github.com/facebook/react-native/pull/10524

Differential Revision: D4069696

Pulled By: lacker

fbshipit-source-id: 67f6450f550cbbf446476ea824a6915125e823ba
2016-10-24 13:43:36 -07:00
Rob Clouth 157a03dd8d Fixes react-native link for apps with extra xcode projects in the root folder
Summary:
Adds a ```sort``` to ```findProject(folder)``` to boost ones in IOS_BASE to the top. Otherwise, if for example there is a git submodule project in the root app folder, the method will pick that one instead and linking will fail.
Fixes issue #10494
Closes https://github.com/facebook/react-native/pull/10495

Differential Revision: D4069439

Pulled By: lacker

fbshipit-source-id: 4328ac55389ed51cb42759fcf8360e56d5058136
2016-10-24 13:13:46 -07:00
Konstantin Raev 25d9f86f99 Added ability to not run IOS tests on CI
Reviewed By: emilsjolander

Differential Revision: D4051046

fbshipit-source-id: c17fbe5d75f4f513a3ed4b708cac7cb7f9377f0b
2016-10-24 12:43:34 -07:00
Emil Sjolander 1ba4e8b9c6 Reduce duplicate function calls
Reviewed By: gkassabli

Differential Revision: D4068140

fbshipit-source-id: 91261afb73e1c5e23c2cfc84df6ecc5c844a4e78
2016-10-24 12:28:39 -07:00
Emil Sjolander 6664b816d7 Dont create a spacing object for returning margin, padding, border, and position
Differential Revision: D4050773

fbshipit-source-id: 3fd04c27f887a36875e455b5404a17154ac18f91
2016-10-24 10:43:43 -07:00
Emil Sjolander 58b5e28e71 Simplify memory model between managed and unmanaged memory
Differential Revision: D4051454

fbshipit-source-id: 8f5d010be520b3d1c981a7f85e5e6d95773ea6c1
2016-10-24 10:43:43 -07:00
Jean Lauliac 6a774f0af1 node-haste/Cache: @flow
Reviewed By: davidaurelio

Differential Revision: D4043681

fbshipit-source-id: 8c82b394f4df9bb0d580f405ce472c69224485f5
2016-10-24 10:29:06 -07:00
Fada Chen fc6eb51996 fix FlowFixMe in SwipeableQuickActionButton
Reviewed By: fred2028

Differential Revision: D4061448

fbshipit-source-id: 255ae39a16d89d89bbd7fac3bc1dd5350a578d0c
2016-10-24 09:58:53 -07:00
Ovidiu Viorel Iepure b68790cd57 Activity session
Summary: Add session ID to be appended to every event in the current Packager session.

Reviewed By: davidaurelio

Differential Revision: D4029580

fbshipit-source-id: 8c34c1f44ee63f845d15f8f89e491ab5c936fb21
2016-10-24 05:43:43 -07:00
Benoit Lemaire a7e333402d Add a few devsupport unit tests
Summary:
This PR adds a few unit tests to two devsupport classes, repectively

- JSDebuggerWebSocketClient
and
- JSPackagerWebSocketClient

Unit tests do not cover all methods / branches of the code. I solely focused on testing things having to do with JSON serialization as I am considering some quick refactoring to get rid of Jackson. Just prepping safety net with these few tests before starting.
Closes https://github.com/facebook/react-native/pull/10516

Differential Revision: D4067433

Pulled By: bestander

fbshipit-source-id: 97dc356c5eca5965914be074a7175cb48f038c4c
2016-10-24 03:58:33 -07:00
Emil Sjolander ea6458b63e Remove flex shorthand getter because it doesnt make a lot of sense
Reviewed By: gkassabli

Differential Revision: D4064674

fbshipit-source-id: 69935b85042020b4e8c61a393c1be8f4d42a6674
2016-10-24 03:44:22 -07:00
Emil Sjolander dc142ad8f9 Dont override flexShrink, flexGrow, and flexBasis with shorthand flex
Reviewed By: gkassabli

Differential Revision: D4064696

fbshipit-source-id: db2d4b8e60209f0a9eed6794a167b85e453be41c
2016-10-24 03:44:18 -07:00
Rahul Jain 40aef6edee Fixes for SimpleNavigationApp
Summary:
Changes made in React-Native Docs

1. Removed unnecessary imports `Text, View` from `SimpleNavigationApp`
2. Took MyScene propTypes out of the class as `static propTypes = {` throws parsing error via eslint
Closes https://github.com/facebook/react-native/pull/10513

Differential Revision: D4066367

Pulled By: hramos

fbshipit-source-id: f7d0ccd5f20637a043e96e115a4c40ce6121a737
2016-10-23 12:28:53 -07:00
Emil Sjolander 978d45ddef Forward gLogger output to adb on android platforms
Reviewed By: splhack

Differential Revision: D4064619

fbshipit-source-id: de23e72844e25106d0db756064f5699959f45ed2
2016-10-23 10:58:40 -07:00