textileio / ios-textile

[DEPRECATED] iOS bindings for https://github.com/textileio/go-textile
MIT License
10 stars 6 forks source link

Threads API is has awkward API for using from swift #46

Open Gozala opened 5 years ago

Gozala commented 5 years ago

From what I can tell it's far more convenient to have API that throws than take out parameter in swift. Currently this is how you have to list threads:

var error: NSError? = nil
let threads = Textile.instance().threads.list(&error)
if let reason = error {
  print("Threads Error: \(reason).")
} else {
  print("Threads: \(threads).")
}

It would be more convenient if list threw error

asutula commented 5 years ago

Keeping an overview of Swift issues in #39

asutula commented 5 years ago

Just throwing some references in here that can be used when I fix this: