react-native-video: [iOS] undefined is not an object (evaluating NativeModuels.UIManager.RCTVideo.Constants')

Getting this error when I navigate to a scene containing the Video component under ios. However, this only happens when I started the simulator with react-native run-ios. If I run with Xcode, everything works fine.

react native version: react-native@0.25.1

2016-06-03 1 51 49

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 4
  • Comments: 31 (2 by maintainers)

Most upvoted comments

You can do it yourself 1.in the project navigator, right click Libraries, add RCTVideo.xcodeproj to your project 2.select your project,select Build Phases -> Link Binary With Libraries,add libRCTVideo.a 3. re-launching “react-native run-ios”

@nikhildaga sorry, others had commented that running ‘rnpm link react-native-video’ fixed the issue (or otherwise linking manually. Have you done this and are still having issues?

For me the following worked for me:

  • yarn add react-native-video - OR - npm install --save react-native-video
  • then link manually: Open Project in XCode -> right click Libraries -> Add Files to ‘ProjectName’ -> find RCTVideo.xcodeproj in node_modules
  • include both libRCTVideo.a in the Build Phases of the Project (you can get there under the Targets) (libRCTVideo.a : one is within RCTVideo.xcodeproj,the other in RCTVideo.xcodeproj > Products)
  • DO NOT include pod ‘react-native-video’, :path => ‘…/node_modules/react-native-video/react-native-video.podspec’ in the pod file.

I solved it by installing react-native-video with pods :

  1. install pods
  2. add this to your podfile is ios folder of your project : pod 'react-native-video', path: '../node_modules/react-native-video'
  3. launch pod install
  4. maybe delete the “-obj” in the “target support files” of file “pods”. You can find it by opening your xcworkspace file in xcode.
  5. rerun your project

I am also facing this problem,and it still has not been resolved,has anybody can help me solve this issue?

For Android, this should work: https://github.com/react-native-community/react-native-video/issues/184#issuecomment-244913381

For iOS, close the packager, and then rerun the Xcode project.

Still having this issue. Also rnpm or manually linking didn’t work for me. React-Native: 0.29.2 Android: 6.0.2 @mattapperson can you please re-open this issue. thx

thanks everyone, this command worked: resolved re-launching “rnpm link react-native-video” command… i was having the same issue. you just saved me another few hours of banging my head against the wall

Same issue react-native 0.29 on iOs

EDIT: resolved re-launching “rnpm link react-native-video” command…