Hi there,
I'm trying to figure out what happens with my cross-platform app upon initializing and instance of AVAudioPlayer. The following code works fine in iOS (12.3.1) but crashes at runtine when trying to run initWithContentsOfURL in macOS (10.14.5) : i.e. SIGABRT with the following error: libc++abi.dylib: terminating with uncaught exception of type NSException.
Any idea of what's going on ? Any suggestion or help appreciated.
Best
...
NSURL* soundURL = [self.soundDictionary objectForKey:self.soundPlayingRequest];
if (soundURL != nil) {
NSError *error =nil;
self.soundPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:soundURL error:&error];
soundPlayer.delegate = self;
if (error.description == noErr)
[self.soundPlayer play];
}