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

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -