【发布时间】:2011-02-02 13:04:58
【问题描述】:
基本上,我遵循“Big Nerd Ranch 指南 - iPhone 编程”并尝试尽可能频繁地在控制台上输出位置。在我的计算机上运行它时,我得到以下输出:
[Session started at 2011-02-02 12:55:41 +0000.]
2011-02-02 12:55:42.884 Whereami[17833:207] <+51.51773825, -0.15769391> +/- 51.00m (speed -1.00 mps / course -1.00) @ 1/22/11 12:12:30 PM Greenwich Mean Time
2011-02-02 12:56:22.882 Whereami[17833:207] Could not find location: Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"
2011-02-02 12:57:10.883 Whereami[17833:207] Could not find location: Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"
但是当我在其他人的计算机上运行它时,它可以正常工作并不断更新位置。我认为这一定是设置问题(所以没有显示任何代码)。如果有人能弄清楚为什么它不能在我的计算机上运行,但可以在其他计算机上运行(或至少为我指明正确的方向),那就太好了。
谢谢
【问题讨论】: