Alexander Khitev
Alexander Khitev

Reputation: 6861

'init()' is unavailable xcode 7

I received the error

'init()' is unavailable

here :

 func download() {
    var assetResource = AVAssetResourceLoadingRequest()
}

and here:

let loader = AVAssetResourceLoader()

I tried to follow the recommendation here, but the error remains. I'm using XCode 7 and Swift 2.

I made following and get the same error.

let loader = AVURLAsset().resourceLoader

Upvotes: 1

Views: 3884

Answers (1)

Alexander Khitev
Alexander Khitev

Reputation: 6861

let url = NSURL(string: "https://www.google.com")!
let asset = AVURLAsset(URL: url)

Upvotes: 1

Related Questions