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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:19:09+00:00 2026-05-22T20:19:09+00:00

I found this piece of code from anther post here. It worked as intended

  • 0

I found this piece of code from anther post here. It worked as intended with iPad simulator mode but not when I switched to the actual iPad device mode. Instead, it came up with a “no such files exist” error message. Before executing this codes, I did create a the Populator folder by right-click on the xxxxxx.app and chose “show package contents” and put some files into the Populator folder. Does Xcode copy the whole app package over the iPad device? Any suggestions?

NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *sourcePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Populator"];
NSString *folderPath = [documentsDirectory stringByAppendingPathComponent:@"Files"];
NSLog(@"Source Path: %@\n Documents Path: %@ \n Folder Path: %@", sourcePath, documentsDirectory, folderPath);
NSLog(@"docdire: %@", documentsDirectory);
NSLog(@"loadImage button clicked");
label.text = [@"sourcePath: " stringByAppendingString:sourcePath];
textField.text = [@"clicked: " stringByAppendingString:documentsDirectory];;

NSError *error;
if([[NSFileManager defaultManager] copyItemAtPath:sourcePath toPath:folderPath error:&error]){
NSLog(@"File successfully copied");
        label.text = @"copy succeeded";
    } else {
        NSLog(@"Error description-%@ \n", [error localizedDescription]);
        NSLog(@"Error reason-%@", [error localizedFailureReason]);
        label.text = [@"Error description: " stringByAppendingString:[error localizedDescription]];
        label2.text = [@"Error reason: " stringByAppendingString:[error localizedFailureReason]];
    }
  • 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-22T20:19:09+00:00Added an answer on May 22, 2026 at 8:19 pm

    You cannot add files or folder to the NSBundle after it has been built. For the device, Xcode is going to sign the NSBundle. Whatever files and folders you want in the NSBundle on the device will have to be added to your Xcode project.

    The other way to add files/folders to your NSBundle is during the build phase before the bundle is signed.

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

Sidebar

Related Questions

I've found this piece of code on Koders : private ServiceProvider SiteServiceProvider { get
I found this link http://artis.imag.fr/~Xavier.Decoret/resources/glsl-mode/ , but there isn't a lot of description around
I found this PECL package called threads , but there is not a release
('1' * N) !~ /^1?$|^(11+?)\1+$/ On the net, I found this piece of Ruby
Reading this question I found this as (note the quotation marks) code to solve
I found this in an article on Multithreaded Apartments, but can’t find a definition
I found this: http://www.evolt.org/failover-database-connection-with-php-mysql and similar examples. But is there a better way? I
Firstly sorry for the long piece of code pasted below. This is my first
There's a piece of code that looks like this. The problem is that during
I found this open-source library that I want to use in my Java application.

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.