<!--
{
  "availability" : [
    "iOS: 2.2.0 -",
    "iPadOS: 2.2.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioPlayerDelegate/audioPlayerDidFinishPlaying(_:successfully:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(pl)AVAudioPlayerDelegate(im)audioPlayerDidFinishPlaying:successfully:"
  },
  "title" : "audioPlayerDidFinishPlaying(_:successfully:)"
}
-->

# audioPlayerDidFinishPlaying(_:successfully:)

Tells the delegate when the audio finishes playing.

```
optional func audioPlayerDidFinishPlaying(_ player: AVAudioPlayer, successfully flag: Bool)
```

## Parameters

`player`

The audio player that finishes playing.

`flag`

A Boolean value that indicates whether the audio finishes playing successfully.

## Discussion

The system doesn’t call this method on an audio interruption.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)