My code is:
if ([CMPedometer isStepCountingAvailable]) { self.pedometer = [[CMPedometer alloc] init]; } else { NSLog(@"Step counting is not available on this device!"); [SVProgressHUD showErrorWithStatus:@"Step counting is not available on this device!"]; }
When I run it on iOS8 and later devices, it says:
Counting steps on this device is not available!
How can I make it available for step counting?
source share