3

I'm working on an IOS swift application that will allow the user to record the entire screen, any app and even the home screen.

In order to do that, I added a Broadcast Upload Extension to my app.

First I used the RPSystemBroadcastPickerView class in order to add a record button to my view that allow the user to open the record popup and select to which app he wants to broadcast the screen flow. And it's working fine :

enter image description here

But I would like to avoid this step and directly open the popup when the app launch.

So I wrote the following code to do that :

RPBroadcastActivityViewController.load(withPreferredExtension: "ch.jroueche.RecordApp.TestScreen", handler:  {broadcastAVC,error in
    guard error == nil else {
        print("Cannot load Broadcast Activity View Controller.")
        return
    }
    
    if let broadcastAVC = broadcastAVC {
        broadcastAVC.delegate = self
        self.present(broadcastAVC, animated: true, completion: {
            // broadcastactivityviewcontroller will perform the callback when the broadcast starts (or fails)
            print("I've START")
            
        })
    }
})

Unlikeenter code here the RPSystemBroadcastPickerView solution, I'm getting the following error :

enter image description here

The preferred broadcast service could not be found.

My issue is similar to the following post : App not showing up as a broadcast service in RPBroadcastActivityViewController

I also added the extension and the preferred extension identifier is correct.

Why would it be possible using the RPSystemBroadcastPickerView and not programmatically using RPBroadcastActivityViewControllerclass. That does not make sense for me.

Does someone have an idea of what could be the issue and how could I fix it ? Or a workaround in order to do this screen record.

Thanks in advance

Naweap
  • 105
  • 8
  • I have the same problem. Did you solve it? – suat korkmaz Feb 18 '21 at 10:01
  • No, I didn't. I temporarily used the workaround to open the RPSystemBroadcastPickerView and simulate a click on it. This solution is working, but is a little bit trash. – Naweap Feb 19 '21 at 11:53

1 Answers1

1

It appears that RPBroadcastActivityViewController shows ONLY Broadcast Setup UI Extension, while RPSystemBroadcastPickerView shows ONLY Broadcast Upload Extension. But I have no idea why, as both of them are stated to show list of available providers/services.

It would be very helpful if someone could bring more details on the topic.

K Bakalov
  • 254
  • 1
  • 7