iOS - Recommended location of application support files

Posted on 2012-08-31
Last Modified: 2012-08-31
In learning to program for the Mac OSX, I was advised to place application support files in a folder like:


I’m experimenting with converting a program from OSX to iOS, and I have no experience with iOS, but I’m aware that the iPad for instance has no hard drive, so what is the recommended location for support files?
Question by:efz
    LVL 14

    Accepted Solution

    The best way is to create a directory (e.g. "Private Documents") in Library directory in app's bundle.
    Similar question here:

    Author Comment

    Please accept my sincere thanks for your speedy and excellent reply.

    So the technique for locating directories on iOS isn't really any different than OSX, correct? For example, when programming for OSX in Delphi XE2/FireMonkey, I determine the user's Document directory by using the following line of code:

    URL:=FileMgr.URLForDirectory(NSDocumentDirectory, NSUserDomainMask, nil, false,Error);

    This returns the path to the user's Document directory (although I'm not sure what the difference is between "URLForDirectory" and "NSSearchPathForDirectoriesInDomains" which is used in the example you referred me to in your link).

    Essentially, in my iOS code I would use the same line to find the Library directory (except using "MSLibraryDirectory") ?
    LVL 14

    Expert Comment

    by:Hamidreza Vakilian
    In fact the difference is that URLForDirectory is not available in iOS < 4 but NSSearchPathForDirectoriesInDomains is available in iOS 2+.

    Author Comment

    Hey thanks much. I have one more question about your answer and then I'll cease and desist. In what module is the NSSearchPathForDirectoriesInDomains in? In other words, when I'm compiling for OSX, I use the MacAPI.Foundation module where everything's defined. This doesn't work in the Free Pascal Compiler, nor does MacAPI_Foundation. What is the correct corresponding module for the "uses" clause in iOS?
    LVL 14

    Expert Comment

    by:Hamidreza Vakilian
    Im sorry; I have not any experience in developing iOS with Delphi & free pascal. you should take a look in their guides. Check this link:
    Also try:
    uses ios_files;

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    I recently went through the process of creating an installable image of an iPhone mobile app (an .ipa file) that beta testers could load onto their test devices. The process involved quite a few steps, but both Appcelerator and had decent …
    The release of the iPhone 6 and the iPhone 6 Plus was extremely successful for Apple. However when iOS 8.1 was introduced, many iPhone users complained of quick battery drainage. Without even knowing, you may be unnecessarily using up your battery p…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now