Is there anyway to add an array of HKWorkouts to UserDefaults or do I have to save the array in core data?
HKObject
and its subclasses conform to NSSecureCoding
, so you can convert an array of them to Data
using NSKeyedArchiver
. See the NSKeyedArchiver documentation for more details.