I saw that TeamViewer allows iOS Screen Capturing by leveraging the Screen Recorder feature from the Control Center in iOS 11. As seen here:
How is that possible? I checked out the ReplayKit, but couldn't find any feature that would hook up to the Control Center like that.
You need to add a Broadcast Upload Extension
to your app.
(In Xcode, File > New Target, select "Broadcast Upload Extension")
Once the extension is installed (alongside your app), a force-touch on the screen recording icon in control center will give the option of using your broadcast extension, instead of the default ("Camera Roll").
There is very little documentation on iOS Screen Recording right now. But this WWDC video talks about it at a high level:
https://developer.apple.com/videos/play/wwdc2017/606/