Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Developer Fields of activity don’t work on iOS

Rank

Total Posts: 1

Joined 2020-02-27

PM

Hello team,

I am working with latest FIT SDK release 21.22.00 of 2020-01-23.
I am using the iOS provided cpp library, libFitSdkCppiOS.a
iOS version 13.3, Xcode 11.3.1

Running the provided example I have the following problems.
The ActivityExample.mm doesn't work saving the developer field "doughnuts_earned". It seems as if the last message written to the file is the one before the first
newRecord.AddDeveloperField(doughnutsEarnedField 
call. If I switch the version from V10 to V20
super.fe [[FitEncode alloc] initWithVersion:fit::ProtocolVersion::V20] 

it seems that it is saved because the file size gets bigger the more doughnuts_earned are saved.
But then the decode function has problem. It terminates with error
"Missing FIT message definition for local message number 1. Error at byte: 0"

If I don't add the developer field to the message (don't call the AddDeveloperField function) then the file is read. Of course no doughnuts are to be found but the field_description message of the doughnuts seems correct.

I also tried encoding a real activity with longitude, latitude, speed, cadence, power and all the rest. This is successful as long as I don't add any developer fields. When I add a developer field the app crashes.
Specifically after I create a few thousand fit::RecordMesg messages with a developer field added through AddDeveloperField call, then I write all the records as in the example
for (auto record records{ [super.fe WriteMesg:record];
Then I write another message and the app crashes as soon the last line below is executed.
fit::EventMesg event1;
event1.SetTimestamp(fitEndTime);
event1.SetEvent(FIT_EVENT_TIMER);
event1.SetEventType(FIT_EVENT_TYPE_STOP_ALL);
event1.SetEventGroup(0);
[super.fe WriteMesg:event1]
the crash is
"malloc: *** error for object: pointer being freed was not allocated" and from the stack trace seems to have to do with the developer field.
Moreover if I try to decode a valid FIT file with extra developer fields, the provided FIT decoder (from the example) seems to work, but the records report 0 developer fields. The developer field description seems to be decoded correctly though.
So there seem to be problems both in the encoding and decoding functions.

Any help will be greatly appreciated.
     
Rank

Total Posts: 15

Joined 2020-02-05

PM

Lambros,

We will have a fix for this in the next release of the FIT SDK. There is a fix for both encoding and decoding FIT files containing developer data. I'll let you know when we have an exact date, but it should be in the next 3-5 weeks.

Ben      
Rank

Total Posts: 5

Joined 2020-09-08

PM

Ben P. - 17 March 2020 10:41 AM
Lambros,

We will have a fix for this in the next release of the FIT SDK. There is a fix for both encoding and decoding FIT files containing developer data. I'll let you know when we have an exact date, but it should be in the next 3-5 weeks.

Ben


Hi, i am planning to develop my own iOS app which should able to receive ANT+ sensors HR data from at least 30 sensors. So, do you have the iOS SDK support this ? Any suggestion to do this ? Would be a great help.

Thanks.      
Rank

Total Posts: 15

Joined 2020-02-05

PM

jams2014 - 13 September 2020 01:16 AM


Hi, i am planning to develop my own iOS app which should able to receive ANT+ sensors HR data from at least 30 sensors. So, do you have the iOS SDK support this ? Any suggestion to do this ? Would be a great help.

Thanks.


The fix for developer data in the iOS FIT SDK was released in version 21.27, which was released in April of this year. For ANT+ related questions, specifically for mobile applications, there is an ANT+ Mobile forum that you might find helpful. https://www.thisisant.com/forum/viewforum/30/

Ben