ItamarM / HeartRate-iOS-SDK

A way for iOS devices to detect a user's heart rate using their device's camera.
MIT License
41 stars 21 forks source link

Not working on iPhone X #1

Open buechner opened 6 years ago

buechner commented 6 years ago

I have tested your library on iPhoneX. It shows "waiting for bpm results" for a few seconds and than nothing happens. It must have something to do with the new camera.

Also, there is a bug with the flashlight. On iPhone X, 8 and 8s it must be activated after the capture session was started.

mellinger commented 6 years ago

I solved this and have consistent results between old and new iPhones by...

1) Changing line 322 in HeartRateKitController to if (red < 100) { 2) Changing line 9 in HeartRateKitController to #define kShouldAbortAfterSeconds 10

ItamarM commented 6 years ago

@mellinger maybe you can PR this and I will merge?