use*_*384 2 xcode objective-c ibeacon estimote
Isssue 1:
我正在按照这个estimote教程创建我自己的Estimote应用程序.但是出现了这个错误:
未知类型名称'ESTBeaconRegion'; 你是说'CLBeaconRegion'吗?
怎么解决?
我已经包含了标题和代表
#import <EstimoteSDK/EstimoteSDK.h>
@interface AppDelegate () <UIApplicationDelegate,CLLocationManagerDelegate,ESTBeaconManagerDelegate>
Run Code Online (Sandbox Code Playgroud)
这是我的podFile
# Uncomment this line to define a global platform for your project
platform :ios, '7.0'
target 'Tabster' do
pod 'EstimoteSDK', '3.1.0'
end
Run Code Online (Sandbox Code Playgroud)
问题2: 为什么框架以红色突出显示?

更新:(尝试Juan Gonzalez建议的示例应用程序)

如果您想在新的estimote SDK 3.0中使用"旧应用",我建议您阅读此地址的迁移指南:
https://github.com/Estimote/iOS-SDK/blob/master/SDK_3_0_MIGRATION_GUIDE.md
ESTBeaconManager
ESTBeaconManager类仍然存在,但功能较窄.在目前的形式中,它负责测量和监控iBeacon设备以及作为iBeacon的广告.它主要涵盖CoreLocation功能,但包含有用的帮助程序,包括preventUnknownUpdateCount,avoidUnknownStateBeacons和returnAllRangedBeaconsAtOnce(已在以前版本的Estimote SDK中提供).
委托方法适用于CLBeacon对象(而不是ESTBeacon)和CLBeaconRegion(而不是ESTBeaconRegion).我们以范围委托为例:
SDK 2.4语法:
- (void)beaconManager:(ESTBeaconManager *)manager
didRangeBeacons:(NSArray *)beacons
inRegion:(ESTBeaconRegion *)region
{
if (beacons.count > 0)
{
ESTBeacon *firstBeacon = [beacons objectAtIndex:0];
}
}
Run Code Online (Sandbox Code Playgroud)
SDK 3.0语法:
- (void)beaconManager:(id)manager
didRangeBeacons:(NSArray *)beacons
inRegion:(CLBeaconRegion *)region
{
if (beacons.count > 0)
{
CLBeacon *firstBeacon = [beacons objectAtIndex:0];
}
}
Run Code Online (Sandbox Code Playgroud)
我希望这会对你有所帮助.
| 归档时间: |
|
| 查看次数: |
768 次 |
| 最近记录: |