Need some coding help re: doc.putProperties (Swift 3)

I’m somewhat new to both Xcode, Swift 3 and Couchbase and have been trudging through code samples and learning through online tutorials and YouTube videos. I’m playing around with some fun learning ideas and am stuck. So what I’m trying to do is create a geofence and whenever it gets entered, I’m sending a log of that event to a Couchbase Sync Gateway (which I have successfully linked to a Couchbase backend database).

The error I’m receiving is specific to Swift 3.0 and it probably is just some technicality. Once the geofence event gets triggered, I pop up a debug message and that is where I’m trying to also submit a document to Couchbase. However, I’m running into a compile error. I’m hoping someone can see what I need to change in order to get this done. It probably has to do something with adding this code in an extension to AppDelegate and I’m just not quite experienced to figure it out yet.

Please see the error screen below.

Appreciate any time in advance,

P.S. I took the sample code from the To-Do List as a basis of this exercise. If I comment out that code section, everything else is ok and it works when I enter the geofence.

In Swift, error handling is built into the language (and acts a lot like exceptions in other languages.) Anywhere an Obj-C method has a final parameter of type NSError**, you omit that parameter in Swift. (Be sure to read the chapter on error handling in the Swift book.)

Hi there jens. Thanks for the advice and after removing that, using the suggested changes and trying out a few things I was able to successfully insert a document when the geofence event was triggered. I do need to add better error handling and when I have something worked out, I will post the snippet in case someone else wants to see how I handled it.