Lab 9 - Tipping toes into iOS
Completing and submitting this lab earns your 3 bonus points
In this lab session, we will:
- Explore the ProtonMail iOS app repository on GitHub
- Find out how ProtonMail defines its UIs, stores its data and declares permissions
To earn points for completing this lab, you should submit a written report (.docx, .pdf, .txt) which answers the questions defined in parts 1. - 4 defined below. For each code reference add a screenshot of the code and a link to the repository file.
0. ProtonMail iOS app repository
In this lab we are going to explore the source code of a real life iOS application. The chosen application is ProtonMail. ProtonMail is a great example of a complex, well written and also well documented iOS app. You can find the repository here. This app was also discussed in the lecture as an example implementation. Go and explore the repository a little bit and try to answer the following questions (hint: all of these questions can be answered based on the documentation alone):
- How is the application structured? Are there different components?
- What kind of architecture is used to build the application?
- Does the ProtonMail app use third party libraries?
1. UI frameworks
The first task is to find out which UI frameworks are used in the ProtonMail app. Find two files where a view is declared and explain how the UI is defined (UIKit, SwiftUI, StoryBoard, some third party solution).
2. Permissions
The second task is to find out how permissions are defined. Some permissions only need to be declared but the user is never prompted with a question if they allow access to the resource. For some permissions the application first needs to ask the user explicitly if they allow access.
The task is to find 3 permissions that the application uses. You should explain how each of these permissions is declared and for one of these permissions you should find where in code the application asks the user for permission.
3. File Storage
Local data storage in the application is documented here. This document briefly explains what kind of data is stored using CoreData, UserDefaults and Keychain.
Your task is to find one use of CoreData and one use of UserDefaults. For both uses report what kind of data was stored, what kind of attributes about the data were stored and the corresponding source file.
4. iOS vs Android
Additionally to an iOS app ProtonMail also has an Android app, the source code can be found here.
For each of the reported answers for questions 1-3:
- find out how the same thing is declared in the Android app
- describe the Android implementation
- report the path to corresponding the source file