This repo started out as a list of all the Mastodon iOS apps I've found, but now it's also the issue tracker for my fediverse app in progress (available on Testflight) and a Swift package that currently comprises the middle layer between the UI and a fork of TootSDK.
While the development of both packages is oriented toward the app, the idea is to keep the TootSDK fork generally useful while the Fedicat package is app-specific, although it is an example how you can maintain session state, handle multiple sessions, and deal with multiple platforms. Feel free to use/fork/copy, but development is active so don't expect stability.
The overall of list of forked and non-forked Swift packages used by Fedicat includes AlertToast, EmojiText, Fedicat, HTML2Markdown, ImagePickerView, Nuke, SwiftCollections, SwiftNIO, SwiftSoup, SwiftKeychainWrapper SwiftUI-Flow, SwiftUIKit, SwiftSys, and TootSDK.
Try to follow the Swift API Design Guidelines
Formatted and checked with swift-format.