The darned 3rd map-file - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: The darned 3rd map-file (/thread-608.html)
The darned 3rd map-file - Bersaelor - Nov 10, 2009 05:42 PM
I load map's from my boundle with the code:
and I have the *.plist files:
Well now in the simulator everything works fine.
On the Iphone though, map3.plist will not be loaded, instead I get a very empty file.
Even if I delete map3.plist, change the "4" in map4.plist to a "3" (they have the same content till now) I get the same error when loading nr3.
If I change the 3 back to 4 , map4.plist is loaded fine again.
I'm going nuts here, help me pleeeease!
The darned 3rd map-file - AnotherJake - Nov 11, 2009 12:10 AM
What happens if you do NSLog([NSString stringWithFormat:@"map%i",mapNr]); right under the line where you try to load it? What's the output?
The darned 3rd map-file - Bersaelor - Nov 11, 2009 03:56 AM
for the code:
Again, if I start the same project in the simulator all maps load without errors. I think the file "map3.plist" must have been omitted when transfering it to the Iphone, because the code itself seems to be flawless. Yet map3.plist is exactly the same as "map4.plist" the other maps except for the "3" in its title.
The darned 3rd map-file - AnotherJake - Nov 11, 2009 08:31 AM
Weird. Did you show package contents on the app to see if it's at least included in the bundle?
The darned 3rd map-file - Bersaelor - Nov 11, 2009 09:03 AM
Well I got it!
In the Product's "Show Package Contents" the file was capitalized.
I.e. there was a "Map3.plist" in the File tactica.app that I could only see when clicking "Reveal in Finder".
In the Project Details in Xcode the file was "map3.plist" and also in the project folder if I opened it in Xcode.
I tried to delete the product file and build a completely new one, "build clean" etc. and at some point the "Map3.plist" was finally gone from the product app.
Maybe it was capitalized in the beginning and the Mac doesn't care for Capitalization, so he thought that he didn't have to update "Map3.plist" with "map3.plist" when I was building a file. He seems to update only the files that changed.
But on the Iphone of course , capitalization is important.
The darned 3rd map-file - AnotherJake - Nov 11, 2009 09:04 AM
Ah right, I forgot about that little detail too. Glad you got it!
The darned 3rd map-file - ThemsAllTook - Nov 11, 2009 09:36 AM
This has to do with how your filesystem is formatted. If you look in Disk Utility, you'll see that you can format your Mac's hard drive to be case sensitive too if you wish. As you experienced, the iPhone's filesystem is always set to be case sensitive, which seems to trip up quite a few developers...
The darned 3rd map-file - Bersaelor - Nov 11, 2009 02:47 PM
Well I knew the IPhone is case-sensitive.
The Problem is that I thought all the files I could see in xcode or finder where lower-case.
It's just that in the built app the *.plist seem not to be updated as long as you don't rename the plists.
Now I even understand problems I had some time before, where I had to build numerous times before changes in a map resulted in the program actually showing the changes,