How to persist filtered event on disconnect
I have setup the metawear to log a filtered event and I am trying to figure out how to retrieve those logs after a disconnect. The event documentation says to use retrieveEventWithIdentifier but when I look at the retrieveEventWithIdentifier documentation it says it is depreciated and to use setConfiguration instead. It isn't clear to me how you would use that instead. In particular, the documentation says that setConfiguration will delete all non-volatile memory when called. Seems like that would delete the logged info that I would want to retrieve.
Can anyone explain the proper way to setup logging and then retrieve the logged data after a disconnect?
This discussion has been closed.
Comments
Thanks Steven. That was very helpful. I am working in swift and relatively new to iOS programming. I have one question about this block: (the forum is limiting my response so will split it up).
[self.device setConfiguration:[[DeviceConfiguration alloc] init] handler:^(NSError *error) {
if (!error) {
// Programming successful!
}
}];
What are you passing as the first argument to setConfiguration? It looks like a new DeviceConfiguration object, but it doesn't have the required coder parameter so I am a little confused.