Is your feature request related to a problem? Please describe.
Currently, question flows are hardcoded. Ideally, question flows are read from a JSON file. This is easier to modify and it would allow providing question flows from web sources
Additional context
Reading a file is surprisingly difficult to implement in XCode. Below is the read function from the freelancers to start off of.
It was part of the code until Build 17 and was in "cozie-apple/Cozie WatchKit Extension/InterfaceController.swift"
private func readLocalFile(forName name: String) -> Data? {
do {
if let bundlePath = Bundle.main.path(forResource: name,
ofType: "json"),
let jsonData = try String(contentsOfFile: bundlePath).data(using: .utf8) {
return jsonData
}
} catch {
print(error)
}
return nil
}
Is your feature request related to a problem? Please describe. Currently, question flows are hardcoded. Ideally, question flows are read from a JSON file. This is easier to modify and it would allow providing question flows from web sources
Additional context Reading a file is surprisingly difficult to implement in XCode. Below is the read function from the freelancers to start off of. It was part of the code until Build 17 and was in "cozie-apple/Cozie WatchKit Extension/InterfaceController.swift"