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

  • Home
  • SEARCH
  • 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 8248733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:17:36+00:00 2026-06-07T23:17:36+00:00

I have read a lot about accessing files in an iPhone app, but I

  • 0

I have read a lot about accessing files in an iPhone app, but I cannot figure out how to get them there in the first place. I have many sound files that are important to my app, and many more that can be purchased using IAP. I know that these files should go in my /Library/Application Support/ directory, however I cannot figure out how to get them there. How do I do this? I am sure that there is something incredibly obvious that I’m missing, but I can’t figure it out. Also, in my app there is a UITableView that keeps track of these files. What is the best way to keep that table’s datasource up-to-date as the user purchases new sounds? I would assume keeping an array in my model would be best, but I’m not sure how to read and write the contents of an array to disk. Any help is appreciated.

  • 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-07T23:17:38+00:00Added an answer on June 7, 2026 at 11:17 pm

    You can use this code to create your folder and then save your files there.

    NSArray *filePaths =    NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask,YES); 
    NSString *path=[filePaths objectAtIndex: 0];
    NSString *tempPath=[[NSString alloc]initWithFormat:@"%@/%@",path,@"TempFolder"];
    
    BOOL bDir;
    NSError *error;
    if([[NSFileManager defaultManager] fileExistsAtPath:tempPath isDirectory:&bDir]==FALSE){
        [[NSFileManager defaultManager] createDirectoryAtPath:tempPath withIntermediateDirectories:YES attributes:nil error:&error];
    }
    

    Then use this code to save your files in your folder

    NSArray *filePaths =    NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask,YES);
    NSString *pathAndName=[[NSString alloc] initWithFormat:@"%@/TempFolder/%@",
                           [filePaths objectAtIndex: 0],
                           fileName];
    NSData * data = //Load your file here
    [data writeToFile:pathAndName atomically:YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read a lot about this issue but mine still seems to be
I have read a lot about this! But I can't make a clear idea!
I have read a lot about MVC design pattern, but some of the things
I have read a lot about preventing race conditions, but typically with one record
I am new to SCOM, but I have read a lot about it and
I have read a lot about unit testing, but I still haven't found any
Even though I have read a lot about it I can't get my head
I have read a lot about Java classloaders, but so far I have failed
I have read a lot about projective geometry and cross ratio, but I don´t
i have read a lot about what im asking, but the closest thing i

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.