Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8850415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:53:54+00:00 2026-06-14T12:53:54+00:00

My app gets some resources, specifically .pvr.ccz , from URL and save them in

  • 0

My app gets some resources, specifically .pvr.ccz, from URL and save them in Documents directory.

NSString *documentsDirectoryPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
...
[responseObject writeToFile:[documentsDirectoryPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.%@", <file_name>, @"pvr.ccz"]] options:NSAtomicWrite error:nil];

After that creates a sprite using .plist and .pvr.ccz. The list of .png images specified in the property list which is already in the project.

[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"<property_list_name>.plist"];
CCSprite *sprite = [CCSprite spriteWithSpriteFrameName:[NSString stringWithFormat:@"<file_name>.png"]];

This will be warned that -[CCFileUtils fullPathFromRelativePath:resolutionType:] : cocos2d: Warning: File not found: <file_name>.pvr.ccz

Is there any way to make Cocos2D can search the resources from URL that saved in a specific folder? or is there any way to save the resources from URL in the place where Cocos2D can found them?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:53:56+00:00Added an answer on June 14, 2026 at 12:53 pm

    I believe that if you specify a full path to coco’s it will look there. Thus

    NSString*fqn = [documentsDirectoryPath stringByAppendingPathComponent@"<property_list_name>.plist"];
    [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:fqn];
    

    have not tried this, but it should work.

    EDIT : assumes .plist is in the project, but the .pvr.ccz is in documents dictionary. Assuming further that your texture is called “downloaded-hd.pvr.ccz”, the project enables HD for devices, the following example should find your files:

    NSString*textureFileName=@"downloaded-hd.pvr.ccz";
    NSString*fqn = 
        [documentsDirectoryPath stringByAppendingPathComponent:textureFileName];
    [[CCSpriteFrameCache sharedSpriteFrameCache] 
        addSpriteFramesWithFile:@"<property_list_name>.plist"
                textureFileName:fqn];
    

    i think the -hd will be silently processed correctly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an app that gets some values from a mysql database via php.
I have a Silverlight 5 app that gets some data from a couple Sharepoint
My app gets some json data from a server and it uses a NSMUtableData
I am developing an Android App that gets some data from a web server,
I have a Django app that gets it's data completely from an external source
I have made an app that gets an array of addresses from a web
I'm trying to build an app that gets JSON from server and then shows
I am making an application (iPhone app) which gets information (jokes) from an RSS
When a user gets mailed the change password link in our app from our
I have an app that hits a REST service, gets some json and then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.