Explorar el Código

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>
Tommy Nguyen hace 4 años
padre
commit
e6edc6dc73
Se han modificado 1 ficheros con 0 adiciones y 13 borrados
  1. 0
    13
      ios/RNCWebViewManager.m

+ 0
- 13
ios/RNCWebViewManager.m Ver fichero

@@ -14,19 +14,6 @@
14 14
 @interface RNCWebViewManager () <RNCWebViewDelegate>
15 15
 @end
16 16
 
17
-@implementation RCTConvert (UIScrollView)
18
-
19
-#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */
20
-RCT_ENUM_CONVERTER(UIScrollViewContentInsetAdjustmentBehavior, (@{
21
-                                                                  @"automatic": @(UIScrollViewContentInsetAdjustmentAutomatic),
22
-                                                                  @"scrollableAxes": @(UIScrollViewContentInsetAdjustmentScrollableAxes),
23
-                                                                  @"never": @(UIScrollViewContentInsetAdjustmentNever),
24
-                                                                  @"always": @(UIScrollViewContentInsetAdjustmentAlways),
25
-                                                                  }), UIScrollViewContentInsetAdjustmentNever, integerValue)
26
-#endif
27
-
28
-@end
29
-
30 17
 @implementation RNCWebViewManager
31 18
 {
32 19
   NSConditionLock *_shouldStartLoadLock;