开发者

Debugging CoreLocation app in real IOs device

开发者 https://www.devze.com 2023-04-06 04:18 出处:网络
I\'m developing an application that uses CoreLocation Framework to track user movements. I\'m caching the information into a DB to make use of it later, etc. The problem I\'m facing is that this kind

I'm developing an application that uses CoreLocation Framework to track user movements. I'm caching the information into a DB to make use of it later, etc. The problem I'm facing is that this kind of application is not to be tested on the Simulator, but on a real device with real data,开发者_如何学运维 but I don't find a way to at least access the data my application is generating and storing into its DB. I'd like to know some tips or hints related to the way of testing&debugging this kind of application.

Thanks!


If you want to access the application's data you can follow the steps on this post. If you are using an SQLite database, I'd suggest you to use the SQLite Manager plugin for Firefox, it works great.

I hope it helps

Cheers!


You need to adopt locationManager:didUpdateToLocation:fromLocation: of CLLocationManagerDelegate. You will receive newLocation in this callback.
newLocation.coordinate - that's what you need.


You can test on the iPhone simulator using a CLLocationManager simulator and that way you'll have access to the data in your DB. There are several CLLocationManager simulators out there that run on the iPhone simulator see this answer on SO.

0

精彩评论

暂无评论...
验证码 换一张
取 消