Starting a new project recently and:
- Wading in to the SwiftData waters and added saving to a context, and I’m impressed. Gave the app an infinite loop at the view layer and we’ll fix that later.
- Doodled a couple candidates for a development and alternate app icon! Someone has to bring a little culture.
- Just that tiny bit of progress today but the momentum is what’s important.

Little clean-ups and place setting / writing plans for the next improvements:
- Fixed that loop lol
- Switched from dataTask completion handlers to Combine's dataTaskPublisher
- TIL don't use @Model var id because that field name is already taken
- Hm that's weird though, the docs say it's persistentModelId but Xcode 15.0.1 gives me id in the definition.
- developer.apple.com/documentat

Tonight:
- Punting on API client safety, moved initial fetch from .onAppear to .task
- Started building Add[Redacted]View for the most common essential data entry to add a new model (UI first, data later). Forms and pickers!
- Removed unused code
- 🎶 Lots of Avett Brothers and feelings

Today:
- Added a preview for the first Form view
- Fixed preview for main view (need to add mock user data)
- Writing notes to connect model work with submitting this form
- Took a detour to build out fetching account info and then returned to pre-populate the form
- Hit a 401 when requesting account info
- Figured out I need to use the accessToken from the token body response
- Pre-filled that info on the form
- Display user's name on main page
- Lots more // TODO

Tonight:
- Added more data types
- Added more Form UI
- Moved Form State vars into actual model
- Picker

Today
- No luck with my previews yet (likely have to mock out API client)
- add parsing/serializing idempotency test to main model (failing)
- add suggestions list for Manufacturer field with network fetch and SwiftData storage (pretty useful!) (more work to connect selection to main model)
- add KeychainSwift dependency
- add AuthenticatedUser (new) owns User (existing)
- add keychain caching for OAuth token — auto-login if the session is still valid!

Today 2:
- failing to set up a server instance locally
(must have a dev server to spare polluting production)
- more on this later

Codable + network API

Today:
- add a development app icon from a doodle!
- change one more model field to optional, fetching correctly now

Today:
- local development server set up
- failing on the Postgres and reaching out to the project folks for help
- might be on the ‘wrong’ Linux, might be making a silly mistake
- blocks app development for anything that writes to the API ☹️

Today:
- it is a server project issue and we’re triaging
- 📝 after that I’ll need to write a GettingStarted.md guide

Today:
- got the dev server working!
- This is not a reproducible build
- This is not a place of honor 🫣
- That GettingStarted.md is calling me and it'll be starting from zero. Might come back to it later
- Need a breather after this but glad I have a checkpoint

jack

@j4ck@iosdev.space

Also Thursday (previous post):
- Added environment variables to xcconfig
- Added showing the env in new SettingsView

Today:
- Fixed api host url to include the port
- Added config for local environment!
- Failing to get an access token from the local dev server during OAuth, asked for help
- Added sign-out button to Settings if authenticated
- Added Settings view to sign-in page to show the current env
- Added notes

November 18, 2023 at 3:43:12 PM
(Edited)

To recap this critical path needs the local dev server to build POSTing models and that’s The first full feature to build. I can't fully develop in production. While I wait for some expert advice on this missing OAuth redirect I could:
- do a side-quest with a Swift package idea for this side-project
- build other features like Search or UI refinements
- take a look at server PRs and open tickets
But I have to pick carefully to keep my energy.

Today:
- wrote that Getting Started guide for installing on Ubuntu

jack’s close-xcode-and-go-to-bed-at-a-reasonable-hour-challenge level: impossible

Show Full thread

I am _reminded_ that Foundation's URLRequest and Swift's Codable don't have support for HTTP multipart forms

"Hey get out of here! No programming in the house! Take that outside on the weekends. We _just_ got the PR queue cleaned up.”

Today [1/2]:
- 💃 Yay just POSTed my first test model through my app!
- Turns out this API supports test=true in production
- Checked with Proxyman 😅
- Added alternate app icons as a treat
- Fixed previews by adding missing models!
- See forTypes param developer.apple.com/documentat
- Add super lazy 2 column layout on main page, that'll get changed
- Wrapped the post-auth user model write in a transaction but still getting hangs, hmm…

Elk Logo

Welcome to Elk!

Elk is a nimble Mastodon web client. You can login to your Mastodon account and use it to interact with the fediverse.

Expect some bugs and missing features here and there. Elk is Open Source and we're actively improving it as a community project. Join us and let's build it together!

If you'd like to report a bug, help us testing, give feedback, or contribute, reach out to us on GitHub and get involved.

To boost development, you can sponsor the Team through GitHub Sponsors. We hope you enjoy Elk!

Joaquín SánchezAnthony FuTAKAHASHI Shuuji三咲智子 Kevin DengPatakDaniel Roe

The Elk Team