Crosslight Location Service

3 replies. Last post: August 9, 2016 4:53 AM by Yudi
Tags :
  • (None)

Hello Crosslight Support,

how can I get the Crosslight location service to work on iOS?

I startet the services sample application and navigated to location service section. Clicking on get my location starts a busy indicator but my location is never found and the busy indicator never disappears.

I activated the location service in the device settings and I grant the sample app the "use always" right.

Show my location on map gets my location and the native map application tracks my location in a second.

What's wrong with the Crosslight location service? I havn't tested it, but maybe there is the same problem on Android.

Thanks,

Thomas

Answers

Yudi Member

I tried to replicate the reported problem by getting my location (using Services Samples) without internet connection. The test was taken on iPhone device and simulator.
However, the problem doesn't persist. I can get my location without internet connection.

If you are using simulator, could you please check if the Location is set? I found discussions in stackoverflow related to this error.

This error occurs if you have Scheme/Edit Scheme/Options/Allow Location Simulation checked but don't have a default location set.

source: Location Manager Error : (KCLErrorDomain error 0).

All Replies

Yudi Member

Sorry for any inconvenience this problem may have caused you.

In order to resolve the problem, we need to add NSLocationWhenInUseUsageDescription keys in info.plist file. This key is required for the location service.

This change has been pushed to Crosslight git. Please have the modified sample re-test on your end and let me know if the problem still persist.

I havn't tested it, but maybe there is the same problem on Android.

Per my test, the same problem doesn't happen on Android.

Hello Yudi,

I tested on iOS and adding the key to the plist file solves the problem. Thanks.

I which, I could test on Android as well, but at the moment I am not able to build because of the resources bug.

When I try to get my location without an internet connection, I receive an error (see attached screenshot). Since the native map application cannot get my location without internet connection, too, I guess that this is the correct behaviour. Or is it because of the LocationAccuracy.Best setting?

Thanks for fixing.

Thomas

1 attachment
Yudi Member

I tried to replicate the reported problem by getting my location (using Services Samples) without internet connection. The test was taken on iPhone device and simulator.
However, the problem doesn't persist. I can get my location without internet connection.

If you are using simulator, could you please check if the Location is set? I found discussions in stackoverflow related to this error.

This error occurs if you have Scheme/Edit Scheme/Options/Allow Location Simulation checked but don't have a default location set.

source: Location Manager Error : (KCLErrorDomain error 0).

All times are GMT -5. The time now is 2:05 AM.
Previous Next