react-native-video-processing
react-native-video-processing copied to clipboard
Not working in ios latest react native version swift 3 errors
Library is not working in fresh installed react native version Not even able to run project with react-native run-ios cmd
package.json file
"dependencies": {
"@react-native-firebase/app": "^6.0.1",
"@react-native-firebase/ml-vision": "^6.0.1",
"react": "16.9.0",
"react-native": "0.61.2",
"react-native-image-picker": "^1.1.0",
"react-native-video-processing": "^1.20.0"
}
below is the errors looks like related to swift 3 Can you update the lib so it can be compatible with latest swift 4 or 5
/Users/siddharth/WhatsIn/node_modules/react-native-video-processing/ios/RNVideoProcessing/RNVideoTrimmer/AVUtilities.swift:22:59: error: 'AVMediaTypeVideo' has been renamed to 'AVMediaType.video'
guard let videoTrack = original.tracks(withMediaType: AVMediaTypeVideo).last else {
^~~~~~~~~~~~~~~~
AVMediaType.video
AVFoundation.AVMediaTypeVideo:3:12: note: 'AVMediaTypeVideo' was obsoleted in Swift 3
public let AVMediaTypeVideo: AVMediaType
^
/Users/siddharth/WhatsIn/node_modules/react-native-video-processing/ios/RNVideoProcessing/RNVideoTrimmer/AVUtilities.swift:44:66: error: 'AVFileTypeQuickTimeMovie' has been renamed to 'AVFileType.mov'
writer = try AVAssetWriter(outputURL: outputURL, fileType: AVFileTypeQuickTimeMovie)
^~~~~~~~~~~~~~~~~~~~~~~~
AVFileType.mov
AVFoundation.AVFileTypeQuickTimeMovie:3:12: note: 'AVFileTypeQuickTimeMovie' was obsoleted in Swift 3
public let AVFileTypeQuickTimeMovie: AVFileType
^
/Users/siddharth/WhatsIn/node_modules/react-native-video-processing/ios/RNVideoProcessing/RNVideoTrimmer/AVUtilities.swift:57:53: error: 'AVMediaTypeVideo' has been renamed to 'AVMediaType.video'
let writerInput = AVAssetWriterInput(mediaType: AVMediaTypeVideo, outputSettings: writerOutputSettings)
^~~~~~~~~~~~~~~~
AVMediaType.video
AVFoundation.AVMediaTypeVideo:3:12: note: 'AVMediaTypeVideo' was obsoleted in Swift 3
public let AVMediaTypeVideo: AVMediaType
^
** BUILD FAILED **
The following build commands failed:
CompileSwift normal x86_64 /Users/siddharth/WhatsIn/node_modules/react-native-video-processing/ios/RNVideoProcessing/RNVideoProcessingManager.swift
CompileSwift normal x86_64 /Users/siddharth/WhatsIn/node_modules/react-native-video-processing/ios/RNVideoProcessing/RNVideoPlayer.swift
CompileSwift normal x86_64 /Users/siddharth/WhatsIn/node_modules/react-native-video-processing/ios/RNVideoProcessing/RNTrimmerView/RNTrimmerView.swift
CompileSwift normal x86_64 /Users/siddharth/WhatsIn/node_modules/react-native-video-processing/ios/RNVideoProcessing/RNTrimmerView/RNTrimmerViewManager.swift
CompileSwift normal x86_64 /Users/siddharth/WhatsIn/node_modules/react-native-video-processing/ios/RNVideoProcessing/RNVideoTrimmer/RNVideoTrimmer.swift
CompileSwift normal x86_64 /Users/siddharth/WhatsIn/node_modules/react-native-video-processing/ios/RNVideoProcessing/RNVideoTrimmer/AVUtilities.swift
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
@sidpauhal any solution for fix this problem ?
@shahen94 hi can you recommend any solution?
@sidpauhal Have you tried with the master version? Add this to your package.json
"react-native-video-processing": "git+https://[email protected]/shahen94/react-native-video-processing.git"
@edferreira yes I have tried it is not working
I fixed this issue by changing the function to the newest function name in my swift version by pressing the fix button in XCode :)
Can we have this fixed in lib please? its breaking on the latest RN
I am using 59.9 and If I set Swift version 4, 4.2 or 5 I get thousands of Swift errors.
Is this package without maintenance?
@lucastonon This package is under maintenance by the community. So everyone is free to fork & update & open PR to merge