-
Notifications
You must be signed in to change notification settings - Fork 17
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
DeviceCapabilities.meetsAdvancedRequirements returns incorrect result on iPhone 15 Pro (possibly other devices) #36
Comments
I was checking the codebase and saw these lines. Lines 181 to 225 in 5e58663
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Checklist
Environment
Goals
Detecting support for advanced haptics, by using the included DeviceCapabilities.meetsAdvancedRequirements method.
Steps to Reproduce
Set up the Nice Vibrations package on a fresh Unity project, targeting the iOS platform. Add a debug call for DeviceCapabilities.meetsAdvancedRequirements, triggering on a button press, and monitor for the console output.
Expected behavior
iPhone devices from 2017 onwards (iPhone 8 and iPhone X and newer) all support Apple's Core Haptics API and should support all advanced haptics functionality, so the meetsAdvancedRequirements check should return true.
Observed behavior
The meetsAdvancedRequirements check returns false, which is incorrect. The hasAmplitudeModulation and hasFrequencyModulation checks also incorrectly return false, though these seem to use the same check method as meetsAdvancedRequirements anyway.
Code Samples & Details
These results can be confirmed as being returned incorrect by attempting to play advanced haptics without performing those checks beforehand. Advanced haptics files will play no problem at all without falling back to basic haptics, even though the requirement checks are saying that it's not supported.
I'm only able to test on the iPhone 15 Pro and iOS 17, so I'm not sure if this affects other devices, or just the latest generation iPhones (or potentially Android devices as well).
The text was updated successfully, but these errors were encountered: