Ursus 1.3.0

Ursus 1.3.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jul 2020
SPMSupports SPM

Maintained by Daniel Clelland.



 
Depends on:
Alamofire~> 5.2
UrsusAtom~> 1.0
 

Ursus 1.3.0

  • By
  • Daniel Clelland

Ursus

An Urbit HTTP/%eyre client for iOS/macOS in Swift.

See my Ursus Chat repository for a demo project.

Usage

Ursus is very much a work in progress - better documentation and a demo app to come. Here's a quick sketch for now:

let ursus = Ursus(url: URL(string: "http://localhost")!, code: "fipfes-fipfes-fipfes-fipfes")
ursus.loginRequest() { ship in
    ursus.subscribeRequest(ship: ship, app: "chat-view", path: "/primary") { event in
        print("On subscribe event:", event)
    }
}

Installation

Ursus can be installed using Cocoapods by adding the following lines to your podfile:

pod 'Ursus', '~> 1.2'

I can probably help set up Carthage or Swift Package Manager support if you need it.

Todo list

Things that would make this codebase nicer:

  • Add support for new %scry endpoint
  • Should the new %logout endpoint clear the urbauth cookie?
  • Pass IDs back through to the event handlers so unsubscribe requests can be made.
  • Test AckRequest, UnsubscribeRequest, DeleteRequest properly.
  • Better documentation/examples.

Other clients

Dependencies