cancel
Showing results for 
Search instead for 
Did you mean: 

iOS: Agentry GPS issues

chris_gray1
Explorer
0 Kudos

I'm using location services in Work Manager for both routing on the map and fetching the coordinates for other uses. However, I'm not getting any return of GPS coordinates in iOS 9. The map won't locate my current position and the GPS_LOCATION system function in the rules is returning only blank values. When I look under privacy settings on the iPad, I'm not seeing Work Manager listed as even requesting location services.

I've rebuilt the app with the new 70.10.07 SDK but the issue remains. Is there a workaround for this or is it a known issue with the current release?

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Chris,

I was able to use the GeoTag Current Location option for my Work Order to successfully capture my location under iOS9 in Work Manager 6.3.  I don't have the map enabled yet so I can't really test the map finding my location but in terms of the GPS_LOCATION function that is working under iOS 9.  I also tested this function under my test app and also successfully retrieved my coordinates as expected.

Testing was done using the generic Agentry 70.10.7.8 client from the app store.

--Bill

chris_gray1
Explorer
0 Kudos

Bill, thanks for pointing out that it worked in the demo app. I gave it a try and it did give a privacy popup and return the GPS coordinates when access was granted.

However, it does leave the mapping issue unresolved. This is the same version number as the latest OpenUI SDK and the mapping components are additions, nothing is disabled.

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

I am also having issues with getting the map to location my current location but I suspect it has to do with a missing setting or permission in my client that I compiled with the Open UI code.  I am investigating further but with the holidays my time will be limited until after the new year so please be patient with me.

--Bill

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Chris,

You need to add the following to your Info.plist

                <key>NSLocationAlwaysUsageDescription</key>

                <string>Location is required to find out where you are when app is in background</string>

                <key>NSLocationWhenInUseUsageDescription</key>

                 <string>Location is required to find out where you are when app is in use</string>

After adding this when I tapped on the icon to locate me I was prompted with the WhenInUse message and Allowed the access.  Then tapping the icon a second time located me as expected.

I tested this under iOS 9 and iOS 8.4.1 and both worked after adding these keys.

--Bill

chris_gray1
Explorer
0 Kudos

Bill,

I'll give this a try. I had looked into it earlier and added an entry for NSLocationWhenInUseUsageDescription since I didn't think it used Location in the background. That didn't have any affect and I didn't think adding both would suddenly trigger the check.

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

I had also added the iOS 9 equivalent but that didn't seem to make any difference.  Maybe you need all that plus the in use?  Just guessing here.

--Bill

chris_gray1
Explorer
0 Kudos

Perhaps the iOS 9 equivalent is only necessary when building specifically for iOS9? I may have to try that later.

Regardless, thanks for the assistance. I'm surprised you need both of those entries added to get any functionality at all. My experience with other apps led me astray.

Answers (0)