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

  • Home
  • SEARCH
  • 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 4252770
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:51:40+00:00 2026-05-21T04:51:40+00:00

First off, InAppSettingsKit is just what I was looking for. Once I figure out

  • 0

First off, InAppSettingsKit is just what I was looking for. Once I figure out some things it will save me tons of time.

My question is: how do I create my own store by subclassing IASKAbstractSettingsStore? The home of IASK states:

The default behaviour of IASK is to store the settings in [NSUserDefaults standardUserDefaults]. However, it is possible to change this behaviour by setting the settingsStore property on an IASKAppSettingsViewController.

and

The easiest way to create your own store is to create a subclass of IASKAbstractSettingsStore.

I’ve spent a good deal of time combing through the code, and I think I understand the basic structure of it. However, I can’t figure out how and what to set the settingsStore property to.

I can see the settingsStore defined and implemented in IASKAppSettingsViewController:

id<IASKSettingsStore>  _settingsStore; 

and

- (id<IASKSettingsStore>)settingsStore {
if (!_settingsStore) {
    _settingsStore = [[IASKSettingsStoreUserDefaults alloc] init];
}
return _settingsStore;

}

I tried subclassing IASKAbstractSettingsStore:

#import <Foundation/Foundation.h>
#import "IASKSettingsStore.h"

@interface IASKSettingsStoreMeals : IASKAbstractSettingsStore {
NSString * _filePath;
NSMutableDictionary * _dict;
}
- (id)initWithPath:(NSString*)path;
@end

and then modified IASKAppSettingsViewController’s settingsStore property to allocate and initialize my new class IASKSettingsStoreMeals instead of IASKSettingsStoreUserDefaults – the only way I can see to change the property:

- (id<IASKSettingsStore>)settingsStore {
if (!_settingsStore) {
    _settingsStore = [[IASKSettingsStoreMeals alloc] init];
}
return _settingsStore;

}

When I build and run, I get the following message when I try the first control (the toggle switch), all other fields do not get saved:

attempt to insert nil value at objects[0] (key: toggleSwitch)

What am I doing wrong? In addition to the changes needed to “rejigger” the code to use IASKSettingsStoreFile (or a subclassed IASKAbstractSettingsStore), I also can’t see where to set the file path change the location of where the settings are saved – or is that done behind the scenes. Looking forward to get past this learning curve and using this.

  • 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-05-21T04:51:41+00:00Added an answer on May 21, 2026 at 4:51 am

    Found the answer.

    My question reveals my inexperience with object orientated languages on the whole, and the concept of encapsulation and frameworks in particular. No changes needed to be made to the IASK framework code, all code was added on my root view controller.

    I created another instance of IASKAppSettingsViewController, and added the following code to change the plist location:

    // the path to write file
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *settingsFile = [documentsDirectory stringByAppendingPathComponent:@"mySettings"];
    IASKSettingsStoreFile *mySettingsBundle = [[IASKSettingsStoreFile alloc] initWithPath:settingsFile]; 
    
    self.appSettingsViewController.settingsStore = mySettingsBundle;
    
    UINavigationController *aNavController = [[UINavigationController alloc] initWithRootViewController:self.appSettingsViewController];
    [mySettingsBundle release];
    
    self.appSettingsViewController.settingsStore = mySettingsBundle;
    
    //[viewController setShowCreditsFooter:NO];   // Uncomment to not display InAppSettingsKit credits for creators.
    // But we encourage you not to uncomment. Thank you!
    self.appSettingsViewController.showDoneButton = YES;
    [self presentModalViewController:aNavController animated:YES];
    [aNavController release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off, I'm sure this is a simple question. I'm just getting started with
First off I'm not expecting a solution, just hoping for some pointers on how
First off, this question is ripped out from this question. I did it because
First off... i'm only just coming to jquery, so... if anyone has time to
First off, the function in question. bool Animation::loadFrames() { sf::Texture frame[frameCount]; std::string pathToFrame; for(int
First off, I'm just starting to mess around with LINQ, and I don't really
first off I can't seem to figure what the first parameter in the pushState
First off I apologize if there is another post out there that answers this,
First off, please accept my apologies if this question is basic, I mainly have
First off, I'm aware of the jQuery UI ThemeRoller - Installing themes question. However,

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.