---
title: "init(url:)"
framework: watchkit
role: symbol
role_heading: Initializer
path: "watchkit/wkaudiofileasset/init(url:)-8ndda"
---

# init(url:)

Returns an asset for the audio file at the specified URL.

## Declaration

```swift
convenience init(url URL: URL)
```

## Parameters

- `URL`: A file-based URL that identifies the audio file. This URL must refer to a shared location that can be accessed by both the Watch app interface and the WatchKit extension. For more information, see https://developer.apple.com/library/archive/documentation/General/Conceptual/WatchKitProgrammingGuide/SharingData.html#//apple_ref/doc/uid/TP40014969-CH29 in https://developer.apple.com/library/archive/documentation/General/Conceptual/WatchKitProgrammingGuide/index.html#//apple_ref/doc/uid/TP40014969. This parameter must not be nil.

## Return Value

Return Value An initialized asset object.

## Discussion

Discussion This method creates an asset for the specified media file. The audio file’s title, album title, and artist information are derived from the metadata in the audio file itself.

## See Also

### Creating an Asset

- [init(url:title:albumTitle:artist:)](watchkit/wkaudiofileasset/init(url:title:albumtitle:artist:)-447fg.md)
