Skip to content

iOS13 exec #2

@SBrod

Description

@SBrod

getting Thread 1: EXC_BAD_ACCESS (code=1, address=0x48) in simulators and real device on this line player = try! AVAudioPlayer(contentsOf: url!)
Screen Shot 2019-10-12 at 11 34 43 AM

Change line 14 to var player : AVAudioPlayer?
and body of playSound to:
let url = Bundle.main.url(forResource: soundName, withExtension: "wav")
player = try? AVAudioPlayer(contentsOf: url!)
player?.play()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions