Nonstop Swift SDK
Getting Task Details
There are some scenarios where the containing Client needs to know what is on offer to the user for completing a given task.
The main example of this is in order to present the correct information to logged out users in marketing scenarios such as on-boarding.
The Client application can call Nonstop with a given task type:
Nonstop.sharedInstance.getTaskDetails(taskType: taskType).subscribe { event in
switch event {
case .success (let taskDetails):
// Details of the Task
case .error (let error):
// Something went wrong
}
}.disposed(by: disposables)
The taskDetails response has the following properties:
pointsAvailable: Int?- The number of points the user would receive for completing that TaskpointsAvailableDisplay: String- The number of points the user would receive for completing that Task, correctly formatted for display to the user.animation: LOTAnimationView?- The animation to integrate into your UI