2015-01-09 1 views
0

iOS 8.1과 함께 2 개의 장비, iPhone 5 (Beacon으로 작동) 및 iPhone 5 (Beacon Detector로 작동)가 있습니다. 활성화AirLocate 및 BeaconDemo : 표시되지 않음

두 장치

  • 위치 서비스 (개인 정보 보호>> 항상 AirLocate에 대한 위치 서비스)
  • 블루투스
  • 와이파이, 인터넷 연결 (아주 관련이없는)가 같은 SSID에 합류
  • iPhone 5에는 적절한 신호 강도를 가진 SIM 카드가 있습니다.
  • iPhone 5에는 SIM 카드가 없습니다.
사용

  • : YES
  • UUID : E2C56DB5-DFFB-48D2-B060-D0F5A71096E0
  • 주요 아이폰 5에서

    , 나는 (구성 페이지에서) 애플의 AirLocate 데모, 그리고 다음과 같은 설정을 설치 0

  • 부 : 0
  • 측정 된 전력 : 일본어 이후 -59

AirLocate는 기본적으로 아이폰 OS 8에서 작동하지 않는보고, 나는 수정 AppDelegate에의 didFinishLaunchingWithOptions과 아이폰 5S에

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 

    // This location manager will be used to notify the user of region state transitions. 
    self.locationManager = [[CLLocationManager alloc] init]; 
    self.locationManager.delegate = self; 
    if([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) { 
     [self.locationManager requestAlwaysAuthorization]; 
    } 

    if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)]){ 
     [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound categories:nil]]; 
    } 
    return YES; 
} 

, 나는 Beacon Demo을 설치하고 (새로운 표지를 추가) 다음과 같이 구성합니다

  • 비콘 UUID : E2C56DB5-DFFB-48D2-B060-D0F5A71096E0
  • 주요 ID : (빈)
  • 마이너 ID : (빈)
  • 안녕하세요 메시지 : 입력 테스트
  • 안녕 메시지 :

안녕 테스트는하지만, 아이폰 5는 항상 "뿐만 범위에서"주장, 아이폰 5S에 표시되지 않습니다. 내가 놓친 게 무엇입니까?


스크린 샷 :

Left: AirLocate; Right: Beacon Demo

왼쪽 : AirLocate; 오른쪽 : 비콘 데모에서 신호 데모


업데이트 최신didFinishLaunchingWithOptions:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    // Set up Core Location Manager 
    self.coreLocation = [[CLLocationManager alloc] init]; 
    _coreLocation.delegate = self; 
    if([self.coreLocation respondsToSelector:@selector(requestAlwaysAuthorization)]) { 
     NSLog(@"Core Location requesting always authorization"); 
     [self.coreLocation requestAlwaysAuthorization]; 
    } 
    if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)]){ 
     [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound categories:nil]]; 
    } 

    // Load any previously registered notifications 
    [self loadNotificationRegions]; 

    // Override point for customization after application launch. 
    return YES; 
} 
+0

Info.plist 파일에 당신이 AirLocate에 수행 된 변경을 해당 항목을 추가해야합니다 8. ​​

아이폰 OS에 추가 필요한 권한을 요청 CoreLocation을 사용하는 경우에만 필요 비콘을 스캔합니다. 송신기로 사용할 경우에는 필요하지 않습니다. – davidgyoung

+0

5 단계에서 AirLocate 프로그램을 사용하면 (설명대로 수정되지만, requestAlwaysAuthorization과 함께 제공되는 plist에 필요한 키를 추가하십시오). 그것은 5에서 신호 전송을 감지합니까? – davidgyoung

답변

2

당신이 here에서 비콘 데모 버전을 사용하는 경우 다음 당신은 당신이 그것을에 해당하는 수정해야 AirLocate 데모 앱에 사용되었습니다. 어느 응용 프로그램은이 작업을 수행 할 때, 당신은 또한 설명 here.

+0

AirLocate App은 Beacon으로 작동하면 다른 Android Beacon App에 의해 선택되어 완벽하게 작동 함을 입증합니다. 하지만 Beacon Demo 앱의 Info.plist에 항목을 추가하고 App Delegate에서 변경 한 다음 Clean Rebuilt를 실행 한 후에도 Beacon이 범위 내에 있지 않다는 메시지가 표시됩니다. 어떻게 디버깅 할 수 있습니까? – Raptor

+0

또한 Beacon Demo App의 AppDelegate에서 AirLocate App과 정렬하기 위해 com.example.apple-samplecode.AirLocate 대신 'com.iotdesignshop.BeaconDemo' 대신 식별자를 변경하려고했습니다. 여전히 "범위를 벗어났습니다" – Raptor

+0

첫 번째 신호 데모를 실행할 때 위치 정보를 묻는 대화 상자가 나타 납니까? 확실하지 않은 경우 제거/다시 설치하고 다시 시도하십시오. 이 대화 상자를 가져 와서 Vin에 응답해야합니다. – davidgyoung

관련 문제