Awesome
Nostr SDK for Apple Platforms
Nostr SDK for Apple Platforms is a native Swift library that enables developers to quickly and easily build Nostr-based apps for Apple platforms.
Minimum Requirements
- Swift 5.7
- iOS 15
- macOS 12
Spec Compliance
The following NIPs are implemented:
- NIP-01: Basic protocol flow description
- NIP-02: Follow List
- NIP-03: OpenTimestamps Attestations for Events
- NIP-04: Encrypted Direct Message --- unrecommended: deprecated in favor of NIP-17
- NIP-05: Mapping Nostr keys to DNS-based internet identifiers
- NIP-06: Basic key derivation from mnemonic seed phrase
- NIP-07:
window.nostr
capability for web browsers - NIP-08: Handling Mentions --- unrecommended: deprecated in favor of NIP-27
- NIP-09: Event Deletion Request
- NIP-10: Conventions for clients' use of
e
andp
tags in text events - NIP-11: Relay Information Document
- NIP-13: Proof of Work
- NIP-14: Subject tag in text events
- NIP-15: Nostr Marketplace (for resilient marketplaces)
- NIP-17: Private Direct Messages
- NIP-18: Reposts
- NIP-19: bech32-encoded entities
- NIP-21:
nostr:
URI scheme - NIP-22: Comment
- NIP-23: Long-form Content
- NIP-24: Extra metadata fields and tags
- NIP-25: Reactions
- NIP-26: Delegated Event Signing
- NIP-27: Text Note References
- NIP-28: Public Chat
- NIP-29: Relay-based Groups
- NIP-30: Custom Emoji
- NIP-31: Dealing with Unknown Events
- NIP-32: Labeling
- NIP-34:
git
stuff - NIP-35: Torrents
- NIP-36: Sensitive Content
- NIP-38: User Statuses
- NIP-39: External Identities in Profiles
- NIP-40: Expiration Timestamp
- NIP-42: Authentication of clients to relays
- NIP-44: Versioned Encryption
- NIP-45: Counting results
- NIP-46: Nostr Connect
- NIP-47: Wallet Connect
- NIP-48: Proxy Tags
- NIP-49: Private Key Encryption
- NIP-50: Search Capability
- NIP-51: Lists
- NIP-52: Calendar Events
- NIP-53: Live Activities
- NIP-54: Wiki
- NIP-55: Android Signer Application
- NIP-56: Reporting
- NIP-57: Lightning Zaps
- NIP-58: Badges
- NIP-59: Gift Wrap
- NIP-60: Cashu Wallet
- NIP-61: Nutzaps
- NIP-64: Chess (PGN)
- NIP-65: Relay List Metadata
- NIP-69: Peer-to-peer Order events
- NIP-70: Protected Events
- NIP-71: Video Events
- NIP-72: Moderated Communities
- NIP-73: External Content IDs
- NIP-75: Zap Goals
- NIP-78: Application-specific data
- NIP-84: Highlights
- NIP-89: Recommended Application Handlers
- NIP-90: Data Vending Machines
- NIP-92: Media Attachments
- NIP-94: File Metadata
- NIP-96: HTTP File Storage Integration
- NIP-98: HTTP Auth
- NIP-99: Classified Listings
Installation
Nostr SDK can be integrated as an Xcode project target or a Swift package target.
Releases follow semantic versioning.
Xcode Project Target
- Go to
File
->Add Package Dependencies
. - Type https://github.com/nostr-sdk/nostr-sdk-ios.git into the search field.
- Select
nostr-sdk-ios
from the search results. - Select
Up to Next Major Version
starting from the latest release as the dependency rule. - Ensure your project is selected next to
Add to Project
. - Click
Add Package
. - On the package product dialog, add
NostrSDK
to your target and clickAdd Package
.
Swift Package Target
In your Package.swift
file:
- Add the NostrSDK package dependency to https://github.com/nostr-sdk/nostr-sdk-ios.git
- Add
NostrSDK
as a dependency on the targets that need to use the SDK.
let package = Package(
// ...
dependencies: [
// ...
.package(url: "https://github.com/nostr-sdk/nostr-sdk-ios.git", .upToNextMajor(from: "0.2.0"))
],
targets: [
.target(
// ...
dependencies: ["NostrSDK"]
),
.testTarget(
// ...
dependencies: ["NostrSDK"]
)
]
)
Contributing
If you would like to contribute to this library, please see CONTRIBUTING.md.
Contact
These are the core maintainers of this library and their Nostr public keys.
Active Maintainers
Passive / Inactive Maintainers
- Bryan Montz (npub1qlk0nqupxmlyxravg0aqscxmcc4q4tq898z6x003rykwwh3npj0syvyayc)
- Joel Klabo (npub19a86gzxctwtz68l8zld2u9y2fjvyyj4juyx8m5geylssrmfj27eqs22ckt)
Acknowledgements
- OpenSats - Nostr Grant in July 2023
- Swift-DocC Plugin - Apache License 2.0, Apple Inc.
- SymbolKit - Apache License 2.0, Apple Inc.
- secp256k1.swift - MIT License, Copyright (c) 2020 GigaBitcoin LLC
- CryptoSwift - Copyright (C) 2014-3099 Marcin Krzyżanowski
- Bech32 - MIT License, Copyright 2018 Evolution Group Limited
- Nos Data+Encoding.swift - MIT License, Copyright 2024 © Verse Communications