I'm trying to decode a .fit file using the Swift SDK. It's generally all working, apart from decoding Developer Data.
I can decode the Field Descriptions and the Developer Data ID messages without any problems.
However, when I attempt to retrieve the developer data form the Session or Record messages, I'm unable to retrieve the data.
I"m basing my Swift code on the CS code showing in the Fit Cookbook.
My code is:
for record in listener.messages.getRecordMesgs() {
for devField in record.getDeveloperFields() {
let thisField:FITDeveloperField = devField as! FITDeveloperField //Convert 'Any' to 'FITDeveloperField'
print(thisField.getValueFor(0)) // Works
print(thisField.getUnits()) // No function
print(thisField.getName()) // No function
}
}
Any ideas where I'm going wrong? It seems like some of the functions I'd expect aren't available in the Swift SDK.
Thanks
Stuart