Closed bagintz closed 4 years ago
What error are you getting exactly?
I see this warning, which makes it sound like it won't work on devices < iOS 13.
It does print out my test messages for Normal Vibrate and Amplitude Control (taken from your example), but no vibration happens. I do get a crash when trying Custom Control:
Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)
I am not sure if I am getting the most informative error in XCode. If you point me somewhere else I can try to send more info.
@benjamindean Ok, user error (I am an Android user) on the Normal Vibrate and Amplitude Control errors. When I got vibration working in general on the phone those both worked fine. I still get a crash when I get to:
await Vibration.hasCustomVibrationsSupport()
in the Flutter code on an iOS 12 device. I am going to wait until someone else comes in the office with an iOS 13 device, I will test that then and let you know, but I assume it works on iOS 13.
So, just to be clear:
Correct?
Yes, I will test 3 and let you know for sure, but #1 and #2 is what I am seeing (Android 10)
@benjamindean just tested, everything works fine on iOS 13
So it seems that the custom options don't work, and actually crash 12, but everything else is good to go!
@benjamindean I got an iPhone 7 to test and for some reason now it will only trigger a single vibration even when using patterns, etc. Vibration.hasCustomVibrationsSupport()
is returning false. Do you have any ideas of why that might be happening on 13.5.1? Thanks!
@bagintz I think it's only supported from iPhone 8. Check here (The first Note).
@benjamindean that link just takes me to a long page of "technologies", I don't see a note. The other thing that I think is strange is that the iPhone 7 has the different vibration patterns like heartbeat, etc. So I would think it would work there ???
@benjamindean that link just takes me to a long page of "technologies", I don't see a note. The other thing that I think is strange is that the iPhone 7 has the different vibration patterns like heartbeat, etc. So I would think it would work there ???
Yes, it does, but seems like haptic engine is only supported on iPhone 8 and above. Not sure how accurate it is, but it's not surprising considering that it's Apple. Do you have anything newer than iPhone 7 to test it out?
One of my other developers tested it out on his newer iphone, last couple generations. And it worked as expected. I will figure something out to make it work at this point for iOS < 13 and iPhone 7 :). Thanks @benjamindean for a great plugin!
I am getting errors about SwiftVibrationPlugin on a device using iOS 12. Does this only work on 13 and up? Thanks!