As much as I search the web, I am unable to locate info on how to integrate the SDK w/ Xcode using Swift (and not objective-C)
Would be appreciated to get some guidance on this,
As much as I search the web, I am unable to locate info on how to integrate the SDK w/ Xcode using Swift (and not objective-C)
Would be appreciated to get some guidance on this,
As you have probably discovered by now, there is no SDK in the "FIT SDK", so nothing to integrate with Xcode (or Eclipse, or VSCode or any other IDE).
The FIT SDK (FitSDKRelease_20.96.00) contains documentation relating to the structure of the FIT file, the very useful fitCSVTool.jar which decodes FIT files to CSV, some sample code in C and java and other useful bits and pieces.
If you want to create or decode FIT files in SWIFT or any other language, you have to start from scratch to implement the syntax in the documentation.
I built a FIT file decoder in PHP to extract very application-specific data for my raceQs yacht racing app, and I'm sure many others have done theirs in various languages for various applications, but it ain't easy!
I have put the parser I used on GitHub as a swift package, which make it easy to integrate to Xcode, just point to the GitHub repo https://github.com/roznet/FitFileParser
There are also an example project available in https://github.com/roznet/fit-sdk-swift
It's based on the official Fit SDK from garmin
Thank you for sharing your project. I am sure there will be a few people interested in it. Looking at your python script that generates the Swift data structures from the FIT C SDK header file... In the FIT SDK, the file Profile.xlsx lists all the messages, fields, scales, offsets, types etc. If you save each worksheet as a CSV file, ie messages.csv and types.csv, and then you can parse those files to generate the data structures for your Swift project. It might be a little less complicated than parsing the header file. The spreadsheet also contains the sub-fields, which are alternative interpretations of some of the fields. The sub-fields are not included in the C SDK. BTW, I am a big fan of FitFileExplorer.
Thanks for the comment on fitFileExplorer. Glad it helps.
Good point and good idea for the Profile.xlsx, I should look at that, will add to the list of issue/ideas for the project
I have now updated the project to parse from the Profile.xlsx file.
a year after, I am finally back to looking at how to utilise FIT files for my project. I went w/ TCX initially as it was text based and easier to decipher and craft and there was a swift based wrapper or SDK-ish for it.
While I did look at your project, (TQ V much) I didn't use it mainly as I needed to encode along with decoding of the fit files.
It's for this project