Я прочитал много сообщений и через руководства для разработчиков и не могу точно определить, как настроить CMCalibratedMagneticField, чтобы я получал данные.Настройка для CMCalibratedMagneticField
Я использую:
[motionManager startDeviceMotionUpdatesUsingReferenceFrame: CMAttitudeReferenceFrameXMagneticNorthZVertical toQueue: [NSOperationQueue currentQueue] withHandler:^(CMDeviceMotion *motion, NSError *error){
//This is where I don't know how to get the calibrated data but I am trying:
CMCalibratedMagneticField *magfield = motion.magneticField.field;
//then sending it to a function where I pull the x, y, and z values.
Я знаю, что это может быть глупый вопрос, есть документация, но я просто не понять синтаксис установки. Любая помощь приветствуется.