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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:37:27+00:00 2026-06-09T21:37:27+00:00

I thought about using NSUserDefaults to store a single image, but i know this

  • 0

I thought about using NSUserDefaults to store a single image, but i know this is discouraged.

Now, I tried using the new Asset library mechanism, but I failed to get it to work.
I tried this because my original idea of storing/retrieving the image URL (path on local disk) is not supported (Apple did away with this for some reason).

So now I’m here asking for ideas on where/how to store information so that I can load a pre-selected image. And note that I am already using Core Data (a single entity type) to populate a tableview. I suppose I could create a 2nd entity type just for this. Is this the recommendation, or is there still yet a simpler or more clever way?

Ex: User “favorites” a specific image. The next time the app loads I’d like to display that image.

  • 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-09T21:37:29+00:00Added an answer on June 9, 2026 at 9:37 pm

    You can use the app’s document directory:

    + (NSString *) applicationDocumentsDirectory 
    {    
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
        return basePath;
    }
    

    Note that this directory is erased when the user removes the app.

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

Sidebar

Related Questions

I know this might sound easy. I thought about using the first dot(.) which
i'm trying to get computer's state in my LAN... thought about using QTcpSocket but
We have a project that’s using many C++11 facilities, and we thought about this
I'm new in using GWT. When I heard about GWT I thought than I
I thought about using the following code, but is there any cleaner way? Process
I looked into javascript, and thought about using the client's clock, but it doesn't
For a new Java web project I thought about using: Eclipse as IDE Mercurial
We have some performance problems with one of our applications. I thought about using
I have never thought about until recently, but I'm not sure why we call
I need to tag my project with the latest revision(working copy).I thought about 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.