Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torchMode={"on"} does not work on startup (iOS) #593

Open
cixio opened this issue Oct 3, 2023 · 4 comments
Open

torchMode={"on"} does not work on startup (iOS) #593

cixio opened this issue Oct 3, 2023 · 4 comments

Comments

@cixio
Copy link

cixio commented Oct 3, 2023

Describe the bug
see title, sometimes the light flashes half a second but then stays off. using a button as switch works great.

To Reproduce
set torchMode={"on"} on iOS 17.0.2 (iPhone 14 pro)

Expected behavior
light goes on and stays on

Additional context
using 14.0.0-beta11 for dual back camera, maybe here is the problem?

@dleavittpmc
Copy link

Ever find a solution for this? I am having this problem

@dleavittpmc
Copy link

Check out this issue: #518

The work around was great for me.

@cixio
Copy link
Author

cixio commented Nov 1, 2023

I use a similar workaround, as you mentioned. I'm quite certain that this is also related to a timing issue, possibly appeared with the introduction of support for dual cameras. I attempted to address it, but so far, I haven't been successful in resolving the issue. Once I manage to fix it, I'll submit a pull request, but I'm not actively working on this bug at the moment.

@cixio
Copy link
Author

cixio commented Nov 2, 2023

Just played around a little bit, when removing this line:

self.update(torchMode: self.torchMode)

Everything works great on my iPhone 14 Pro. I can not retrace what causes the bug, but it seems that the reapply of the configuration (comment in line above) is not necessary (any more?) - can you confirm other devices?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants