Day 17: Swift macOS password manager for people who hate the cloud
Tags: macos, swift, passwordmanager, cloud
Published: 2019-01-18 04:42:47

---
title: Day 17: Swift macOS password manager for people who hate the cloud
published: true
description: Follow along as I make a 100% cloudless and 100% native password manager for macOS. That's 200% raw password managing power.
tags: macos, swift, password manager, cloud
series: Making a swift MacOS password manager for people who hate the cloud
cover_image: https://thepracticaldev.s3.amazonaws.com/i/q6r73zbfbm3mpfs98bu5.jpg
---

[<- For Day 16 go here](https://dev.to/swlkr/day-16-swift-macos-password-manager-for-people-who-hate-the-cloud-2bi7)

📅 01/17/2019
🚀 13 days until launch
🔥 16 day streak
💰 $2.99 price (into cup of coffee territory now)
🤑 $0 revenue
📈 0 customers
⌚️ 18.5 hours spent
💻 ----
🏁 Today's goal: **Encrypt sqlite database**

**7:10 AM**
I realized that although it seemed like a good idea to put the passwords as keychain values with UUIDs, it's not a good idea. The keychain can get uploaded to iCloud independently of the app, which kind of defeats the purpose. I'm going to try to instead just store the master password in the keychain and store the passwords in SQLite, which means I need to hook up the master password to SQLite, which I did not do before 😬

**8:05 AM**
I'm kind of overwhelming myself here, but I learned a crap ton about the limitations of NSToolbar and how to work around them. I also learned about SplitViews today and I kind of didn't realize how terrible my implementation of a fixed-width TableView was combined with a fixed-width ContainerView. So combine that with the keychain, sqlite encryption and… the list goes on.

Oh! Also today I was tired and lost all of my work on the copy buttons from yesterday via `git —reset hard head` while it was uncommitted. Checked the `reflog`, no such luck 😅

Sigh. I'll pick this up after work. Not a good idea with 13 days left to launch to start from scratch, but GOING TO ANYWAY 💪

**6:18 PM**
Started a little later, had to pick up some new floor for my house because carpet and vinyl ain't good enough bruh 🙅‍♀️ Alright, let's see where I'm at in like 2 hours

**9:19 PM**
Three hours later. I've started over completely from scratch and have been coding furiously. I actually did a good thing this time. The SQLite db is encrypted with the master password you set 🎉. It's almost like this thing is worth paying money for now! Except… you can't store passwords or copy them anymore 😅 Here's what it looks like now. Barren 🏜

![](https://thepracticaldev.s3.amazonaws.com/i/5d976an5sbn257ig1ly4.gif)

And no I don't know why it jumped out of the frame of my recording like that. One other weird thing I'll have to deal with.

Alright so let me just break down today one more time for my own sanity:

- Started a brand spankin' new xcode project after 16 days
- Actually [encrypted the SQLite database with the master password you set](https://github.com/stephencelis/SQLite.swift/issues/861#issuecomment-455423412)
- Switched from Carthage to Cocoapods
- Read up on *state of the art* AppKit UI stuff (nstoolbar/faux toolbars and split views)
- Store just the master password in the keychain, and everything else in the encrypted SQLite file

Come back tomorrow for more sadness and despair as the launch deadline looms over me like a dark cloud! See you then! 👋