- in the website there are JSON files: [url removed, login to view], [url removed, login to view], [url removed, login to view]
- in the attachment there is also almost blank xCode project: there 3 JSON files there too, i created also the core data entities: updates, countries, cities.
I need a simple xCode project with following functionality:
- when the app is starting for the first time, there is no data in core data database
- the app should test if there is internet connection and if it can get the JSON files from the web and update the core data from these files. If there is no internet connection or there is no connection to the server (the site is down) than the application should load data from the local version of JSON files
- the next time the application launches or becomes active (applicationWillEnterForeground or applicationDidBecomeActive) it should check again if there are any updates in the website: [url removed, login to view] (if the number is higher than the current update number (unix time stamp) in the core data Updates entity).
- in the first screen the countries should be listed. when you click on a particular state, than the cities should be displayed in the uitableview.
First check the [url removed, login to view] when the app is starting. If there is a newer version on the web remove all countries from database and insert new countries from JSON.
When user taps/clicks on a country than there should be another update for cities. The JSON file for the cities will be generated separate for each of the countries, regarding to the country id e.g.: [url removed, login to view], [url removed, login to view] (currently not set up). The Cities Entity should be populated and also the uitableview.
The update process should be fast.
Please feel free to ask any questions.