Skip to content

Commit

Permalink
Added GroundControl
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisreimann committed Jan 23, 2013
1 parent 7d4364a commit d518a2f
Show file tree
Hide file tree
Showing 16 changed files with 2,419 additions and 2,013 deletions.
17 changes: 16 additions & 1 deletion Classes/iOctocat.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#import "YRDropdownView.h"
#import "ECSlidingViewController.h"
#import "Orbiter.h"
#import "NSUserDefaults+GroundControl.h"
#import "NSDate+Nibware.h"

#define kClearAvatarCacheDefaultsKey @"clearAvatarCache"
Expand Down Expand Up @@ -51,6 +52,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
- (void)applicationDidBecomeActive:(UIApplication *)application {
[self checkAvatarCache];
[self checkGitHubSystemStatus];
[self contactGroundControl];
}

- (void)setCurrentAccount:(GHAccount *)account {
Expand Down Expand Up @@ -90,7 +92,7 @@ - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceAppl
}

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
NSURL *serverURL = [NSURL URLWithString:@"http://ioctocat.com/"];
NSURL *serverURL = [NSURL URLWithString:@"https://ioctocat.com/push/"];
Orbiter *orbiter = [[Orbiter alloc] initWithBaseURL:serverURL credential:nil];
[orbiter registerDeviceToken:deviceToken withAlias:nil success:^(id responseObject) {
DJLog(@"Registration Success: %@", responseObject);
Expand All @@ -112,6 +114,19 @@ - (BOOL)openURL:(NSURL *)url {
}
}

- (void)contactGroundControl {
#ifdef CONFIGURATION_Release
NSURL *url = [NSURL URLWithString:@"https://ioctocat.com/app/defaults.plist"];
#else
NSURL *url = [NSURL URLWithString:@"https://ioctocat.com/app/defaults-beta.plist"];
#endif
[[NSUserDefaults standardUserDefaults] registerDefaultsWithURL:url success:^(NSDictionary *defaults) {
DJLog(@"Defaults from GroundControl:\n\n%@", defaults);
} failure:^(NSError *error) {
NSLog(@"Error fetching defaults from GroundControl:\n\n%@\n\nUser info: %@", error, error.userInfo);
}];
}

- (void)setupHockeySDK {
NSString *path = [[NSBundle mainBundle] pathForResource:@"HockeySDK" ofType:@"plist"];
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
Expand Down
1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ platform :ios, '5.0'
gem 'cocoapods', '0.16.0'
pod 'AFNetworking', '1.1'
pod 'AFOAuth2Client', '0.1'
pod 'GroundControl'
pod 'Orbiter'
pod 'Base64'
pod 'SVPullToRefresh', :head
Expand Down
4 changes: 4 additions & 0 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ PODS:
- Base64 (1.0.0)
- ECSlidingViewController (0.9.2)
- Expecta (0.2.0)
- GroundControl (0.0.1):
- AFNetworking (>= 0.9)
- HockeySDK (2.5.5)
- Orbiter (0.0.1):
- AFNetworking (>= 0.9)
Expand All @@ -19,6 +21,7 @@ DEPENDENCIES:
- Base64
- ECSlidingViewController (from `https://github.com/iOctocat/ECSlidingViewController.git')
- Expecta (from `https://github.com/github/expecta.git')
- GroundControl
- HockeySDK
- Orbiter
- SVProgressHUD (HEAD)
Expand All @@ -39,6 +42,7 @@ SPEC CHECKSUMS:
Base64: 285e4864ccacb72cb921c09fd7a19af3b47f450d
ECSlidingViewController: f95954f73f256db09ac87d2837a7a286bd25dbf0
Expecta: 3ddfc757aeb1e351e12c6f1e21ab631f77178f13
GroundControl: 26e550c2f39f7705aab4dee690435bffa2267a82
HockeySDK: e59ba4e0060d13a9acfb5da8f9381298fbc53e0b
Orbiter: b083e5567d9b90e1da1ccda4b3c410df26d5da8d
SVProgressHUD: 592da548680cd3613923b5f98113add52ad30cc2
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions Pods/GroundControl/GroundControl.podspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions Pods/GroundControl/GroundControl/NSUserDefaults+GroundControl.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 90 additions & 0 deletions Pods/GroundControl/GroundControl/NSUserDefaults+GroundControl.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions Pods/GroundControl/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 67 additions & 0 deletions Pods/GroundControl/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Pods/Headers/GroundControl/NSUserDefaults+GroundControl.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions Pods/Pods-Acknowledgements.markdown

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions Pods/Pods-Acknowledgements.plist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d518a2f

Please sign in to comment.