how to implement the Broadcast Upload Extension

I wanna use the ReplayKit Streaming feature in iOS10, so I need to implement the Broadcast UI Extension and Broadcast Upload Extension in the APP. I did as what's shown in the WWDC2016, but it's not clear how to implement the Upload Extension and I have problem about that. Does anyone implement the Upload Extension successfully ? I'm using the SampleHandler in the template to process the data. Does anyone know how to do that ?