I tried to change my code from
let urlString = Bundle.main.path(forResource: "X", ofType: "mp3")!
to
let urlString = Bundle.main.path(forResource: "X", ofType: "caf")!
after I already uploaded the file. But it throws a fatal error: Unexpectedly found nil while unwrapping an Optional value
I double check the filename and it's correct. and the caf file does play.
let urlString = Bundle.main.path(forResource: "X", ofType: "mp3")!
to
let urlString = Bundle.main.path(forResource: "X", ofType: "caf")!
after I already uploaded the file. But it throws a fatal error: Unexpectedly found nil while unwrapping an Optional value
I double check the filename and it's correct. and the caf file does play.