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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:07:58+00:00 2026-05-29T20:07:58+00:00

What I wanna do is just accessing to local file system from my iPhone.

  • 0

What I wanna do is just accessing to local file system from my iPhone.
I have some files in Library directory.

So, my code is as below.

NSString *dir = @"/Users/MY_ID/Library/Application Support/iPhone Simulator/5.0/Applications/6AB76439-APP-ID-1C1BB92E/Library/test";
NSURL *url = [NSURL fileURLWithPath:dir isDirectory:NO];

Then, what I got for the value of url is,

file://localhost/Users/MY_ID/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/6AB76439-APP-ID-1C1BB92E/Library/test

and both iPhone simulator and a real iPhone CANNOT resolve this url.

I think the problem is this part.

file://localhost

because, without that part, I can read file from string.

But, what I need to do is to get the “test” file via NSURL.

Since [[MPMoviePlayerViewController alloc] initWithContentURL:] method only can read NSURL.

let me read the video file from my local file system.

Thanks!!!

  • 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-29T20:08:01+00:00Added an answer on May 29, 2026 at 8:08 pm

    Since this is clearly not useful outside of your local test environment (and hence not portable code anyway), why not just create a “localhost” symlink in the root of your machine?

    ln -s / /localhost
    

    I wasn’t even aware the MPMoviePlayerViewController could read a file from the local filesystem in this way. For simplicity, why not bundle your movie file into the app or host it on something like dropbox?

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

Sidebar

Related Questions

I just wanna to substract one CSV-File from another one, but not if the
I just wanna display the contents of files from sdcard on emulator (as image
Just wanna confirm my thoughts about CryptographicException on decryption. I have some tests, exactly
I just wanna to delete from specified text file first N characters, but i'm
I just wanna find out if there's a way I could minimize code clutter
I just wanna know if it is possible to pause a playing SWF file
I Just wanna to list all files and subdirectories and store this list in
I just wanna ask best practice supposed I have three tables. posts, categories, post_Categories.
I'm using code-igniter to develop my php application. I just wanna ask if there
Suppose I have a form and I wanna prevent the user from submiting the

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.