Hi,
I was having trouble to read .plist files on ios and after spending a few hours on it, i became with a fix.
So basically you have to change this method
CCDictionary<std::string, CCObject*> *CCFileUtils::dictionaryWithContentsOfFileThreadSafe
Located in cocos2d-x/platform/ios/CCFileUtils_ios.mm
To this:
<pre>
CCDictionary<std::string, CCObject>**CCFileUtils::dictionaryWithContentsOfFileThreadSafe(const char pFileName)
{
//Fix line 1: get the app’s resources path
NSString plistFilePath = [[NSBundle mainBundle] resourcePath];
NSString* pPath = [NSString stringWithUTF8String:pFileName];
//Fix line 2, change the pPath for the resourcePath+pFileName
NSDictionary* pDict = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:"%
/%s",plistFilePath,pFileName]];
CCDictionary<std::string, CCObject*>* pRet = new CCDictionary<std::string, CCObject*>();
for (id key in [pDict allKeys]) {
id value = [pDict objectForKey:key];
static_addValueToCCDict(key, value, pRet);
}
return pRet;
}