본문 바로가기
Unity/[Asset] BeHealthkit - Study

Unity BeHealthkit Asset :: ios 건강 - 수동 데이터 필터링

by ejrtks 2022. 8. 3.

1. ReadQuantityData 함수에서 QuantitySample을 필터링한다.

if(samples.Count > 0)
{
 foreach (var current in samples)
 {
  if (current.source.name == "건강")
   continue;

  if (DebugManager.Instance._healthkitReadSamplesDebugMode)
   Debug.LogFormat("   - {0} : {1}", current, current.quantity.doubleValue);

한국어로 "건강"으로 필터링한다. 

* 이 부분을 필터링하지 않으면, BeHealthkit 에셋에서 , 수동으로 입력한 데이터도 가져오게 된다.

댓글