I am making an enterprise app using ResearchKit.
I am now in the step of making a pdf with the answers gathered and emailing it.
I know that if you have a Consent Document this is the code for it:
ConsentDocument .makePDFWithCompletionHandler({ (NSData pdfFile, NSError error) -> Void in
// println("pdf created")
// finding document path //TODO: Remove if not needed
let documentsPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] .stringByAppendingPathComponent("Consent.pdf")
pdfFile!.writeToFile(documentsPath, atomically: false)
println(consentDocumentFromDirectory)
})
But what if I do not have a Consent Document?
How should I create the pdf?