Find the key, tempo and sections of a song
On iOS 27, Pro Musician Toolkit can listen to a longer stretch and report its key, tempo, bars and sections. In the app it is called Understanding.
Play for a while and Understanding finds the key, tempo, bar lines, phrases and instruments in what you play.

How long it needs
A key or a tempo needs a few seconds. A shape needs long enough to hold more than one phrase. Press Analyze for a stretch you have already played, or Live to follow along as you go.
Sections become loops
In the Practice Looper, Understanding splits a track into sections, each with its key and length, such as Section 4, D major, 8 bars. Phrase boundaries are loop points, so a section can become an A-B loop with one tap.

Which devices
Understanding uses Apple's music analysis, which needs iOS 27 or later. On earlier versions the rest of Detect, the chord and tempo tools, works as usual.
Questions
Does it name the chords too?
Understanding reports key, tempo, bars and sections. To name the chord being played right now, use the chord detector in Detect.
Which iOS version do I need?
Understanding needs iOS 27 or later. The rest of the app runs on iOS 17 or later.
Try it in Pro Musician Toolkit
Free on the App Store for iPhone and iPad. Requires iOS 17 or later.