0
votes

I'm creating my sprite sheets with TexturePacker and then add .plist and .pvr.ccz files to Xcode project.

For using this sprite sheet, I have this code:

CCSpriteFrameCache *cache = [CCSpriteFrameCache sharedSpriteFrameCache];
[cache addSpriteFramesWithFile:@"filename.plist"];

It's working fine, but if I remove filename.plist and filename.pvr.ccz from Xcode project, even deleting these files from hard drive, the project runs well and show all sprites!

How can CCSpriteFrameCache load these files when it's not included in project bundle?

1

1 Answers

0
votes

Issue a "Clean" command in Xcode or delete the app from the device. Either way it'll stop working once you did that.

The thing is that Xcode doesn't remove deleted files from the bundle, either by default or under certain circumstances (I never cared to check which it is).

Therefore even though you deleted the files from your Xcode project, the bundle on the device still contains these files. I suppose this is an optimization where Xcode only transfers added or modified images to the app bundle on the device. It doesn't remove the app and re-transfer everything because that would be too slow for developers, particularly if you are developing a rather large app (20+ MB).