Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial Commit

  • Loading branch information...
commit 2dd71dd149c8b22c7d84b15840915d97bd95d9b0 0 parents
@mattt authored
3  .gitmodules
@@ -0,0 +1,3 @@
+[submodule "AFNetworking"]
+ path = AFNetworking
+ url = https://github.com/AFNetworking/AFNetworking.git
1  AFNetworking
@@ -0,0 +1 @@
+Subproject commit 5ddd070607d801f305fbfe6550e81d0b47a8881c
33 Example/Client/AppDelegate.h
@@ -0,0 +1,33 @@
+// AppDelegate.h
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <UIKit/UIKit.h>
+
+@class ViewController;
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@property (strong, nonatomic) ViewController *viewController;
+
+@end
67 Example/Client/AppDelegate.m
@@ -0,0 +1,67 @@
+// AppDelegate.m
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "AppDelegate.h"
+
+#import "ViewController.h"
+
+#import "NSUserDefaults+GroundControl.h"
+
+static NSString * const kGroundControlDefaultsURLString = @"http://ground-control-demo.herokuapp.com/defaults.plist";
+
+@implementation AppDelegate
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ [[NSUserDefaults standardUserDefaults] registerDefaultsWithURL:[NSURL URLWithString:kGroundControlDefaultsURLString]];
+
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
+ self.window.rootViewController = self.viewController;
+ [self.window makeKeyAndVisible];
+
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+ // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+ // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end
369 Example/Client/GroundControl Example.xcodeproj/project.pbxproj
@@ -0,0 +1,369 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ F8C0BC5A15F173F500DC38E6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8C0BC5915F173F500DC38E6 /* UIKit.framework */; };
+ F8C0BC5C15F173F500DC38E6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8C0BC5B15F173F500DC38E6 /* Foundation.framework */; };
+ F8C0BC5E15F173F500DC38E6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8C0BC5D15F173F500DC38E6 /* CoreGraphics.framework */; };
+ F8C0BC8915F1743400DC38E6 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F8C0BC8215F1743400DC38E6 /* ViewController.xib */; };
+ F8C0BC8A15F1743400DC38E6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BC8415F1743400DC38E6 /* AppDelegate.m */; };
+ F8C0BC8B15F1743400DC38E6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BC8515F1743400DC38E6 /* main.m */; };
+ F8C0BC8C15F1743400DC38E6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BC8615F1743400DC38E6 /* ViewController.m */; };
+ F8C0BC9415F1751600DC38E6 /* NSUserDefaults+GroundControl.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BC9315F1751600DC38E6 /* NSUserDefaults+GroundControl.m */; };
+ F8C0BCAB15F1757300DC38E6 /* AFHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BC9715F1757300DC38E6 /* AFHTTPClient.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8C0BCAC15F1757300DC38E6 /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BC9915F1757300DC38E6 /* AFHTTPRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8C0BCAD15F1757300DC38E6 /* AFImageRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BC9B15F1757300DC38E6 /* AFImageRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8C0BCAE15F1757300DC38E6 /* AFJSONRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BC9D15F1757300DC38E6 /* AFJSONRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8C0BCAF15F1757300DC38E6 /* AFJSONUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BC9F15F1757300DC38E6 /* AFJSONUtilities.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8C0BCB015F1757300DC38E6 /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BCA115F1757300DC38E6 /* AFNetworkActivityIndicatorManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8C0BCB115F1757300DC38E6 /* AFPropertyListRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BCA415F1757300DC38E6 /* AFPropertyListRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8C0BCB215F1757300DC38E6 /* AFURLConnectionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BCA615F1757300DC38E6 /* AFURLConnectionOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8C0BCB315F1757300DC38E6 /* AFXMLRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BCA815F1757300DC38E6 /* AFXMLRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ F8C0BCB415F1757300DC38E6 /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = F8C0BCAA15F1757300DC38E6 /* UIImageView+AFNetworking.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ F8C0BC5515F173F500DC38E6 /* GroundControl Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "GroundControl Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ F8C0BC5915F173F500DC38E6 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ F8C0BC5B15F173F500DC38E6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ F8C0BC5D15F173F500DC38E6 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ F8C0BC7C15F1743400DC38E6 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ F8C0BC7D15F1743400DC38E6 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+ F8C0BC8315F1743400DC38E6 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = ViewController.xib; sourceTree = "<group>"; };
+ F8C0BC8415F1743400DC38E6 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ F8C0BC8515F1743400DC38E6 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ F8C0BC8615F1743400DC38E6 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+ F8C0BC8E15F174AF00DC38E6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ F8C0BC9015F174B400DC38E6 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = "<group>"; };
+ F8C0BC9215F1751600DC38E6 /* NSUserDefaults+GroundControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSUserDefaults+GroundControl.h"; sourceTree = "<group>"; };
+ F8C0BC9315F1751600DC38E6 /* NSUserDefaults+GroundControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSUserDefaults+GroundControl.m"; sourceTree = "<group>"; };
+ F8C0BC9615F1757300DC38E6 /* AFHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPClient.h; sourceTree = "<group>"; };
+ F8C0BC9715F1757300DC38E6 /* AFHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPClient.m; sourceTree = "<group>"; };
+ F8C0BC9815F1757300DC38E6 /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperation.h; sourceTree = "<group>"; };
+ F8C0BC9915F1757300DC38E6 /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperation.m; sourceTree = "<group>"; };
+ F8C0BC9A15F1757300DC38E6 /* AFImageRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFImageRequestOperation.h; sourceTree = "<group>"; };
+ F8C0BC9B15F1757300DC38E6 /* AFImageRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageRequestOperation.m; sourceTree = "<group>"; };
+ F8C0BC9C15F1757300DC38E6 /* AFJSONRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFJSONRequestOperation.h; sourceTree = "<group>"; };
+ F8C0BC9D15F1757300DC38E6 /* AFJSONRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFJSONRequestOperation.m; sourceTree = "<group>"; };
+ F8C0BC9E15F1757300DC38E6 /* AFJSONUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFJSONUtilities.h; sourceTree = "<group>"; };
+ F8C0BC9F15F1757300DC38E6 /* AFJSONUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFJSONUtilities.m; sourceTree = "<group>"; };
+ F8C0BCA015F1757300DC38E6 /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkActivityIndicatorManager.h; sourceTree = "<group>"; };
+ F8C0BCA115F1757300DC38E6 /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkActivityIndicatorManager.m; sourceTree = "<group>"; };
+ F8C0BCA215F1757300DC38E6 /* AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworking.h; sourceTree = "<group>"; };
+ F8C0BCA315F1757300DC38E6 /* AFPropertyListRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFPropertyListRequestOperation.h; sourceTree = "<group>"; };
+ F8C0BCA415F1757300DC38E6 /* AFPropertyListRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFPropertyListRequestOperation.m; sourceTree = "<group>"; };
+ F8C0BCA515F1757300DC38E6 /* AFURLConnectionOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLConnectionOperation.h; sourceTree = "<group>"; };
+ F8C0BCA615F1757300DC38E6 /* AFURLConnectionOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLConnectionOperation.m; sourceTree = "<group>"; };
+ F8C0BCA715F1757300DC38E6 /* AFXMLRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFXMLRequestOperation.h; sourceTree = "<group>"; };
+ F8C0BCA815F1757300DC38E6 /* AFXMLRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFXMLRequestOperation.m; sourceTree = "<group>"; };
+ F8C0BCA915F1757300DC38E6 /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+AFNetworking.h"; sourceTree = "<group>"; };
+ F8C0BCAA15F1757300DC38E6 /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+AFNetworking.m"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ F8C0BC5215F173F500DC38E6 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F8C0BC5A15F173F500DC38E6 /* UIKit.framework in Frameworks */,
+ F8C0BC5C15F173F500DC38E6 /* Foundation.framework in Frameworks */,
+ F8C0BC5E15F173F500DC38E6 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ F8C0BC4A15F173F500DC38E6 = {
+ isa = PBXGroup;
+ children = (
+ F8C0BC7B15F1742400DC38E6 /* GroundControl */,
+ F8C0BC5815F173F500DC38E6 /* Frameworks */,
+ F8C0BC5615F173F500DC38E6 /* Products */,
+ F8C0BC9115F1751600DC38E6 /* Vendor */,
+ );
+ sourceTree = "<group>";
+ };
+ F8C0BC5615F173F500DC38E6 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ F8C0BC5515F173F500DC38E6 /* GroundControl Example.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ F8C0BC5815F173F500DC38E6 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ F8C0BC5915F173F500DC38E6 /* UIKit.framework */,
+ F8C0BC5B15F173F500DC38E6 /* Foundation.framework */,
+ F8C0BC5D15F173F500DC38E6 /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ F8C0BC7B15F1742400DC38E6 /* GroundControl */ = {
+ isa = PBXGroup;
+ children = (
+ F8C0BC7C15F1743400DC38E6 /* AppDelegate.h */,
+ F8C0BC8415F1743400DC38E6 /* AppDelegate.m */,
+ F8C0BC7D15F1743400DC38E6 /* ViewController.h */,
+ F8C0BC8615F1743400DC38E6 /* ViewController.m */,
+ F8C0BC8515F1743400DC38E6 /* main.m */,
+ F8C0BC9015F174B400DC38E6 /* Prefix.pch */,
+ F8C0BC8E15F174AF00DC38E6 /* Info.plist */,
+ F8C0BC7F15F1743400DC38E6 /* en.lproj */,
+ );
+ name = GroundControl;
+ sourceTree = "<group>";
+ };
+ F8C0BC7F15F1743400DC38E6 /* en.lproj */ = {
+ isa = PBXGroup;
+ children = (
+ F8C0BC8215F1743400DC38E6 /* ViewController.xib */,
+ );
+ path = en.lproj;
+ sourceTree = "<group>";
+ };
+ F8C0BC9115F1751600DC38E6 /* Vendor */ = {
+ isa = PBXGroup;
+ children = (
+ F8C0BC9515F1757300DC38E6 /* AFNetworking */,
+ F8C0BCB515F1757A00DC38E6 /* GroundControl */,
+ );
+ name = Vendor;
+ path = ../../GroundControl;
+ sourceTree = "<group>";
+ };
+ F8C0BC9515F1757300DC38E6 /* AFNetworking */ = {
+ isa = PBXGroup;
+ children = (
+ F8C0BC9615F1757300DC38E6 /* AFHTTPClient.h */,
+ F8C0BC9715F1757300DC38E6 /* AFHTTPClient.m */,
+ F8C0BC9815F1757300DC38E6 /* AFHTTPRequestOperation.h */,
+ F8C0BC9915F1757300DC38E6 /* AFHTTPRequestOperation.m */,
+ F8C0BC9A15F1757300DC38E6 /* AFImageRequestOperation.h */,
+ F8C0BC9B15F1757300DC38E6 /* AFImageRequestOperation.m */,
+ F8C0BC9C15F1757300DC38E6 /* AFJSONRequestOperation.h */,
+ F8C0BC9D15F1757300DC38E6 /* AFJSONRequestOperation.m */,
+ F8C0BC9E15F1757300DC38E6 /* AFJSONUtilities.h */,
+ F8C0BC9F15F1757300DC38E6 /* AFJSONUtilities.m */,
+ F8C0BCA015F1757300DC38E6 /* AFNetworkActivityIndicatorManager.h */,
+ F8C0BCA115F1757300DC38E6 /* AFNetworkActivityIndicatorManager.m */,
+ F8C0BCA215F1757300DC38E6 /* AFNetworking.h */,
+ F8C0BCA315F1757300DC38E6 /* AFPropertyListRequestOperation.h */,
+ F8C0BCA415F1757300DC38E6 /* AFPropertyListRequestOperation.m */,
+ F8C0BCA515F1757300DC38E6 /* AFURLConnectionOperation.h */,
+ F8C0BCA615F1757300DC38E6 /* AFURLConnectionOperation.m */,
+ F8C0BCA715F1757300DC38E6 /* AFXMLRequestOperation.h */,
+ F8C0BCA815F1757300DC38E6 /* AFXMLRequestOperation.m */,
+ F8C0BCA915F1757300DC38E6 /* UIImageView+AFNetworking.h */,
+ F8C0BCAA15F1757300DC38E6 /* UIImageView+AFNetworking.m */,
+ );
+ name = AFNetworking;
+ path = ../AFNetworking/AFNetworking;
+ sourceTree = "<group>";
+ };
+ F8C0BCB515F1757A00DC38E6 /* GroundControl */ = {
+ isa = PBXGroup;
+ children = (
+ F8C0BC9215F1751600DC38E6 /* NSUserDefaults+GroundControl.h */,
+ F8C0BC9315F1751600DC38E6 /* NSUserDefaults+GroundControl.m */,
+ );
+ name = GroundControl;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ F8C0BC5415F173F500DC38E6 /* GroundControl Example */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = F8C0BC7315F173F500DC38E6 /* Build configuration list for PBXNativeTarget "GroundControl Example" */;
+ buildPhases = (
+ F8C0BC5115F173F500DC38E6 /* Sources */,
+ F8C0BC5215F173F500DC38E6 /* Frameworks */,
+ F8C0BC5315F173F500DC38E6 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "GroundControl Example";
+ productName = "GroundControl Example";
+ productReference = F8C0BC5515F173F500DC38E6 /* GroundControl Example.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ F8C0BC4C15F173F500DC38E6 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0440;
+ ORGANIZATIONNAME = "Mattt Thompson";
+ };
+ buildConfigurationList = F8C0BC4F15F173F500DC38E6 /* Build configuration list for PBXProject "GroundControl Example" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = F8C0BC4A15F173F500DC38E6;
+ productRefGroup = F8C0BC5615F173F500DC38E6 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ F8C0BC5415F173F500DC38E6 /* GroundControl Example */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ F8C0BC5315F173F500DC38E6 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F8C0BC8915F1743400DC38E6 /* ViewController.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ F8C0BC5115F173F500DC38E6 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ F8C0BC8A15F1743400DC38E6 /* AppDelegate.m in Sources */,
+ F8C0BC8B15F1743400DC38E6 /* main.m in Sources */,
+ F8C0BC8C15F1743400DC38E6 /* ViewController.m in Sources */,
+ F8C0BC9415F1751600DC38E6 /* NSUserDefaults+GroundControl.m in Sources */,
+ F8C0BCAB15F1757300DC38E6 /* AFHTTPClient.m in Sources */,
+ F8C0BCAC15F1757300DC38E6 /* AFHTTPRequestOperation.m in Sources */,
+ F8C0BCAD15F1757300DC38E6 /* AFImageRequestOperation.m in Sources */,
+ F8C0BCAE15F1757300DC38E6 /* AFJSONRequestOperation.m in Sources */,
+ F8C0BCAF15F1757300DC38E6 /* AFJSONUtilities.m in Sources */,
+ F8C0BCB015F1757300DC38E6 /* AFNetworkActivityIndicatorManager.m in Sources */,
+ F8C0BCB115F1757300DC38E6 /* AFPropertyListRequestOperation.m in Sources */,
+ F8C0BCB215F1757300DC38E6 /* AFURLConnectionOperation.m in Sources */,
+ F8C0BCB315F1757300DC38E6 /* AFXMLRequestOperation.m in Sources */,
+ F8C0BCB415F1757300DC38E6 /* UIImageView+AFNetworking.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ F8C0BC8215F1743400DC38E6 /* ViewController.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ F8C0BC8315F1743400DC38E6 /* en */,
+ );
+ name = ViewController.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ F8C0BC7115F173F500DC38E6 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ F8C0BC7215F173F500DC38E6 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ F8C0BC7415F173F500DC38E6 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ F8C0BC7515F173F500DC38E6 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ F8C0BC4F15F173F500DC38E6 /* Build configuration list for PBXProject "GroundControl Example" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F8C0BC7115F173F500DC38E6 /* Debug */,
+ F8C0BC7215F173F500DC38E6 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ F8C0BC7315F173F500DC38E6 /* Build configuration list for PBXNativeTarget "GroundControl Example" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F8C0BC7415F173F500DC38E6 /* Debug */,
+ F8C0BC7515F173F500DC38E6 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = F8C0BC4C15F173F500DC38E6 /* Project object */;
+}
7 Example/Client/GroundControl Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:GroundControl Example.xcodeproj">
+ </FileRef>
+</Workspace>
38 Example/Client/Info.plist
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.mattt.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
10 Example/Client/Prefix.pch
@@ -0,0 +1,10 @@
+#import <Availability.h>
+
+#ifndef __IPHONE_4_0
+#warning "This project uses features only available in iOS SDK 4.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
29 Example/Client/ViewController.h
@@ -0,0 +1,29 @@
+// ViewController.h
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <UIKit/UIKit.h>
+
+@interface ViewController : UIViewController
+
+@property (weak, nonatomic) IBOutlet UILabel *greetingLabel;
+
+@end
53 Example/Client/ViewController.m
@@ -0,0 +1,53 @@
+// ViewController.m
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "ViewController.h"
+
+@interface ViewController ()
+- (void)updateValues;
+@end
+
+@implementation ViewController
+
+- (void)updateValues {
+ self.greetingLabel.text = [[NSUserDefaults standardUserDefaults] objectForKey:@"Greeting"];
+}
+
+#pragma mark - UIViewController
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ [[NSNotificationCenter defaultCenter] addObserverForName:NSUserDefaultsDidChangeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {
+ NSLog(@"NSUserDefaultsDidChangeNotification: %@", notification);
+ [self updateValues];
+ }];
+
+ [self updateValues];
+}
+
+- (void)viewDidUnload {
+ _greetingLabel = nil;
+ [super viewDidUnload];
+}
+
+@end
187 Example/Client/en.lproj/ViewController.xib
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1296</int>
+ <string key="IBDocument.SystemVersion">12B19</string>
+ <string key="IBDocument.InterfaceBuilderVersion">2549</string>
+ <string key="IBDocument.AppKitVersion">1187</string>
+ <string key="IBDocument.HIToolboxVersion">624.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">1498</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBProxyObject</string>
+ <string>IBUILabel</string>
+ <string>IBUIView</string>
+ </array>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="774585933">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUILabel" id="423239930">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 42}, {280, 46}}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <string key="NSReuseIdentifierKey">_NS:9</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <int key="IBUIContentMode">7</int>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">Greeting</string>
+ <object class="NSColor" key="IBUITextColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MCAwIDAAA</bytes>
+ </object>
+ <nil key="IBUIHighlightedColor"/>
+ <int key="IBUIBaselineAdjustment">0</int>
+ <float key="IBUIMinimumFontSize">10</float>
+ <int key="IBUITextAlignment">1</int>
+ <object class="IBUIFontDescription" key="IBUIFontDescription">
+ <int key="type">1</int>
+ <double key="pointSize">28</double>
+ </object>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">28</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
+ </array>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="423239930"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC43NQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="774585933"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">greetingLabel</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="423239930"/>
+ </object>
+ <int key="connectionID">9</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="774585933"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="423239930"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8</int>
+ <reference key="object" ref="423239930"/>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">ViewController</string>
+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="-2.CustomClassName">UIResponder</string>
+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">10</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <array class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <object class="IBPartialClassDescription">
+ <string key="className">ViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">greetingLabel</string>
+ <string key="NS.object.0">UILabel</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">greetingLabel</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">greetingLabel</string>
+ <string key="candidateClassName">UILabel</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/ViewController.h</string>
+ </object>
+ </object>
+ </array>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <real value="1296" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">1498</string>
+ </data>
+</archive>
31 Example/Client/main.m
@@ -0,0 +1,31 @@
+// main.m
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <UIKit/UIKit.h>
+
+#import "AppDelegate.h"
+
+int main(int argc, char *argv[]) {
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
5 Example/Server/Gemfile
@@ -0,0 +1,5 @@
+source :rubygems
+
+gem 'sinatra', require: 'sinatra/base'
+gem 'plist'
+gem 'thin'
26 Example/Server/Gemfile.lock
@@ -0,0 +1,26 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ daemons (1.1.9)
+ eventmachine (0.12.10)
+ plist (3.1.0)
+ rack (1.4.1)
+ rack-protection (1.2.0)
+ rack
+ sinatra (1.3.3)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
+ tilt (~> 1.3, >= 1.3.3)
+ thin (1.4.1)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ tilt (1.3.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ plist
+ sinatra
+ thin
1  Example/Server/Procfile
@@ -0,0 +1 @@
+web: bundle exec thin start -p $PORT
16 Example/Server/config.ru
@@ -0,0 +1,16 @@
+require 'bundler'
+Bundler.require
+
+class Defaults < Sinatra::Base
+ get '/defaults.plist' do
+ content_type 'application/x-plist'
+
+ {
+ 'Greeting' => "Hello, World",
+ 'Price' => 4.20,
+ 'FeatureXIsLaunched' => true
+ }.to_plist
+ end
+end
+
+run Defaults
49 GroundControl/NSUserDefaults+GroundControl.h
@@ -0,0 +1,49 @@
+// NSUserDefaults+GroundControl.h
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+
+/**
+
+ */
+@interface NSUserDefaults (GroundControl)
+
+/**
+
+ */
+- (void)registerDefaultsWithURL:(NSURL *)url;
+
+/**
+
+ */
+- (void)registerDefaultsWithURL:(NSURL *)url
+ success:(void (^)(NSDictionary *defaults))success
+ failure:(void (^)(NSError *error))failure;
+
+/**
+
+ */
+- (void)registerDefaultsWithURLRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSDictionary *defaults))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure;
+
+@end
90 GroundControl/NSUserDefaults+GroundControl.m
@@ -0,0 +1,90 @@
+// NSUserDefaults+GroundControl.m
+//
+// Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "NSUserDefaults+GroundControl.h"
+#import "AFPropertyListRequestOperation.h"
+
+@interface NSUserDefaults (_GroundControl)
++ (NSOperationQueue *)gc_sharedPropertyListRequestOperationQueue;
+@end
+
+@implementation NSUserDefaults (GroundControl)
+
++ (NSOperationQueue *)gc_sharedPropertyListRequestOperationQueue {
+ static NSOperationQueue *_sharedPropertyListRequestOperationQueue = nil;
+
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ _sharedPropertyListRequestOperationQueue = [[NSOperationQueue alloc] init];
+ [_sharedPropertyListRequestOperationQueue setMaxConcurrentOperationCount:NSOperationQueueDefaultMaxConcurrentOperationCount];
+ });
+
+ return _sharedPropertyListRequestOperationQueue;
+}
+
+
+- (void)registerDefaultsWithURL:(NSURL *)url {
+ [self registerDefaultsWithURL:url success:nil failure:nil];
+}
+
+- (void)registerDefaultsWithURL:(NSURL *)url
+ success:(void (^)(NSDictionary *defaults))success
+ failure:(void (^)(NSError *error))failure
+{
+ NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
+ [request setHTTPShouldHandleCookies:NO];
+ [request setHTTPShouldUsePipelining:YES];
+ [request addValue:@"application/x-plist" forHTTPHeaderField:@"Accept"];
+
+ [self registerDefaultsWithURLRequest:request success:^(__unused NSURLRequest *request, __unused NSHTTPURLResponse *response, NSDictionary *defaults) {
+ if (success) {
+ success(defaults);
+ }
+ } failure:^(__unused NSURLRequest *request, __unused NSHTTPURLResponse *response, NSError *error) {
+ if (failure) {
+ failure(error);
+ }
+ }];
+}
+
+- (void)registerDefaultsWithURLRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSDictionary *defaults))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure
+{
+ AFPropertyListRequestOperation *requestOperation = [[AFPropertyListRequestOperation alloc] initWithRequest:urlRequest];
+ [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
+ [self registerDefaults:responseObject];
+ [self synchronize];
+
+ if (success) {
+ success(operation.request, operation.response, responseObject);
+ }
+ } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
+ if (failure) {
+ failure(operation.request, operation.response, error);
+ }
+ }];
+
+ [[[self class] gc_sharedPropertyListRequestOperationQueue] addOperation:requestOperation];
+}
+
+@end
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2012 Mattt Thompson (http://mattt.me/)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
67 README.md
@@ -0,0 +1,67 @@
+# GroundControl
+** Remote configuration for iOS **
+
+> Break free of the two-week tyranny of the App Store approval process!
+
+Many developers don't realize that they are allowed to remotely control the behavior of their app (provided that the application isn't downloading any new code).
+
+GroundControl gives you a dead-simple way to remotely configure your app, allowing you to add things like [feature flags](http://code.flickr.com/blog/2009/12/02/flipping-out/), impromptu [A/B tests](http://en.wikipedia.org/wiki/A/B_testing), or a simple ["message of the day"](http://en.wikipedia.org/wiki/Motd_(Unix)).
+
+It's built on top of [AFNetworking](https://github.com/afnetworking/afnetworking), and provides a single category on `NSUserDefaults` (just add `#import "NSUserDefaults+GroundControl.h"` to the top of any file you want to use it in).
+
+## Client Code
+
+```objective-c
+ NSURL *URL = [NSURL URLWithString:@"http://example.com/defaults.plist"];
+ [[NSUserDefaults standardUserDefaults] registerDefaultsWithURL:URL];
+```
+
+...or if you need callbacks for success/failure, and prefer not to listen for a `NSUserDefaultsDidChangeNotification`:
+
+```objective-c
+ NSURL *URL = [NSURL URLWithString:@"http://example.com/defaults.plist"];
+ [[NSUserDefaults standardUserDefaults] registerDefaultsWithURL:URL
+ success:^(NSDictionary *defaults) { ... }
+ failure:^(NSError *error) { ... }
+ ];
+```
+
+...or if you need to use an HTTP method other than GET, or need to set any special headers, specify an `NSURLRequest`:
+
+```objective-c
+ NSURL *URL = [NSURL URLWithString:@"http://example.com/defaults.plist"];
+ NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
+ [[NSUserDefaults standardUserDefaults] registerDefaultsWithURLRequest:URL
+ success:^(NSURLRequest *request, NSHTTPURLResponse *response, NSDictionary *defaults) { ... }
+ failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error) { ... }
+ ];
+```
+
+## Server Code
+
+GroundControl asynchronously downloads and reads a remote plist file. This could be a static file or served dynamically. Either way, since property lists aren't especially fun to write by hand, you can generate and serve one rather easily using the `plist` and `sinatra` gems (full working version can be found in example/server):
+
+```ruby
+require 'sinatra'
+require 'plist'
+
+get '/defaults.plist' do
+ content_type 'application/x-plist'
+
+ {
+ 'Greeting' => "Hello, World",
+ 'Price' => 4.20,
+ 'FeatureXIsLaunched' => true
+ }.to_plist
+end
+```
+
+### Creators
+
+[Mattt Thompson](http://github.com/mattt)
+[@mattt](https://twitter.com/mattt)
+
+## License
+
+GroundControl is available under the MIT license. See the LICENSE file for more info.
+
Please sign in to comment.
Something went wrong with that request. Please try again.