-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[0.62.0-rc.1] Vibration.vibrate has unspecified nullability on iOS #27920
Comments
According to the docs, specifying a duration in Even in that case, I think this could be handled better. I'll flag this with the team. |
This comment has been minimized.
This comment has been minimized.
@hramos Correct that the value of the duration parameter is ignored on iOS, but the docs also say that it is required. And indeed, calling without any arguments rightfully complains about the lack of arguments. The docs also make it sound like vibrate(Array) should have a meaning on iOS, but it looks completely unimplemented. No idea if this is a regression or not. |
I'm looking at RNTester, in Vibration example, where I added an example that calls Docs do seem out of date as RCTVibration shows vibration by pattern is not implemented on iOS. |
@hramos I can reproduce on v0.62 rc1 and it doesn't matter if I call it with a number as a param or without parameter, which makes sense because of it's being called without params for iOS here @trevyn is right about this being related to TurboModules. The problem is that numbers are not supported as nullable arguments in functions, Just submitted a PR to fix the issue: #27951 |
Still seeing this in To reproduce on a fresh build:import React from 'react'
import { Vibration, Button } from 'react-native'
const Example = () => <Button onPress={() => Vibration.vibrate()} title="Push me to crash" />
) Results in:Expected:Would expect this simple Looks like the suggested PR (#27951) has status Is there anything we can do to help? 🙂 |
Mesmo problema aqui |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Description:
Vibration.vibrate() errors on iOS on 0.62.0-rc.1. Looks like something to do with TurboModules.
Error: Argument 0 (NSNumber) of Vibration.vibrate has unspecified nullability but React requires that all NSNumber arguments are explicitly marked as 'nonnull' to ensure compatibility with Android.
React Native version:
Steps To Reproduce
Expected Results
Error-free vibration.
The text was updated successfully, but these errors were encountered: