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

[bugfix] Nullability Fix for HealthManager Argument #549

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

tosettil-polimi
Copy link
Contributor

Nullability Fix for HealthManager Argument

Issue

Issue #547 reported a nullability compatibility problem with the HealthManager.readWorkout method.

Problem Description

The method's NSNumber argument was missing an explicit nullability specification, which could cause compatibility issues with Android when using React Native.

Changes

  • Added nonnull specification to the target parameter
  • Ensures explicit nullability marking for better cross-platform compatibility

Code Modification

RCT_EXPORT_METHOD(captureRef:(nonnull NSNumber *)target withOptions:(NSDictionary *)options resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject)

Impact

  • Resolves React Native type compatibility warnings
  • Improves type safety across platforms
  • Ensures consistent behavior between iOS and Android

Testing

  • Verified method signature works correctly with React Native
  • Confirmed no breaking changes to existing functionality

@tosettil-polimi tosettil-polimi changed the title Nullability Fix for HealthManager Argument [bugfix] Nullability Fix for HealthManager Argument Nov 22, 2024
@aymather
Copy link

Any idea when this might be merged?

:) <3

@tosettil-polimi
Copy link
Contributor Author

tosettil-polimi commented Nov 25, 2024

Nope, see here the Issue for the temporary fix

@gaearon
Copy link

gaearon commented Dec 6, 2024

The PR title and description seem wrong (there is no "health manager" argument) but the fix is right.

@brentvatne brentvatne merged commit afa8ecf into gre:master Dec 6, 2024
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.

4 participants