startMonitoringSignificantLocationChanges not working in swift

本秂侑毒 提交于 2019-11-30 13:46:13

It's working, but it's really hard to trigger significant location changes - it usually happens when the device is changing cell towers - I don't think it's possible to do with the simulator.

You'd probably have to get on a bike/car and travel AT LEAST a few kilometres.

There's a trick you can use though, that will trigger significant location change:

Switch Airplaine mode in your iPhone on and off with a few second intervals repeatedly, it should trick the device into thinking that it changed cell towers and trigger the significant location change.

In your simulator, goto Debug->Location->Custom and change location, then test it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!