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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:40:57+00:00 2026-05-26T18:40:57+00:00

I know how to read/write to local files on iOS using file handles. I

  • 0

I know how to read/write to local files on iOS using file handles. I can dynamically create and read/write form them.
What I’m trying to do right now is to include a file, about 200 lines long with the app bundle, which I hope to parse and extract configuration settings from. I really do not want to have to create an array of 200 numbers by hand.

How would I go about including a text file with the app, and making it accessible from my application?

Thank you!

  • 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-26T18:40:58+00:00Added an answer on May 26, 2026 at 6:40 pm

    You can include a file in the bundle by adding it to your Resources folder in Xcode and making sure that it is included in your target as well. To access a file in the bundle (e.g., a text file called info.txt), you can get the path using:

    [[NSBundle mainBundle] pathForResource:@"info" ofType:@"txt"]
    

    Then access it using the normal NSFileManager methods.

    EDIT:
    With this said, you can’t write anything into this file inside the bundle on iOS. Instead, you can copy the file from the bundle to a file system location (say, your app’s Application Support folder) on first launch, then access it there elsewhere in your app.

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

Sidebar

Related Questions

does anybody know of a secure 'read-once' local file access system? Or how one
I am trying to write to a local file from a PL/SQL script. In
Does anyone know of an existing ruby implementation of a read/write lock - http://en.wikipedia.org/wiki/Readers-writer_lock
I don't really know much about sockets except how to read and write to
Does anyone know what is required to be able to read and write to
Does anyone know a good C++ class to read (and possibly also write) INI
Anyone know how to read Outlook nickname list file (.NK2)? Any document on how
Does anyone know how to read a x.properties file in Maven. I know there
using .NET Clipboard API you can write following code: //dataObject - instance of IDataObject,
I know that read() is a blocking call unless I make the socket non-blocking.

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.