chrisfisher/react-native-directed-scrollview

Issue when linking via cocoapods

Opened this issue · 1 comments

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 :)

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 .