skip to Main Content

Xcode – SharingMusicPlayer.swift:12:79: Cannot convert value of type 'AVAudioPlayer.Type' to expected argument type 'AVAudioPlayer'

This is what I have in my singleton: import AVFoundation import Foundation class SharingMusicPlayer { static let sharingMusicPlayer = SharingMusicPlayer(backgroundMusicPlayer: AVAudioPlayer) let backgroundMusicPlayer : AVAudioPlayer private init(backgroundMusicPlayer: AVAudioPlayer) { self.backgroundMusicPlayer = backgroundMusicPlayer } func playMusic() { // open and play…

VIEW QUESTION
Back To Top
Search