fix(iOS): Meta method 'UIScrollViewContentInsetAdjustmentBehavior:' conflict warning

This converter is already defined in
[RCTScrollViewManager.m](https://github.com/facebook/react-native/blob/master/React/Views/ScrollView/RCTScrollViewManager.m#L40).

Redefining it in react-native-webview can cause undefined behaviour when
used. Since ScrollView is unlikely to go away, we can take a dependency on it.

All current tests should pass.

When building a React Native app with `react-native-webview`, the following
warning can be seen in the build logs:

```
Meta method 'UIScrollViewContentInsetAdjustmentBehavior:' in category from /~/Library/Developer/Xcode/DerivedData/App-geojljebaazfrrgvxfkjjpiwmdlg/Build/Products/Debug-iphonesimulator/React-Core/libReact-Core.a(RCTScrollViewManager.o) conflicts with same method from another category
```

The warning should go away after removing the offending function.

Co-authored-by: Jason Safaiyeh <safaiyeh@protonmail.com>
This commit is contained in:
Tommy Nguyen 2020-01-20 05:07:35 +01:00 committed by Jason Safaiyeh
parent 3a9218031f
commit e6edc6dc73
1 changed files with 0 additions and 13 deletions

View File

@ -14,19 +14,6 @@
@interface RNCWebViewManager () <RNCWebViewDelegate>
@end
@implementation RCTConvert (UIScrollView)
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */
RCT_ENUM_CONVERTER(UIScrollViewContentInsetAdjustmentBehavior, (@{
@"automatic": @(UIScrollViewContentInsetAdjustmentAutomatic),
@"scrollableAxes": @(UIScrollViewContentInsetAdjustmentScrollableAxes),
@"never": @(UIScrollViewContentInsetAdjustmentNever),
@"always": @(UIScrollViewContentInsetAdjustmentAlways),
}), UIScrollViewContentInsetAdjustmentNever, integerValue)
#endif
@end
@implementation RNCWebViewManager
{
NSConditionLock *_shouldStartLoadLock;