Reputation: 740
I'm trying to ask permissions for pedometer data again but the alert not showing up any ideas why this is happening tried to restart the device delete the app but no luck heres my example code in swift
let pedometer = CMPedometer()
let now = NSDate()
let calendar = NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian)
let midnightOfToday = calendar!.startOfDayForDate(now)
pedometer.startPedometerUpdatesFromDate(midnightOfToday, withHandler: { (data:CMPedometerData?, error:NSError?) -> Void in
print(data?.numberOfSteps)
})
Upvotes: 1
Views: 662
Reputation: 2187
There's no way to do it on a per-app basis, but you can do a global reset.
Settings->General->Reset->Reset Location & Privacy
Upvotes: 1