且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在iOS模拟器中禁用系统位置警报

更新时间:2023-10-20 22:00:10

根据此从最重要的KIF贡献者那里得到答案,不可能自动解除系统警报,因此,您应该模拟(即替代)定位服务,以便您可以测试代码而不会遇到警报。

According to this answer from the top KIF contributor, dismissing system alerts automatically is impossible, and you should therefore mock (i.e. provide a substitute for) the location service so that you can test your code without running into the alert.