The system is nominally set up to understand iOS file use behavior.
unsigned int InitSystem(int argc, char * argv[],char* unchangedPath, char* readOnlyPath, char* writeablePath)
So iOS bundle path would be the 3rd arg.
The system calls different fopen routines for the different kinds of file opens it does, including
FopenStaticReadOnly, FopenReadOnly, etc.
So you SHOULDN’T be having to manually recode any source lines to get the right behavior.
From your output traces, the iOS version is not happy reading LIVEDATA/posrules.txt for some reason, while your main version is.