Summary:
public
The `RCTJSCProfiler` was created but hadn't been added to the OSS xcodeproj, add it now.
Reviewed By: mgd
Differential Revision: D2761259
fb-gh-sync-id: 3287bb48c39cd2ff1a73fd03f53f67fe95aaac4b
Summary:
JS relies on the URL returned by SourceCodeModule to load packager assets. Because we currently return localhost when debugging (because that's the URL Chrome uses), assets don't load when debugging. This makes it so SourceCodeModule still returns the package URL relative to the emulator / device even when debugging.
public
Reviewed By: astreet
Differential Revision: D2759710
fb-gh-sync-id: bab6a88ef044b8b4d971381e3b23c59fa9aa2ed0
Summary:
Here is a showcase of 2 bugs that are fixed with this PR: touchability of title, touchability of overlapped top-right positionned (under the navbar).
(i'm using the inspector)
![bug](https://cloud.githubusercontent.com/assets/211411/11809475/7b6ba71a-a327-11e5-90cf-cbe58637c447.gif)
I have a navbar with a back button, a Title area with a **Green Circle**, a Right area with nothing inside.
In my Screen View, I've positioned in absolute a **Red Rectangle** just on the top-right corner under the navbar.
I want my **Green Circle** and **Red Rectangle** to be touchable but in current React Native version, this is not possible: as shown in the gif, the 3 LeftButton/Title/RightButton wrapper View are **catching the touch events**. My PR allows events to go through these wrapper View.
**After the fix:**
![nobug](https://cloud.githubusercontent.com/assets/211411/11809590/3b803994-a328-11e5-81f7-c1a3bab45e1b.gif)
Complementary Notes:
- in the case of the Red Rectangle, only the lower part of it i
Closes https://github.com/facebook/react-native/pull/4786
Reviewed By: svcscm
Differential Revision: D2760205
Pulled By: androidtrunkagent
fb-gh-sync-id: 55bb141c8f61ab537ff9e832b65b04cb904dfeb9
Summary:
public
Most of the time - especially during app startup - when we call UIManager.manageChildren(), we are actually just adding the first set of children to a newly created view.
This case is already optimized for in the JS code, by memoizing index arrays at various sizes, but this is not especially efficient since it is still sending an array of indices with each call that could be easily inferred on the native side instead.
I've added a hybrid native/JS optimization that improves the performance for this case. It's not a huge win in terms of time saved, but benchmarks show improvements in the ~1% range for several of the app startup metrics.
Reviewed By: tadeuzagallo
Differential Revision: D2757388
fb-gh-sync-id: 74f0cdbba93af2c04d69b192a8c2cc5cf429fa09
Summary:
Add a method to handle URLs registered to the app,
```js
IntentAndroid.getInitialURL(url => {
if (url) {
// do stuff
}
});
```
Refer - http://developer.android.com/training/app-indexing/deep-linking.html#adding-filters
The API cannot be same as the iOS API (i.e. as a constant), as the activity is not availble at the time of module initialization. Moreover, multiple activties can share the same bridge instance, and the activity itself is not a constant. Hence the initialURL can change.
Closes https://github.com/facebook/react-native/pull/4320
Reviewed By: svcscm
Differential Revision: D2759667
Pulled By: foghina
fb-gh-sync-id: b725231ae1401fa5565d444eee5a30d303e263ae
Summary:
public
When forwarding the unbundle code to the bridge, we’re passing the code by value.
This changes the affected method to take it by reference.
Reviewed By: astreet
Differential Revision: D2759569
fb-gh-sync-id: 508d4f4d56bcbdd5a7df5610cf9040121f8878ef
Summary:
public
Thanks to the new lazy initialization system for modules, `RCTDidCreateNativeModules` no longer does what the name implies.
Previously, `RCTDidCreateNativeModules` was fired after all native modules had been initialized. Now, it simply fires each time the bridge is reloaded. Modules are created on demand when they are needed, so most of the assumptions about when `RCTDidCreateNativeModules` will fire are now incorrect.
This diff deprecates `RCTDidCreateNativeModules`, and adds a new notification, `RCTDidInitializeModuleNotification`, which fires each time a module a new module is instantiated.
If you need to access a module at any time you can just call `-[bridge moduleForClass:]` and the module will be instantiated on demand. If you want to access a module *only* after it has already been instantiated, you can use the `RCTDidInitializeModuleNotification` notification.
Reviewed By: tadeuzagallo
Differential Revision: D2755036
fb-gh-sync-id: 25bab6d5eb6fcd35d43125ac45908035eea01487
Summary:
public
A lot of the core modules have to use private methods in the bridge, specially
since the `RCTBatchedBridge` interface is never exposed. That was leading to a
lot of different private bridge categories spread across different modules,
which makes harder to identify which modules are affected by private API changes.
Replace all the categories with a single private header.
Reviewed By: nicklockwood
Differential Revision: D2757564
fb-gh-sync-id: 793158b9082d542b74a6094ed0db4d5dc3a88f78
Summary:
public
Clean up the `RCTContextExecutor` a little bit by converting the exposed hooks to use the ObjC API.
Reviewed By: nicklockwood
Differential Revision: D2757363
fb-gh-sync-id: c6f5f53c5c1adb78af1cdb449268b6b3cc9740e8
Summary:
Improve error message when profiling data cannot be sent to the packager
public
Reviewed By: tadeuzagallo
Differential Revision: D2749489
fb-gh-sync-id: 26bd56d05be5f3579e45c2407974dd2b885460fc
Summary:
Extract JSC profiler API which can now be used even if profiler is unavailable.
public
Reviewed By: tadeuzagallo
Differential Revision: D2749217
fb-gh-sync-id: 1ffa6f37323ea0ddbda3fdacfdf8a9b360185b2e
Summary:
public
The profiler currently only hooks into bridge modules, extend it so we also
log method calls on views.
Reviewed By: jspahrsummers
Differential Revision: D2755213
fb-gh-sync-id: e8ff224eec08898340d05e104772ff1626538bd5
Summary:
Keep `PullToRefreshViewAndroid` consistent with other components that allow optimization through `setNativeProps`.
Also updates the example to make sure it is working.
Closes https://github.com/facebook/react-native/pull/4771
Reviewed By: svcscm
Differential Revision: D2756033
Pulled By: androidtrunkagent
fb-gh-sync-id: a1f483a3809f01bca06a6a09498f9a89fd65f572
Summary:
If a console exists, keep the original as `global.originalConsole` before overwriting `global.console` with a polyfill. This matches what we do for XHR, fetch, and some other libraries.
Closes https://github.com/facebook/react-native/pull/3322
Reviewed By: svcscm
Differential Revision: D2755873
Pulled By: androidtrunkagent
fb-gh-sync-id: 4c23f807b73b79cfa9fbbd4e2814d76eecabd596
Summary:
public
Attempt to fix https://travis-ci.org/facebook/react-native/builds
Steps:
cd .../react-native-github
npm install fbjs-haste@0.3.4
# manually update npm-shrinkwrap.json (normally done using npm shrinkwrap --dev but the shrinkwrap file is out of date)
Reviewed By: zpao
Differential Revision: D2755259
fb-gh-sync-id: c5237adcc14e9e21cc09dfad765eff16ddf28484
Summary:
public
In order to handle methods that returns struct in i386 and x86_64 we'd need to implement special methods (like objc_msgSend_stret),
but we'll just bail out for now, since there's very few usages.
Reviewed By: jspahrsummers
Differential Revision: D2754732
fb-gh-sync-id: d3585d244633d918770ef79a52dee9cdf87a53da
Summary:
Closes#4290
`mostRecentEventCount` was always being set after `text` on iOS, so let's be really explicit about the order here as we were doing on Android: always call `setNativeProps` providing the `mostRecentEventCount` before we call `onChange` or `onChangeText`.
I also ripped out storing `mostRecentEventCount` in the state, which isn't necessary since we're always doing it through `setNativeProps`.
Closes https://github.com/facebook/react-native/pull/4588
Reviewed By: svcscm
Differential Revision: D2754565
Pulled By: nicklockwood
fb-gh-sync-id: a1401f39b4e19248095517c2a3503cd2af59fa47
Summary:
public
New version of gradle has a better support for zipTree copy task. Since we have a few of those including one for boost library which used to take very long, after upgrading we no longer need 6a656a1.
Also seems like many improvements made to gradle since 2.2 made it perform better on incremental builds (around 10% improvement on my laptop).
Command used to upgrade gradle version:
gradle wrapper --gradle-version 2.9
Some of the plugins require updating as well since the previous versions were incompatible with gradle 2.9.
Closes https://github.com/facebook/react-native/pull/4462
Reviewed By: mkonicek
Differential Revision: D2754786
Pulled By: mkonicek
fb-gh-sync-id: 92c07d29aec6d5b4b2c55205b42b135c4d9479a9