iOS Question LocationChanged event is not raised

Alex_197

Well-Known Member
Licensed User
Longtime User
Hi all

I'm running a small (3 activties) test app on my iPhone 7 with iOS ver. 15.5 without SIM Card.
The app created for a testing iLocation.

I'm running my test in Release mode.

If the Wi-Fi works I can successfully get Lat/Long. In Show sub I intialize LocManager

On pg_Disapear event I stop GPS by using LocManager.Stop and LocManager.StopHeading
On the next screen I initialaize it again.

So I run my app allow GPS permission. Click on GPS button on the 1st screen - GPS works Ok.
Then I return to the phone sttings screen which in turn stops the GPS and turn off the Wi-FI.

I return to the app and click on another button that opens 2nd screen. With Wi-Fi turned off I click on GPS button and get nothing.

LocationChanged event and HeadingGhanged event are not raised. But if I click again - it works
 

Attachments

  • GPSTest.zip
    69.6 KB · Views: 183

Alex_197

Well-Known Member
Licensed User
Longtime User
I mean if the user in the some location without Wi-Fi and at this location there is no cell phone coverage? A lot of places like this in NYC:)
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
Why do you turn off GPS? How do you want to find the location if there is no wifi nor GPS?
to preserve the battery if I don't need to use GPS.

My app is for clock in / clock out. Between clock in time and clock out time I don't need to use GPS. It might be 6-8 hours difference.
So I stopped it right after clocked in.

But I didn't expect the situation that when I start it again before clock out if there is no wi-fi or cell phone service it won't work. I expected that the GPS will get coordinates from the satellite if there are no wi-fi or 4G. Turns out that event LocationChanged event is not fired.
 
Upvote 0
Top