Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

日を跨ぐと歩数の表示に誤差が出る #1

Closed
yuppejp opened this issue Nov 12, 2022 · 1 comment
Closed

日を跨ぐと歩数の表示に誤差が出る #1

yuppejp opened this issue Nov 12, 2022 · 1 comment

Comments

@yuppejp
Copy link
Owner

yuppejp commented Nov 12, 2022

0時付近で歩数がカウントされるとwalklyアプリの表示がヘルスケアアプリの歩数と異なる場合がある。

@yuppejp
Copy link
Owner Author

yuppejp commented Nov 13, 2022

.strictStartDateオプションを付けることで解消。

let predicate = HKQuery.predicateForSamples(withStart: startOfDay, end: now)
    ↓
let predicate = HKQuery.predicateForSamples(withStart: startOfDay, end: now, options: .strictStartDate)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant