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

The Archive Base Latest Questions

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

I have an application in Xcode 4.2. I have created plist file as my

  • 0

I have an application in Xcode 4.2.

I have created plist file as my requirement.

I have found the data from Applications main bundle and got the data in to the array.

But As I want to modify the plist data at run time, I could not find it in Documents Directory

Actually I want to modify the plist programmatically. Though I am not using mainbundle.

-(NSString *) saveFilePath::(NSString *)tagString     
{
    NSArray *arr = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

    NSString *strPath = [[arr objectAtIndex:0] stringByAppendingPathComponent:tagString];       
    return strPath;
} 

Could not retrive the plist file.(Path I am getting, but path with file not getting)

I also could not find physically the plist file in the iphone simulator/App/Documents folder?

  • 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-26T05:27:58+00:00Added an answer on May 26, 2026 at 5:27 am

    you need to copy plist from bundle to document directory first

    -(void) checkAndCreateSetting
    {
        BOOL success;
        NSFileManager *fileManager = [NSFileManager defaultManager];
        NSError *error;
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *documentsDirectory = [paths objectAtIndex:0];
        NSString *writableDBPath= [documentsDirectory stringByAppendingPathComponent:@"Settings.plist"];
        success = [fileManager fileExistsAtPath:writableDBPath];
        if (success) return;
        // The writable database does not exist, so copy the default to the appropriate location.
        NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Settings.plist"];
        success = [fileManager copyItemAtPath:defaultDBPath toPath:writableDBPath error:&error];
        if (!success) {
            NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]);
        }
    }
    

    let me know in case of any query
    thanks& regards
    neil

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

Sidebar

Related Questions

I have created a page-based application in Xcode 4, for iPad iOS5. When I
I have created a simple hello world application in xcode using the command line
I created a basic application in Xcode 4.2. Very simple application, I have not
I have created an xcode project. Now I want to give .app file to
I have created one application using XCode. Now i want to deploy that application
I have an application that was originally created compatible with iOS 2.x. With Xcode
I have a basic project created in xcode as a Tab Bar Application, What
I have started a new project from salesforce template o XCODE, then I created
I have created a universal window based application in xcode 4. Additionally I created
I actually need to get the .app file of a xcode application. I have

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.