How to detect whether iPhone is vibrating or not?

2019-09-15 00:10发布

I want to write an app that does something whenever the iPhone vibrates (receives phone call, text on vibrate mode). Is there anyway to detect whether the iPhone is vibrating (i.e. handle a "vibrate" event)? Thanks for the help!

2条回答
来,给爷笑一个
2楼-- · 2019-09-15 00:39

Well i don't think so that Apple give so much liberty but still you can look here for a good discussion on this topic Detecting the iPhone's Ring / Silent / Mute switch using AVAudioPlayer not working?

查看更多
手持菜刀,她持情操
3楼-- · 2019-09-15 00:46

No. You don't have access to any API that does this. Out of interest, why would you want to?

查看更多
登录 后发表回答