Uygulamamda, CoreLocation'da Beacon Region Monitoring özelliğini kullanıyorum. Uygulama, bölge olarak 2 farklı yakınlık UUID'sini (farklı kimlikleri vardır), 'u ayarlar ve aşağıdaki gibi çalışmaya başlar.iOS'ta İşaret Etme İşaretleri 10
#pragma mark - CLLocationManagerDelegate
(void)locationManager:(CLLocationManager *)manager
didEnterRegion:(CLRegion *)region {
[self.locationManager requestStateForRegion:(CLBeaconRegion *)region];
}
- (void)locationManager:(CLLocationManager *)manager
didExitRegion:(CLRegion *)region {
[self.locationManager stopRangingBeaconsInRegion:(CLBeaconRegion *)region];
}
- (void)locationManager:(CLLocationManager *)manager
didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region{
for(CLBeacon* b in beacons){
//output only previous beacon if it's before regionout to previous region
NSLog(@"%@",b);
}
}
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {
//error
}
- (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region{
if(state == CLRegionStateInside){
if ([region isMemberOfClass:[CLBeaconRegion class]] && [CLLocationManager isRangingAvailable]){
[self.locationManager startRangingBeaconsInRegion:(CLBeaconRegion *)region];
}
}
}
Bu IOS 8 ve IOS 9'da çalışır, ancak
IOS 10. çalışmaz
1.broadcast beacon1
2.[app]didRangeBeacons (beacon1)
3.stop beacon1 and broadcast beacon2
4.[app]didRangeBeacons (beacon2)
[IOS 10]
[IOS 8/IOS 9]1.broadcast beacon1
2.[app]didRangeBeacons (beacon1)
3.stop beacon1 and broadcast beacon2
4.[app]didRangeBeacons (**beacon1**)
Bu iOS 10'un bir hatası mı?
Orada kesinlikle işaret değişen ile iOS 10'da farklı bir şey gibi görünüyor. Ben kısaca gösteren ve daha sonra didRangeBeacons işlevinde tekrar hiçbir zaman değişen beacons ile tutarsız sonuçlar alıyorum. – davidethell
Deneme ve bilgi için teşekkür ederiz! Bir güncellemede çözülmeyi bekliyorum ... –
Bu sorun için bir radar mı dosyaladınız? –