Persona Pop (Native iOS Mobile Application)
Notice: Due to copyright and security concerns, this directory is not a complete representation of the app Persona Pop found in the iOS App Store.
Welcome to Persona Pop!
Welcome to Persona Pop! Have fun taking a pop quiz on popular television shows and movie personas. How well can you identify television shows and movies based on vague representations of popular characters? This project was started in Barnett's free time as a way to have fun programming.
Persona Pop is developed and maintained by a single developer, Reese Barnett. Barnett is responsible for the UI/UX design, front-end code, and back-end code. This project uses an iterative development process called Agile that allows Barnett to evolve requirements and solutions over the lifetime of the application.
- Developer: Reese Barnett (Full-Stack)
- Programming Technologies: Xcode, SwiftUI, iOS SDK, Swift Package Manager, Git
- Design Technologies: Adobe XD, Adobe Illustrator, Adobe Photoshop, Lottie, Icons8
- Frameworks: XCTest, Lottie, AVFAudio, Message UI, UserNotification, Accessibility
- Language: Swift
- Barnett conducted user research and market research. This allowed him to discover and better understand various design choices to implement into Persona Pop. One way he conducted research is through Apple's own Human Interface Guidelines and App Store Review Guidelines. Barnett developed a better understanding of what makes apps engaging, useful, and safe. Using the research, he was able to successfully define the functional requirements, target audience, and app specifications. This phase resulted in a high-level outline of the application and its purpose.
- With the users' expectations well-defined, Barnett was able to design and prototype the application. This phase included wireframes, mockups, and prototyping. Wireframing allowed Barnett to visualize the basic structure of the application. Mockups (implemented using Adobe Xd) allowed Barnett to visualize the structure along with the ornamental design of the application. Finally, prototyping allowed Barnett to better understand the view hierarchy and navigation between the views.
- In accordance with the MVVM architecture, all views in Persona Pop simply present data. Because views are what the end-users interact with, a view can contain functionality for user interactions, visual behaviors, and communication with the view model. Even with that functionality, a view can never directly modify data. Communication between the view model and view is accomplished by using the
@EnvironmentObject
property wrapper when declaring the view model in the view. The@EnvironmnetObject
property wrapper tells the view to watch the view model for any state changes.
- A view in Persona Pop is a complex composition of smaller views called sub-views. A sub-view is a custom view defined in a separate structure (and often a separate file) from the view it is a component of. For example, the view defined in LevelGrid.swift is composed of sub-views defined in LevelIcon.swift and UnlockLevelPopUp.swift. In Swift, a view is simply a structure that conforms to the
View
protocol. This protocol provides modifiers that Barnett uses to configure the views.
- In accordance with the MVVM architecture, the backend code is split between models and view models. Models are Persona Pop's domain model as well as validation logic. View models encapsulate a model by only exposing relevant data to the views. When state changes occur in the Model, the view model notifies the relevant views to update.
- The communication between the view models and views is accomplished with the
ObservableObject
protocol. TheObservableObject
protocol allows specific properties to be marked with the@Published
property wrapper so that changes to the property notify relevant views to update. The view models communicate with the models by calling the model's methods. For example, the view model defined in CoinController.swift encapsulates the model defined in CoinModel.swift, and communicates with the view defined in Artwork.swift.
- One challenge Barnett faced is deciding where to store the user's data. Using a DBMS comes with many useful predefined features but can also add a lot of overhead if the features provided are unnecessary for the application. File processing reduces the overhead, but many features will have to be developed by hand. Since Persona Pop does not collect large amounts of user data, only requires single-user access, and requires minimal scaling in the future, file processing is used to store data.
- Data in Persona Pop is stored on the device using JSON. When a user makes a change to the application's data, the corresponding model instance is encoded as JSON. This JSON file overwrites the preexisting JSON file of the same name. When the user opens the app, the previously saved JSON is decoded back into the model instance, allowing the user to resume where they left off.
- Barnett implemented unit tests with the XCTest framework. This framework seamlessly integrates with Xcode's testing workflow. Unit tests allow Barnett to test methods and functions across his project for the proper output. Using
XCTAssert...(...)
functions Barnett was able to test his back-end code. This ensured that Persona Pop will be ready for production and a wide variety of inputs.