How to read/write files under iOS

Is there any one has any success to read and write on iOS devices (iPad and iPhone) and write on macOS.

Trying to read and write files under iOS. So far only luck is to read from macOS (if I deploy my iOS app onto the arm based macOS as iPad app.)

Strangely the program seems at least able to read files under Mac (M2 Macbook Air pretend to be iPad) but not under iDevices (iPad and iPhone). And also reading the base directory using SDL_GetBasePath(). Not sure where to get the details to make the pref option to work and hence may be there is a way to go.

The lazy one app I tried using SDL_RWFromFile file no luck on both.

Any help will be much apprecaited

With Exult we do write on iOS devices. Savegames and cfg. GitHub - exult/exult: Exult is a project to recreate Ultima 7 for modern operating systems, using the game's original plot, data, and graphics files.