Teaching Announcements
The Map View
The List View
The aim of the third and final assignment is to demonstrate an understanding of Location-based applications, and the use of persistent knowledge, and apply it by creating a location-aware iOS iPhone app. The app should identify the user’s current location on a map, and indicate the location of the 10 closest tagged locations in the area. In addition, it should list all of the tagged locations in a separate view, but ordered with respect to proximity to the user’s current location. The application should continually monitor the user’s location, and update the screen when the user has moved a distance of 25 meters or more. The application should use Core Data to store persistently the tagged locations (which should initially be supplied via a plist file - see below). It should also use the MapKit to display locations on a map, and Core Locations, to manage the location-aware component. Examples of the final version are given below.
Your solution should exploit the UITabViewController to manage two view controllers - one controlling a Map-based view, and the other a List view. In addition, you should develop and test this using the Xcode 4.2 development environment.
Your solution should rely on data stored in its persistent store, managed by Core Data. To acquire the initial data (i.e. when there are no entries in the store), you should utilise one of the following plist files (Note that all of the files generate arrays of dictionary objects):
•For testing within the iPhone 5.0 Simulator (CityCycleRideLocations.plist).
•For testing around the Liverpool University area using your own device (coming soon).
The above files will be updated over the next few days - you will be notified by email to say when new versions are available.
The following images may be of use for the tab bar items:
•Location Image (74-location.png)
•Map Image (103-map.png)
These images have been taken from the royalty free Glyphish set of mobile app icons, which is a good repository for button and tab-bar icons. If you prefer to use your own images, then you can do so.
Detailed Requirements
The full requirements are given (below):
1.The application should present two tabs on a lower tab bar, corresponding to a “Map View” and a “List View”, with the “map View” as the first view presented when starting the app.
2.The application should be based on an “Empty Application” project template, and implement the UITabBarController programmatically.
3.The “Map View” (managed by a UIViewController) should display an annotated area around the current location. The user’s location should be identified using a “pin”. In addition, up to ten other pins should identify the 10 closest tagged locations on the map. Each of the pins, when selected, should display the title, or name of the location, and “some other information” (in the subtitle), of your choosing. The region displayed (and consequently the pins shown) should change as the user’s current location changes. Updates should be based on the user’s movement (physical - in the case of testing with a device, or simulated - if using the iPhone simulator), and not driven by the user (i.e. through a user interface).
4.The “List View” (managed using a table view - either within a UIViewController or through a UINavigationController/UITableViewController combination) should display a sorted list of tagged locations, ordered on proximity to the user’s current location. The minimum information presented should include the name of the location, and the distance to the user; however, the style of cell used, and the inclusion of other data is up to you.
5.The first time the application runs (i.e. when a new persistent store is created containing no entries), new entries should be loaded from one of the plist files (listed above), and saved into the store. The plist file should be included within, and loaded from the application bundle.
6.Both tabs should automatically update when the location of the user changes. Use a location accuracy of the nearest 10 meters, and set the distance filter (to manage location updates) to 25 meters.
The work should be based on the material presented in the NearestMe Lab work presented in Lab 8 and Lab 9, and the discussion on location-aware issues and Apple’s iOS MapKit. Additional hints will be given in the lecture material.
For this assignment, you should use XCode 4.2, and exploit the new debugging features for Core-Location, running under any version of iOS 5. However, you should not use any of the new features introduced in iOS5, as the code should still run on an iOS 4.3 device. In particular, do not use Automatic Reference Counting and Storyboarding.
Marking Scheme
The purpose of this assignment is to demonstrate that you know how to develop a location-aware native iPhone app using Core Data, Core Location and the MapKit. You do not need to hand in any design documentation but your code MUST be well commented so that it explains what is happening in the code. The following marking scheme will be used to assess each submission:
•Map View: (40 marks total)
•Demonstrate an understanding of using the Map Kit to display a map within a view, centred around the current user, and automatically scaling to an initial area showing the streets around the user. (20 marks)
•Manage the annotated pins to identify locations on that map, including tags that should appear giving a title and subtitle when a pin is selected. (10 marks)
•Update the map and pins as new location events are generated (10 marks)
•List View: (20 marks total)
•Create a table view to list all of the locations stored within the persistent store, sorted on proximity to the user’s current location. (10 marks)
•Ensure the table updates when the user’s location changes. (10 marks)
•Data Manipulation: (20 marks total)
•Manage all of your data by storing it in the Core Data managed persistent store. (10 marks)
•When a new core data store is generated (i.e. no records exist), create the initial data using entries found in a plist file (10 marks)
•General: (20 marks total)
•Manage a Tab Bar View Controller to support the two views. (10 marks)
•Layout and Design (10 marks)
Hints
Most of what you need has already been covered in the labs or lecture notes. The following provides a few additional hints for this assignment.
1.The assignment is based almost entirely on Lab 8 and Lab 9 - NearestMe. Work through these labs before attempting the assignment, so that you are familiar with the issues involved.
2.You can obtain all of the annotations from an MKMapView using the method annotations, and then iterate through them all. For example, to remove all of the annotations from a map, you could use the following code:
// Clear pins
for (id<MKAnnotation> annotation in
[mapView annotations]) {
[mapView removeAnnotation:annotation];
}
3.Other hints will appear shortly.
This assignment contributes 15% to your overall mark for COMP327.
The code should compile without warning or errors. In addition, memory should be managed appropriately.
SUBMISSION INSTRUCTIONS
Firstly, check that you have adhered to the following list:
1.Your project should be self contained within a single zip file containing all of the files in the XCode project. The file's name MUST be 'AreWeThereYet.zip'. Ensure that all of your source files are included in the project (hint, unpack it in a different directory and check it still builds).
2.Your project is developed within XCode, not some other language or environment.
3.Your program compiles and runs on a machine within the computer science department’s Mac Lab, under Xcode 4.2, using the iOS SDK 5 (recently released) or an earlier version. If you have developed your code elsewhere (e.g. your own mac), ensure that it also works on our system before submission. It is your responsibility to check that you can log onto the department’s system well in advance of the submission deadline.
4.Your program does not bear undue resemblance to anybody else's! Electronic checks for code similarity will be performed on all submissions and instances of plagiarism will be severely dealt with. The rules on plagiarism and collusion are explicit: do not copy anything from anyone else’s code, do not let anyone else copy from your code and do not hand in 'jointly developed' solutions.
To submit your solution you must SUBMIT IT ELECTRONICALLY, and adhere to the following instructions:
Electronic submission:
•Your code must be submitted to the departmental electronic submission system at: http://cgi.csc.liv.ac.uk/cgi-bin/submit.pl?module=comp327
•You need to login in to the above system and select ‘Assignment 3’ from the drop-down menu. You then locate the file containing your program that you wish to submit, check the box stating that you have read and understood the university’s policy on plagiarism and collusion, then click the ‘Upload File’ button.
Work will be accepted only if it is submitted electronically following the above instructions.
Finally, please remember that it is always better to hand in an incomplete piece of work, which will result in some marks being awarded, as opposed to handing in nothing, which will guarantee a mark of 0 being awarded. Demonstrators will be on hand during the COMP327 practical sessions to provide assistance, should you need it.
COMP327 - Practical Assignment 3 2011
06/12/2011
Deadline:
5pm Friday 16th Dec ‘11
Example Output