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 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. Development is active so don't expect stability.
Try to follow the Swift API Design Guidelines
Formatted and checked with swift-format.