Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

aerlfredith

macrumors newbie
Original poster
Feb 25, 2013
2
0
Hi,

I'm trying to load files from a directory in my appbundle in iOS the simulator does this fine but the std::ifstream doesnt open on the iPad i use for testing.
Is this an issue with file access privileges or do i have to do something different,
Code:
	std::ifstream is;

	is.open(fileString.c_str(), std::ios::binary);
	if (!is.is_open())
        {
               printf("FAIL");
        }
Thanks, Jan
 
Last edited by a moderator:
I do the following for my C++ game code -

Code:
[[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] resourcePath]];

std::ifstream	ifs("Token Map 1.data", std::ios::binary);
if ( ifs.is_open() )
{
    _thexder.load(ifs);
}
 
Last edited:
:/

I found out that the iOS simulator is not case-sensitive but the device IS case-sensitive
 
That's correct. The Sim uses the Mac file system, which is case-insensitive and the device file system is case-sensitive.
 
Anyone who does that should be smitten. ;-)

And if OP did that we wouldn't be having this conversation.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.