Parse.com PFGeoPoint.geoPointForCurrentLocationInBackground not doing anything

后端 未结 3 1727
情书的邮戳
情书的邮戳 2021-01-12 05:39

I\'m using Parse.com iOS SDK, and I need the current location of the user, so I\'m using the function PFGeoPoint.geoPointForCurrentLocationInBackground(...).

The pr

相关标签:
3条回答
  • 2021-01-12 06:15

    I had the same problem. It's fixed in Parse 1.4.0.

    Also you need to add the following key/value pair to your app's info.plist:

    <key>NSLocationWhenInUseUsageDescription</key>
    <string>We want to send your location data to the NSA, please allow access to location services. (replace this text with whatever you want the dialog to say)</string>
    

    References:

    • Parse SDK for iOS 8
    • CLLocationManager in iOS 8 - use of NSLocationWhenInUseUsageDescription
    0 讨论(0)
  • 2021-01-12 06:15

    UPDATE:

    Fixed


    Got back with Facebook on this issue.

    Geopoint

    Similar question posted here: Parse geopoint swift not getting current location

    Will update as they respond back.

    0 讨论(0)
  • 2021-01-12 06:18

    Check this:

    Click at your Project Targets/Build Phases/Link Binary With Libraries/

    This file must be listed: CoreLocation.framework 
    if there is not click Add and select it from the list.
    

    In your ViewController.swift check this:

    import CoreLocation

    class ViewController: UIViewController, CLLocationManagerDelegate {

    /Supporting Files/info.plist <- Click on this file

    Click on + to add: Key: NSLocationAlwaysUsageDescription Type: String Value: Add a description

    Click on + to add: Key : NSLocationWhenInUseUsageDescription Type: String Value: Add a description

    check IOS Simulator /Debug/Location/Apple here you must select something (none => error)

    0 讨论(0)
提交回复
热议问题