<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PHASE",
  "identifier" : "/documentation/PHASE/PHASEAssetRegistry/unregisterAsset(identifier:completion:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PHASE"
    ],
    "preciseIdentifier" : "c:objc(cs)PHASEAssetRegistry(im)unregisterAssetWithIdentifier:completion:"
  },
  "title" : "unregisterAsset(identifier:completion:)"
}
-->

# unregisterAsset(identifier:completion:)

Deallocates system memory for a given asset and removes it from the engine’s list of registered assets.

```
func unregisterAsset(identifier: String, completion handler: (@Sendable (Bool) -> Void)? = nil)
```

```
func unregisterAsset(identifier: String) async -> Bool
```

## Parameters

`identifier`

The unique name that the app defines for the sound asset.

`handler`

Code that the system runs after it unregisters the asset.

## Discussion

> Important:
> You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration:
> 
> ```swift
> func unregisterAsset(identifier: String) async -> Bool
> ```
> 
> For information about concurrency and asynchronous code in Swift, see <doc://com.apple.documentation/documentation/Swift/calling-objective-c-apis-asynchronously>.

---

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)