PFGeoPoint无法处理xco​​de7-ios9

时间:2015-10-18 23:56:40

标签: swift geopoints

我正在尝试使用Parse检索当前用户位置。但出于某种原因,我不知道在下面的区块中我无法发生任何事情。无论是重点还是错误。

我正在使用ios9运行xcode 7。

   func geoLocation(){
        print("GEO LOCATION")
        PFGeoPoint.geoPointForCurrentLocationInBackground { (point: PFGeoPoint?, error: NSError?) -> Void in
            print("POINT\(point)\(error)")
        }
    }

1 个答案:

答案 0 :(得分:1)

NSLocationWhenInUseUsageDescription

NSLocationAlwaysUsageDescription

将此键放在info.plist

现在这是IOS 8及以上版本的要求。