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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:49:25+00:00 2026-05-21T14:49:25+00:00

I have placed a file programmatically in documents folder on iPhone like below. NSFileManager

  • 0

I have placed a file programmatically in documents folder on iPhone like below.

NSFileManager *fileManager = [NSFileManager defaultManager];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

NSError *error;
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *writableDBPath = [documentsDirectory stringByAppendingPathComponent:@"myfilename.xxxxx"];


NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"myfilename.xxxxx"];
BOOL success = [fileManager copyItemAtPath:defaultDBPath toPath:writableDBPath error:&error];
if (!success) {
    NSAssert1(0, @”Failed to create writable database file with message ‘%@’.”, [error localizedDescription]);
}

I want to access this file in Safari by giving the path of local file through the below code.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:localFileURL] ];

Is it possible? I saw somewhere, we can use the URL starting with “file:///” . Is it true? If yes, how can i access my documents directory file path in Safari passing the URL via the above one line code?

Please advise.

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-21T14:49:26+00:00Added an answer on May 21, 2026 at 2:49 pm

    I would expect that that is not possible because every app is sandboxed, which means your app’s data is not accessible to any other app, and vice versa.

    To add to that, file:// is not one of the recognized or supported iOS schemes, as far as I know.

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

Sidebar

Related Questions

I have placed a properties file in below location. i created a folder in
I have placed .htaccess file in my server's root folder with following content: Redirect
How to access App_Data folder in WCF service? I have placed a xslt file
I have a web archive with a file placed in the WEB-INF directory. How
I would like to access a file system file from within SharePoint, programmatically via
I have placed following javascript in my html file. <script TYPE=text/javascript> function srk(){ document.ontouchmove
I have my hibernate.cfg.xml congif file placed in PersistenceManager project as you see in
I have placed my static web application in an asset folder. My static web
Inn the below code i have placed my mp3 in the src directory where
I have placed CSS and images in the Content folder. All works fine in

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.