ReplayKit2 Broadcast Working Sample?

I've instantiated the Broadcast Upload and Setup UI templates for new targets. Although after a restart a new screen recording option comes up, there is no SetupUI presented no matter what I try. Also, some of the properties references in WWDC 2017 session 606 don't exist, like broadcastSession.


I'm on iOS 11 b2. Anyone have an actual working sample? Or working anecdote?

Thanks

Wish I could help, unfortunately I am just chiming in also, in hope of any pointers to extra docs, examples, etc.


After an inordinate amount of searching documentation and forums here, and the web at large, I was really surprised to find stunningly little in terms of skeleton code examples, anecdotes, or useful information in general. At one point early on I came across what I now remember as a sample project basically consisting of stubs to use while testing. Unfortunately I didn't mark it and now can't find it again - and am beginning to wonder if I just dreamed it or something.


I would dearly love an example project that did nothing but display a broadcast setup UI extension, either from the view controller template XCode creates, or from an associated xib or storyboard - the extension doesn't need to do anything but show up. My test extension either shows a blank popup with none of the controls (which can't then be dismissed) or nothing at all depending on whether I use the template code as is, or change the plist to use a storyboard. I'm also now getting an "Access denied" error code 5801 in the non-stuck case, but I think that is seperate since I'm getting that when I cancel a mobcrush broadcast too, not just the test broadcast extension


In neither case do I see any console prints that indicate *any* of my extension executed at all - not viewDidLoad, loadView(), awakeFromNib() (thought that would happen in the storyboard case, for instance), etc.


I fully expect I'm just missing something that should be obvious, but some demo code would sure help.

To invoke Broadcast Setup UI, you can just download a game on AppStore that supports ReplayKit Broadcast and start broadcasting in the game. I personally use the game "Basket Fall" a lot for testing.

Thanks. I don't know though if we're talking about the same functionality. From what I understood, device WIDE broadcast is triggered from the OS UI level. So there is nothing specific to the app that requires it to be a *special* app.


Are you referring to Replay Kit enabled apps that can launch a Broadcast Setup UI and stream in app? Or the more broader ability of streaming anything from the device?


From what I understood - and I could be wrong - the new broadcast feature allowed for any UNPREPARED app to stream out through a Broadcast Extension.


Would LOVE for clarification from Apple on this. It would be disappointing to find out that an app HAS to be prepared to work with an app for general broadcasting.

I realise this thread is a bit old, but there didn't seem to be an answer, so I'm posting this in case someone else is researching the topic.


As of iOS 11, there are 2 ways of initiating a broadcast:


  1. As in iOS 10, via a Broadcast setup UI and Broadcast Upload extension pairing.

    These work with a ReplayKit enabled app, where the app presents the RPBroadcastActivityViewController to allow the user to select a streaming service, which then presents the setup UI. The upload extension then takes over once the broadcast has started, and is responsible for actually handling the data and passing it up to the server. It's worth noting that the stub for the setup UI provided in XCode does not provide and actual UI. You have to instantiate a view for your setup UI's View Controller from scratch. I found that init(nibName:bundle:) was called automatically, but with both parameters set to nil, so I created a nib and provided my nib's name into super.init(nibName:bundle:) in order to create my own UI, but you could also create it programmatically, for example.

  2. The new way, via Screen Sharing in Control Centre.

    In this case, you only need to provide an upload extension. If you do provide a setup UI extension, it will not be launched at all when triggering a screen broadcast session. You will also find in your sample handler that broadcastStarted(withSetupInfo:) is called with setupInfo == nil. You can actually use this to identify whether your broadcast has been started from within an app, or via control centre, since your own setup UI extension is responsible for providing this information to the uploadExtension. If you do need to provide information to the upload extension for screen broadcasts triggered in this way, it's best to add UI to configure it to your containing app, and then use shared user defaults, for example, to communicate the values between the processes.


Hopefully that information is helpful to someone!

Do you have an example also ? .. I have create the upload extension for screen sharing which I start it from Control Center but the default methods in SampleHandler never get called.

Any idea?

ReplayKit2 Broadcast Working Sample?
 
 
Q