Skip to content

Instantly share code, notes, and snippets.

@drewB
drewB / gist:85a0befb2ad9b4fc75ad
Last active February 22, 2016 16:27 — forked from anonymous/gist:748f0c95eb5fe4bafbb6
Metawear: example of how to persisting event after disconnects
import Foundation
class MetawearConfig:NSObject, MBLRestorable {
var pulseWidthEvent:MBLEvent!
func encodeWithCoder(aCoder: NSCoder) {
aCoder.encodeObject(self.pulseWidthEvent, forKey: "pulseWidthEvent")
}