iOS Location Server running duplicate

Hi there,


We have found a issue about the CLLocationManager. The senario is like following:


We have put a log to the CLLocationManagerDelegate --> didUpdateLocations function for monitoring the location changes. However, we found that sometimes there are two location service running on same app, the log shows the exact same location with the exact same timestamp comes as duplicate.


It happens in two way:

1. because me and my collegue are building the app by using our own bundle id. For example,

-my bundle id is org.a and I only use the cable to install for my bundle id.

-my collegue's bundle id is org.b,and he is using testfilght to release the version.

Sometimes, there will two app in my phone, one is install from cable (my bundle id), and the other one is install from testflight (my collegue's release), but I will delete the one installed from the cable after I finished debug. However, the log in testflight one indicate there are two location service updating at the same time.


2. the device only installed app by using testflight, once we release a new build from testflight and update the app, the log will show there are two location service is running/


The above conclusion is just my guess, and it now happens everytime. Very hard to know when it happenes, all we can do is check the log daily. And the current solution is: if we found there are two location service running. We have to delete the app and restart the phone,then reinstall the app. After the reinstallation, everything back to normal.


My understanding is the bundle id will identify the sandbox so each app will register there own service, so I have no idea how is that happens. Please help me and let me know why that happenes.


Sincerely,

Li