wangzhi17 / react-native-ezviz-player

React Native 新架构集成萤石云SDK,实现预览和对讲功能,新架构在iOS和android端都已经实现。暂未兼容React Native旧架构。支持reactnative 0.73和react native 0.74.3以上。
MIT License
1 stars 1 forks source link

ios启动也报错了 #2

Closed yuanqing-fu closed 3 months ago

yuanqing-fu commented 3 months ago

/Users/apple/Desktop/workspace/concrete-sense-app-monitor/node_modules/react-native-ezviz-player/ios/RCTEzvizPlayerModule.h:13:9 'RCTEzvizPlayerSpecs/RCTEzvizPlayerSpecs.h' file not found

import "RCTEzvizPlayerSpecs/RCTEzvizPlayerSpecs.h"

这里缺少RCTEzvizPlayerSpecs.h这个文件

wangzhi17 commented 3 months ago

切换到第三方包的根目录 node ./../node_modules/react-native/scripts/generate-codegen-artifacts.js --path ./ --outputPath ./../node_modules/react-native-ezviz-player/generated/ -t all

wangzhi17 commented 3 months ago

参考这个地方 https://reactnative.cn/docs/0.73/the-new-architecture/pillars-fabric-components#ios

yuanqing-fu commented 3 months ago

ios,我运行起来了,但是无法播放,也没有报错,代码里是不是还需要配置AppKey?

yuanqing-fu commented 3 months ago

我现在就是这样配置的 <EzvizPlayerView style={{ flex: 1, backgroundColor: '#000000' }} accessToken="" deviceSerial="" cameraNo={1} verifyCode="" onPlayFailed={() => console.log('play failed')} />

pmorandi23 commented 3 months ago

Hello. Please, i having the same issue in iOS with my React Native (Expo)

import "RCTEzvizPlayerSpecs/RCTEzvizPlayerSpecs.h"

 |         ^ 'RCTEzvizPlayerSpecs/RCTEzvizPlayerSpecs.h' file not found

14 | #import <EZOpenSDKFramework/EZPlayer.h> 15 | #import <EZOpenSDKFramework/EZOpenSDK.h>

11 | #import <UIKit/UIKit.h>

12 | #import <React/RCTViewComponentView.h> | ^ 'React/RCTViewComponentView.h' file not found

Can you help me  to solve this?

I already run this command : node ./../node_modules/react-native/scripts/generate-codegen-artifacts.js --path ./ --outputPath ./../node_modules/react-native-ezviz-player/generated/ -t all 

but doesnt solve the issue

Many thanks for your time
wangzhi17 commented 3 months ago

Hello, please upgrade to version 1.1.9 first. This library supports react Native 0.74 or above. I have not used it in expo. These files will be automatically generated by using the yarn iOS command.