mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
7.56k stars 1.1k forks source link

✨ Do we think a LockedCameraCaptureExtension would be possible in React Native? #3204

Closed alexfoxy closed 1 month ago

alexfoxy commented 1 month ago

What feature or enhancement are you suggesting?

In the current iOS 18 and iPhone 16 there are new ways to launch "LockedCameraCapture" apps. These typically are a more limited feature set of the app which can be used without unlocking the device. Unfortunately they require a "LockedCameraCaptureUIScene" which is written in Swift. There some docs here: https://developer.apple.com/documentation/lockedcameracapture

There doesn't seem any option just to "open the app", even if it requires FaceID. This is very frustrating as my app can't be assigned to the new Camera Control button on iPhone 16s.

Could this be possible without having to re-build the whole UI in Swift for this? Is it possible to embed the React Native view into a different a Swift View?

Thanks!

What Platforms whould this feature/enhancement affect?

iOS

Alternatives/Workarounds

No workarounds available.

Additional information

maintenance-hans[bot] commented 1 month ago

Guten Tag, Hans here! 🍻 Thanks for your suggestion. It sounds like you are interested in a very specific feature related to the new "LockedCameraCapture" capabilities in iOS. However, could you please clarify if there are any specific error messages or issues you encountered while trying to implement this? Some logs from Xcode could be very helpful for mrousavy to assess the situation.

If you want more direct help from mrousavy, consider supporting the project through GitHub Sponsors. Looking forward to more details!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

alexfoxy commented 1 month ago

@mrousavy Not sure the bot can help with this one, what are your thoughts?

mrousavy commented 1 month ago

Hi! I took a quick look at the docs, but it seems like this is impossible to do in React Native (VisionCamera) right now.

mrousavy commented 1 month ago

(and nothing I can really do, this is something the react native app should need to do, like a widget)

alexfoxy commented 1 month ago

Yeah I figured as much - the only option would be to create the React Native view in the Swift Widget Extension.