react-native-video-processing icon indicating copy to clipboard operation
react-native-video-processing copied to clipboard

Swift Compiler Error

Open lucastonon opened this issue 5 years ago • 12 comments

I am getting a lot of swift errors using:

  • React Native 59.9
  • XCode 11.2.1 Screen Shot 2019-11-20 at 19 15 52

Any ideia what this could be?

lucastonon avatar Nov 20 '19 22:11 lucastonon

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

shahen94 avatar Nov 26 '19 06:11 shahen94

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?

jrartiga avatar Dec 08 '19 02:12 jrartiga

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.

dittmarconsulting avatar Dec 15 '19 03:12 dittmarconsulting

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

santiagovazquez avatar Dec 20 '19 19:12 santiagovazquez

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

dittmarconsulting avatar Dec 24 '19 00:12 dittmarconsulting

@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).

santiagovazquez avatar Dec 25 '19 15:12 santiagovazquez

@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+

aelarassi avatar Feb 26 '20 15:02 aelarassi

Is this solved somehow for 0.61+?

mladibejn avatar Mar 01 '20 16:03 mladibejn

@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

BunHouth avatar Mar 02 '20 14:03 BunHouth

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://[email protected]/shahen94/react-native-video-processing.git"

  2. Replace the RNVideoProcessing.xcodeproj file 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 👍

chai86 avatar Apr 05 '20 22:04 chai86

@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

MrAlekhin avatar Apr 26 '20 20:04 MrAlekhin

@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

chai86 avatar Apr 26 '20 20:04 chai86