Your error log expresses itself very succinctly:
Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session
This tells you about the problem as well as the solution.
Now you are doing something like this:
[[AVAudioSession sharedInstance] setActive:NO
withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation
error:nil];
However, you must first stop the instance of the audio player, and then set the activation status to Yes or No.
[yourAudioPlayer stop];
[[AVAudioSession sharedInstance] setActive:NO
withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation
error:nil];
See your Apple documentation for the enum AudioSessionSetActiveOption enum values .
See also: Apple documentation on setActive: withOptions method
Regarding your second mistake
PropertyManager was compiled with optimization - stepping may behave oddly; variables may not be available.
see this great answer .
source
share