$29.99
CSC 491/391 Mobile Application Development for iOS II
Programming Assignment 2
Web Contents, Background Processing, & JSON Parsing
Due Date & Submission
• Submit your assignment in D2L Dropbox.
• Submit a single zip file that contains the contents of the project folder
o To zip your project folder: Ctrl-click your project folder and select “Compress
…” from the context menu.
• It is mandatory to use Xcode 12 and Swift 5.3 for this assignment.
• Include only your source files, including
o *.swift, *.plist, *.xib, *.storyboard
o image files
o project files (.xcodeproj)
o test folders
• You must use a unique prefix for the project name. (I suggest you use your last name
and first initial as your prefix.) Please use the same prefix for all your assignments.
o Note you only need to use the prefix for the project name. It is not necessary
to use the prefix on other files in your project.
• Do not include unused or unrelated files.
• Before you submit, build and run the project, make sure everything compiles and
works. Close your project before zipping the folder.
• Here are the most common reasons assignments are marked down:
o Project does not build.
o Project does not build without warnings.
o One or more items in the Requirements section were not satisfied.
o A fundamental concept was not understood.
o Code is sloppy and hard to read (e.g. indentation is not consistent, etc.).
o Your solution is difficult (or impossible) for someone reading the code to
understand due to lack of comments, poor variable/method names, poor
solution structure, etc.
• Bonus points.
o Bonus points may be awarded to projects with exceptional qualities in one or
more aspects.
o Bonus points will only be awarded after all the required elements have been
satisfied.
o Bonus points will not be awarded merely for extra amount of work (or code).
o Extra and sloppy code may cause your assignments to be marked down.
o Bonus points are awarded at the sole discretion of the instructor.
o Include a note in the comment in D2L describing the part(s) should be
considered for bonus points.
Goals
• Building an app that asynchronously accesses web contents provided in JSON format.
• Properly handle error conditions that may occur during the communication and in the
data content.
Requirements
Develop an iOS app that accesses web contents provided in JSON format from a web site
such as the CTA train and bus trackers1
. You may also use a different web site that provides
data content similar in complexity to the ones provided by CTA.
The specific requirements are:
1. Access the data content in the JSON format and properly handle errors that may occur
during communication.
2. Properly parse the JSON data and properly handle errors and anomalies that may be
contained in the data content.
3. Design an appropriate UI to access, display, and interact with the data. Update the
content display in the UI at an appropriate interval. For example, using the CAT train
tracker API, you should be able to select all or some of the lines, select all or some of
the stops, and update the UI for upcoming arrivals, etc. Therefore, the app should
have at least 2-3 screens.
4. The UI should present the data in an informative and usable manner.
5. The data access should be handled in the background allowing the UI to remain
responsive and informative at all time.
6. The app should be robust. Even when errors or anomalies are encountered during the
communication or in the data content, it should able to continue to function to the
best possible extent by providing appropriate messages, responses, and the best
available information in the UI.
Documentation
It is mandatory to include a brief document that discusses
1 See documentation at http://www.transitchicago.com/developers/default.aspx and
https://www.transitchicago.com/developers/traintracker/
• The software design of your app, including diagrams of the key components (classes)
and their relations.
• What error conditions and anomalies during the communication and in the data
content that you have considered in the design and implementation of your app? What
measures did you take to allow your app to continue to function in the presence of
these conditions?
• What measures did you take to avoid cyclic strong references in your code?
Possible bonus points for this assignment in one or more of the following areas:
• Exceptional quality in the design of your code, e.g., using suitable design patterns,
language features, etc. to achieve simplicity.
• Effective design of the user interface.
• Properly handle all possible scenarios that may arise during the execution of the app.
• Clean, well-organized, and easy to understand code.
Document the areas that exhibit these exceptional qualities in your app.