chrisfisher / react-native-directed-scrollview

UNMAINTAINED- see below. A natively implemented scrollview component which lets you specify different scroll directions for child content.
MIT License
149 stars 67 forks source link

Issue when linking via cocoapods #50

Open davidgruebl opened 5 years ago

davidgruebl commented 5 years ago

First of all thanks to everyone involved in building this great component!

When running react-native link react-native-directed-scrollview with CocoaPods setup I ran into the following error: "Invariant Violation: requireNativeComponent: “DirectedScrollViewChild” was not found in the UIManager". I saw in the Pods Xcode Project that this lib was missing. I got around it by simply deleting the "ios/Pods" file and running react-native link react-native-directed-scrollview again, so it would link it directly in the main Xcodeproj rather than via the pod file. After that i restored my Podfile. However I'm not exactly sure what's the issue when react-native link uses the pod file. (I did run `pod install and also tried multiple times deleting node_modules, Pods, Podfile.lock, DerivedData) I'm mostly writing this in case anyone runs into the same issue so they know how to work around :)

ntk0104 commented 4 years ago

First of all thanks to everyone involved in building this great component!

When running react-native link react-native-directed-scrollview with CocoaPods setup I ran into the following error: "Invariant Violation: requireNativeComponent: “DirectedScrollViewChild” was not found in the UIManager". I saw in the Pods Xcode Project that this lib was missing. I got around it by simply deleting the "ios/Pods" file and running react-native link react-native-directed-scrollview again, so it would link it directly in the main Xcodeproj rather than via the pod file. After that i restored my Podfile. However I'm not exactly sure what's the issue when react-native link uses the pod file. (I did run `pod install and also tried multiple times deleting node_modules, Pods, Podfile.lock, DerivedData) I'm mostly writing this in case anyone runs into the same issue so they know how to work around :) Thanks for your solution. I will summary for anyone who stuck in this step.

  1. npm install react-native-directed-scrollview
  2. delete pod folder, pod.lock, build in /ios folder
  3. react-native link react-native-directed-scrollview (instead of 'react-native link')
  4. cd ios and pod install
  5. react-native start -- --reset-cache (in seperate terminal window)
  6. react-native run-ios (in seperate terminal window) I also recommend using node 10. Notice that: I can only install this lib in version < 0.6 . I still cannot install this lib for react-native >= 0.6 .