twilio / video-quickstart-ios

Twilio Video Quickstart for iOS
https://www.twilio.com/docs/api/video
MIT License
460 stars 178 forks source link

ReplayKit Broadcast Extension methods not being called. Screen Recording never starts #649

Closed sverton123 closed 2 years ago

sverton123 commented 2 years ago

Description

When I hit start screen record, the appex is found but after doing the countdown, the extension methods are never called. I can launch from any of the three schemes (ReplayKit, BroadcastExtension, BroadcastExtensionSetupUI) and set debugs and logs in broadcastStarted(withSetupInfo, but the method never gets called. The countdown simply goes from 3 to 1 and shows Start Broadcast again.

Steps to Reproduce

  1. Download this repo as is
  2. Put an NSLog in broadcastStarted(withSetupInfo and a breakpoint
  3. Run ReplayKit schema.
  4. Hit Start Broadcast button on Twilio view
  5. See the Apple Screen Broadcast Picker correctly has BroadcastExtension selected as the correct extension
  6. Hit Start Broadcast on the picker
  7. Observer the countdown from 3 to 1.
  8. Repeat steps 3-7 for the BroadcastExtension and BroadcastExtensionSetupUI schemas

Expected Behavior

The recording should begin and the method Start Broadcast should be called

Versions

Log

There are no logs. That's what's frustrating :/

timrozum commented 2 years ago

Hi @sverton123, I will give this a try and let you know.

Also have you tried restarting the iOS device? Sometimes ReplayKit can get in a bad state and this can fix it.

timrozum commented 2 years ago

@sverton123 I was able to confirm that the broadcast example code worked and that I could debug it. Here are some ideas I have for you to try:

  1. Do Xcode > Product > Clean Build Folder
  2. Restart your iOS device
  3. Make sure to replace TWILIO_ACCESS_TOKEN with a valid access token in the broadcast extension.
  4. Make sure to replace TWILIO_ACCESS_TOKEN with a valid access token (different from broadcast extension token) in the main app.
  5. You can use VideoQuickStart and connect to Broadcast room and you should see the screen from the other device when you start capturing the screen.

Let me know if you still have issues.

timrozum commented 2 years ago

Going to close this but feel free to reach out again on this ticket if there are more questions.