Permalink
Browse files

Update for the iPhone Simulator bug "server did not accept client reg…

…istration 68" and hard coded the current location to 1 infinite loop.
  • Loading branch information...
1 parent c2dd9ef commit 81619d0e1d029a5bc4fd46b17a259af673af6c3c @deepabhan deepabhan committed Sep 19, 2011
@@ -10,6 +10,7 @@
#import "LQClient.h"
#import "LQConfig.h"
#import "MapAttackAppDelegate.h"
+#import "FTLocationSimulator.h"
@implementation GameListViewController
@@ -83,20 +84,26 @@ - (void)refreshNearbyLayers {
self.loadingStatus.hidden = NO;
self.gamesNearLabel.text = @"";
+#ifdef FAKE_CORE_LOCATION
+ [self locationManager:locationManager
+ didUpdateToLocation:[[CLLocation alloc] initWithLatitude:37.33095 longitude:-122.03066] fromLocation:nil];
+#else
if (!locationManager) {
locationManager = [[CLLocationManager alloc] init];
locationManager.distanceFilter = 1.0;
locationManager.delegate = self;
+ [locationManager startUpdatingLocation];
}
-
- [locationManager startUpdatingLocation];
+#endif
}
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation {
+ //[locationManager stopUpdatingLocation];
+
NSLog(@"Got location update! %@", newLocation);
[[LQClient single] getPlaceContext:newLocation withCallback:^(NSError *error, NSDictionary *response){
@@ -137,7 +144,6 @@ - (void)locationManager:(CLLocationManager *)manager
}];
}];
- [locationManager stopUpdatingLocation];
}
- (NSString *)urlForGameAtIndex:(NSInteger)index {
@@ -17,7 +17,7 @@
#define TAG_DEVICE_ID_SENT 1
#define TAG_MESSAGE_RECEIVED 2
-#define VERBOSE 0
+#define VERBOSE 1
@implementation GeoloqiReadClient
@@ -15,7 +15,7 @@
#define TIMEOUT_SEC 6.0
#define TAG_DEVICE_ID_SENT 1
-#define VERBOSE 0
+#define VERBOSE 1
#if LITTLE_ENDIAN
@@ -101,6 +101,8 @@ - (void)startMonitoringLocation {
locationManager.distanceFilter = distanceFilterDistance;
locationManager.delegate = self;
}
+
+ DLog(@"Starting location updates");
[locationManager startUpdatingLocation];
@@ -144,7 +146,7 @@ - (void)locationManager:(CLLocationManager *)manager
return;
}
- // Only capture points as frequently as the min. tracking interval
+ // Only capture points as frequently as the min. tracking inter
// These checks are done against the last saved location (currentLocation)
if (YES || !oldLocation || // first update
([newLocation distanceFromLocation:currentLocation] > distanceFilterDistance && // check min. distance
@@ -39,7 +39,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
if([[LQClient single] isLoggedIn]) {
// Start sending location updates
- [socketClient startMonitoringLocation];
+ // [socketClient startMonitoringLocation];
[[UIApplication sharedApplication]
registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
@@ -129,6 +129,7 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N
-(void)loadGameWithURL:(NSString *)url {
[tabBarController setSelectedIndex:1];
DLog(@"MapAttackAppDelegate loadGameWithURL:%@", url);
+ [socketClient startMonitoringLocation];
[self.mapController loadURL:url];
}
@@ -615,7 +615,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CODE_SIGN_IDENTITY = "iPhone Developer: Aaron Parecki (UR6C55S2E6)";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
@@ -629,19 +629,21 @@
);
PRODUCT_NAME = MapAttack;
PROVISIONING_PROFILE = "C00E2949-5BFA-43B4-8B4B-A4A880578555";
+ TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
};
1D6058950D05DD3E006BFB54 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = MapAttack_Prefix.pch;
INFOPLIST_FILE = "MapAttack-Info.plist";
PRODUCT_NAME = MapAttack;
+ TARGETED_DEVICE_FAMILY = 1;
VALIDATE_PRODUCT = YES;
};
name = Release;

0 comments on commit 81619d0

Please sign in to comment.