update HapSupport - objective-c to c