Skip to content

Latest commit

 

History

History
86 lines (63 loc) · 3.96 KB

README.md

File metadata and controls

86 lines (63 loc) · 3.96 KB

Activity Pub Explorer

Swift Version

Toy app to explore how Mastodon and ActivityPub feeds in general might be handled with Swift / SwiftUI

None of this should be used as an example of best practices.

Files this Repo

General in "Generic Services" folder

  • APIServer: Generic Framework baseline for REST APIs
  • HTMLSnippetRender: How to get HTML -> AttributedString for use in SwiftUI
  • RequestService: The network connection/HTTP business
  • StringDictionaryDisplay - A view that takes in a dictionary, spits out LabeledContent views

MSTDN Folder

  • MSTDNStatusItem: https://app.quicktype.io/ generated struct for a status item and related types
  • MSTDNInstanceProfile: https://app.quicktype.io/ generated struct for the instance profile data
  • MSTDNStatusItem+Display: Things that will likely be useful to other API's as well to prep for viewing. Creates the AttributedString. Introspects for available displayable parameters
  • MastodonAPIServer: Mastodon API calls + the server location

StatusListViews

  • FeedVerticalView - this is the main view everything hangs off of

SampleContent folder

  • ExampleInstance - an accessor function for some of the json in this folder
  • misc json

ActivityPub/Fediverse compliance

  • ActivityPubGeneral - Directory for AP general stuff. Not really in use yet.

Resources

Working with URLS and HTTP

Working with API

Working with the JSON

Rendering HTML in the UI

WARNING: Using NSAttributedStrings in a scrolling view, even when passed off to an AttributedString can crash the program if an .id(UUID()) is not used on the view. Which view need the .id exactly seems to change depending on the exact scenario.

AsyncImage

Misc

Release History

Current State: Wouldn't exactly call it "released".

  • 0.0.0.0 - "hello_world"
    • current state of main