If you just want to use the iPad with different apps:
https://www.lifewire.com/use-ipad-for-wireless-midi-controller-1994720
For anyone looking to specifically use TouchOSC with Windows or Mac, the developer has a very thorough FAQ page.
General Setup
https://hexler.net/docs/touchosc
MIDI Setup for Touch OSC Bridge
https://hexler.net/docs/touchosc-getting-started-midi
@tocan Check this post out, no matter what, I only was able to get it to work by using the rtpMIDI Driver.
This lets me use apps besides TouchOSC
To use the iPad as an MPE controller, there is also KB-1 from developer Kai Aras: https://www.synthtopia.com/content/2018/11/21/kb-1-turns-your-ipad-or-iphone-into-an-mpe-keyboard-controller/.