search

Home  >  Q&A  >  body text

ios - AVAudioPlay模拟器可以播放录音,但是真机不行

  1. @property (strong, nonatomic) AVAudioPlayer *audioPlayer;

  2. [session setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker error:&sessionError];

  3. audioPlayerDidFinishPlaying:successfully: 可以进入,并且返回的flag是YES

  4. 使用caf文件

  5. 点击播放按钮时创建AVAudioPlayer对象

  6. 耳机同样无声音

  7. iOS10,Xcode8

求解,多谢!

大家讲道理大家讲道理2910 days ago274

reply all(1)I'll reply

  • PHPz

    PHPz2017-04-18 09:40:12

    The problem is solved, restore factory settings and reinstall the App

    reply
    0
  • Cancelreply