Skip to content

Conversation

@WoLewicki
Copy link
Contributor

Summary

PR fixing how booleans are handled on new arch since using the folly converter makes them resolve to true everytime. It also adds missing prop.

Copy link

@cixio cixio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great. Thanks!

Copy link

@BrendonGomes BrendonGomes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solution works fine on RN 0.76.5 IOS 18.1 emulator.

Copy link

@stefanep stefanep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function worked smoothly in the android emulator

Comment on lines 168 to 172
id maxPhotoQualityPrioritization = CKConvertFollyDynamicToId(newProps.maxPhotoQualityPrioritization);
if (maxPhotoQualityPrioritization != nil && [maxPhotoQualityPrioritization isKindOfClass:NSString.class]) {
_view.maxPhotoQualityPrioritization = [flashMode isEqualToString:@"balanced"] ? CKMaxPhotoQualityPrioritizationBalanced : [flashMode isEqualToString:@"quality"] ? CKMaxPhotoQualityPrioritizationQuality : CKMaxPhotoQualityPrioritizationSpeed;
[changedProps addObject:@"maxPhotoQualityPrioritization"];
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still uses flash mode.
I would have preferred regular if-statements here since this is a little rough to read. Or at least some variables to ensure it was more readable and succinct.
Can you record a video to show that it's working/not crashing on both platforms?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WoLewicki can you please get this video uploaded so we can all use this great fix?

@fluffydonkey
Copy link

Pleeeeeease get this through I need this so badly

@WoLewicki
Copy link
Contributor Author

@fluffydonkey you can always use patch-package to introduce those changes to your project. I will look at this now though.

@WoLewicki
Copy link
Contributor Author

Here is a video with the prop being swapped since there is no button for it.

photoQuality.mp4

@scarlac scarlac merged commit a0393f3 into teslamotors:master Apr 1, 2025
4 checks passed
@scarlac
Copy link
Collaborator

scarlac commented Apr 1, 2025

Thank you for the PR and your help/collaboration on the related tickets @WoLewicki !

@d-moreira
Copy link

@scarlac @WoLewicki this PR introduced a regression that causes Android builds on RN 0.77 (old arch) to fail with the following error:

/node_modules/react-native-camera-kit/android/src/main/java/com/rncamerakit/CKCameraManager.kt:22:83 Argument type mismatch: actual type is 'com.rncamerakit.CKCameraManager', but 'U!' was expected.

which had previously been fixed in #695.

@scarlac
Copy link
Collaborator

scarlac commented Apr 24, 2025

@d-moreira Good catch. I confirmed it locally. Fix released in v15.0.1 now.

scarlac added a commit that referenced this pull request Apr 24, 2025
@WoLewicki
Copy link
Contributor Author

Probably it was added because that is that's how it's now done by codegen. Maybe introducing sourcesets for this would be the best option. wdyt @scarlac ?

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

Successfully merging this pull request may close these issues.

8 participants