Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

How can I set that device should vibrate if a push notification come to my application?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
301 views
Welcome To Ask or Share your Answers For Others

1 Answer

I just figured out one way to do this: if you want to phone to only vibrate on receipt of a push notification, you need to have a silent sound file in your application bundle, for example "silence.aif" ... if you specify that sound file in the APS notification, the iOS device will "play" the silence.aif from your application bundle, but since the sound is silence, there is nothing to hear. However the notification vibration is still triggered :-)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...