Register
Site Login
Site Search
Forums
Advertisement
Welcome to PocketMatrix. PocketMatrix is dedicated to providing the best online community for mobile device developers and enthusiests. What's new?

iPhone - Opening files in simulator and device


iPhone - Opening files in simulator and device

Postby Nacho84 » Feb 17, 2009 @ 4:51am

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
(18.41 KiB) Downloaded 21 times
Nacho84
pm Member
 
Posts: 82
Joined: Dec 15, 2007 @ 12:00pm
Location: Buenos Aires, Argentina


Postby Nacho84 » Feb 17, 2009 @ 11:33pm

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
Nacho84
pm Member
 
Posts: 82
Joined: Dec 15, 2007 @ 12:00pm
Location: Buenos Aires, Argentina


Postby edge » Feb 18, 2009 @ 8:30am

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.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron