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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:48:56+00:00 2026-06-03T17:48:56+00:00

I have an NSLog call which is displaying the current directory I’m using with

  • 0

I have an NSLog call which is displaying the current directory I’m using with the NSFileManager in my program.

When running my application in XCODE, my “current Directory” is shown as:

/Users/gsteiner/Desktop/Program Code/Band Manager/build/Debug

This is expected as it is the location of the compiled application. However, if I then go to the finder and double click the compiled application, which is located at the above path, the current directory is showing:

/

or, the root directory.

I would have thought that the “current directory” would be the directory in which the application is contained, but apparently that is not the case.

Can anyone enlighten me to why this is? Is it some type of error, or is that the way it is supposed to be on an application launch. If so, what would be the best way of finding the directory where the compiled application is located?

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-06-03T17:49:05+00:00Added an answer on June 3, 2026 at 5:49 pm

    One of the security mechanisms and application sandboxing of iOS is setting the working directory of each application as its root. This way no application has access to another
    application’s directory / resources (and surely no access to the system tools).

    Take a look at this document for some more knowledge about it.

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

Sidebar

Related Questions

I have some code which attempts to make a call within an application, but
I have a method, which right now only needs to do an NSLog call:
Confused here... I have two dates which I NSLog to console and get: dates
I have a Label, let's call it currencyFormattedLabel, the value of which was earlier
I have a main application which dynamically loads a dylib , from inside that
i have this function which call a function to check CMS for info. but
I have a method that I call to make web service requests using GET.
I have 2 classes: class A have a declared protocol, which i call in
I have a method which i need to call within another method. in a
I am creating an application in which I have add a facility for post

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.