Closed firofame closed 2 years ago
Which Xcode version and which Swift version are you using?
XCode 12.4, Swift version 5.3.2
/Users/firozahmed/Desktop/MyApp/node_modules/react-native-vision-camera/ios/CameraView+RecordVideo.swift:135:70: Cannot convert value of type '[AnyHashable : Any]' to expected argument type '[String : Any]'
@mrousavy this is the exact error I get. I wonder if it's just me
I got the same error. Do anyone know the reason?
@champikamendis what version of Xcode are you using?
@firofame XCode 12
Okay looks like they changed the type of that value. If I cast it, it breaks for other users π
there is one more build error. just an fyi
/Users/firozahmed/Desktop/MyApp/node_modules/react-native-vision-camera/ios/CameraView+RecordVideo.swift:267:26: Type of expression is ambiguous without more context
Can @mrousavy tell me what to change in my code? I have two errors when building like @firofame faced.
I got the same issue, my xcode version is 12.4 with "react": "16.13.1", "react-native": "0.63.3"
node_modules/react-native-vision-camera/ios/CameraView+RecordVideo.swift:135:70: Cannot convert value of type '[AnyHashable : Any]' to expected argument type '[String : Any]'
node_modules/react-native-vision-camera/ios/CameraView+RecordVideo.swift:267:26: Type of expression is ambiguous without more context
vision-camera works fine with XCode 13. unfortunately, I am stuck with XCode 12.4 since I have some dependency on Swift 5.3.
@mrousavy is there an older version that works with XCode 12.4?
Having the same issue on xcode 12.5
Having the same issue on Xcode 13, any solution?
Having the same issue please help me out how to fix it
Same issue, for XCode 12.5 (also test with XCode 13.2, also unsuccessful because of new errors), and RN 66.4
On my end it builds, running Xcode 13.2.1 (13C100)
@mrousavy Sorry, errors described at my previous message are not related to Xcode version (see screenshot with errors). I'm typecast places with errors in VisionCamera swift module on Xcode 12.5 and it starts building, but I got another error's, same as on Xcode 13.2:
UPD: Finally i found problem. This errors appeared because I used use_frameworks (for custom native swift module), I just add :modular_headers => true for every dependency in Podfile and remove use_frameworks and now all works!
i get same issue
Okay looks like they changed the type of that value. If I cast it, it breaks for other users π
what do you propose?
I propose that I fix the issue once I also get this issue. For me, on Xcode 13, everything builds fine so far. I also mentioned all of the versions (e.g. Swift) in the Troubleshooting section.
same error here. Any prevision on fixing?
Same issue: Xcode 12.5, Swift 5.3
I dont understand what's probblem. But i do some steps and it can run successfully.
Delete node module and remove yarn.lock ( use yarn instead of npm, i used npm before ). And change "react-native-vision-camera": "2.9.4", ( delete ^ in front 2.9.4). Then run: yarn
to install library, after that delete Podfile.lock then npx pod-install
Rerun and it worked for me.
Xcode Version 12.5
"react-native": "0.64.2"
here is folder react-native-vision-camera
in node_module. You can try to extract it and put in your node_module. Hope this help.
https://drive.google.com/file/d/1VUlXvxxownyQnvgbnEOxppCWc_Htrm-D/view?usp=sharing
I also encounter the same issue, I'm using Xcode 12.4 and Swift 5.3.2
I'm did not encounter the error anymore after updating to Xcode 13.3
Great!
@mrousavy "Troubleshooting" page says "VisionCamera requires a minimum Swift version of 5.2", This needs to be changed to XCode 13.
many repositories have a minimum requirement section in the readme so that people with older version do not waste their time.
This needs to be changed to XCode 13
Wrong, it does not need to be changed to XCode 13. I was using XCode 12 back when I originally created VisionCamera.
so that people with older version do not waste their time
That's what the TROUBLESHOOTING guide is for. If you run into any issues, I have specifically created a document that helps you troubleshoot any common issues I can think of. It's your responsibility to look there, and not waste your time.
Sir, I respect & appreciate your work very much.
swift 5.2 was shipped with XCode 11.4. https://swiftversion.net/
Everyone was using XCode 12+. so, they probably had swift 5.2+ and still had the same error.
I trust you 100% when you say you were using XCode 12 when you originally created this project, but is there a chance the minimum version could have changed for the latest version of VisionCamera?
Thanks! Yeah, I guess we could add an additional point to the TROUBLESHOOTING guide that states "Make sure you're using Xcode 13 or higher". just to be sure
If you encounter this issue and cannot upgrade to Xcode 13, you can try version 2.10.0, which, during my tests, is the latest version currently that doesn't have this issue in Xcode 12. It's not quite a solution but 2.10.0 may already suit your needs.
If you encounter this issue and cannot upgrade to Xcode 13, you can try version 2.10.0, which, during my tests, is the latest version currently that doesn't have this issue in Xcode 12. It's not quite a solution but 2.10.0 may already suit your needs.
thank you this worked instantly
What were you trying to do?
run the app on ios simulator/device after installing react-native-vision-camera
Reproduceable Code
No response
What happened instead?
Build failed with "Cannot convert value of type '[AnyHashable : Any]' to expected argument type '[String : Any]'"
Relevant log output
Device
iPhone 12 (iOS 14.4)
VisionCamera Version
2.11.2
Additional information