Magnetometer iOS code (Swift)
I'm unable to get the code for Magnetometer. Here's my code.
device.gyro?.dataReadyEvent.startNotificationsWithHandlerAsync { (obj, error) in
...
}
device.magnetometer?.dataReadyEvent.startNotificationsWithHandlerAsync { (obj, error) in
...
}
Using this code, I'm able to get the data for Gyro, but not for Magnetometer. I'm getting the following error "value of type MBLMagnetometer has no member 'dataReadyEvent'".
How to get the data for magnetometer?
This discussion has been closed.
Comments