Guys where there may be an error, the folder with the music is in the @ "/ Sounds / song.mp3" directory. I tried everything. On the simulator and on the device, notes are working = (NSError does not generate errors.
NSError *error; NSString* path = [[NSBundle mainBundle] pathForResource:@"song" ofType:@"mp3"]; AVAudioPlayer* player = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:&error]; // // [player setVolume:1.f]; [player prepareToPlay]; // [player play]; NSLog(@"%@", error.localizedDescription);