Can't find the logic or the solution of taking the simple answer as string in a array of a ORKStepResult. It was working before with this :
for stepResults in taskViewController.result.results! as! [ORKStepResult] {
for result in stepResults.results! {
switch result.identifier {
case "themaQuestionStep":
if let questionResult = result as? ORKQuestionResult {
questionResultThema = String(questionResult.answer?.objectAtIndex(0))
}
After a time and update (swift & researchkit), it didn't. The line make me crazy is this one :
questionResultThema = String(questionResult.answer?.objectAtIndex(0))
If I do this :
questionResultThema = String(describing: questionResult.answer)
It give me the right response, but in a array :
( 6 )>