Call native swift function by appium driver

Hi guys,

I am looking for the appium solution to communicate through the native application context with running application backend. Is it possible to get the same behavior as I have inside the webView context?
The same way I am able to execute driver.executeScript() commands in the browser console.
What developers need to do in order to expose this commands inside the native context?
The application is iOS native and developed using the swift + xcode 13.2.

Thanks in advance.