The best way to interact with native iOS API on iOS itself is Swift Playgrounds. It supports most built-in frameworks and you can pretty much write anything you want using the app.

Source: Hacking with private APIs on iPad | Rambo.codes