Solution of intensity configurable vibrations.
The key is to use
import objc_util, time feedback = objc_util.ObjCClass('UIImpactFeedbackGenerator').new() feedback.initWithStyle(0) for I in range(0, 9): feedback.impactOccurred() time.sleep(0.1)
This demo will generate "impact feedback" with rhythm.
Another way is to use
AudioToolbox.hC API. I learned from this topic, but I found another system sound IDs to perform different intensities.
AudioServicesPlaySystemSound(1519); AudioServicesPlaySystemSound(1520); AudioServicesPlaySystemSound(1521);
1520are the same feedbacks when you use 3D touch,
1521is a 3 combo light vibrate.
@Nyanki0427 thanks for this, really helped me figure out where I was wrong
That worked for me as well!