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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:17:16+00:00 2026-06-15T09:17:16+00:00

When I run an application in the simulator can I get an environment variable

  • 0

When I run an application in the simulator can I get an environment variable of the directory that the app was installed in? Here is where it’s being installed currently for me but the iOS version and GUID (i.e.’112318C3-A508-482D-9A1D-0A55B3B16FDB’) will change, I’d like to have it as a variable after build.

/Library/Application Support/iPhone Simulator/6.0/Applications/112318C3-A508-482D-9A1D-0A55B3B16FDB

If there’s no way to get that as an environment variable, can I just get the GUID that it’s naming the directory?

  • 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-15T09:17:17+00:00Added an answer on June 15, 2026 at 9:17 am

    Can you explain a bit more of what you are trying to accomplish?

    I’m not sure about environment variables containing that path, however you can add the following method in your application and print it’s output to see the path to the documents directory of the app (This is a folder inside the path your looking for).

    // Returns the URL to the application's Documents directory.
    - (NSURL *)applicationDocumentsDirectory
    {
        return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
    }
    

    Then you can use the URL however you need to.

    NSLog(@"%@", [[self applicationDocumentsDirectory] path]);

    If you really mean environment variable, there is another post containing a pretty exhaustive list of environment variables you can find here: How do I print a list of "Build Settings" in Xcode project?

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

Sidebar

Related Questions

I'm using XCode 4 to develop an application that can be run on iPhone
I wanted to run my application on iPhone simulator via some script. Is it
When, I run my application in the simulator using the Leaks instrument, it uses
I developed one swing application but each time you run application new window is
I need to run the application that I have made in Xcode on my
I want to run another Application (Polaris Office) directly from my Application. But it
how can i send JSON request from blackberry application that works as client to
I'm trying to run my app in OCUnit environment. It uses a sqlite database
When I run my IOS application (on either the IPad simulator or real device)
I am trying to run an Android application on a BlackBerry PlayBook Simulator using

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.