A few weeks ago I submitted my App to the App sot which was reviewed and passed with no problems. The App has an SQLite database which hold the latitude and longitude of some airports. When tapping a button a view of the airport is displayed. All is working as expected.
Two weeks ago I submitted an update which passed review and is now on the Apps store ready to download as an update.
After doing the update on to my own iPhone I now have a problem. If I tap the button to display the airport view, the map loads but not at the correct latitude and longitude. I then deleted the App from my iPhone and downloaded is again and everything is working correctly.
Can anyone throw some light on to why this should happen.
__________________
Many thanks, keep safe and well.
My experience has been that updating the app only updates the app folder - the settings and Documents files remain untouched. So, if you've changed the format of any of these files then you need to version control them so that you can deal with the older format and upgrade as necessary.
If all you have done is add records though, I would have thought this would be fine.
Assuming you are using source control, you can test all this in the simulator:
- Delete the app from the simulator
- Step back to your original version of your app
- Run the app
- Go back to your latest version of your app
- Run the app again
Does the problem now show in simulator?
I use CoreData to store my calculation history steps and I came across this problem if I modified the CoreData store entities and tried to use an old store with new code - CoreData will spot this and assert pretty quickly. During development the solution is easy - delete the CoreData store in the Documents folder of the simulator. The correct solution for app releases is to version control your files. If you don't, you have to force the user to delete the app from their device to delete the files, which is clearly very bad practice.
I will put my hands up and say I have never heard of "source control" until now.
I have read up on the subject and implemented it on the project. Thank you for drawing my attention to "source control".
I followed your instructions to the letter and sure enough the issue was replicated in the simulator.
What would you recommend as the next step.
Thanks for your time with this post.
__________________
Many thanks, keep safe and well.
Getting the problem replicated in the simulator is a good step - well done Now you have the problem in the simulator, can you put debug in your code to figure out what's going on? For example, use NSLog() or breakpoints to see what's being read out of your database? Is it what you expect?
Quote:
I will put my hands up and say I have never heard of "source control" until now.
I have read up on the subject and implemented it on the project. Thank you for drawing my attention to "source control".
Off topic I know, but which source control system have you gone for? Git and Subversion are probably the two most popular (I use git myself). Once you have your source in a source control system it's easy to diff between revisions to see what code has changed - makes this much easier to determine the at what point problems have been introduced.
Just a catchup to thank you for your help today. I found the error in the SQL table. A new field was added for the update App and was inserted into the table rather than added to the end. This of course through the field index out by a factor of 1.
So when the App ran the Latitude became the longitude the the longitude was assign the content from the next field. The MapKit function was OK with the Lat and assign the Lng with 0.0.
Again, many thanks for your help.
p.s I am using "subversion" for the version control.
__________________
Many thanks, keep safe and well.