Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Objective-c library for loading a remote JSON / XML config file with locally defined default values.
Objective-C Ruby
Branch: master

Version 1.6.0. Warning: backwards incompatible changes! Removed execu…

…teBlockWhenDownloaded:onFailure:, replaced with registerSuccessBlock:failureBlock:.
latest commit 0b08d09b72
@kevinrenskers kevinrenskers authored


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.

Something went wrong with that request. Please try again.