pdf - Saving an email consent doc in researchkit (swift 3.1) -
i able save , email pdf of consent form research kit. currently, have following code generate pdf
let signatureresult : orkconsentsignatureresult = taskviewcontroller.result.stepresult(forstepidentifier: "consentreviewstep")?.firstresult as! orkconsentsignatureresult
let consentdocument = consentdocument.copy() as! orkconsentdocument signatureresult.apply(to: consentdocument) consentdocument.makepdf { (data, error) -> void in var documentspath = nssearchpathfordirectoriesindomains(.documentdirectory, .userdomainmask, true)[0] documentspath.append("consent.pef") var documentsurl = nsurl.fileurl(withpath: documentspath) try? data?.write(to: documentsurl, options: [.atomic]) }
this first fails error terminating app due uncaught exception 'nsobjectnotavailableexception', reason: 'signature title missing'
not sure go here part working, before moving on mailing function.
Comments
Post a Comment