PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

iPhone - Opening files in simulator and device

Hi! I've ported my game to the iPhone and I'm at a point where I can actually play it on the simulator. Nonetheless, when deploying the app into a real device, the game wouldn't work. I ran the app on an iPod touch using the debugger and found out that it's having problems when accessing resource files that are stored inside folders.

I'm attaching a simple project I've made that exemplifies my situation: if I execute it on the simulator I can successfully open the file but, if I execute it on a real device, I get a message that indicates that the file cannot be opened. What am I doing wrong?

Thanks in advance for your help!

--Nacho
Attachments:
pruebaarchivo.zip (19 KB)
Hi! I've managed to solve this issue by adding the EFOF_READ flag in the ClassEFile::Open() method along with the EFOF_READONLY flag I was already using.

--Nacho
Hi Nacho,

Great to hear you've found a solution. The file couldn't be opened because it tried to open a file for writing in a read-only path.