Search Issue Tracker
Won't Fix
Votes
6
Found in
2019.4
2020.2
2020.2.0b1
Issue ID
1276572
Regression
No
[iOS] Audio files are not played when using CallKit
Reproduction steps:
1. Download and open the attached "BugReproProject" project
2. In the Menu bar, press "File" > "Build Settings..."
3. Switch to iOS platform, build and deploy the project
(The following steps are made on the device)
4. Press the "PLAY AUDIO" button (an audio clip starts playing)
5. Press the "CALL" button (audio clip stops playing) and then the "END CALL" button
6. Press the "PLAY AUDIO" button again
Expected result: An audio clip starts playing
Actual result: Audio clip doesn't start playing
Reproduces on: 2019.4.12f1, 2020.1.9f1, 2020.2.0b7
Could not test with: 2018.4, 2021.1 (Console errors)
Tested with:
iPhone 6 (iOS 12.4.8)
iPhone 6s (iOS 13.3.1)
iPhone 7 (iOS 12.3.1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note (2021.2.X):
On iOS Unity uses AVAudioSession for audio playback. Unity takes care of different interuptions and state changes of AVAudioSession to keep audio playing. From OS standpoint disabling app's AVAudioSession does not count as interuption or notifiable state change, as AVAudioSession active state can only be changed with intent from user. In this case disabling of AVAudioSession happens when a call is ended, user is notified of this in CXProviderDelegate provider:didDeactivateAudioSession: method. Disabling AVAudioSession is destructive operation so we do not recommend using it.
In case AVAudioSession has been disabled Unity audio can be restored calling AudioSettings.Reset() in C# script or UnitySetAudioSessionActive() in native plugin. These calls do restore audio, but they resets audio state as well, meaning all audio sources in the scene are stopped.