How to NOT play audio in silent mode with iOS?

Hi, my problem is as the title.
I’m developing a casual app for Android and iOS.
When on iOS devices, my app always plays sounds and BGM even in silent mode.

Does anyone know solutions of this problem?
Any flags for silent mode? Any settings on xcode?

Thanks!

I found a way to not play audio in silent mode with iOS.
I just redefined AudioSessionCategory.

On xcode, open YOURPROJECT/Classes/UI/UnityViewControllerBase.mm and add the follow in viewWillAppear.

- (void)viewWillAppear:(BOOL)animated {
	[super viewWillAppear:animated];
	AppController_SendMainViewControllerNotification(kUnityMainViewWillAppear);

    UInt32 category = kAudioSessionCategory_AmbientSound;
    AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(category), &category);
}

Don’t forget to include include AudioToolbox/AudioToolbox.h.
I don’t know this is a correct way, but it works.