Be sure that you are in the "Songwriting" mode of the app.
To export a MIDI file swipe up the sheet at the bottom of the screen and tap on the icon highlighted below.
If you don't see it, you must scroll the list of icons horizontally.
👉 In the following sheet, tap "MIDI".
👉 Tap on "Share MIDI file".
You can change the file name, add a suffix (Date & time) to the file. Also, you can set which extension you would like to export