2014-09-29 59 views
3

我試圖在我的應用程序中使用新的CLVisit功能來監視用戶的訪問,我遵循WWDC-14視頻並實現了每一件事情,但locationManager:didVisit根本沒有調用。我設置了NSLocationAlwaysUsageDescription鍵,啓用功能「位置更新」的背景模式,包括在我的課的viewDidLoad中的以下內容:IOS 8:CLVisit CoreLocation

_locationManager = [[CLLocationManager alloc] init]; 
_locationManager.delegate = self; 
[_locationManager requestAlwaysAuthorization]; 
[_locationManager startMonitoringVisits]; 

關於可留在某一特定地點所需的最短時間沒有文檔參觀或任何有關地點之間的距離。 我試圖使用GPX文件進行測試,並在建築物中停留時間超過10分鐘,但locationManager:didVisit委託沒有被解僱。

請幫助我,如何測試CLVisits,或者如果我錯過了任何代碼。

回答