Commit Graph
2196 Commits
Author SHA1 Message Date
Lorenzo Sciandra af79164b58 [0.57.8] Bump version numbers 2018-12-13 10:23:26 +00:00
Zack SheppardandLorenzo Sciandra ba5015104d Extend reason message for RCTFatalException (#22532)
Summary:
Fixes #22530

As described in the issue, the previous behavior for the `RCTFatal` macro was to truncate the `reason` on the resulting `NSException` to 75 characters. This would ensure the reason would fit on a single line, but resulted in issues debugging errors that occurred in the wild, as many crash logging tools (like Sentry) discard the `name` value of the exception and use the `reason` as their primary identifier. At 75 characters, useful information like the location of the error would usually be truncated.

- [x] This extends the truncation threshold to 175 characters, which should be short enough to prevent full-screen-takeover length errors, but long enough to provide useful context to the error.
- [x] This adds a `userInfo` value to the resulting `NSException`. It copies over the `userInfo` from the `NSError` passed to the macro, and adds an "untruncated message" value that contains the untruncated version of the `NSException`'s reason.

[iOS] [Changed] - RCTFatalExceptions now include more information in their reason and a userInfo.

<!--

  CATEGORY may be:

  - [General]
  - [iOS]
  - [Android]

  TYPE may be:

  - [Added] for new features.
  - [Changed] for changes in existing functionality.
  - [Deprecated] for soon-to-be removed features.
  - [Removed] for now removed features.
  - [Fixed] for any bug fixes.
  - [Security] in case of vulnerabilities.

  For more detail, see https://keepachangelog.com/en/1.0.0/#how

  MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

  EXAMPLES:

  [General] [Added] - Add snapToOffsets prop to ScrollView component
  [General] [Fixed] - Fix various issues in snapToInterval on ScrollView component
  [iOS] [Fixed] - Fix crash in RCTImagePicker

-->
Pull Request resolved: https://github.com/facebook/react-native/pull/22532

Differential Revision: D13373469

Pulled By: cpojer

fbshipit-source-id: ac140d14ce76e1664869437c2c178bdd65ab6e0e
2018-12-12 16:59:20 +00:00
ifsnowandLorenzo Sciandra 79011d77cc Fixed for supporting mediaPlaybackRequiresUserAction under iOS 10. (#22208)
Summary:
There is a problem that the `mediaPlaybackRequiresUserAction` property does not work in WKWebView(`useWebKit`) under iOS 10.

I fully know you are currently working to migrate the core's WebView to the standalone `react-native-webview` project. This has already been submitted to PR in `react-native-webview` and will be merged soon. I hope this fix applies to `react-native` before your migration is done.
Pull Request resolved: https://github.com/facebook/react-native/pull/22208

Differential Revision: D13334868

Pulled By: cpojer

fbshipit-source-id: f2a811a477054155ed5fe62ab31e4d63f70e7848
2018-12-12 16:58:35 +00:00
Valentin SherginandLorenzo Sciandra b739c115f9 Summary:
Calling -[UIScrollView setContentOffset] with NaN values can cause a crash. That's not clear why exactly the computation returns NaN sometime, but the implemented sanitizing should help to detect this problem during development (and this also prevents the app from crashing).

See attached task for more details.

Reviewed By: fkgozali

Differential Revision: D13242729

fbshipit-source-id: 747bf1b42e02597e9f1300eee24547563ab29b27
2018-12-12 16:55:53 +00:00
Lorenzo Sciandra 2151c30474 [0.57.7] Bump version numbers 2018-11-27 13:10:20 +00:00
Lorenzo Sciandra d5332fbad2 [0.57.6] Bump version numbers 2018-11-26 17:19:28 +00:00
Adam ComellaandLorenzo Sciandra ac5aaec03f iOS: Support inline view truncation (#21456)
Summary:
If text is truncated and an inline view appears after the truncation point, the user should not see the inline view. Instead, we have a bug such that the inline view is always visible at the end of the visible text.

This commit fixes this by marking the inline view as hidden if it appears after the truncation point.

This appears to be a regression. React Native used to have logic similar to what this commit is adding: https://github.com/facebook/react-native/blob/1e2a924ba60001c6f0587c7561536f00b2922cbf/Libraries/Text/RCTShadowText.m#L186-L192

**Before fix**

Inline view (blue square) is visible even though it appears after the truncation point:

![image](https://user-images.githubusercontent.com/199935/46382038-d3a71200-c65d-11e8-8179-2ce4aad8d010.png)

The full text being rendered was:

```
<Text numberOfLines={1}>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
  sed do eiusmod tempor incididunt ut labore et dolore magna
  <View style={{width: 50, height: 50, backgroundColor: 'steelblue'}} />
</Text>
```

**After fix**

Inline view is properly truncated:

![image](https://user-images.githubusercontent.com/199935/46382067-fdf8cf80-c65d-11e8-84ea-e2b71c229dae.png)

**Test Plan**

Tested that the inline view is hidden if it appears after the truncation point when `numberOfLines` is 1 and 2. Similarly, verified that the inline view is visible if it appears before the truncation point.

**Release Notes**

[IOS] [BUGFIX] [Text] - Fix case where inline view is visible even though it should have been truncated

Adam Comella
Microsoft Corp.
Pull Request resolved: https://github.com/facebook/react-native/pull/21456

Differential Revision: D10182991

Pulled By: shergin

fbshipit-source-id: a5bddddb1bb8672b61d4feaa04013a92c8224155
2018-11-26 16:41:41 +00:00
Zack GomezandLorenzo Sciandra 79b33118ea Fix inability to remove 'Disabled' state from AccessibilityStates
Summary:
D8842691 split AccessibilityTraits into multiple RN properties.  However, the accessor code did not support REMOVING traits.
This results in buttons that were disabled (AccessibilityTraits & NotEnabled === true) never being enabled.

Fix the issue by making the split accessors properly mask in the bits, allowing you unset them without disturbing bits managed by the other accessor.

NOTE: setting AccessibilityTraits and AccessibilityRole or AccessibilityStates will still result in bugs.

Reviewed By: shergin

Differential Revision: D9661970

fbshipit-source-id: 77d70dd0754f2eaf8cbf895bfc13757c697a76d8
2018-11-26 16:34:14 +00:00
Lorenzo Sciandra 44bfffb116 [0.57.5] Bump version numbers 2018-11-13 15:07:04 +00:00
Mike McCartneyandLorenzo Sciandra 277c19c93e Fix Xcode 10 errors relating to third-party (0.57-stable) 2018-11-12 10:26:05 +00:00
Lorenzo Sciandra 468161232e [0.57.4] Bump version numbers 2018-10-25 17:52:59 +01:00
Slobodan PredolacandLorenzo Sciandra 356fcf00dc Relax the requirement that lazy module cannot be initialized on the main thread
Summary:
[RN] Relax the requirement that lazy module cannot be initialized on the main thread
I tried to understand the D5364734 that intoduced this, and I am not sure, but belive that asserting here is too strict. If you have a module that you want to lazily initialize, and module does not demand the main queue, it should be just a warning if you run on the main queue, not necessarily an error.

Reviewed By: mmmulani

Differential Revision: D10429880

fbshipit-source-id: 018c211d45b98dd8c552bf0289fe517d05e56d47
2018-10-23 09:31:53 +01:00
Lorenzo Sciandra 8fd5bcc888 [0.57.3] Bump version numbers 2018-10-12 12:19:21 +01:00
Lorenzo Sciandra 46bb737b98 Revert "[0.57.3] Bump version numbers"
This reverts commit 56cde24863.
2018-10-12 10:28:20 +01:00
Mike Grabowski 56cde24863 [0.57.3] Bump version numbers 2018-10-11 23:39:41 +02:00
Alexey LangandMike Grabowski a4ef256167 Bump up the buffer size and show a warning if the trace might be truncated
Summary: The current buffer size isn't enough even to capture a short TTI trace.

Reviewed By: mhorowitz

Differential Revision: D10112538

fbshipit-source-id: 266fa6ffa916049245b21d7725a364d75589c776
2018-10-11 23:13:16 +02:00
James ReggioandMike Grabowski dba2235d95 Fix artifacting on RN-drawn borders with asymmetric radii (#21208)
Summary:
This PR fixes an obscure rendering bug on iOS for borders with asymmetric radii. It appears to be a problem with the custom drawing that React Native performs when it cannot use native UIKit/CoreAnimation border drawing.
Pull Request resolved: https://github.com/facebook/react-native/pull/21208

Differential Revision: D10130120

Pulled By: hramos

fbshipit-source-id: d9fbc5c622c060db15658d038a068216b47bb26d
2018-10-11 21:37:59 +02:00
Hector Ramos 4a440f4018 [0.57.2] Bump version numbers 2018-10-04 13:29:30 -07:00
Hector Ramos 67dca8bbf9 Revert "[0.57.2] Bump version numbers"
This reverts commit b7437639df.
2018-10-04 13:29:04 -07:00
Hector Ramos b7437639df [0.57.2] Bump version numbers 2018-10-04 11:40:58 -07:00
Hector Ramos e4607a4ec3 Revert "[0.57.2] Bump version numbers"
This reverts commit 8e810838a2.
2018-10-04 11:40:24 -07:00
Mike Grabowski 8e810838a2 [0.57.2] Bump version numbers 2018-10-04 17:01:57 +02:00
Mike Grabowski 29fb119404 Revert "[0.57.2] Bump version numbers"
This reverts commit 4aec7c953e.
2018-10-04 17:01:51 +02:00
Mike Grabowski 4aec7c953e [0.57.2] Bump version numbers 2018-10-02 14:39:35 +02:00
Mike Grabowski 63cf888161 Revert "[0.57.2] Bump version numbers"
This reverts commit aae1e296e9.
2018-10-02 14:38:01 +02:00
Mike Grabowski aae1e296e9 [0.57.2] Bump version numbers 2018-10-02 14:30:15 +02:00
Hector Ramos ba89bf4252 [0.57.1] Bump version numbers 2018-09-21 09:22:17 -07:00
Hector Ramos 202bb14469 Removing development team from Xcode project. (#20054)
Summary:
Fixes #16881

Removing development team from Xcode project.
Pull Request resolved: #20054
GitHub Author: Caleb (Rojuinex) Bartholomew rojuinex@gmail.com

Differential Revision: D9440144

Pulled By: hramos

fbshipit-source-id: 5cb4cf24c5f7562632006f0d0143f762fed04295
2018-09-21 09:21:24 -07:00
Sergei DryganetsandLorenzo Sciandra 0a5eefbf29 Debug only code were leaking into release builds on iOS. (#21232)
Summary:
RCT_DEBUG is always defined - it is just rather 0 or 1 so
```#ifndef RCT_DEBUG is always true```
Pull Request resolved: https://github.com/facebook/react-native/pull/21232

Differential Revision: D9982316

Pulled By: hramos

fbshipit-source-id: 5408bfcf95a6ed2beae38217a6ad1ee43950857d
2018-09-21 15:42:06 +01:00
Jeff ThomasandLorenzo Sciandra 5f85b256cc Way to register RCT_MODULE in Plugin2.0 instead of +load
Summary:
[RFC] WIP: Way to register RCT_MODULE in Plugin2.0 instead of +load

This seemed like the simplest way to do this to register in the existing
didNotFindModule callback so that we don't have to touch any opensource code.

NOTE: The new version of this fixes the problems with dylibs, but not the -ObjC flag removal. This seems like the right call to avoid users having to implement c-functions to return their classes; instead we used objc_getClass.

Reviewed By: dshahidehpour

Differential Revision: D9112719

fbshipit-source-id: cf8df97d7c443cafa0e06a1e61bdf2612944ed87
2018-09-21 15:42:03 +01:00
Valentin SherginandLorenzo Sciandra e884d7f9fc Making RCTIsIPhoneX() return true for the R and Max models
Summary: Actual sizes can be found on the offical website.

Reviewed By: fkgozali

Differential Revision: D9837072

fbshipit-source-id: 38b3f2177629e82740eecc8df4566febbe20815a
2018-09-21 15:37:39 +01:00
Mike Grabowski 3008c3ccba [0.57.0] Bump version numbers 2018-09-12 13:21:38 +02:00
Lindsay WinklerandHector Ramos b77d640432 Add the new RCTWKWebView* files to build target on iOS (#21031)
Summary:
These files support backing a `WebView` component with the WebKit-based
`WKWebView` on iOS.  These files need to be included in the Xcode
build target so that they are compiled, linked and ultimately available
to the UIManager at runtime, so that the correct views can be instantiated
when a `WebView` is passed the prop `useWebKit={true}`.
Pull Request resolved: https://github.com/facebook/react-native/pull/21031

Differential Revision: D9762185

Pulled By: hramos

fbshipit-source-id: 0d699e40afd56041cbbb76d77f11ba6932403d6d
2018-09-11 15:25:28 -07:00
Hector Ramos 8402c97f83 [0.57.0-rc.4] Bump version numbers 2018-09-06 16:13:03 -07:00
Hector Ramos cb471c7b3e Revert "[0.57.0-rc.4] Bump version numbers"
This reverts commit 9dcc39586c.
2018-09-06 16:12:06 -07:00
Hector Ramos 9dcc39586c [0.57.0-rc.4] Bump version numbers 2018-09-06 15:28:55 -07:00
Hector Ramos 5ffa4b319b Revert "[0.57.0-rc.4] Bump version numbers"
This reverts commit 9974d4f1e7.
2018-09-06 15:28:49 -07:00
Mike Grabowski 9974d4f1e7 [0.57.0-rc.4] Bump version numbers 2018-09-03 11:07:32 +02:00
Mike Grabowski f28a6bbc44 Revert "[0.57.0-rc.4] Bump version numbers"
This reverts commit 6d4970f886.
2018-09-03 11:06:17 +02:00
Mike Grabowski 6d4970f886 [0.57.0-rc.4] Bump version numbers 2018-09-02 19:13:46 +02:00
Oleg LokhvitskyandMike Grabowski ef7e99c1bb ScrollView snapToOffsets
Summary:
* Added snapToOffsets prop to ScrollView. Allows snapping at arbitrary points.

* Fixed pagingEnabled not being overridden by snapToInterval on iOS.

* Fixed Android *requiring* pagingEnabled to be defined alongside snapToInterval.
* Added support for decelerationRate on Android.

* Fixed snapping implementation. It was not calculating end position correctly at all (velocity is not a linear offset).
  * Resolves https://github.com/facebook/react-native/issues/20155
* Added support for new content being added during scroll (mirrors existing functionality in vertical ScrollView).

* Added support for snapToInterval.
  * Resolves https://github.com/facebook/react-native/issues/19552

Reviewed By: yungsters

Differential Revision: D9405703

fbshipit-source-id: b3c367b8079e6810794b0165dfdbcff4abff2eda
2018-08-31 15:28:00 +02:00
Kevin GozaliandLorenzo Sciandra a3b2f5d05f iOS downgrade error to warning when invoking native module with invalid bridge
Summary: A bunch of flows including JS reload and e2e tests seem to hit the race condition, causing redbox. For now, make it a warning to unblock.

Differential Revision: D9327418

fbshipit-source-id: a72b378d88f7566268fd9415fbd34225c8b931e7
2018-08-31 10:14:56 +01:00
Hector Ramos a8aa8b673c [0.57.0-rc.3] Bump version numbers 2018-08-24 14:51:24 -07:00
Vladimir ZdravkovicandHector Ramos 7ae186cd85 Updated the glog library version from 0.3.4 to 0.3.5 (#20811)
Summary:
While the original reason for this change was because of an issue #20780, with further investigation I concluded that the issue is till present for this combo of versions:
glog - 0.3.5
google-cast-sdk - 4.3.1

Downgrading google-cast-sdk to 4.3.0 fixed the build issue.

Release Notes:
--------------
Updated glog version from 0.3.4 to 0.3.5 for iOS

[IOS] [ENHANCEMENT] [GLOG]
Pull Request resolved: https://github.com/facebook/react-native/pull/20811

Differential Revision: D9485221

Pulled By: hramos

fbshipit-source-id: 65caf0839588384a5229a6165506dc6ef62e5fc5
2018-08-24 12:32:55 -07:00
Hector Ramos f7fc381eda [0.57.0-rc.2] Bump version numbers 2018-08-22 14:55:35 -07:00
Hector Ramos a92bb3b06e [0.57.0-rc.1] Bump version numbers 2018-08-22 13:20:20 -07:00
Hector Ramos 2739bf45cc Revert "[0.57.0-rc.1] Bump version numbers"
This reverts commit 8cd5be67ff.
2018-08-22 13:19:59 -07:00
Hector Ramos 8cd5be67ff [0.57.0-rc.1] Bump version numbers 2018-08-22 12:54:21 -07:00
Héctor RamosandLorenzo Sciandra b44449395c Fix old license that snuck into repo (#20702)
Summary:
Quick trivial PR to add back a necessary header. Fixes CI as well.
Pull Request resolved: https://github.com/facebook/react-native/pull/20702

Differential Revision: D9374430

Pulled By: hramos

fbshipit-source-id: dba0f1d4fc80e39242d8c3e6d1e0007492d2860d
2018-08-22 17:17:12 +01:00
Ramanpreet NaraandLorenzo Sciandra e0df3a1a8b Gate usage of WebKit 10.0 APIs
Reviewed By: mmmulani

Differential Revision: D9362001

fbshipit-source-id: 62cde6bcc1f190c168973b173ce55c029328bfbf
2018-08-22 17:17:12 +01:00