I have an app I am testing on iOS 10 Beta 3 currently, and for some odd reason whenever I execute this one method, it seems to be crashing on the startPedometerUpdatesFromDate
line below:
if (!_pedometer) {
_pedometer = [[CMPedometer alloc] init];
}
[_pedometer startPedometerUpdatesFromDate:[NSDate date] withHandler:^(CMPedometerData * _Nullable pedometerData, NSError * _Nullable error) {
I have confirmed that _pedometer
is not nil
and it is even more odd as it worked in iOS 9 before I upgraded.
There is nothing in the console that suggests anything wrong with the code, and when it crashes it just leads to this (even with exception breakpoints):
libsystem_kernel.dylib`__abort_with_payload:
0x183a58d94 <+0>: movz x16, #0x209
0x183a58d98 <+4>: svc #0x80
-> 0x183a58d9c <+8>: b.lo 0x183a58db4 ; <+32>
0x183a58da0 <+12>: stp x29, x30, [sp, #-16]!
0x183a58da4 <+16>: mov x29, sp
0x183a58da8 <+20>: bl 0x183a3d7dc ; cerror_nocancel
0x183a58dac <+24>: mov sp, x29
0x183a58db0 <+28>: ldp x29, x30, [sp], #16
0x183a58db4 <+32>: ret
I also made sure to include Privacy - Health Update Usage Description and Privacy - Health Share Usage Description in my Info.plist. It is also being tested on an iPhone 6 Plus so I am not quite sure what the issue could be. Is there anything I am missing?