Update your iOS app in real-time.
-
Import PAAdminClient.h into your app.
-
Get a token from the web front end at http://pennappsbackend.herokuapp.com
-
Initialize the admin client somewhere in your app using that token, probably in AppDelegate.m didFinishlaunching:
[[PAAdminClient sharedAdminClient] setToken:@"_htlu5-G149w7xONSbdIKg"];
-
If you want push notification support, add this to your AppDelegate.m:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
NSString *type = [userInfo objectForKey:@"type"];
if ([type isEqualToString:@"pennapps"]) {
[[PAAdminClient sharedAdminClient] refreshData];
}
}
- Be Amazing.
- Cycript by Jay Freeman
Swap is available under the GPLv3 license. See the LICENSE file for more info.
This is the winning hack for PennApps Fall 2013 by Conrad Kramer (High School Senior), Nathan Eidelson (Stanford), Andrew Aude (Stanford), and Alex Dunn (University of Chicago)
Contact us at swapdevs@gmail.com