Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adds background to main game list. Query nearby games after first loo…

…king up the user's location.
  • Loading branch information...
commit 5823c9ac933f7bdad90450a890d1e8650e7202ab 1 parent 926fdc9
@aaronpk aaronpk authored
View
10 Classes/GameListViewController.h
@@ -8,10 +8,16 @@
#import <UIKit/UIKit.h>
#import "GameCell.h"
+#import <CoreLocation/CoreLocation.h>
-@interface GameListViewController : UIViewController <UITableViewDelegate> {
+@interface GameListViewController : UIViewController <UITableViewDelegate, CLLocationManagerDelegate> {
IBOutlet GameCell *gameCell;
NSMutableArray *games;
+#ifdef FAKE_CORE_LOCATION
+ FTLocationSimulator *locationManager;
+#else
+ CLLocationManager *locationManager;
+#endif
}
@property (nonatomic, retain) IBOutlet UIButton *reloadBtn;
@@ -22,6 +28,6 @@
- (IBAction)reloadBtnPressed;
- (IBAction)logoutBtnPressed;
-- (void)getNearbyLayers;
+- (void)refreshNearbyLayers;
@end
View
30 Classes/GameListViewController.m
@@ -21,6 +21,7 @@ - (void)dealloc {
[selectedIndex release];
[tableView release];
[reloadBtn release];
+ [locationManager release];
[super dealloc];
}
@@ -46,22 +47,43 @@ - (void)loadView {
- (void)viewDidLoad {
[super viewDidLoad];
games = [[NSMutableArray alloc] init];
- [self getNearbyLayers];
+ [self refreshNearbyLayers];
}
- (IBAction)reloadBtnPressed {
- [self getNearbyLayers];
+ [self refreshNearbyLayers];
}
- (IBAction)logoutBtnPressed {
[[LQClient single] logout];
}
-- (void)getNearbyLayers {
- [[LQClient single] getNearbyLayers:^(NSError *error, NSDictionary *response){
+- (void)refreshNearbyLayers {
+ if (!locationManager) {
+#ifdef FAKE_CORE_LOCATION
+ locationManager = [[FTLocationSimulator alloc] init];
+#else
+ locationManager = [[CLLocationManager alloc] init];
+#endif
+ locationManager.distanceFilter = 1.0;
+ locationManager.delegate = self;
+ }
+
+ [locationManager startUpdatingLocation];
+
+}
+
+- (void)locationManager:(CLLocationManager *)manager
+ didUpdateToLocation:(CLLocation *)newLocation
+ fromLocation:(CLLocation *)oldLocation {
+
+ [[LQClient single] getNearbyLayers:newLocation withCallback:^(NSError *error, NSDictionary *response){
self.games = [response objectForKey:@"nearby"];
+ NSLog(@"Found games: %@", self.games);
[self.tableView reloadData];
}];
+
+ [locationManager stopUpdatingLocation];
}
- (NSString *)urlForGameAtIndex:(NSInteger)index {
View
17 Classes/GeoloqiReadClient.m
@@ -17,6 +17,7 @@
#define TAG_DEVICE_ID_SENT 1
#define TAG_MESSAGE_RECEIVED 2
+#define VERBOSE 0
@implementation GeoloqiReadClient
@@ -66,17 +67,29 @@ - (void)reconnect
// After the client finishes writing the UUID, start listening for new data
- (void)onSocket:(AsyncSocket *)sock didWriteDataWithTag:(long)tag
{
- DLog(@"[Read] Did write data with tag %d", tag);
+ if(VERBOSE)
+ DLog(@"[Read] Did write data with tag %d", tag);
[asyncSocket readDataToData:[AsyncSocket CRLFData] withTimeout:-1 tag:TAG_MESSAGE_RECEIVED];
}
- (void)onSocket:(AsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag
{
- DLog(@"[Read] Did read data with tag %d: %@", tag, data);
+ if(VERBOSE)
+ DLog(@"[Read] Did read data with tag %d: %@", tag, data);
+
+ if([data isEqualToData:[@"ok\r\n" dataUsingEncoding:NSUTF8StringEncoding]]) {
+ if(VERBOSE)
+ DLog(@"[Read] Got 'ok' response");
+ [asyncSocket readDataToData:[AsyncSocket CRLFData] withTimeout:-1 tag:TAG_MESSAGE_RECEIVED];
+ return;
+ }
+
NSError **err;
NSDictionary *dict;
+ // DLog(@"[Read] String: %@", [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
+
dict = [[CJSONDeserializer deserializer] deserialize:data error:err];
DLog(@"[Read] Message: %@", dict);
View
4 Classes/GeoloqiSocketClient.h
@@ -32,8 +32,6 @@
- (NSData *)dataFromLocation:(CLLocation *)location;
- (void)startMonitoringLocation;
- (void)stopMonitoringLocation;
-
-// TODO: Make a delegate protocol.
-// TODO: Send CLLocation to server.
+- (BOOL)locationUpdateState;
@end
View
37 Classes/GeoloqiSocketClient.m
@@ -14,6 +14,8 @@
#define TIMEOUT_SEC 6.0
#define TAG_DEVICE_ID_SENT 1
+#define VERBOSE 0
+
#if LITTLE_ENDIAN
#pragma pack(push) /* push current alignment to stack */
@@ -47,7 +49,7 @@ - (id) init
{
// Change to use UDP
asyncSocket = [[AsyncUdpSocket alloc] initWithDelegate:self];
- distanceFilterDistance = 1.0;
+ distanceFilterDistance = 0.5;
trackingFrequency = 1;
sendingFrequency = 1;
uuid = [[MapAttackAppDelegate UUID] retain];
@@ -66,16 +68,15 @@ - (void) dealloc
[super dealloc];
}
-
- (void) normalConnect
{
NSError *error = nil;
NSString *host = LQ_WRITE_SOCKET_HOST;
UInt16 port = LQ_WRITE_SOCKET_PORT;
+
+ DLog(@"[Write] Connecting to %@:%i", host, port);
- DLog(@"[Write] Connecting to %@:%i", host, port);
-
// Change to use UDP
if (![asyncSocket connectToHost:LQ_WRITE_SOCKET_HOST onPort:LQ_WRITE_SOCKET_PORT error:&error])
{
@@ -85,7 +86,9 @@ - (void) normalConnect
#pragma mark -
-
+- (BOOL)locationUpdateState {
+ return locationUpdatesOn;
+}
- (void)startMonitoringLocation {
if (!locationManager) {
@@ -153,39 +156,46 @@ - (void)locationManager:(CLLocationManager *)manager
// object:self];
NSData *data = [self dataFromLocation:newLocation];
- DLog(@"[Write] Sending location data: %@", data);
+ if(VERBOSE)
+ DLog(@"[Write] Sending location data: %@", data);
[asyncSocket sendData:data toHost:LQ_WRITE_SOCKET_HOST port:LQ_WRITE_SOCKET_PORT withTimeout:10.0 tag:TAG_DEVICE_ID_SENT];
//Look for ack back
[asyncSocket receiveWithTimeout:30.0 tag:TAG_DEVICE_ID_SENT];
} else {
#if LQ_LOCMAN_DEBUG
- DLog(@"[Write] Location update (to %@; from %@) rejected", newLocation, oldLocation);
+ if(VERBOSE)
+ DLog(@"[Write] Location update (to %@; from %@) rejected", newLocation, oldLocation);
#endif
}
}
- (void)onUdpSocket:(AsyncUdpSocket *)sock didSendDataWithTag:(long)tag;
{
- DLog(@"[Write] did send");
+ if(VERBOSE)
+ DLog(@"[Write] did send");
}
- (void)onUdpSocket:(AsyncUdpSocket *)sock didNotSendDataWithTag:(long)tag dueToError:(NSError *)error;
{
- DLog(@"[Write] did not get ack back");
+ if(VERBOSE)
+ DLog(@"[Write] did not get ack back");
}
- (BOOL)onUdpSocket:(AsyncUdpSocket *)sock didReceiveData:(NSData *)data withTag:(long)tag fromHost:(NSString *)host port:(UInt16)port;
{
//TODO: determine if this is a valid packet
- DLog(@"[Write] Recieved packet back from server: %@", data);
+ if(VERBOSE)
+ DLog(@"[Write] Recieved packet back from server: %@", data);
if (data.length == sizeof(uint32_t)) {
uint32_t time = OSSwapBigToHostInt32(*(uint32_t *)data.bytes);
- DLog(@"[Write] Accepted packet with timestamp: %u", time);
+ if(VERBOSE)
+ DLog(@"[Write] Accepted packet with timestamp: %u", time);
return YES;
} else {
- DLog(@"[Write] packet invalid size: %d", data.length);
+ if(VERBOSE)
+ DLog(@"[Write] packet invalid size: %d", data.length);
return NO;
}
}
@@ -224,7 +234,8 @@ - (NSData *)dataFromLocation:(CLLocation *)location {
// DLog(@"Offset of command: %lu", offsetof(LQUpdatePacket, f.command));
// DLog(@"Offset of date: %lu", offsetof(LQUpdatePacket, f.date));
- DLog(@"[Write] Sending timestamp: %d", update.f.date);
+ // if(VERBOSE)
+ DLog(@"[Write] Sending location update %@", [NSData dataWithBytes:update.bytes length:sizeof(update.bytes)]);
//Swap endianness of each 16 bit int
update.f.date = OSSwapHostToBigInt32(update.f.date);
View
5 Classes/LQClient.h
@@ -7,6 +7,7 @@
//
#import <Foundation/Foundation.h>
+#import <CoreLocation/CoreLocation.h>
#import "ASIHTTPRequest.h"
#import "ASIFormDataRequest.h"
@@ -21,7 +22,7 @@ typedef void (^LQHTTPRequestCallback)(NSError *error, NSDictionary *response);
@interface LQClient : NSObject {
// NSMutableArray *queue;
- ASIHTTPRequest *authenticationRequest;
+// ASIHTTPRequest *authenticationRequest;
}
@property (nonatomic, copy) NSString *accessToken;
@@ -34,7 +35,7 @@ typedef void (^LQHTTPRequestCallback)(NSError *error, NSDictionary *response);
- (BOOL)isLoggedIn;
// - (NSString *)refreshToken;
- (void)sendPushToken:(NSString *)token withCallback:(LQHTTPRequestCallback)callback;
-- (void)getNearbyLayers:(LQHTTPRequestCallback)callback;
+- (void)getNearbyLayers:(CLLocation *)location withCallback:(LQHTTPRequestCallback)callback;
- (void)createNewAccountWithEmail:(NSString *)email initials:(NSString *)initials callback:(LQHTTPRequestCallback)callback;
- (void)joinGame:(NSString *)layer_id withToken:(NSString *)group_token;
- (void)logout;
View
7 Classes/LQClient.m
@@ -38,7 +38,6 @@ - (id) init
}
- (void)dealloc {
- // [queue release];
[super dealloc];
}
@@ -260,8 +259,10 @@ - (void)sendPushToken:(NSString *)token withCallback:(LQHTTPRequestCallback)call
[self runRequest:request callback:callback];
}
-- (void)getNearbyLayers:(LQHTTPRequestCallback)callback {
- NSURL *url = [self urlWithPath:[NSString stringWithFormat:@"layer/nearby?latitude=45.5246&longitude=-122.6843&application_id=%@", MapAttackAppID]];
+- (void)getNearbyLayers:(CLLocation *)location withCallback:(LQHTTPRequestCallback)callback {
+ NSURL *url = [self urlWithPath:[NSString stringWithFormat:@"layer/nearby?latitude=%f&longitude=%f&application_id=%@",
+ //45.5246, -122.6843, MapAttackAppID]];
+ location.coordinate.latitude, location.coordinate.longitude, MapAttackAppID]];
__block ASIHTTPRequest *request;
if([self isLoggedIn]) {
request = [self userRequestWithURL:url];
View
29 Classes/LQPushHandler.h
@@ -0,0 +1,29 @@
+//
+// LQPushHandler.h
+// Geoloqi
+//
+// Created by Aaron Parecki on 12/23/10.
+// Copyright 2010 Geoloqi.com. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+enum {
+ kLQPushAlertGeonote = 0,
+ kLQPushAlertShutdown,
+ kLQPushAlertStart
+};
+
+@interface LQPushHandler : NSObject <UIAlertViewDelegate> {
+ NSString *lastAlertURL;
+}
+
+@property (nonatomic, retain) NSString *lastAlertURL;
+
+- (id)myInit;
+- (void)handlePush:(UIApplication *)application notification:(NSDictionary *)userInfo;
+- (void)handleLocalNotificationFromApp:(UIApplication *)app notif:(UILocalNotification *)notif;
+- (void)handleLaunch:(NSDictionary *)launchOptions;
+
+@end
View
219 Classes/LQPushHandler.m
@@ -0,0 +1,219 @@
+//
+// LQPushHandler.m
+// Geoloqi
+//
+// Created by Aaron Parecki on 12/23/10.
+// Copyright 2010 Geoloqi.com. All rights reserved.
+//
+
+#import "LQPushHandler.h"
+#import "CJSONSerializer.h"
+#import "MapAttack.h"
+#import "MapAttackAppDelegate.h"
+
+@implementation LQPushHandler
+
+@synthesize lastAlertURL;
+
+- (id)myInit {
+ self = [super init];
+ lastAlertURL = [[NSString alloc] init];
+ NSLog(@"Alloc url: %@", lastAlertURL);
+ return self;
+}
+
+/**
+ * This is called from application: didReceiveRemoteNotification: which is called regardless of whether
+ * the app is in the foreground or background, but only if it is currently running.
+ */
+- (void)handlePush:(UIApplication *)application notification:(NSDictionary *)userInfo {
+ NSString *title;
+
+ // Push was received while the app was in the foreground
+ if(application.applicationState == UIApplicationStateActive) {
+ NSDictionary *location = [userInfo valueForKeyPath:@"lqloc"];
+ if(location) {
+ NSLog(@"Got some location data! Yeah!!");
+
+ NSDictionary *json = [NSDictionary dictionaryWithObject:[[CJSONSerializer serializer] serializeObject:userInfo] forKey:@"json"];
+ [[NSNotificationCenter defaultCenter] postNotificationName:LQMapAttackDataNotification
+ object:self
+ userInfo:json];
+ return;
+ }
+ }
+
+ NSString *type = [userInfo valueForKeyPath:@"geoloqi.type"];
+
+ if(type && [@"geonote" isEqualToString:type]) {
+ title = @"MapAttack";
+ } else if(type && [@"message" isEqualToString:type]) {
+ title = @"MapAttack";
+ } else {
+ title = @"MapAttack";
+ }
+
+ if([type isEqualToString:@"shutdownPrompt"]){
+ if([application applicationState] == UIApplicationStateActive) {
+ // Received a push notification asking the user if they want to shut off location updates.
+ // If updates have already been turned off, don't bother actually prompting this.
+ if([[lqAppDelegate socketClient] locationUpdateState]){
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title
+ message:[userInfo valueForKeyPath:@"aps.alert.body"]
+ delegate:self
+ cancelButtonTitle:@"No"
+ otherButtonTitles:@"Yes", nil];
+ [alert setTag:kLQPushAlertShutdown];
+ [alert show];
+ [alert release];
+ }
+ } else {
+ [[lqAppDelegate socketClient] stopMonitoringLocation];
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Geoloqi"
+ message:@"Location tracking is off"
+ delegate:nil
+ cancelButtonTitle:nil
+ otherButtonTitles:@"Ok", nil];
+ [alert show];
+ [alert release];
+ }
+ } else if([type isEqualToString:@"startPrompt"]) {
+ if([application applicationState] == UIApplicationStateActive) {
+ // Received a push notification asking the user if they want to turn on location updates.
+ // If updates are already on, don't bother actually prompting this.
+ if([[lqAppDelegate socketClient] locationUpdateState] == NO){
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title
+ message:[userInfo valueForKeyPath:@"aps.alert.body"]
+ delegate:self
+ cancelButtonTitle:@"No"
+ otherButtonTitles:@"Yes", nil];
+ [alert setTag:kLQPushAlertStart];
+ [alert show];
+ [alert release];
+ } else {
+ [[lqAppDelegate socketClient] startMonitoringLocation];
+ }
+ }
+ } else {
+ if([userInfo valueForKeyPath:@"aps.alert.body"] != nil) {
+ UIAlertView *alert;
+ if([userInfo valueForKeyPath:@"geoloqi.link"] != nil) {
+ alert = [[UIAlertView alloc] initWithTitle:title
+ message:[userInfo valueForKeyPath:@"aps.alert.body"]
+ delegate:self
+ cancelButtonTitle:@"Close"
+ otherButtonTitles:@"View", nil];
+ self.lastAlertURL = [userInfo valueForKeyPath:@"geoloqi.link"];
+ NSLog(@"Storing value in lastAlertURL: %@", lastAlertURL);
+ } else {
+ alert = [[UIAlertView alloc] initWithTitle:title
+ message:[userInfo valueForKeyPath:@"aps.alert.body"]
+ delegate:self
+ cancelButtonTitle:nil
+ otherButtonTitles:@"Ok", nil];
+ self.lastAlertURL = nil;
+ }
+ if([application applicationState] == UIApplicationStateActive) {
+ [alert show];
+ [alert setTag:kLQPushAlertGeonote];
+ } else {
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.lastAlertURL]];
+ }
+ [alert release];
+ }
+ }
+}
+
+- (void)handleLocalNotificationFromApp:(UIApplication *)app notif:(UILocalNotification *)notif {
+ // A local notification came in but the app was in the foreground. This method is called immediately,
+ // so we need to show them the alert and handle the response appropriately.
+
+ if([app applicationState] == UIApplicationStateActive){
+ // Don't prompt if tracking is already off. Probably won't happen anymore since the timers are cancelled when tracking is turned off.
+ if([[lqAppDelegate socketClient] locationUpdateState]){
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[notif.userInfo objectForKey:@"title"]
+ message:[notif.userInfo objectForKey:@"description"]
+ delegate:self
+ cancelButtonTitle:@"No"
+ otherButtonTitles:notif.alertAction, nil];
+ [alert show];
+ [alert setTag:kLQPushAlertShutdown];
+ [alert release];
+ }
+ } else {
+ // The app just launched and it was running in the background. If they hit "Yes" then shut off updates
+ [[lqAppDelegate socketClient] stopMonitoringLocation];
+ }
+}
+
+/**
+ * This is called when the app is launched from the button on a push notification
+ */
+- (void)handleLaunch:(NSDictionary *)launchOptions {
+
+ NSLog(@"---- Handling launch from push notification");
+
+ NSDictionary *data = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
+ if(data == nil)
+ return;
+
+ NSString *type = [data valueForKeyPath:@"geoloqi.type"];
+
+ if([type isEqualToString:@"startPrompt"]){
+
+ [[lqAppDelegate socketClient] startMonitoringLocation];
+ lqAppDelegate.tabBarController.selectedIndex = 1;
+
+ }else if([type isEqualToString:@"shutdownPrompt"]){
+
+ [[lqAppDelegate socketClient] stopMonitoringLocation];
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"MapAttack"
+ message:@"Location tracking is off"
+ delegate:nil
+ cancelButtonTitle:nil
+ otherButtonTitles:@"Ok", nil];
+ [alert show];
+ [alert release];
+ }else{
+ if([data valueForKeyPath:@"geoloqi.link"] != nil) {
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[data valueForKeyPath:@"geoloqi.link"]]];
+ }
+ }
+
+}
+
+
+- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
+ NSLog(@"URL: %@", lastAlertURL);
+
+ switch([alertView tag]) {
+ case kLQPushAlertShutdown:
+ if(buttonIndex == 1){
+ // Shut off location tracking now
+ [[lqAppDelegate socketClient] stopMonitoringLocation];
+ }
+ break;
+ case kLQPushAlertStart:
+ if(buttonIndex == 1){
+ // Turn on location tracking now
+ [[lqAppDelegate socketClient] startMonitoringLocation];
+ }
+ break;
+ case kLQPushAlertGeonote:
+ if(buttonIndex == 1){
+ // Clicked "view" and the push contained a link, so open a web browser
+ NSLog(@"User clicked View, reading the value from lastAlertURL");
+ NSLog(@"Value: %@", self.lastAlertURL);
+ if(self.lastAlertURL != nil) {
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.lastAlertURL]];
+ }
+ }
+ }
+}
+
+- (void)dealloc {
+ [lastAlertURL release];
+ [super dealloc];
+}
+
+@end
View
1  Classes/MapAttackAppDelegate.h
@@ -23,6 +23,7 @@ static NSString *const LQUUIDKey = @"LQUUID";
NSString *deviceToken;
}
+@property (nonatomic, retain) GeoloqiSocketClient *socketClient;
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet AuthView *authViewController;
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
View
1  Classes/MapAttackAppDelegate.m
@@ -17,6 +17,7 @@ @implementation MapAttackAppDelegate
@synthesize tabBarController, authViewController;
@synthesize geoloqi;
@synthesize mapController;
+@synthesize socketClient;
#pragma mark Application launched
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
View
1  Classes/MapViewController.m
@@ -40,6 +40,7 @@ - (void)loadURL:(NSString *)url {
[lqAppDelegate.tabBarController presentModalViewController:[[AuthView alloc] init] animated:YES];
} else {
DLog(@"Loading URL in game view %@", url);
+ [read reconnect];
[webView loadRequest:[NSMutableURLRequest requestWithURL:[NSURL URLWithString:[url stringByAppendingFormat:@"?access_token=%@", [[LQClient single] accessToken]]]]];
}
}
View
110 GameList.xib
@@ -42,41 +42,23 @@
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBUILabel" id="483052203">
+ <object class="IBUIImageView" id="720927273">
<reference key="NSNextResponder" ref="191373211"/>
- <int key="NSvFlags">306</int>
- <string key="NSFrame">{{37, 14}, {244, 43}}</string>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{320, 411}</string>
<reference key="NSSuperview" ref="191373211"/>
- <object class="NSColor" key="IBUIBackgroundColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- <object class="NSColorSpace" key="NSCustomColorSpace" id="811917410">
- <int key="NSID">2</int>
- </object>
- </object>
- <bool key="IBUIOpaque">NO</bool>
- <bool key="IBUIClipsSubviews">YES</bool>
+ <float key="IBUIAlpha">0.73943662643432617</float>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <string key="IBUIText">Nearby Games</string>
- <object class="NSFont" key="IBUIFont">
- <string key="NSName">Helvetica</string>
- <double key="NSSize">36</double>
- <int key="NSfFlags">16</int>
- </object>
- <object class="NSColor" key="IBUITextColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MCAwIDAAA</bytes>
+ <object class="NSCustomResource" key="IBUIImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">bkg.png</string>
</object>
- <nil key="IBUIHighlightedColor"/>
- <int key="IBUIBaselineAdjustment">1</int>
- <float key="IBUIMinimumFontSize">10</float>
- <int key="IBUITextAlignment">1</int>
</object>
<object class="IBUIButton" id="787785800">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{105, 354}, {107, 37}}</string>
+ <string key="NSFrame">{{105, 365}, {107, 37}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -105,12 +87,11 @@
<object class="IBUITableView" id="634107941">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">274</int>
- <string key="NSFrame">{{8, 67}, {300, 274}}</string>
+ <string key="NSFrame">{{6, 67}, {308, 291}}</string>
<reference key="NSSuperview" ref="191373211"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- <reference key="NSCustomColorSpace" ref="811917410"/>
+ <bytes key="NSWhite">MCAwAA</bytes>
</object>
<bool key="IBUIClipsSubviews">YES</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -118,13 +99,11 @@
<int key="IBUISeparatorStyle">1</int>
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
<float key="IBUIRowHeight">65</float>
- <float key="IBUISectionHeaderHeight">22</float>
- <float key="IBUISectionFooterHeight">22</float>
</object>
<object class="IBUIButton" id="984611742">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{238, 354}, {70, 37}}</string>
+ <string key="NSFrame">{{238, 365}, {70, 37}}</string>
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -140,6 +119,18 @@
</object>
<reference key="IBUINormalTitleShadowColor" ref="214458575"/>
</object>
+ <object class="IBUIImageView" id="23319299">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{40, 5}, {239, 57}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSCustomResource" key="IBUIImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">MapAttackLogo.png</string>
+ </object>
+ </object>
</object>
<string key="NSFrameSize">{320, 411}</string>
<reference key="NSSuperview"/>
@@ -225,10 +216,11 @@
<reference key="object" ref="191373211"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="483052203"/>
<reference ref="787785800"/>
- <reference ref="634107941"/>
<reference ref="984611742"/>
+ <reference ref="634107941"/>
+ <reference ref="23319299"/>
+ <reference ref="720927273"/>
</object>
<reference key="parent" ref="0"/>
</object>
@@ -244,11 +236,6 @@
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">5</int>
- <reference key="object" ref="483052203"/>
- <reference key="parent" ref="191373211"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">13</int>
<reference key="object" ref="787785800"/>
<reference key="parent" ref="191373211"/>
@@ -263,6 +250,16 @@
<reference key="object" ref="984611742"/>
<reference key="parent" ref="191373211"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">30</int>
+ <reference key="object" ref="23319299"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">31</int>
+ <reference key="object" ref="720927273"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -279,8 +276,10 @@
<string>23.IBViewBoundsToFrameTransform</string>
<string>28.IBPluginDependency</string>
<string>28.IBViewBoundsToFrameTransform</string>
- <string>5.IBPluginDependency</string>
- <string>5.IBViewBoundsToFrameTransform</string>
+ <string>30.IBPluginDependency</string>
+ <string>30.IBViewBoundsToFrameTransform</string>
+ <string>31.IBPluginDependency</string>
+ <string>31.IBViewBoundsToFrameTransform</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -294,7 +293,7 @@
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw6wAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABBAAAAw6mAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
@@ -302,8 +301,10 @@
</object>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSAffineTransform">
- <bytes key="NSTransformStruct">P4AAAL+AAABCWAAAwlwAAA</bytes>
+ <bytes key="NSTransformStruct">P4AAAL+AAABB3AAAwmoAAA</bytes>
</object>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform"/>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -322,7 +323,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">29</int>
+ <int key="maxID">31</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -557,6 +558,14 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">UIImageView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIImageView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">UILabel</string>
<string key="superclassName">UIView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -682,6 +691,19 @@
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<string key="IBDocument.LastKnownRelativeProjectPath">MapAttack.xcodeproj</string>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>MapAttackLogo.png</string>
+ <string>bkg.png</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>{239, 57}</string>
+ <string>{320, 480}</string>
+ </object>
+ </object>
<string key="IBCocoaTouchPluginVersion">132</string>
</data>
</archive>
View
4 MapAttack-Info.plist
@@ -26,5 +26,9 @@
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
+ <key>UIBackgroundModes</key>
+ <array>
+ <string>location</string>
+ </array>
</dict>
</plist>
View
32 MapAttack.xcodeproj/project.pbxproj
@@ -28,6 +28,11 @@
0F12916713F4C809007AAB66 /* FTLocationSimulator.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F12916213F4C809007AAB66 /* FTLocationSimulator.m */; };
0F12916813F4C809007AAB66 /* RegexKitLite.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F12916513F4C809007AAB66 /* RegexKitLite.m */; };
0F78A72B141553E000029E9C /* DebugLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F78A72A141553E000029E9C /* DebugLog.m */; };
+ 0FDBA6321416F0C200F5C8A5 /* LQPushHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FDBA6311416F0C200F5C8A5 /* LQPushHandler.m */; };
+ 0FEC568E14192F770017CE48 /* MapAttackLogo.png in Resources */ = {isa = PBXBuildFile; fileRef = 0FEC568C14192F770017CE48 /* MapAttackLogo.png */; };
+ 0FEC568F14192F770017CE48 /* MapAttackLogo@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0FEC568D14192F770017CE48 /* MapAttackLogo@2x.png */; };
+ 0FEC56921419300F0017CE48 /* bkg.png in Resources */ = {isa = PBXBuildFile; fileRef = 0FEC56901419300F0017CE48 /* bkg.png */; };
+ 0FEC56931419300F0017CE48 /* bkg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0FEC56911419300F0017CE48 /* bkg@2x.png */; };
0FFD5EBA140C25D6008BC18B /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 0FFD5EB8140C25D6008BC18B /* Icon.png */; };
0FFD5EBB140C25D6008BC18B /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0FFD5EB9140C25D6008BC18B /* Icon@2x.png */; };
0FFD5ECA140F218D008BC18B /* LQClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FFD5EC9140F218D008BC18B /* LQClient.m */; };
@@ -48,8 +53,6 @@
0FFD5FA4140F4396008BC18B /* GameListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FFD5FA3140F4396008BC18B /* GameListViewController.m */; };
0FFD6083140FF95B008BC18B /* AuthView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FFD6081140FF95B008BC18B /* AuthView.m */; };
0FFD6084140FF95B008BC18B /* AuthView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0FFD6082140FF95B008BC18B /* AuthView.xib */; };
- 0FFD615514100C17008BC18B /* bkg.png in Resources */ = {isa = PBXBuildFile; fileRef = 0FFD615314100C17008BC18B /* bkg.png */; };
- 0FFD615614100C17008BC18B /* bkg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0FFD615414100C17008BC18B /* bkg@2x.png */; };
0FFD63401410397D008BC18B /* GameCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FFD633F1410397D008BC18B /* GameCell.m */; };
0FFD634C14103A16008BC18B /* GameCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0FFD634B14103A16008BC18B /* GameCell.xib */; };
0FFD65FA1412C718008BC18B /* initialFrame.png in Resources */ = {isa = PBXBuildFile; fileRef = 0FFD65F81412C718008BC18B /* initialFrame.png */; };
@@ -116,6 +119,12 @@
0F12916513F4C809007AAB66 /* RegexKitLite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegexKitLite.m; sourceTree = "<group>"; };
0F78A729141553E000029E9C /* DebugLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebugLog.h; sourceTree = "<group>"; };
0F78A72A141553E000029E9C /* DebugLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DebugLog.m; sourceTree = "<group>"; };
+ 0FDBA6301416F0C200F5C8A5 /* LQPushHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LQPushHandler.h; sourceTree = "<group>"; };
+ 0FDBA6311416F0C200F5C8A5 /* LQPushHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LQPushHandler.m; sourceTree = "<group>"; };
+ 0FEC568C14192F770017CE48 /* MapAttackLogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = MapAttackLogo.png; path = Resources/MapAttackLogo.png; sourceTree = "<group>"; };
+ 0FEC568D14192F770017CE48 /* MapAttackLogo@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "MapAttackLogo@2x.png"; path = "Resources/MapAttackLogo@2x.png"; sourceTree = "<group>"; };
+ 0FEC56901419300F0017CE48 /* bkg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bkg.png; path = Resources/bkg.png; sourceTree = "<group>"; };
+ 0FEC56911419300F0017CE48 /* bkg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "bkg@2x.png"; path = "Resources/bkg@2x.png"; sourceTree = "<group>"; };
0FFD5EB8140C25D6008BC18B /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
0FFD5EB9140C25D6008BC18B /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; };
0FFD5EC8140F218D008BC18B /* LQClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LQClient.h; sourceTree = "<group>"; };
@@ -154,8 +163,6 @@
0FFD6080140FF95B008BC18B /* AuthView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuthView.h; sourceTree = "<group>"; };
0FFD6081140FF95B008BC18B /* AuthView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AuthView.m; sourceTree = "<group>"; };
0FFD6082140FF95B008BC18B /* AuthView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = AuthView.xib; path = Classes/AuthView.xib; sourceTree = "<group>"; };
- 0FFD615314100C17008BC18B /* bkg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bkg.png; sourceTree = "<group>"; };
- 0FFD615414100C17008BC18B /* bkg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bkg@2x.png"; sourceTree = "<group>"; };
0FFD633E1410397D008BC18B /* GameCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameCell.h; sourceTree = "<group>"; };
0FFD633F1410397D008BC18B /* GameCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameCell.m; sourceTree = "<group>"; };
0FFD634B14103A16008BC18B /* GameCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GameCell.xib; sourceTree = "<group>"; };
@@ -236,6 +243,8 @@
0FFD66AA1412D719008BC18B /* MapAttackAuth.m */,
0FFD68551413F3F8008BC18B /* HowToPlay.h */,
0FFD68561413F3F8008BC18B /* HowToPlay.m */,
+ 0FDBA6301416F0C200F5C8A5 /* LQPushHandler.h */,
+ 0FDBA6311416F0C200F5C8A5 /* LQPushHandler.m */,
);
path = Classes;
sourceTree = "<group>";
@@ -412,8 +421,10 @@
0FFD5EB9140C25D6008BC18B /* Icon@2x.png */,
0FFD65F81412C718008BC18B /* initialFrame.png */,
0FFD65F91412C718008BC18B /* initialFrame@2x.png */,
- 0FFD615314100C17008BC18B /* bkg.png */,
- 0FFD615414100C17008BC18B /* bkg@2x.png */,
+ 0FEC568C14192F770017CE48 /* MapAttackLogo.png */,
+ 0FEC568D14192F770017CE48 /* MapAttackLogo@2x.png */,
+ 0FEC56901419300F0017CE48 /* bkg.png */,
+ 0FEC56911419300F0017CE48 /* bkg@2x.png */,
0FFD6082140FF95B008BC18B /* AuthView.xib */,
2840D7CD1179279E00D7F93C /* MapView.xib */,
282CCBFD0DB6C98000C4EA27 /* GameList.xib */,
@@ -497,8 +508,6 @@
0FFD5EBA140C25D6008BC18B /* Icon.png in Resources */,
0FFD5EBB140C25D6008BC18B /* Icon@2x.png in Resources */,
0FFD6084140FF95B008BC18B /* AuthView.xib in Resources */,
- 0FFD615514100C17008BC18B /* bkg.png in Resources */,
- 0FFD615614100C17008BC18B /* bkg@2x.png in Resources */,
0FFD634C14103A16008BC18B /* GameCell.xib in Resources */,
0FFD65FA1412C718008BC18B /* initialFrame.png in Resources */,
0FFD65FB1412C718008BC18B /* initialFrame@2x.png in Resources */,
@@ -510,6 +519,10 @@
0FFD68E8141402F4008BC18B /* map-icon@2x.png in Resources */,
0FFD68E9141402F4008BC18B /* nearby-games-icon.png in Resources */,
0FFD68EA141402F4008BC18B /* nearby-games-icon@2x.png in Resources */,
+ 0FEC568E14192F770017CE48 /* MapAttackLogo.png in Resources */,
+ 0FEC568F14192F770017CE48 /* MapAttackLogo@2x.png in Resources */,
+ 0FEC56921419300F0017CE48 /* bkg.png in Resources */,
+ 0FEC56931419300F0017CE48 /* bkg@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -556,6 +569,7 @@
0FFD66AB1412D719008BC18B /* MapAttackAuth.m in Sources */,
0FFD68581413F3F8008BC18B /* HowToPlay.m in Sources */,
0F78A72B141553E000029E9C /* DebugLog.m in Sources */,
+ 0FDBA6321416F0C200F5C8A5 /* LQPushHandler.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -602,7 +616,7 @@
OTHER_CFLAGS = "-DDEBUG";
OTHER_LDFLAGS = "-lxml2";
PREBINDING = NO;
- "PROVISIONING_PROFILE[sdk=iphoneos*]" = "CF7AE5F7-6348-4BEE-B4CD-499DC0FB6C89";
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "2101AEA6-D7CA-4374-B845-BE08FF4C67C1";
SDKROOT = iphoneos;
};
name = Debug;
View
BIN  Resources/MapAttackLogo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/MapAttackLogo@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/bkg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/bkg@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  bkg.png
Deleted file not rendered
View
BIN  bkg@2x.png
Deleted file not rendered
Please sign in to comment.
Something went wrong with that request. Please try again.