How to store CLLocation using Core Data (iPhone)? -


I am using core space, mapkit and core data framework after saving a location and moving the location.

What I have done, I have just created an institution called Poi and some other people have added qualities like latitude (double type), longitude (double type).

Simply put, my app saves Poi with two NSNs. (Late and tall), but I think there should be a smart way to store CLLocation in addition to this.

Cheers

What you're doing is fine Longitude should be avoided as a couple. When you need to retrieve the information again, get the pair back from the core data and create a CLLocationCoordinate2D structure with a function like CLLocationCoordinate2DMake . No construction has been done to store any location, so it is OK to store latitude and underlined components.

If you are not doing any math work on latitude or longitude (finding the bounding box etc.) then you can store floats and doubles in the form of wire, changing their values ​​slightly, Operations fail.


Comments