shahen94 / react-native-video-processing

Native Video editing/trimming/compressing :movie_camera: library for React-Native
https://shahen94.github.io/react-native-video-processing/
MIT License
1.25k stars 325 forks source link

Swift Compiler Error #261

Open lucastonon opened 5 years ago

lucastonon commented 5 years ago

I am getting a lot of swift errors using:

Any ideia what this could be?

shahen94 commented 5 years ago

Seems issue with Swift version, you should downgrade your swift version or update package

jrartiga commented 4 years ago

image Im not sure what to do, I mean I am using "react-native": "0.61.4", and latest xcode,` what exactly I need to do, I mean as far as I understood, is that I need to migrate somehow your repo to the latest swift?

dittmarconsulting commented 4 years ago

I have exactly the same problem. I followed the video instruction to the dot but I'm also using Xcode 11.2.1 which can only run Swift 4+.

"react": "16.8.3",
"react-native": "0.59.5",
"react-native-video-processing": "^1.20.0"

Need urgent help to fix that compile issue. I have spent many hours and tried every trick on the book.

santiagovazquez commented 4 years ago

You should use "react-native-video-processing": "shahen94/react-native-video-processing" on your package.json in order to work with Swift 4+

dittmarconsulting commented 4 years ago

That reduced the errors from 44 to 10 but still it doesn't compile without modifying the source files @santiagovazquez

Screen Shot 2019-12-24 at 11 01 36 am

santiagovazquez commented 4 years ago

@dittmarconsulting I would clone the repo and start from the scratch again. Follow the instructions from the video https://www.youtube.com/watch?v=HRjgeT6NQJM&feature=youtu.be. I did that last week and it worked (with the latest version of Xcode and latest version of RN).

aelarassi commented 4 years ago

@dittmarconsulting I would clone the repo and start from the scratch again. Follow the instructions from the video https://www.youtube.com/watch?v=HRjgeT6NQJM&feature=youtu.be. I did that last week and it worked (with the latest version of Xcode and latest version of RN).

Doesn't work for last version React Native 0.60+

mladibejn commented 4 years ago

Is this solved somehow for 0.61+?

BunHouth commented 4 years ago

@dittmarconsulting I would clone the repo and start from the scratch again. Follow the instructions from the video https://www.youtube.com/watch?v=HRjgeT6NQJM&feature=youtu.be. I did that last week and it worked (with the latest version of Xcode and latest version of RN).

Doesn't work for last version React Native 0.60+

Please check this issue. https://github.com/shahen94/react-native-video-processing/issues/268#issuecomment-591224776

chai86 commented 4 years ago

My steps to get this working from Swift v3.0 -> Swift v4.2, without disrupting your existing project too much:

1) In your package.json file make sure you have: "react-native-video-processing": "git+https://git@github.com/shahen94/react-native-video-processing.git"

2) Replace the RNVideoProcessing.xcodeprojfile with the latest one on GitHub (located in ../node_modules/react-native-video-processing/ios)

3) Replace the ENTIRE RNVideoProcessing folder with the latest one on GitHub

4) Drag and drop the RCTSwiftBridgeModule.hfile into the RNVideoProcessing folder in the folder viewer on the left habd side in XCode (i'm using XCode v10.1)

5) BUILD 👍

MrAlekhin commented 4 years ago

@chai86 not sure what do you mean about step 4. Could you give more context? having 60 swift errors [

Screen Shot 2020-04-26 at 4 20 00 PM

](url)

chai86 commented 4 years ago

@MrAlekhin You need to take the RCTSwiftBridgeModule.h (you'll find it in the latest file in the repo). Make sure you have it in the correct folder (in Windows or Finder). This shold be node_modules/.../ios/RNVideoProcessing.

Then drag it to the left hand side folder structure in XCode (i'm building for iOS), and build

Screenshot 2020-04-26 at 21 19 36