Getting available workflows
Get information about the workflows that are synced to the device in order to display them to the user
Get all of the downloaded workflows
The SDK provides a Published variable syncedWorkflows to hold a list of all of the synced workflows to the device.
Each workflow is a struct of Workflow which provides the client a number of public parameters that relate to the workflow, and it's associated resources on the device.
Example usage
Access and show the workflows in a simple list
struct YourApp: View {
@EnvironmentObject var cloneable: CloneablePlatform
var body: some View {
CloneableWorkflowWrapper(cloneablePlatform: cloneable) {
// The rest of your apps views and children views
if (cloneable.syncedWorkflows != nil && !cloneable.syncedWorkflows!.isEmpty){
List {
Section(header: Text("Workflows")
.font(.system(size: 24, weight: .bold))
.foregroundColor(Color.primary)
.textCase(nil)
.padding([.leading], 0)
) {
ForEach(cloneable.syncedWorkflows!) { workflow in
VStack {
Text(workflow.workflowName)
.font(.headline)
Text(workflow.workflowDescription)
}
}
}
}
}
}
}
}Available parameters for each workflow
Each Workflow struct provided in the syncedWorkflows variable includes the following properties. Use these properties to dynamically display information to the user or to decide which workflows to display.
Example usage
The public Cloneable Player app makes use of these variables to determine if all required files are downloaded to the device, if the device supports required HW, and to ensure that the workflow is capable and ready to run prior to starting the workflow
See the open source sample app for example implementation


Last updated

