What is Nostr?
tyiu / Terry Yiu
npub1yau…vjmf
2024-11-28 00:43:46

Nostr SDK for Apple Platforms - OpenSats 90-Day Progress Report # 1: Aug - Oct 2024

NOSTR SDK FOR APPLE PLATFORMS

Progress Report # 1: Aug - Oct 2024

Nostr SDK for Apple Platforms made great strides this quarter. I was the sole developer who maintained Nostr SDK for Apple Platforms part-time, as the other core contributors, unfortunately, could not commit time to developing or reviewing code for the project.

Approximately 50% of the tasks listed in the original OpenSats application have been completed. Moreover, implementations of several other NIPs / event kinds not listed in the application were fixed or added.

There was a substantial architecture change in how Nostr event kinds are built to improve the project’s code maintainability and scalability as more NIPs and event kinds are supported. Specifically, certain event kinds support several handfuls of tags, some of which have complex logic. This requirement resulted in the introduction of a large, unmaintainable number of parameters in event creation methods in the EventCreating protocol. Multiple event kinds share some tags, but the EventCreating architecture made it difficult to share logic. By deprecating the EventCreating protocol in favor of the NostrEventBuilding protocol, we can encourage a composable architecture: decompose each event kind tag into a separate builder function, and tags shared across multiple event kinds can re-use the same code. This architecture change has and will pay dividends in future changes. For example, labels, custom emojis, and threading are concepts and tags shared across multiple event kinds, and their implementation has been made substantially more manageable with this architecture. Vitor Pamplona), developer of Amethyst, applauded the architecture design by saying: It's nice indeed. I will be copying your SDK patterns on Kotlin :)

I battle-tested Nostr SDK for Apple Platforms in the wild by integrating it into Comingle iOS, an events app powered by Nostr, solely developed by me. It was launched and used at Nostriga in August 2024 for attendees to see the conference schedule and RSVP to talks. It proved that a developer could quickly use the SDK to build a functional iOS app on Nostr using Swift.

1) How did you spend your time?

Below is a broken-down summarized bulletpointed list of completed tasks.

Development of Nostr SDK for Apple Platforms

Added

Updated

In Progress

2) What do you plan to work on next quarter?

The remaining items in the original application to OpenSats include:

  • Deprecate EventCreating protocol in favor of NostrEventBuilding protocol for the remaining event kinds
  • Provide better support for integrating data models with persistence layers
  • Add unit tests and graceful handling for bad data from relays
  • Outbox model support / relay abstraction on top of events
  • Integrate demo app with more implemented NIPs
  • Integrate Nostr SDK for Apple Platforms further into Comingle iOS for further battle-testing
  • Support Damus, Nos.social, Primal, and other clients as they integrate with parts of the SDK by answering questions, fixing any issues they have, adding requested features, and reviewing pull requests
  • Consider integrating SDK NIP-44 v2 encryption or NIP-17 DMs with Damus iOS to battle-test implementation and push for deprecation of NIP-04 DMs
  • NIP-28 Public Chat - Review pull request from external contributor developing Skatepay
  • NIP-47 Nostr Wallet Connect - Review pull request from external contributor
  • NIP-57 Lightning Zaps

3) How did you make use of the money?

Living expenses.

Author Public Key
npub1yaul8k059377u9lsu67de7y637w4jtgeuwcmh5n7788l6xnlnrgs3tvjmf