title: How can I make safe mp3 files for AVAudioPlayer, without getting errors
body: <p>I have problem when trying to play some mp3 files on iOS app. 
  First, I noticed that these files was also not working on Safari for iOS, but now I am having files that works on Safari for iOS, and doesn't work on my App.</p>
  
  <p>I am using thi code to play mp3 audio files:</p>
  
  <pre><code>NSString *pronociationPath = …..
  
  if (pronociationPath != nil) 
  {           
      NSURL *fileURL = [[NSURL alloc] initFileURLWithPath:pronociationPath];
      NSError *error;
  
      self.player=[[[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:&amp;error] autorelease];
      [fileURL release];
      [self.player setNumberOfLoops:0];
      if (self.player == nil) {
          NSLog(@"%@",error);
      }
      else
      {
          [self.player prepareToPlay];
          [self.player play];
      }
  }
  </code></pre>
  
  <p>And I am having this error for a file that works on Safari iOS:</p>
  
  <blockquote>
    <p>Error Domain=NSOSStatusErrorDomain Code=1685348671 "The operation
    couldn’t be completed. (OSStatus error 1685348671.)"</p>
  </blockquote>
  
  <p>Is something wrong with my code? 
  Is there any guide to create safe mp3 files for iOS Apps ?
  I've seen Apple documentation, but I don't see any useful informations <a href="https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html#//apple_ref/doc/uid/TP40009767-CH2-SW28" rel="nofollow noreferrer">https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html#//apple_ref/doc/uid/TP40009767-CH2-SW28</a></p>