Platformsios 5.0, osx 10.6, requires ARC

Badge w/ Version
Badge w/ Platform

Objective-c library for loading a remote JSON / XML config file with locally defined default values.


The best and easiest way is to use CocoaPods.

pod 'RemoteConfig'

How to get started

Create a subclass of GVJSONRemoteConfig or GVXMLRemoteConfig and override the following methods:

  • - (NSURL *)remoteFileLocation; (required)
  • - (void)setupMapping; (required)
  • - (NSTimeInterval)redownloadRate; (optional, by default the remote file is redownloaded every 24 hours)

It’s recommended to add synthesized properties for your config values. However, key value coding also works.


See the included example app: Config.m and ViewController.m.

To run the example app, install its dependancies via CocoaPods: pod install.

@interface Config : GVJSONRemoteConfig

@property (strong, nonatomic) NSNumber *exampleIntegerValue;
@property (strong, nonatomic) NSString *exampleStringValue;
@property (strong, nonatomic) NSString *nonExistingStringValue;

+ (Config *)sharedInstance;

@implementation Config

+ (Config *)sharedInstance {
    static dispatch_once_t pred;
    static Config *sharedInstance = nil;
    dispatch_once(&pred, ^{ sharedInstance = [[self alloc] init]; });
    return sharedInstance;

- (NSURL *)remoteFileLocation {
    return [NSURL URLWithString:@""];

- (void)setupMapping {
    [self mapRemoteKeyPath:@"remote_integer_value" toLocalAttribute:@"exampleIntegerValue" defaultValue:[NSNumber numberWithInteger:1]];
    [self mapRemoteKeyPath:@"remote_string_value" toLocalAttribute:@"exampleStringValue" defaultValue:@"Default local value"];
    [self mapRemoteKeyPath:@"nonexisting_string_value" toLocalAttribute:@"nonExistingStringValue" defaultValue:@"Default local value for nonexisting value on server"];



  • iOS 5
  • ARC
  • Xcode 4.4 or higher

Issues and questions

Have a bug? Please create an issue on GitHub!

To do

The following items are on the to do list:

  • Check the last-modified header so we don’t parse data if it wasn’t changed (using NSURLRequestReloadRevalidatingCacheData already limits downloading, but we’re still always parsing the old data)
  • Add tests

Apps using RemoteConfig

  • Scrobbler
  • MetroLyrics
  • Tailgate Fan

Are you using RemoteConfig in your iOS or Mac OS X app? Send a pull request with an updated file to be included.


RemoteConfig is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "RemoteConfig",
    "version": "1.6.0",
    "summary": "Objective-c library for loading a remote JSON / XML config file with locally defined default values.",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Kevin Renskers": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.6.0"
    "platforms": {
        "ios": "5.0",
        "osx": "10.6"
    "source_files": "RemoteConfig/*.{h,m}",
    "requires_arc": true,
    "dependencies": {
        "XMLReader": []

Pin It on Pinterest

Share This