IOS Local Push Notification Override Mute / Silent Mode

I am currently working on an iOS project that requires me to send a local push notification to a user with sound. The problem is that I want the sound to play even if the device is turned off or in silent mode, but I'm not sure if this is possible.

There were several similar questions, but none of them were successfully satisfied as follows: iPhone. Is it possible to override the silent mode or have a recursive beep with push notification?

Disclaimer: I understand that this is not a desirable feature for the application and that this may be the reason for the abandonment of the App Store.

+5
source share
1 answer

I just found this question while searching for something related to push notification.

You can achieve this by listening to the push notification and start playing sound in your application when you receive the push notification.

1) for iOS7 and higher, you can get a push notification, even the user does not open the application using this method

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;

2) . AVAudioSession, , . documentation - , . , , , ..

+2

All Articles