Push notification sound disabled if phone locked, otherwise enabled - ios

I want to have my push notifications play a sound when the iPhone is locked, but no sound when the iphone is unlocked.
Does anyone know how to accomplish this?

As far as I know, apple rejects applications with lock notifications listeners.
check link.

Related

No Vibrate Only want Sound in Pushnotification (ios)?

I know the ways for,
1.how to playing sound and vibrating(both) while push notification comes from server to iPhone device
2.Only playing vibrate with no sound.
but I did not find any way to "play only sound and stop vibrating when new push notification comes" on device.
Please suggest me both way.
1) iPhone mode in vibrate.
2) iPhone mode in General.
My Xcode is version 7.2.
I set this dictionary in APN Tester than get sound and vibrate=>
{"aps":{"alert":"Hello from APNs Tester.","badge":"1","sound":"default"}}
But, I want only sound no vibrate.
I think this question is duplicate . but I can't get proper solution.
Thankx in advance.

Send a notification to the iPhone while connected to an Apple Watch

I want to make a button on the Apple Watch that, when tapped, will send a notification to the iPhone making it beeping and turning on his screen. Trouble is that, when iPhone is paired to an Apple Watch, all notifications plays on the Apple Watch. Is there a way to send a notification exclusively to iPhone?
Edit: Technically should be possible, this app do that! https://itunes.apple.com/it/app/lookout-free/id434893913?mt=8

how to trigger notification from iPhone on iWatch

A noob question. I want to receive a notification when variable changes on the iOS app. to be clear. I want show notification on iWatch app when for example the user presses a button on the iOS App.
I have seen many tutorials for using the notifications interface. but all of them doesn't specify how to trigger the notifications from iPhone.
Anyone who knows a proper guide?
Thank you
Your notifications will go to your iPhone or your Apple Watch, depending on the device that you're using.
iOS will take care of notifications if your ios app supports notifications.
If your iPhone is unlocked, you get notifications on your iPhone, instead of your Apple Watch.
If your iPhone is locked or asleep, and your Apple Watch is unlocked and on your wrist, you get notifications on your Apple Watch.

How to enable notification on applewatch?

I can get push notifications on an Iphone device, but I cannot get them on apple watch,please advise.
On simulator notification test works, but on real device it doesn't work.
iOS will decide where best to send any notification. It will not just send to both devices.
If iOS thinks it is best to display it on your phone, then it will notify there or vice versa.
iOS automatically makes that decision using facts such as you are wearing the Watch, because if you're not wearing the Watch, there's no point in sending a notification there.
To test the receiving of notifications do the following:
Turn of the iPhone's screen.
Take on the Watch. It must be on your wrist.
The watch has the heart beat detector. Therefore, the watch will know if it is not wearn or not and only displays notifications if you wear it.

Push notification sound doesn't work on iOS8

Hi trying to fix a issue discovered other, the device is not playing the notification sound if it is locked. If device is unlocked the sound is played this issue happens only on iOS 8.x.
I test other apps like gmail and the same no notification sound when the device is locked
The sound is enabled from the notification center
The register for remote notification is done correctly like this
The only issue is that when the device is locked there is no notification sound even the lock screen is not lighting up like on previous versions.
Any solution to fix this ?
UPDATE:
After updating the device to iOS 8.3 seams that all iOS bugs that i notice before now are fixed , and the notification sound too, but I still what to know if there is some solution for this issue, thx.
Did you make the same noob mistake as me ? :D
I had the Do Not Disturb mode turned on and it prevented the device lock screen from waking and no sound played.
If you did, turn off Do No Disturb.
Note: the Do Not Disturb toggle can be accessed by pulling up from the bottom of the iPhone screen. It's the crescent moon icon that's next to the rotation lock button.
Along a similar vein to #Zhang, I wasn't getting any sounds because I had sound volume turned down all the way in Settings > Sounds. There is a "Ringers and Alerts" volume slider (top of the screen, in iOS 8.1 at least) that I had all the way down, and after increasing this volume slider I was able to hear the alert sounds.

Resources