├── locateScreenShot.png ├── Locate ├── Locate │ ├── beacon.png │ ├── DrawView.h │ ├── ViewController.h │ ├── AppDelegate.h │ ├── main.m │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── DrawView.m │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.xib │ ├── ViewController.m │ └── AppDelegate.m ├── LocateTests │ ├── Info.plist │ └── LocateTests.m └── Locate.xcodeproj │ └── project.pbxproj ├── .gitignore └── README.md /locateScreenShot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasJay/Locate/HEAD/locateScreenShot.png -------------------------------------------------------------------------------- /Locate/Locate/beacon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThomasJay/Locate/HEAD/Locate/Locate/beacon.png -------------------------------------------------------------------------------- /Locate/Locate/DrawView.h: -------------------------------------------------------------------------------- 1 | // 2 | // DrawView.h 3 | // Locate 4 | // 5 | // Created by Tom Jay on 9/9/15. 6 | // Copyright (c) 2015 Tom Jay. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DrawView : UIView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Locate/Locate/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Locate 4 | // 5 | // Created by Tom Jay on 9/9/15. 6 | // Copyright (c) 2015 Tom Jay. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Mac OS X 3 | *.DS_Store 4 | 5 | # Xcode 6 | *.pbxuser 7 | *.mode1v3 8 | *.mode2v3 9 | *.perspectivev3 10 | *.xcuserstate 11 | project.xcworkspace/ 12 | xcuserdata/ 13 | 14 | # Generated files 15 | *.o 16 | *.pyc 17 | 18 | 19 | #Python modules 20 | MANIFEST 21 | dist/ 22 | build/ 23 | 24 | # Backup files 25 | *~.nib 26 | -------------------------------------------------------------------------------- /Locate/Locate/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Locate 4 | // 5 | // Created by Tom Jay on 9/9/15. 6 | // Copyright (c) 2015 Tom Jay. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Locate/Locate/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Locate 4 | // 5 | // Created by Tom Jay on 9/9/15. 6 | // Copyright (c) 2015 Tom Jay. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Locate 2 | iOS iBeacon Locate App 3 | 4 | This is the source for an iOS app that can be used to locate iBeacons. 5 | 6 | You need to change the AppDelegate.h code and set your UUID for your Beacons. 7 | 8 | If you need help on iBeacons or need iBeacon Devices pleat feel free to contact me. 9 | 10 | Thanks, Tom 11 | 12 | thomasjay200@gmail.com 13 | 14 | Screen Shot 15 | ![screenshot](https://github.com/ThomasJay/Locate/blob/master/locateScreenShot.png) 16 | -------------------------------------------------------------------------------- /Locate/Locate/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Locate/LocateTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.tomjay.ios.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Locate/LocateTests/LocateTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // LocateTests.m 3 | // LocateTests 4 | // 5 | // Created by Tom Jay on 9/9/15. 6 | // Copyright (c) 2015 Tom Jay. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface LocateTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation LocateTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Locate/Locate/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.tomjay.ios.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSLocationAlwaysUsageDescription 26 | iBeacon Enabled App 27 | NSLocationWhenInUseUsageDescription 28 | iBeacon App 29 | UIBackgroundModes 30 | 31 | bluetooth-central 32 | location 33 | 34 | UILaunchStoryboardName 35 | LaunchScreen 36 | UIMainStoryboardFile 37 | Main 38 | UIRequiredDeviceCapabilities 39 | 40 | armv7 41 | 42 | UISupportedInterfaceOrientations 43 | 44 | UIInterfaceOrientationPortrait 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Locate/Locate/DrawView.m: -------------------------------------------------------------------------------- 1 | // 2 | // DrawView.m 3 | // Locate 4 | // 5 | // Created by Tom Jay on 9/9/15. 6 | // Copyright (c) 2015 Tom Jay. All rights reserved. 7 | // 8 | 9 | #import "DrawView.h" 10 | 11 | @implementation DrawView 12 | 13 | - (void)drawRect:(CGRect)rect { 14 | 15 | 16 | int width = self.frame.size.width; 17 | int height = self.frame.size.height; 18 | 19 | CGContextRef context = UIGraphicsGetCurrentContext(); 20 | 21 | CGContextSetLineWidth(context, 2.0); 22 | 23 | CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor); 24 | 25 | int size = 20; 26 | CGRect rectangle = CGRectMake((width / 2) - (size/2), height - (size / 2),size,size); 27 | 28 | CGContextAddEllipseInRect(context, rectangle); 29 | 30 | size = 100; 31 | CGRect rectangle1 = CGRectMake((width / 2) - (size/2), height - (size / 2),size,size); 32 | 33 | CGContextAddEllipseInRect(context, rectangle1); 34 | 35 | size = 200; 36 | CGRect rectangle2 = CGRectMake((width / 2) - (size/2), height - (size / 2),size,size); 37 | 38 | CGContextAddEllipseInRect(context, rectangle2); 39 | 40 | size = 300; 41 | CGRect rectangle3 = CGRectMake((width / 2) - (size/2), height - (size / 2),size,size); 42 | 43 | CGContextAddEllipseInRect(context, rectangle3); 44 | 45 | size = 400; 46 | CGRect rectangle4 = CGRectMake((width / 2) - (size/2), height - (size / 2),size,size); 47 | 48 | CGContextAddEllipseInRect(context, rectangle4); 49 | 50 | size = 500; 51 | CGRect rectangle5 = CGRectMake((width / 2) - (size/2), height - (size / 2),size,size); 52 | 53 | CGContextAddEllipseInRect(context, rectangle5); 54 | 55 | size = 600; 56 | CGRect rectangle6 = CGRectMake((width / 2) - (size/2), height - (size / 2),size,size); 57 | 58 | CGContextAddEllipseInRect(context, rectangle6); 59 | 60 | size = 700; 61 | CGRect rectangle7 = CGRectMake((width / 2) - (size/2), height - (size / 2),size,size); 62 | 63 | CGContextAddEllipseInRect(context, rectangle7); 64 | size = 800; 65 | CGRect rectangle8 = CGRectMake((width / 2) - (size/2), height - (size / 2),size,size); 66 | 67 | CGContextAddEllipseInRect(context, rectangle8); 68 | 69 | size = 900; 70 | CGRect rectangle9 = CGRectMake((width / 2) - (size/2), height - (size / 2),size,size); 71 | 72 | CGContextAddEllipseInRect(context, rectangle9); 73 | 74 | size = 1000; 75 | CGRect rectangle10 = CGRectMake((width / 2) - (size/2), height - (size / 2),size,size); 76 | 77 | CGContextAddEllipseInRect(context, rectangle10); 78 | 79 | size = 1100; 80 | CGRect rectangle11 = CGRectMake((width / 2) - (size/2), height - (size / 2),size,size); 81 | 82 | CGContextAddEllipseInRect(context, rectangle11); 83 | 84 | 85 | 86 | CGContextStrokePath(context); 87 | } 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /Locate/Locate/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Locate/Locate/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Locate/Locate/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // Locate 4 | // 5 | // Created by Tom Jay on 9/9/15. 6 | // Copyright (c) 2015 Tom Jay. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "DrawView.h" 11 | 12 | @interface ViewController () { 13 | int slotSize; 14 | 15 | int nextSlot; 16 | 17 | int slotOffsets[5]; 18 | 19 | NSString *slotKeys[5]; 20 | 21 | } 22 | 23 | @property(nonatomic, strong) NSMutableArray *imageList; 24 | 25 | @end 26 | 27 | @implementation ViewController 28 | 29 | - (void)viewDidLoad { 30 | [super viewDidLoad]; 31 | // Do any additional setup after loading the view, typically from a nib. 32 | 33 | self.imageList = [NSMutableArray array]; 34 | 35 | int width = self.view.frame.size.width; 36 | 37 | slotSize = width / 5; 38 | 39 | 40 | 41 | slotOffsets[0] = (3 * slotSize) - (slotSize / 2); 42 | slotOffsets[1] = (2 * slotSize); 43 | slotOffsets[2] = (4 * slotSize); 44 | slotOffsets[3] = (1 * slotSize); 45 | slotOffsets[4] = 25; 46 | 47 | NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; 48 | 49 | 50 | [center addObserver:self selector:@selector(rangedBeacons:) 51 | name:@"RANGEDBEACONS" object:nil]; 52 | 53 | 54 | 55 | } 56 | 57 | -(void) rangedBeacons:(NSNotification*) notification { 58 | NSDictionary *userInfoDictionary = [notification userInfo]; 59 | 60 | NSArray *beaconsFound = userInfoDictionary[@"beaconsFound"]; 61 | 62 | 63 | 64 | // Remove all images; 65 | for (UIImageView *imageView in _imageList) { 66 | [imageView removeFromSuperview]; 67 | } 68 | 69 | [_imageList removeAllObjects]; 70 | 71 | 72 | int height = self.view.frame.size.height; 73 | 74 | 75 | for (NSDictionary *item in beaconsFound) { 76 | 77 | // NSString *uuid = item[@"uuid"]; 78 | NSString *major = item[@"major"]; 79 | NSString *minor = item[@"minor"]; 80 | // NSNumber *rssi = item[@"rssi"]; 81 | NSNumber *distanceInFeedInt = item[@"distanceInFeet"]; 82 | 83 | NSString *key = [NSString stringWithFormat:@"%@-%@", major, minor]; 84 | 85 | int slotNumber = 0; 86 | 87 | for (int i=0;i<5;i++) { 88 | NSString *slotKey = slotKeys[i]; 89 | 90 | // Check if its not null to see if its the current key 91 | if (slotKey != nil) { 92 | if ([slotKey isEqual:key]) { 93 | slotNumber = i; 94 | break; 95 | } 96 | } 97 | else { 98 | // If we have an empty slot and have not found this key, use this slot 99 | slotKeys[i] = key; 100 | slotNumber = i; 101 | break; 102 | } 103 | } 104 | 105 | 106 | [self addImage:slotNumber signal:height - ([distanceInFeedInt intValue] * 15) major:[major intValue] minor:[minor intValue]]; 107 | 108 | 109 | } 110 | 111 | } 112 | 113 | -(void) viewDidAppear:(BOOL)animated { 114 | 115 | [super viewDidAppear:animated]; 116 | 117 | DrawView *drawView = [[DrawView alloc] initWithFrame:self.view.frame]; 118 | 119 | drawView.backgroundColor = [UIColor clearColor]; 120 | 121 | [self.view addSubview:drawView]; 122 | 123 | 124 | } 125 | 126 | -(void) addImage:(int) slot signal:(int) signal major:(int) major minor:(int)minor{ 127 | 128 | 129 | 130 | UIView *containerView = [[UIView alloc] initWithFrame:CGRectMake(slotOffsets[slot] - 25, signal - 80, 80, 80)]; 131 | 132 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 80, 20)]; 133 | label.text= [NSString stringWithFormat:@"0x%04x", major]; 134 | label.textColor=[UIColor blueColor]; 135 | 136 | [containerView addSubview:label]; 137 | 138 | UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(0, 15, 80, 20)]; 139 | label2.text= [NSString stringWithFormat:@"0x%04x", minor]; 140 | label2.textColor=[UIColor lightGrayColor]; 141 | 142 | [containerView addSubview:label2]; 143 | 144 | 145 | 146 | UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(12, 35, 35, 35)]; 147 | 148 | imageView.image = [UIImage imageNamed:@"beacon"]; 149 | imageView.frame = CGRectMake(12, 35, 35, 35); 150 | 151 | 152 | [containerView addSubview:imageView]; 153 | 154 | [self.view addSubview:containerView]; 155 | 156 | [_imageList addObject:containerView]; 157 | 158 | } 159 | 160 | 161 | 162 | - (void)didReceiveMemoryWarning { 163 | [super didReceiveMemoryWarning]; 164 | // Dispose of any resources that can be recreated. 165 | } 166 | 167 | @end 168 | -------------------------------------------------------------------------------- /Locate/Locate/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Locate 4 | // 5 | // Created by Tom Jay on 9/9/15. 6 | // Copyright (c) 2015 Tom Jay. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import 11 | #import 12 | 13 | NSString * const BeaconUUIDKey = @"4F52D93B-18DA-4E81-B512-1FBF5ED4626F"; 14 | 15 | @interface AppDelegate () 16 | 17 | @property (strong, nonatomic) CLBeaconRegion *myBeaconRegion; 18 | @property (strong, nonatomic) CLLocationManager *locationManager; 19 | 20 | 21 | @end 22 | 23 | 24 | 25 | @implementation AppDelegate 26 | 27 | 28 | -(void) setupiBeacons { 29 | 30 | // Initialize location manager and set ourselves as the delegate 31 | 32 | self.locationManager = [[CLLocationManager alloc] init]; 33 | 34 | if (self.locationManager == nil) { 35 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Location Manager is nil" message:nil delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles: nil]; 36 | [alert show]; 37 | 38 | return; 39 | 40 | } 41 | 42 | self.locationManager.delegate = self; 43 | 44 | 45 | 46 | if ([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) { 47 | [self.locationManager requestAlwaysAuthorization]; 48 | } 49 | 50 | 51 | self.locationManager.desiredAccuracy = kCLLocationAccuracyKilometer; 52 | self.locationManager.pausesLocationUpdatesAutomatically = NO; 53 | 54 | // Create a NSUUID with the same UUID as the broadcasting beacon 55 | NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:BeaconUUIDKey]; 56 | 57 | // Setup a new region with that UUID and same identifier as the broadcasting beacon 58 | self.myBeaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:uuid identifier:@"com.stomjay.beacons"]; 59 | 60 | 61 | // Tell location manager to start monitoring for the beacon region coming or going 62 | [self.locationManager startMonitoringForRegion:self.myBeaconRegion]; 63 | 64 | // Incase we are in a region already!!! 65 | [self.locationManager startRangingBeaconsInRegion:self.myBeaconRegion]; 66 | 67 | [self.locationManager startUpdatingLocation]; 68 | 69 | 70 | // Check if beacon monitoring is available for this device 71 | if (![CLLocationManager isMonitoringAvailableForClass:[CLBeaconRegion class]]) { 72 | 73 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Monitoring not available" message:nil delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles: nil]; 74 | [alert show]; 75 | return; 76 | } 77 | 78 | 79 | [self.locationManager startRangingBeaconsInRegion:self.myBeaconRegion]; 80 | [self.locationManager startUpdatingLocation]; 81 | 82 | 83 | 84 | } 85 | 86 | 87 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 88 | // Override point for customization after application launch. 89 | 90 | [self performSelector:@selector(setupiBeacons) withObject:nil afterDelay:2.1]; 91 | 92 | return YES; 93 | } 94 | 95 | - (void)applicationWillResignActive:(UIApplication *)application { 96 | // 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. 97 | // 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. 98 | } 99 | 100 | - (void)applicationDidEnterBackground:(UIApplication *)application { 101 | // 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. 102 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 103 | } 104 | 105 | - (void)applicationWillEnterForeground:(UIApplication *)application { 106 | // 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. 107 | } 108 | 109 | - (void)applicationDidBecomeActive:(UIApplication *)application { 110 | // 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. 111 | } 112 | 113 | - (void)applicationWillTerminate:(UIApplication *)application { 114 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 115 | } 116 | 117 | 118 | #pragma mark - Beacon location code 119 | 120 | - (void)locationManager:(CLLocationManager *)manager monitoringDidFailForRegion:(CLRegion *)region withError:(NSError *)error { 121 | NSLog(@"Failed monitoring region: %@", error); 122 | } 123 | 124 | - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error { 125 | NSLog(@"Location manager failed: %@", error); 126 | } 127 | 128 | - (void)locationManager:(CLLocationManager*)manager didEnterRegion:(CLRegion *)region 129 | { 130 | 131 | NSLog(@"didEnterRegion Started"); 132 | 133 | 134 | // We entered a region, now start looking for our target beacons! 135 | [self.locationManager startRangingBeaconsInRegion:self.myBeaconRegion]; 136 | [self.locationManager startUpdatingLocation]; 137 | } 138 | 139 | -(void)locationManager:(CLLocationManager*)manager didExitRegion:(CLRegion *)region 140 | { 141 | 142 | NSLog(@"didExitRegion Started"); 143 | 144 | // Exited the region 145 | [self.locationManager stopRangingBeaconsInRegion:self.myBeaconRegion]; 146 | } 147 | 148 | -(void)locationManager:(CLLocationManager*)manager 149 | didRangeBeacons:(NSArray*)beacons 150 | inRegion:(CLBeaconRegion*)region 151 | { 152 | 153 | 154 | if (beacons == nil || [beacons count] == 0) { 155 | return; 156 | } 157 | 158 | 159 | NSMutableArray *beaconsFound = [NSMutableArray array]; 160 | 161 | 162 | for (CLBeacon *beacon in beacons) { 163 | 164 | NSMutableDictionary *beaconDict = [NSMutableDictionary dictionary]; 165 | 166 | 167 | // You can retrieve the beacon data from its properties 168 | NSString *uuid = beacon.proximityUUID.UUIDString; 169 | NSString *major = [NSString stringWithFormat:@"%@", beacon.major]; 170 | NSString *minor = [NSString stringWithFormat:@"%@", beacon.minor]; 171 | 172 | 173 | // NSLog(@"rssi=%ld", (long)beacon.rssi); 174 | 175 | CLProximity proximity = beacon.proximity; 176 | 177 | NSString *proximityString = @""; 178 | 179 | if (proximity == CLProximityUnknown) { 180 | proximityString = @"Unknown"; 181 | } 182 | 183 | if (proximity == CLProximityImmediate) { 184 | proximityString = @"Immediate"; 185 | } 186 | 187 | if (proximity == CLProximityNear) { 188 | proximityString = @"Near"; 189 | } 190 | 191 | if (proximity == CLProximityFar) { 192 | proximityString = @"Far"; 193 | } 194 | 195 | CLLocationAccuracy accuracy = beacon.accuracy; 196 | 197 | 198 | 199 | // NSLog(@"Raw accuracy=%f", accuracy); 200 | 201 | if (accuracy < 0) { 202 | accuracy = accuracy * -1.0; 203 | } 204 | 205 | double distanceInFeet = accuracy * 3.28084; 206 | 207 | // NSString *distanceInFeetString = [NSString stringWithFormat:@"%.2f", distanceInFeet]; 208 | 209 | // NSLog(@"Adjusted accuracy=%f", accuracy); 210 | // NSLog(@"distanceInFeetString=%@", distanceInFeetString); 211 | // NSLog(@"proximityString=%@", proximityString); 212 | 213 | int distanceInFeedInt = distanceInFeet; 214 | 215 | 216 | beaconDict[@"uuid"] = uuid; 217 | beaconDict[@"major"] = major; 218 | beaconDict[@"minor"] = minor; 219 | 220 | 221 | int rssi = (int)beacon.rssi; 222 | 223 | beaconDict[@"rssi"] = [NSNumber numberWithInt:rssi]; 224 | beaconDict[@"distanceInFeet"] = [NSNumber numberWithInt:distanceInFeedInt]; 225 | 226 | 227 | // If the rssi value is 0 then dont consider this a valid beacon ping 228 | if (beacon.rssi != 0) { 229 | [beaconsFound addObject:beaconDict]; 230 | } 231 | 232 | 233 | } 234 | 235 | NSMutableDictionary *userInfoDictionary = [NSMutableDictionary dictionary]; 236 | [userInfoDictionary setValue:beaconsFound forKey:@"beaconsFound"]; 237 | 238 | dispatch_async(dispatch_get_main_queue(), 239 | ^{ 240 | [[NSNotificationCenter defaultCenter] postNotificationName:@"RANGEDBEACONS" object:nil userInfo:userInfoDictionary]; 241 | }); 242 | 243 | 244 | 245 | } 246 | 247 | 248 | 249 | 250 | @end 251 | -------------------------------------------------------------------------------- /Locate/Locate.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E206E4491BA105F2000B6DED /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E206E4481BA105F2000B6DED /* CoreLocation.framework */; }; 11 | E239338A1BA0DDC800BC8FDF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E23933891BA0DDC800BC8FDF /* main.m */; }; 12 | E239338D1BA0DDC900BC8FDF /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E239338C1BA0DDC800BC8FDF /* AppDelegate.m */; }; 13 | E23933901BA0DDC900BC8FDF /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E239338F1BA0DDC900BC8FDF /* ViewController.m */; }; 14 | E23933931BA0DDC900BC8FDF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E23933911BA0DDC900BC8FDF /* Main.storyboard */; }; 15 | E23933951BA0DDC900BC8FDF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E23933941BA0DDC900BC8FDF /* Images.xcassets */; }; 16 | E23933981BA0DDC900BC8FDF /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = E23933961BA0DDC900BC8FDF /* LaunchScreen.xib */; }; 17 | E23933A41BA0DDC900BC8FDF /* LocateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E23933A31BA0DDC900BC8FDF /* LocateTests.m */; }; 18 | E23933AF1BA0DDE300BC8FDF /* DrawView.m in Sources */ = {isa = PBXBuildFile; fileRef = E23933AE1BA0DDE300BC8FDF /* DrawView.m */; }; 19 | E23933B11BA0E20300BC8FDF /* beacon.png in Resources */ = {isa = PBXBuildFile; fileRef = E23933B01BA0E20300BC8FDF /* beacon.png */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | E239339E1BA0DDC900BC8FDF /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = E239337C1BA0DDC800BC8FDF /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = E23933831BA0DDC800BC8FDF; 28 | remoteInfo = Locate; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | E206E4481BA105F2000B6DED /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; 34 | E23933841BA0DDC800BC8FDF /* Locate.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Locate.app; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | E23933881BA0DDC800BC8FDF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 36 | E23933891BA0DDC800BC8FDF /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 37 | E239338B1BA0DDC800BC8FDF /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 38 | E239338C1BA0DDC800BC8FDF /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 39 | E239338E1BA0DDC900BC8FDF /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 40 | E239338F1BA0DDC900BC8FDF /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 41 | E23933921BA0DDC900BC8FDF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | E23933941BA0DDC900BC8FDF /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 43 | E23933971BA0DDC900BC8FDF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 44 | E239339D1BA0DDC900BC8FDF /* LocateTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LocateTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | E23933A21BA0DDC900BC8FDF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46 | E23933A31BA0DDC900BC8FDF /* LocateTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LocateTests.m; sourceTree = ""; }; 47 | E23933AD1BA0DDE300BC8FDF /* DrawView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawView.h; sourceTree = ""; }; 48 | E23933AE1BA0DDE300BC8FDF /* DrawView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DrawView.m; sourceTree = ""; }; 49 | E23933B01BA0E20300BC8FDF /* beacon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = beacon.png; sourceTree = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | E23933811BA0DDC800BC8FDF /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | E206E4491BA105F2000B6DED /* CoreLocation.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | E239339A1BA0DDC900BC8FDF /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | E239337B1BA0DDC800BC8FDF = { 72 | isa = PBXGroup; 73 | children = ( 74 | E206E4481BA105F2000B6DED /* CoreLocation.framework */, 75 | E23933861BA0DDC800BC8FDF /* Locate */, 76 | E23933A01BA0DDC900BC8FDF /* LocateTests */, 77 | E23933851BA0DDC800BC8FDF /* Products */, 78 | ); 79 | sourceTree = ""; 80 | }; 81 | E23933851BA0DDC800BC8FDF /* Products */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | E23933841BA0DDC800BC8FDF /* Locate.app */, 85 | E239339D1BA0DDC900BC8FDF /* LocateTests.xctest */, 86 | ); 87 | name = Products; 88 | sourceTree = ""; 89 | }; 90 | E23933861BA0DDC800BC8FDF /* Locate */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | E23933B01BA0E20300BC8FDF /* beacon.png */, 94 | E239338B1BA0DDC800BC8FDF /* AppDelegate.h */, 95 | E239338C1BA0DDC800BC8FDF /* AppDelegate.m */, 96 | E239338E1BA0DDC900BC8FDF /* ViewController.h */, 97 | E239338F1BA0DDC900BC8FDF /* ViewController.m */, 98 | E23933911BA0DDC900BC8FDF /* Main.storyboard */, 99 | E23933941BA0DDC900BC8FDF /* Images.xcassets */, 100 | E23933961BA0DDC900BC8FDF /* LaunchScreen.xib */, 101 | E23933871BA0DDC800BC8FDF /* Supporting Files */, 102 | E23933AD1BA0DDE300BC8FDF /* DrawView.h */, 103 | E23933AE1BA0DDE300BC8FDF /* DrawView.m */, 104 | ); 105 | path = Locate; 106 | sourceTree = ""; 107 | }; 108 | E23933871BA0DDC800BC8FDF /* Supporting Files */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | E23933881BA0DDC800BC8FDF /* Info.plist */, 112 | E23933891BA0DDC800BC8FDF /* main.m */, 113 | ); 114 | name = "Supporting Files"; 115 | sourceTree = ""; 116 | }; 117 | E23933A01BA0DDC900BC8FDF /* LocateTests */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | E23933A31BA0DDC900BC8FDF /* LocateTests.m */, 121 | E23933A11BA0DDC900BC8FDF /* Supporting Files */, 122 | ); 123 | path = LocateTests; 124 | sourceTree = ""; 125 | }; 126 | E23933A11BA0DDC900BC8FDF /* Supporting Files */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | E23933A21BA0DDC900BC8FDF /* Info.plist */, 130 | ); 131 | name = "Supporting Files"; 132 | sourceTree = ""; 133 | }; 134 | /* End PBXGroup section */ 135 | 136 | /* Begin PBXNativeTarget section */ 137 | E23933831BA0DDC800BC8FDF /* Locate */ = { 138 | isa = PBXNativeTarget; 139 | buildConfigurationList = E23933A71BA0DDC900BC8FDF /* Build configuration list for PBXNativeTarget "Locate" */; 140 | buildPhases = ( 141 | E23933801BA0DDC800BC8FDF /* Sources */, 142 | E23933811BA0DDC800BC8FDF /* Frameworks */, 143 | E23933821BA0DDC800BC8FDF /* Resources */, 144 | ); 145 | buildRules = ( 146 | ); 147 | dependencies = ( 148 | ); 149 | name = Locate; 150 | productName = Locate; 151 | productReference = E23933841BA0DDC800BC8FDF /* Locate.app */; 152 | productType = "com.apple.product-type.application"; 153 | }; 154 | E239339C1BA0DDC900BC8FDF /* LocateTests */ = { 155 | isa = PBXNativeTarget; 156 | buildConfigurationList = E23933AA1BA0DDC900BC8FDF /* Build configuration list for PBXNativeTarget "LocateTests" */; 157 | buildPhases = ( 158 | E23933991BA0DDC900BC8FDF /* Sources */, 159 | E239339A1BA0DDC900BC8FDF /* Frameworks */, 160 | E239339B1BA0DDC900BC8FDF /* Resources */, 161 | ); 162 | buildRules = ( 163 | ); 164 | dependencies = ( 165 | E239339F1BA0DDC900BC8FDF /* PBXTargetDependency */, 166 | ); 167 | name = LocateTests; 168 | productName = LocateTests; 169 | productReference = E239339D1BA0DDC900BC8FDF /* LocateTests.xctest */; 170 | productType = "com.apple.product-type.bundle.unit-test"; 171 | }; 172 | /* End PBXNativeTarget section */ 173 | 174 | /* Begin PBXProject section */ 175 | E239337C1BA0DDC800BC8FDF /* Project object */ = { 176 | isa = PBXProject; 177 | attributes = { 178 | LastUpgradeCheck = 0640; 179 | ORGANIZATIONNAME = "Tom Jay"; 180 | TargetAttributes = { 181 | E23933831BA0DDC800BC8FDF = { 182 | CreatedOnToolsVersion = 6.4; 183 | SystemCapabilities = { 184 | com.apple.BackgroundModes = { 185 | enabled = 1; 186 | }; 187 | }; 188 | }; 189 | E239339C1BA0DDC900BC8FDF = { 190 | CreatedOnToolsVersion = 6.4; 191 | TestTargetID = E23933831BA0DDC800BC8FDF; 192 | }; 193 | }; 194 | }; 195 | buildConfigurationList = E239337F1BA0DDC800BC8FDF /* Build configuration list for PBXProject "Locate" */; 196 | compatibilityVersion = "Xcode 3.2"; 197 | developmentRegion = English; 198 | hasScannedForEncodings = 0; 199 | knownRegions = ( 200 | en, 201 | Base, 202 | ); 203 | mainGroup = E239337B1BA0DDC800BC8FDF; 204 | productRefGroup = E23933851BA0DDC800BC8FDF /* Products */; 205 | projectDirPath = ""; 206 | projectRoot = ""; 207 | targets = ( 208 | E23933831BA0DDC800BC8FDF /* Locate */, 209 | E239339C1BA0DDC900BC8FDF /* LocateTests */, 210 | ); 211 | }; 212 | /* End PBXProject section */ 213 | 214 | /* Begin PBXResourcesBuildPhase section */ 215 | E23933821BA0DDC800BC8FDF /* Resources */ = { 216 | isa = PBXResourcesBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | E23933931BA0DDC900BC8FDF /* Main.storyboard in Resources */, 220 | E23933B11BA0E20300BC8FDF /* beacon.png in Resources */, 221 | E23933981BA0DDC900BC8FDF /* LaunchScreen.xib in Resources */, 222 | E23933951BA0DDC900BC8FDF /* Images.xcassets in Resources */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | E239339B1BA0DDC900BC8FDF /* Resources */ = { 227 | isa = PBXResourcesBuildPhase; 228 | buildActionMask = 2147483647; 229 | files = ( 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | }; 233 | /* End PBXResourcesBuildPhase section */ 234 | 235 | /* Begin PBXSourcesBuildPhase section */ 236 | E23933801BA0DDC800BC8FDF /* Sources */ = { 237 | isa = PBXSourcesBuildPhase; 238 | buildActionMask = 2147483647; 239 | files = ( 240 | E23933901BA0DDC900BC8FDF /* ViewController.m in Sources */, 241 | E239338D1BA0DDC900BC8FDF /* AppDelegate.m in Sources */, 242 | E23933AF1BA0DDE300BC8FDF /* DrawView.m in Sources */, 243 | E239338A1BA0DDC800BC8FDF /* main.m in Sources */, 244 | ); 245 | runOnlyForDeploymentPostprocessing = 0; 246 | }; 247 | E23933991BA0DDC900BC8FDF /* Sources */ = { 248 | isa = PBXSourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | E23933A41BA0DDC900BC8FDF /* LocateTests.m in Sources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | /* End PBXSourcesBuildPhase section */ 256 | 257 | /* Begin PBXTargetDependency section */ 258 | E239339F1BA0DDC900BC8FDF /* PBXTargetDependency */ = { 259 | isa = PBXTargetDependency; 260 | target = E23933831BA0DDC800BC8FDF /* Locate */; 261 | targetProxy = E239339E1BA0DDC900BC8FDF /* PBXContainerItemProxy */; 262 | }; 263 | /* End PBXTargetDependency section */ 264 | 265 | /* Begin PBXVariantGroup section */ 266 | E23933911BA0DDC900BC8FDF /* Main.storyboard */ = { 267 | isa = PBXVariantGroup; 268 | children = ( 269 | E23933921BA0DDC900BC8FDF /* Base */, 270 | ); 271 | name = Main.storyboard; 272 | sourceTree = ""; 273 | }; 274 | E23933961BA0DDC900BC8FDF /* LaunchScreen.xib */ = { 275 | isa = PBXVariantGroup; 276 | children = ( 277 | E23933971BA0DDC900BC8FDF /* Base */, 278 | ); 279 | name = LaunchScreen.xib; 280 | sourceTree = ""; 281 | }; 282 | /* End PBXVariantGroup section */ 283 | 284 | /* Begin XCBuildConfiguration section */ 285 | E23933A51BA0DDC900BC8FDF /* Debug */ = { 286 | isa = XCBuildConfiguration; 287 | buildSettings = { 288 | ALWAYS_SEARCH_USER_PATHS = NO; 289 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 290 | CLANG_CXX_LIBRARY = "libc++"; 291 | CLANG_ENABLE_MODULES = YES; 292 | CLANG_ENABLE_OBJC_ARC = YES; 293 | CLANG_WARN_BOOL_CONVERSION = YES; 294 | CLANG_WARN_CONSTANT_CONVERSION = YES; 295 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 296 | CLANG_WARN_EMPTY_BODY = YES; 297 | CLANG_WARN_ENUM_CONVERSION = YES; 298 | CLANG_WARN_INT_CONVERSION = YES; 299 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 300 | CLANG_WARN_UNREACHABLE_CODE = YES; 301 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 302 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 303 | COPY_PHASE_STRIP = NO; 304 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 305 | ENABLE_STRICT_OBJC_MSGSEND = YES; 306 | GCC_C_LANGUAGE_STANDARD = gnu99; 307 | GCC_DYNAMIC_NO_PIC = NO; 308 | GCC_NO_COMMON_BLOCKS = YES; 309 | GCC_OPTIMIZATION_LEVEL = 0; 310 | GCC_PREPROCESSOR_DEFINITIONS = ( 311 | "DEBUG=1", 312 | "$(inherited)", 313 | ); 314 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 315 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 316 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 317 | GCC_WARN_UNDECLARED_SELECTOR = YES; 318 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 319 | GCC_WARN_UNUSED_FUNCTION = YES; 320 | GCC_WARN_UNUSED_VARIABLE = YES; 321 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 322 | MTL_ENABLE_DEBUG_INFO = YES; 323 | ONLY_ACTIVE_ARCH = YES; 324 | SDKROOT = iphoneos; 325 | }; 326 | name = Debug; 327 | }; 328 | E23933A61BA0DDC900BC8FDF /* Release */ = { 329 | isa = XCBuildConfiguration; 330 | buildSettings = { 331 | ALWAYS_SEARCH_USER_PATHS = NO; 332 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 333 | CLANG_CXX_LIBRARY = "libc++"; 334 | CLANG_ENABLE_MODULES = YES; 335 | CLANG_ENABLE_OBJC_ARC = YES; 336 | CLANG_WARN_BOOL_CONVERSION = YES; 337 | CLANG_WARN_CONSTANT_CONVERSION = YES; 338 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 339 | CLANG_WARN_EMPTY_BODY = YES; 340 | CLANG_WARN_ENUM_CONVERSION = YES; 341 | CLANG_WARN_INT_CONVERSION = YES; 342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 343 | CLANG_WARN_UNREACHABLE_CODE = YES; 344 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 345 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 346 | COPY_PHASE_STRIP = NO; 347 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 348 | ENABLE_NS_ASSERTIONS = NO; 349 | ENABLE_STRICT_OBJC_MSGSEND = YES; 350 | GCC_C_LANGUAGE_STANDARD = gnu99; 351 | GCC_NO_COMMON_BLOCKS = YES; 352 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 353 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 354 | GCC_WARN_UNDECLARED_SELECTOR = YES; 355 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 356 | GCC_WARN_UNUSED_FUNCTION = YES; 357 | GCC_WARN_UNUSED_VARIABLE = YES; 358 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 359 | MTL_ENABLE_DEBUG_INFO = NO; 360 | SDKROOT = iphoneos; 361 | VALIDATE_PRODUCT = YES; 362 | }; 363 | name = Release; 364 | }; 365 | E23933A81BA0DDC900BC8FDF /* Debug */ = { 366 | isa = XCBuildConfiguration; 367 | buildSettings = { 368 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 369 | INFOPLIST_FILE = Locate/Info.plist; 370 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 371 | PRODUCT_NAME = "$(TARGET_NAME)"; 372 | }; 373 | name = Debug; 374 | }; 375 | E23933A91BA0DDC900BC8FDF /* Release */ = { 376 | isa = XCBuildConfiguration; 377 | buildSettings = { 378 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 379 | INFOPLIST_FILE = Locate/Info.plist; 380 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 381 | PRODUCT_NAME = "$(TARGET_NAME)"; 382 | }; 383 | name = Release; 384 | }; 385 | E23933AB1BA0DDC900BC8FDF /* Debug */ = { 386 | isa = XCBuildConfiguration; 387 | buildSettings = { 388 | BUNDLE_LOADER = "$(TEST_HOST)"; 389 | FRAMEWORK_SEARCH_PATHS = ( 390 | "$(SDKROOT)/Developer/Library/Frameworks", 391 | "$(inherited)", 392 | ); 393 | GCC_PREPROCESSOR_DEFINITIONS = ( 394 | "DEBUG=1", 395 | "$(inherited)", 396 | ); 397 | INFOPLIST_FILE = LocateTests/Info.plist; 398 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 399 | PRODUCT_NAME = "$(TARGET_NAME)"; 400 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Locate.app/Locate"; 401 | }; 402 | name = Debug; 403 | }; 404 | E23933AC1BA0DDC900BC8FDF /* Release */ = { 405 | isa = XCBuildConfiguration; 406 | buildSettings = { 407 | BUNDLE_LOADER = "$(TEST_HOST)"; 408 | FRAMEWORK_SEARCH_PATHS = ( 409 | "$(SDKROOT)/Developer/Library/Frameworks", 410 | "$(inherited)", 411 | ); 412 | INFOPLIST_FILE = LocateTests/Info.plist; 413 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 414 | PRODUCT_NAME = "$(TARGET_NAME)"; 415 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Locate.app/Locate"; 416 | }; 417 | name = Release; 418 | }; 419 | /* End XCBuildConfiguration section */ 420 | 421 | /* Begin XCConfigurationList section */ 422 | E239337F1BA0DDC800BC8FDF /* Build configuration list for PBXProject "Locate" */ = { 423 | isa = XCConfigurationList; 424 | buildConfigurations = ( 425 | E23933A51BA0DDC900BC8FDF /* Debug */, 426 | E23933A61BA0DDC900BC8FDF /* Release */, 427 | ); 428 | defaultConfigurationIsVisible = 0; 429 | defaultConfigurationName = Release; 430 | }; 431 | E23933A71BA0DDC900BC8FDF /* Build configuration list for PBXNativeTarget "Locate" */ = { 432 | isa = XCConfigurationList; 433 | buildConfigurations = ( 434 | E23933A81BA0DDC900BC8FDF /* Debug */, 435 | E23933A91BA0DDC900BC8FDF /* Release */, 436 | ); 437 | defaultConfigurationIsVisible = 0; 438 | defaultConfigurationName = Release; 439 | }; 440 | E23933AA1BA0DDC900BC8FDF /* Build configuration list for PBXNativeTarget "LocateTests" */ = { 441 | isa = XCConfigurationList; 442 | buildConfigurations = ( 443 | E23933AB1BA0DDC900BC8FDF /* Debug */, 444 | E23933AC1BA0DDC900BC8FDF /* Release */, 445 | ); 446 | defaultConfigurationIsVisible = 0; 447 | defaultConfigurationName = Release; 448 | }; 449 | /* End XCConfigurationList section */ 450 | }; 451 | rootObject = E239337C1BA0DDC800BC8FDF /* Project object */; 452 | } 453 | --------------------------------------------------------------------------------