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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:58:25+00:00 2026-06-06T13:58:25+00:00

I am trying to determine where to place a script file in a location

  • 0

I am trying to determine where to place a script file in a location where I can read/write to while being Sandboxed. While reading the Apple documentation, I seen the below:

Some path-finding APIs (above the POSIX layer) refer to app-specific locations outside of the user’s home directory. In a sandboxed app, for example, the NSTemporaryDirectory function provides a path to a directory that is outside of the user’s home directory but specific to your app and within your sandbox; you have unrestricted read/write access to it for the current user. The behavior of these path-finding APIs is suitably adjusted for App Sandbox and no code change is needed.

So basically I need to use the NSTemporaryDirectory function to return the Application Temp Directory.. but I can’t seem to figure out how with the other documentation for NSTemporaryDirectory:

NSTemporaryDirectory
Returns the path of the temporary directory for the current user.

NSString * NSTemporaryDirectory (void);
Return Value
A string containing the path of the temporary directory for the current user. If no such directory is currently available, returns nil.

Can someone please assist me in figuring out where this temp directory may be located, or how to find it with some sort of NSLog?

Please advise.

  • 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-06T13:58:26+00:00Added an answer on June 6, 2026 at 1:58 pm

    How about simply:

    NSString *tempDir = NSTemporaryDirectory();
    NSLog(@"tempDir='%@'", tempDir);
    

    EDIT: Updated answer to store the value in a variable, as per OP request.

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

Sidebar

Related Questions

I'm trying to determine how many columns a csv file has. Here's my script,
I have a layered application. I am trying to determine where to place a
I'm trying to determine the iPhone user's location using a CLLocationManager and CLGeocoder. My
I am trying to write an iTunes script that takes the selected tracks, moves
I'm trying to write a script which automatically restores a database backup. I know
Been spending some time trying to get a solution in place that will determine
How can I determine the tilt location in the y direction on my iOS
I'm trying to determine where to place my Validation Models. My structure is at
I have a check in place via php to determine if the file is
I'm trying to add a file upload script in php to a website I'm

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.