2 Replies
      Latest reply on Jul 11, 2019 2:44 PM by chps67
      chps67 Level 1 Level 1 (0 points)

        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.




                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];