App crashing when I attempt to authorize HealthKit

I am running this code:
Code Block swift
healthStore.requestAuthorization(toShare: types, read: types) { (success, error) in
if !success {
fatalError("we ned that data to shar to fcebok")
} else {
}
}

Then I get an error at runtime:
Code Block
_NSCFString * "*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil" 0x0000600003fd4af0

Is this HealthKit? I can't seem to see what I am doing wrong.
By the way, the fatal error message is a joke.

Answered by Dr_Beta in 616665022
Its a HealthKit problem
Accepted Answer
Its a HealthKit problem
App crashing when I attempt to authorize HealthKit
 
 
Q