I’m triyng to implement the dropbox sdk to sync some files. With my end goal of using an .mm helper to load plists into NSData, and then returning a CCDictionary for use in cocos2d-x. Is there any way to do this?
After implementing the api (https://www.dropbox.com/developers/sync/docs/ios) i’m pretty much stuck here
CCDictionary *GetPList(string name)
{
DBPath *existingList = [[DBPath root] childPath:[NSString stringWithCString:name.c_str() encoding:[NSString defaultCStringEncoding]]];
DBFile *file = [[DBFilesystem sharedFilesystem] openFile:existingList error:nil];
NSData *contents = [file readData:nil];
}
hi, CCDirectory is not accept data like int/string/NSData, and so on. it only accept CCInt/CCFloat/CCSprite extends from CCObject.
James Hooks wrote:
I’m triyng to implement the dropbox sdk to sync some files. With my end goal of using an .mm helper to load plists into NSData, and then returning a CCDictionary for use in cocos2d-x. Is there any way to do this?
>
After implementing the api (https://www.dropbox.com/developers/sync/docs/ios) i’m pretty much stuck here
>
[…]
You can try looping through the contents of NSData object, create a CCString/CCInteger/CCFloat/whatever and put the NSData element into it. You then add the CCObject into the CCDictionary