Search code examples
iosswiftuber-api

Uber-API iOS Swift unable to find current location


I have been working with the example Uber API at https://github.com/uber/rides-ios-sdk/tree/master/examples/Swift%20SDK/Swift%20SDK . I am using localhost and have the app pulling through except user location.

I keep getting the error:"Unable able to find current location"

enter image description here

Any suggestions where to start? I have added the CoreLocation.framework and tried modifying the RideRequestWidgetExampleViewController. I am in UberSandBox still.


Solution

  • I would check to make sure that your simulator location is enabled. When you open the simulator if you go to Debug > Location is the None option checked?

    Otherwise, make sure that you add either the NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription keys to your Info.plist with a string describing why you need location