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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:15:57+00:00 2026-06-01T00:15:57+00:00

In my iOS application I have made a form that should submit data into

  • 0

In my iOS application I have made a form that should submit data into a plist. I have followed examples from this link amongst other –

How to write a data in plist?

Now the I think I have done everything right except I am getting one error and it is related to ARC – says Xcode – so I am not sure if the example I used is outdated or if I have just forgotten something.

To clarify – I have the save button with the appropriate -(IBAction) and it is giving no errors so i think I am ok there. the bit that needs tweaking I think is copying the original Data.plist into the document folder which I think I am suppose to achieve with this.

I have pasted the code where the error occurs below. Any help is great and if I can help by posting more code, let me know:-)

- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.


NSString *destPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
destPath = [destPath stringByAppendingPathComponent:@"Data.plist"];

// If the file doesn't exist in the Documents Folder, copy it.
NSFileManager *fileManager = [NSFileManager defaultManager];

if (![fileManager fileExistsAtPath:destPath]) {
    NSString *sourcePath = [[NSBundle mainBundle] pathForResource:@"Data" ofType:@"plist"];
    [fileManager copyItemAtPath:sourcePath toPath:destPath];
}

// Load the Property List.
savedReadingsDictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:destPath];
}

Cheers Jeff

I just noticed I didn’t clarify what is giving me the error:

it’s this line

[fileManager copyItemAtPath:sourcePath toPath:destPath];

and the error is:

ARC Issue – No visible @interface for ‘NSFileManager’ declares the selector ‘copyItemAtPath:toPath:’

  • 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-01T00:15:58+00:00Added an answer on June 1, 2026 at 12:15 am

    You’ve used a method that doesn’t exist. You just need to change it as

    [fileManager copyItemAtPath:sourcePath toPath:destPath error:nil];
    

    Instead of passing nil as error, you can also pass your custom NSError object. Refer to the NSFileManager class reference to see all allowed methods

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

Sidebar

Related Questions

I have a program that load data from a file using std::ifstream and store
i have made an application with storyboard and the new iOS 5 feature like
I have a SQLite database that I am creating in my iOS application. A
I have made a web application that administrate questions for a quiz. The web
I have an application that was originally created compatible with iOS 2.x. With Xcode
I've developed a couple of iOS applications, and apart from that I have no
I have an iOS application that downloads an xml file using: NSURL *queryURL =
I have been looking into the ways of distributing an iOS application internally in
I have made an application for my client by keeping target iOS as 4.
So, I may have made a mistake in updating my application to iOS 4.0

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.