ReplayKit: startRecording() completion handler is never entered

前端 未结 1 1496
忘了有多久
忘了有多久 2021-01-13 16:28

Problem description

The startRecording() completion handler is never entered, even though the \"Allow screen recording in $AppName\" pop-up was show

1条回答
  •  孤街浪徒
    2021-01-13 17:15

    I guess I found the answer myself. Please try this out and and confirm if it works:

    1. Delete your App
    2. Clean Xcode project
    3. Hold power button of your iOS device
    4. When slide to turn off appears, hold home button until screen flashes black, then release all buttons
    5. Run your Xcode project again
    6. Handlers should now be called again

    My suspicion is that there is some bug in the used shared instance of the recorder which can only be reset when cleaning up the device RAM.

    Edit: I also observed that this error only happens when I stop the running app with Xcode while the recording is in progress. If I put the app in the background or shut down the app with the iOS task manager, then this error does not appear when the app is started again.

    Conclusion: DO NOT shut down your app using Xcode, while recording is running. If you use the iOS task manager instead then it will continue working properly and deliver the callbacks.

    Edit 2: A bug report is filed and Apple answered that they are aware of this problem, working on it to solve it.

    0 讨论(0)
提交回复
热议问题