Since iOS 11, Apple has provided a built-in screen recorder which can be useful for you, in a couple of ways:
The new screen capture feature can be used to record walkthroughs and guides of your app. What’s really useful is that you can even edit and trim the video directly in your device using iMovie.
This will help if you need to troubleshoot your app since you can record exactly how and what is happening on your device
How to enable screen recording in iOS:
Go to into your Settings
Find Control Center, and tap on Customise Controls
Scroll down until you see Screen Recording. Tap to add this option to your control centre
Then close the settings.
How to record a screen:
Swipe down from the upper right of the screen to display the Control centre
Tap on the Screen recording button
There will be a quick countdown and once the recording starts you’ll see a red bar at the top of your screen.
To stop your recording, tap on the red bar at the top of the screen
The video will be saved in your Photos