maitrungduc1410 / react-native-video-trim

Video trimmer for React Native App
MIT License
37 stars 14 forks source link

getting Reference to property 'player' in closure requires explicit use of 'self' to make capture semantics explicit #37

Closed amosaxe closed 3 months ago

amosaxe commented 3 months ago

While running in ios, we are getting the following error:/Users/prachhhi/Documents/yes/app/AppV2/node_modules/react-native-video-trim/ios/VideoTrimmerViewController.swift:254:16 Reference to property 'player' in closure requires explicit use of 'self' to make capture semantics explicit Screenshot 2024-02-14 at 8 48 28 PM

maitrungduc1410 commented 3 months ago

which version of this library and RN are you using?

Have you run Pod install? can you try this in new project, because with the above errors I'll definitely will see it and never publish :)

amosaxe commented 3 months ago

RN version: 0.72.4 react-native-video-trim version: 1.0.10

yes we have ran pod install.

Yes correct and apologies for not adding full context, the same code is running in another system so we suspect something wrong with xcode settings. But as this issue is coming with library only, I thought of asking for help here.

maitrungduc1410 commented 3 months ago

can you use latest version? 1.0.13

maybe you need to clear Build cache (from Xcode) and rerun again, sometimes Xcode is laggy, it shows error but when you hit Run, it'll compile fine

amosaxe commented 3 months ago

I tried latest version just now, but still did not help.

I have tried everything to clean xcode and pod cache

in xcode -> product-> clean build folder

as well as doing a complete cleanup

rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
pod install

but to no avail

maitrungduc1410 commented 3 months ago

Can you click each of the error then screenshot and show me exact location for each error?

amosaxe commented 3 months ago

This file contains all the errors Screenshot 2024-02-14 at 10 33 19 PM

maitrungduc1410 commented 3 months ago

Let me push a fix for this, I think this is about backward compatibility, it's really fine on my end

amosaxe commented 3 months ago

Sure, thanks a lot, yes I am also able to run on another system with latest xcode so looks like that only.

maitrungduc1410 commented 3 months ago

hi @amosaxe please upgrade to 1.0.14, rerun pod install and try again

amosaxe commented 3 months ago

Hey @maitrungduc1410, Yep this worked, thanks for this, now I am thinking why I didnt just patched on my own and raised a PR lol. Again thanks for quickly responding and helping.