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 6544647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:29:27+00:00 2026-05-25T11:29:27+00:00

I have a few .txt files my app accesses and gets data from. The

  • 0

I have a few .txt files my app accesses and gets data from.

The way I understand it, using my project’s copy bundle resources build phase will correctly install these files into the Apple-mandated directories when the app is run on the user’s computer.

Again, as I understand it, this is all I need to do to make the .txt files legal for the Mac Apple Store. Please correct me if I’m wrong.

So, I’m doing the above step. The .txt files are added to the project and to the build step.

Once the app is running, how do I open those files? How do I get the file path?

I’m looking for a standard filepath like: @"~/Library/<app-identifier>/filename.txt>"

Does a list of such special file paths exist?

  • 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-05-25T11:29:27+00:00Added an answer on May 25, 2026 at 11:29 am

    You should use one of the NSBundle methods. The most basic is:

    NSString *path = [[NSBundle mainBundle] pathForResource:@"filename"
                                                     ofType:@"txt"];
    

    Have a look at the NSBundle Class Reference for methods where you can specify subdirectories and how to get other bundles than the main bundle.

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

Sidebar

Related Questions

I have a php page that creates page data from two .txt files (one
I have few questions about using lock to protect my shared data structure. I
I have few text and excel file, from which I need to import data
What I need to do is that I have few files (txt) about 2GB
My app comes with preloaded data. At the moment, I have a txt file
I have few files in .txt format (these files are either saved in a
For reasons undisclosed, suppose I have many identical README.txt files in a few dozen
I am trying to read in from a few files using something like this
I have the first few lines of a text file fx.txt with the following
Hey, my app parses numerous txt files in a directory that are almost all

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.