loading...
Cover image for Day 5: Making a swift macOS password manager for people who hate the cloud

Day 5: Making a swift macOS password manager for people who hate the cloud

swlkr profile image Sean Walker Originally published at streaking.app ・2 min read

Making a swift MacOS password manager for people who hate the cloud (32 Part Series)

1) Day 1: Making a swift macOS password manager for people who hate the cloud 2) Day 2: Making a swift macOS password manager for people who hate the cloud 3 ... 30 3) Day 3: Making a swift macOS password manager for people who hate the cloud 4) Day 4: Making a swift macOS password manager for people who hate the cloud 5) Day 5: Making a swift macOS password manager for people who hate the cloud 6) Day 6: Making a swift macOS password manager for people who hate the cloud 7) Day 7: Making a swift macOS password manager for people who hate the cloud 8) Day 8: Making a swift MacOS password manager for people who hate the cloud 9) Day 9: Making a swift macOS password manager for people who hate the cloud 10) Day 10: Making a swift macOS password manager for people who hate the cloud 11) Day 11: Making a swift macOS password manager for people who hate the cloud 12) Day 12: Swift macOS password manager for people who hate the cloud 13) Day 13: Swift macOS password manager for people who hate the cloud 14) Day 14: Swift macOS password manager for people who hate the cloud 15) Day 15: Swift macOS password manager for people who hate the cloud 16) Day 16: Swift macOS password manager for people who hate the cloud 17) Day 17: Swift macOS password manager for people who hate the cloud 18) Day 18: Swift macOS password manager for people who hate the cloud 19) Day 19: Swift macOS password manager for people who hate the cloud 20) Day 20: Swift macOS password manager for people who hate the cloud 21) Day 21: Swift macOS password manager for people who hate the cloud 22) Day 22: Swift macOS password manager for people who hate the cloud 23) Day 23: Swift macOS password manager for people who hate the cloud 24) Day 24: Swift macOS password manager for people who hate the cloud 25) Day 25: Swift macOS password manager for people who hate the cloud 26) Day 26: Swift macOS password manager for people who hate the cloud 27) Day 27: Swift macOS password manager for people who hate the cloud 28) Day 28: Swift macOS password manager for people who hate the cloud 29) Day 29: Swift macOS password manager for people who hate the cloud 30) Day 30: Swift macOS password manager for people who hate the cloud 31) Day 31: Swift macOS password manager for people who hate the cloud 32) How did my password manager do after launch?

<- For Day 4 go here

Living life

I know it might seem like a daily streak thing is a bad idea, I mean, what happens when you actually live your life instead of code all day? What happens then? Today, I went snowboarding with some friends who flew into town and I had a great time! I only fell a few times and amazed myself! I'm not an expert snowboarder by any means, or even a good one, so that was cool.

The streak must continue

Look, I've been writing every day for 34 days, and coding this product for 4 days, I can't break the streak just because I lived my life today! The streak goes on. There's only 30 minutes until I pass out from exhaustion, so let's see what I can whip up. Turns out, not much. I did manage to slap labels and text fields on the view though, so that's something. I messed around with tucking the sqlite code away behind a struct, I might try something where inheritance or protocols is involved, so I wind up with something similar to active record, here's where I left off:

import SQLite

struct Login {
    let id = Expression<Int64>("id")
    let username = Expression<String?>("username")
    let email = Expression<String>("email")
    let key = Expression<String>("key")
    var db: Connection

    static func database() -> Connection {
        let path = NSSearchPathForDirectoriesInDomains(
            .applicationSupportDirectory, .userDomainMask, true
            ).first! + "/" + Bundle.main.bundleIdentifier!

        do {
            try FileManager.default.createDirectory(
                atPath: path, withIntermediateDirectories: true, attributes: nil
            )
        } catch {
            print("Unexpected error: \(error).")
        }

        var conn : Connection?
        do {
            conn = try Connection("\(path)/app.db")
        } catch {
            print("Unexpected error: \(error).")
        }

        return conn!
    }

    init() {
        db = Login.database()
    }
}

Tune in tomorrow for Day 6 🔥

Making a swift MacOS password manager for people who hate the cloud (32 Part Series)

1) Day 1: Making a swift macOS password manager for people who hate the cloud 2) Day 2: Making a swift macOS password manager for people who hate the cloud 3 ... 30 3) Day 3: Making a swift macOS password manager for people who hate the cloud 4) Day 4: Making a swift macOS password manager for people who hate the cloud 5) Day 5: Making a swift macOS password manager for people who hate the cloud 6) Day 6: Making a swift macOS password manager for people who hate the cloud 7) Day 7: Making a swift macOS password manager for people who hate the cloud 8) Day 8: Making a swift MacOS password manager for people who hate the cloud 9) Day 9: Making a swift macOS password manager for people who hate the cloud 10) Day 10: Making a swift macOS password manager for people who hate the cloud 11) Day 11: Making a swift macOS password manager for people who hate the cloud 12) Day 12: Swift macOS password manager for people who hate the cloud 13) Day 13: Swift macOS password manager for people who hate the cloud 14) Day 14: Swift macOS password manager for people who hate the cloud 15) Day 15: Swift macOS password manager for people who hate the cloud 16) Day 16: Swift macOS password manager for people who hate the cloud 17) Day 17: Swift macOS password manager for people who hate the cloud 18) Day 18: Swift macOS password manager for people who hate the cloud 19) Day 19: Swift macOS password manager for people who hate the cloud 20) Day 20: Swift macOS password manager for people who hate the cloud 21) Day 21: Swift macOS password manager for people who hate the cloud 22) Day 22: Swift macOS password manager for people who hate the cloud 23) Day 23: Swift macOS password manager for people who hate the cloud 24) Day 24: Swift macOS password manager for people who hate the cloud 25) Day 25: Swift macOS password manager for people who hate the cloud 26) Day 26: Swift macOS password manager for people who hate the cloud 27) Day 27: Swift macOS password manager for people who hate the cloud 28) Day 28: Swift macOS password manager for people who hate the cloud 29) Day 29: Swift macOS password manager for people who hate the cloud 30) Day 30: Swift macOS password manager for people who hate the cloud 31) Day 31: Swift macOS password manager for people who hate the cloud 32) How did my password manager do after launch?

Posted on Jan 6 '19 by:

swlkr profile

Sean Walker

@swlkr

Takes hikes 🏔 Makes sites 👨‍💻

Discussion

markdown guide