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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:05:54+00:00 2026-06-06T21:05:54+00:00

So I see there is an init method in RestKit’s reference: objectStoreWithStoreFilename:inDirectory:usingSeedDatabaseName:managedObjectModel:delegate which suppose

  • 0

So I see there is an init method in RestKit’s reference: objectStoreWithStoreFilename:inDirectory:usingSeedDatabaseName:managedObjectModel:delegate which suppose to initialize objectStore in specified Directory. “inDirectory” parameter accepts NSString. I’ve tried @”Library/Caches” and [self.applicationCachesDirectory absoluteURL] where self.applicationCachesDirectory returns URL of the Caches directory but I’m getting exceptions.

Please tell me how can I specify “Library/Caches” in this method in order to save sqlite DB in the Caches directory instead of Documents?

  • 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-06T21:05:56+00:00Added an answer on June 6, 2026 at 9:05 pm

    Got it working. I’ve created helper method to get Caches folder path as NSString

        - (NSString *)applicationCachesDirectoryString
    {
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
        NSString *cachePath = [paths objectAtIndex:0];
        BOOL isDir = NO;
        NSError *error;
        if (! [[NSFileManager defaultManager] fileExistsAtPath:cachePath isDirectory:&isDir] && isDir == NO) {
            [[NSFileManager defaultManager] createDirectoryAtPath:cachePath withIntermediateDirectories:NO attributes:nil error:&error];
        }
        return cachePath;
    }
    

    and then passed it to the objectStore init method:

    self.objectManager.objectStore = [RKManagedObjectStore objectStoreWithStoreFilename:databaseName inDirectory:[self applicationCachesDirectoryString] usingSeedDatabaseName:seedDatabaseName managedObjectModel:managedObjectModel delegate:self];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following is my ListView adapter. You can see in it that there is a
I see there are techniques available to have deep models in Backbone, but how
I see there are several posts regarding Cannot set Property and I'm still struggling
I see there is a question here but there is no definite answer. Has
I see there is version 1.5 and 3.0 beta , but I can't seem
I see there are BN_CLICKED and BN_DBLCLK notification messages for a button control. but
I see there are lot's of examples in Ext JS where instead of actually
I see there is a API call for Frienships/Show, but I am not sure
I see there is full ajax mode but I wanted to see if there
I see there is an extension for Ninject integration with asp.net-mvc but it looks

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.