0

Im using timed walk from researchkit test in an app that uses carekit as well. However, I have no idea why I am getting this error. Any help would be greatly appreciated. This is what I have so far. (error states Use of unresolved identifier)

 import ResearchKit

  public var timedWalk: ORKOrderedTask 
{return ORKOrderedTask.timedWalk(withIdentifier: "Timed  Walk",intendedUseDescription: "Assessment measures balance", distanceInMeters: 3, timeLimit: 13, includeAssistiveDeviceForm: true, options: .excludeConclusion) 

 //Create a question.
let title = "Estimate your fall Risk"
let text = "This assessment measure how fast you walk to estimate your fall risk. Start from a sitting position stand walk 10 feet turn around and  walk back to sitting position"
***let questionStep = ORKQuestionStep(identifier: "Timed Get up and Go", title: title, text: text, answer: answerFormat)*** 
  questionStep.isOptional = false


       //Create an ordered task with a single question
   return ORKOrderedTask(identifier: "Timed Walk", steps: [questionStep])
  • what is the error? or is `intendedUseDescription: Assessment measure, the, balance, ` the error? this swift isn't syntactically correct. I couldn't even parse it myself to figure out how to edit it. it would be very helpful if you could edit the question a bit to make it syntactically correct. – Joe Daniels Dec 09 '16 at 21:14
  • alternately, please be more descriptive in asking for help with swift syntax. – Joe Daniels Dec 09 '16 at 21:15
  • Sorry about that. I corrected the syntax error. I just don't know what to write this code. thanks! – Khalid Mohamed Dec 09 '16 at 21:29

1 Answers1

0

Here's a syntactically correct version of the above code:

public var timedWalk: ORKOrderedTask {
    return ORKOrderedTask.timedWalk(withIdentifier: "Timed Walk",
                                    intendedUseDescription:" Assessment measure, the, balance",
                                    distanceInMeters: 3, timeLimit: 13,  options: .excludeConclusion)
}
Joe Daniels
  • 1,646
  • 1
  • 11
  • 9