textileio / ios-textile

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

Updates to return nil where appropriate #16

Closed asutula closed 5 years ago

asutula commented 5 years ago

Slightly different approach in Obj C to get the desired result.

Obj C will gladly create default pb object from nil NSData, so that works great for creating empty list types.

In the case of non-list types, we're relying on the go-textile layer to return an error if a return type that should never be nil is going to be nil.

The only work left to do as seen is this PR is to make sure we return nil in cases where we know it is an acceptable return value from go-textile. This is usually in cases where we're querying for something by id.

asutula commented 5 years ago

Pretty simple one. Going in, but feel free to comment if you thing anything needs to be changed later.