Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
412 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...