I have the following code where I want to check for the type of error instance.
if let error = error {
// error is Error
if error is CMErrorMotionActivityNotAuthorized {
}
}
It is giving me error that CMErrorMotionActivityNotAuthorized
is not a type. How can I check that if the error is of type CMErrorMotionActivityNotAuthorized