我正在使用JAALEE制造的iBeacons,Liam尝试get list go iBeacons到我附近,但是我不能得到它
// JLEConfigBeacon.m
// Example
//
// Created by jaalee on 14-4-23.
// Copyright (c) 2014年 jaalee. All rights reserved.
//
#import "BeaconList.h"
#import "JLEBeaconDevice.h"
#import "SWRevealViewController.h"
#import "PetFinderViewController.h"
#import "AdvertisementViewController.h"
@interface BeaconList ()
@property (nonatomic) NSMutableArray *mBeaconDeviceList;
@property (nonatomic) JLEBeaconConfigManager *mBeaconConfigManager;
@property (nonatomic) JLEBeaconDevice *mBeaconDevice;
@end
@implementation BeaconList
@synthesize destinationName;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
_mBeaconDeviceList = [[NSMutableArray alloc] init];
_mBeaconConfigManager = [[JLEBeaconConfigManager alloc] init];
_mBeaconConfigManager.delegate = self;
_sidebarButton.target = self.revealViewController;
_sidebarButton.action = @selector(revealToggle:);
if ([[self title] isEqualToString:@"Beacon List"]) {
[self setTitle:@"Pet Finder"];
}
}
-(void)viewDidAppear:(BOOL)animated
{
[_mBeaconDeviceList removeAllObjects];
[self.mTableView reloadData];
[_mBeaconConfigManager startJaaleeBeaconsDiscovery];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
#pragma mark - JLEBeaconConfigManager delegate
- (void)beaconConfigManager:(JLEBeaconConfigManager *)manager didDiscoverBeacon:(JLEBeaconDevice *)beacon RSSI:(NSNumber *)RSSI
{
for (int i = 0; i < _mBeaconDeviceList.count; i++) {
JLEBeaconDevice *temp = [_mBeaconDeviceList objectAtIndex:i];
if (temp == beacon) {
return;
}
}
[_mBeaconDeviceList addObject:beacon];
[self.mTableView reloadData];
}
@end不知道如何解决这个问题。我想用它从检测到的信标中获取接近UUID。
发布于 2015-02-27 00:45:30
如果您的ibeacon没有任何其他功能,如estimote ibeacons(加速计和温度传感器),则不能使用SDK。
查看iOS 8的本教程并更改UUID。
http://ibeaconmodules.us/blogs/news/14279747-tutorial-ibeacon-app-development-with-corelocation-on-apple-ios-7-8
https://stackoverflow.com/questions/28742822
复制相似问题