Rollo62 536 Posted April 8, 2019 (edited) Dear all, a CrossPost in the German DP. I want to use a simple vibration-feedback, aka Peek und Pop, but I'm unsure with which method this may run on all iPhone devices. There is the possibility to use AudioServicesPlaySystemSound,https://stackoverflow.com/questions/33425586/vibrate-iphone-6s-manually-like-peek-and-pop which would be perfectly OK for me. But I had to note that this doesn't seem to work on all devices anymore. There is also the TapticEngine, which can be used on newer devices (I think >= iOS10 / iPhone7).https://developer.apple.com/documentation/uikit/uiimpactfeedbackgeneratorhttps://www.delphipraxis.net/192200-uiimpact-feedback-generator-fehlende-klasse-deklarieren-und-nutzen.html There seems to exist also a way via 3DTouch.https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/Adopting3DTouchOniPhone/3DTouchAPIs.html Which method might guarantee that it will work on all devices and versions ? Edited April 8, 2019 by Rollo62 Share this post Link to post
Dave Nottage 557 Posted April 10, 2019 Given one of the answers in the SO link, it sounds (pun intended) like AudioServicesPlaySystemSound is your best bet to ensure it works on all devices. You just need to import the function, something like this: uses iOSapi.CoreFoundation; const libAudioToolbox = '/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox'; procedure AudioServicesPlaySystemSound(inSystemSoundID: UInt32); cdecl; external libAudioToolbox name _PU + 'AudioServicesPlaySystemSound'; Share this post Link to post
Rollo62 536 Posted May 4, 2019 Yes I used this one. So you know any reasons why this might work on some iPhones and some not ? These were comments from users, i dont have such iPhones in hand. Its working fine on all my test devices. Share this post Link to post
Dave Nottage 557 Posted May 5, 2019 5 hours ago, Rollo62 said: So you know any reasons why this might work on some iPhones and some not ? These were comments from users, i dont have such iPhones in hand. I see one comment about it not working on iOS 7.1.2, which I supposed might have had a bug? Which comments are you referring to? Share this post Link to post
Rollo62 536 Posted May 5, 2019 My clients with that issue had newer phones, iPhoneX even, definitvely >= iOS 11. Anyway, there were not too many complaints about missing vibration function, so I hope its not a general issue. Probably the users switched it off somehow or had some other apps interfearing with vibration, unfortunately they couldn't give me some clear explanation of the errors and configurations at the hotline. I am still aware and on the hunt for more strange behaviours with my clients in the future, but some issues like that might be solved by time automatically too (hopefully) Share this post Link to post