AVAudioPlayer is not playing in Background when iPhone is locked

前端 未结 4 2012
花落未央
花落未央 2021-01-03 11:57

Actually i fetching the songs from Documents Directory.

I referred this Link:- http://www.raywenderlich.com/29948/backgrounding-for-ios , But it wil

4条回答
  •  花落未央
    2021-01-03 12:26

    Does it work in the background when your device is unlocked?

    If so, it sounds like a permissions issue. If you have enabled data-protection for your app at developer.apple.com. Whilst the device is locked with a passcode you will not be able to read the documents directory because the files are encrypted.

    We got stuck trying to write to a database whilst the device was locked. Wasted a good two days to figure that one out.

    W

    • Edit - Also may find the setting in Xcode under capabilities

提交回复
热议问题