This is a Unity plugin for iOS that allows you to record the screen and capture gameplay. It includes the Xcode project that it was built in. To start using it, simply drag the PluginSource folder into your Unity project as a sub-folder in the following directory/file path: Assets > Plugins > iOS > ReplayKitUnity > Drag the source and editor folders into here
Blog Post describing the steps to make a bridge: https://medium.com/@SoCohesive/unity-how-to-build-a-bridge-ios-to-unity-with-swift-f23653f6261
This plugin is a work in progress and has been built to show the steps of creating a Unity iOS plugin using Swift
ReplayKitUnity.StartRecording();
ReplayKitUnity.StopRecording();
Get the video file after recording is complete
a) Subscribe to the onStopCaptureWithFile action in ReplayKitUnity
ReplayKitUnity.Instance.onStopCaptureWithFile += OnStopRecording; (connect to your function)
b) Use the VideoPlayer Unity componnent or any video playback technique to play the .mp4
ReplayKitUnity.Instance.onStartRecording += OnStartRecording; (connect to your function)
Set a constrained time to record gameplahy (ie - only 10 seconds)
ReplayKitUnity.AllowedTimeToRecord = 10.0f;
ReplayKitUnity.MailSubjectText = "Check this recording of my game out!";