nikolouzos / swiftui-notes

A simple note-taking application written using SwiftUI. The backend is managed using Google's Firebase (Firestore).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwiftUI Notes - A note-taking application

A fun note-taking application built with SwiftUI and Firebase Firestore

Build Status

Contents

Summary

This is a simple note-taking application that supports user accounts. Each user has their personal notes. They can add or edit any of their notes. Notes can be archived when their purpose has been fulfilled. You can see your archived notes and re-activate them. Notes can be edited by multiple users. You can invite a user to edit a note by entering their phone number. They will receive a notification with the option to accept or reject the invite.

The notes

The notes can contain text and/or checklists. You can combine those two formats (unlike Google Keep for example, where only one format is available at a time). The notes can be edited in realtime on any device and, on save, they will be updated (thanks to Google's Firebase Firestore).

The challenge

Apart from this being a SwiftUI learning experience, I want to challenge myself to enforce Test-driven development (TDD) principles. The goal is to write easily maintainable, well documented and well tested code that integrates easily with Bitrise's workflows.

How to build and run this app

To run this app you will need MacOS 10.14+ (Mojave) and Xcode 11. To use the live preview feature of SwiftUI, you will need MacOS 10.15+ (Catalina). Also, I am currently not uploading the GoogleService-Info.plist file, which is needed to configure the Firebase SDK, but you can download a demo file from here (Link not working yet).

Edit: I elected to add GoogleService-Info.plist to the project in the end. The file is not really protected (anyone with a malicious intent can gain access to it easily), so there's no reason to not include it. The correct way to protect your project is to write rules and test them thoroughly.

Steps to run the application

  1. Clone the project.
  2. Open a Terminal and navigate to the project directory.
  3. Run pod install from the Terminal. (If you haven't installed Coocoapods you can get it from here).
  4. Pray Xcode doesn't explode.
  5. Run the application.

Tools used

The SwiftUI framework was used to code this application. The MVC (Model-View-Controller) architecture is followed loosely. To ensure the best coding practices and formatted are enforced, SwiftLint was used. For logging, I used SwiftyBeaver. Also, BitriseCI was used to run automated tests. The application was written using Xcode 11 beta 6, on MacOS Catalina (10.15) beta.

Note: this application will ONLY work on iOS 13.0+, which is currently in beta

CocoaPods dependencies

Library Link
Firebase Link
SwiftyBeaver Link
Crashlytics Link
SwiftLint Link

This list was last updated on 21st August 2019.

About

A simple note-taking application written using SwiftUI. The backend is managed using Google's Firebase (Firestore).


Languages

Language:Swift 97.3%Language:Ruby 2.7%