These two lines of code do not work, but I have yet to find a simple way to create a new document and an attachment.
CouchRevision* revision = [self.database documentWithID:name].currentRevision;
CouchAttachment* attachment = [revision createAttachmentWithName:@"photo" type:@"image/jpeg"];
The problem is that .currentRevision appears to return nil for an new (unsaved) document. I see that CouchModel cheats with a private CouchAttachment.initWithParent:name: metadata: method, so there seems to be a general need to do this.