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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:47:24+00:00 2026-05-26T00:47:24+00:00

We have a code to download a PDF from the server using a SOAP

  • 0

We have a code to download a PDF from the server using a SOAP protocol.

We store the file on the Documents folder of the iOs device, and the we want to allow the user to open the file (usually PDF’s files)

But, at least on the simulator, the application didn’t open the file successfully.

Of course, I can open manually the file (in order to check that the file has been downloaded perfectly)

// Get the documents folder where write the content
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 
NSString *documentsDirectory = [paths objectAtIndex:0];

NSString *filePath = [documentsDirectory stringByAppendingPathComponent:documentDownloaded.fileName];

if ([[NSFileManager defaultManager] fileExistsAtPath:[self getFileCompletePath]]){
    NSString *filePath = [[NSString alloc] initWithFormat:@"%@", [self getFileCompletePath]];
    NSURL *url = [[NSURL alloc] initFileURLWithPath:filePath];

    if ([[UIApplication sharedApplication] canOpenURL:url]){
        [[UIApplication sharedApplication] openURL: url];
    } else {
        NSLog(@"Not supported application to open the file %@", filePath);
    }

    [url release];
    [filePath release];
}

The file full path in the simulator is:

/Users/User/Library/Application Support/iPhone Simulator/4.3.2/Applications/87800296-2917-4F26-B864-B20069336D1D/Documents/0000907.pdf

Anybody knows if is something wrong?

The file could be and spreadsheet, pdf, image, document … but for the first work around will be great just for pdf’s.

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-26T00:47:24+00:00Added an answer on May 26, 2026 at 12:47 am

    You cannot open file URLs with UIApplication‘s openURL: method. Because of sandboxing, other apps could not access any files within your application’s Documents folder.

    You need to use UIDocumentInteractionController to open documents that you download or create in other applications.

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

Sidebar

Related Questions

I want to download a file from server to a local host. i have
I have the following sample code where I download a pdf from the European
I have a requirement to download a PDF file and saving it on clicking
I have the following code to download a file in the notification system. But
I have completed client side code by download sample from git for push notification
I have code where I schedule a task using java.util.Timer . I was looking
I have a file, say a PDF on my website and when a user
I have a flash app that needs to download a file, whose name contains
i have a site where people can download source code, sorta paste type site,
I have an application (winforms) that downloads a file to user's temporary folder, then

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.