Recently I was working with IOS and Android magnetometer for a project, I searched and found that there exist three ways to get the magnetometer data in IOS (check this question "In iOS, what is the difference between the Magnetic Field values from the Core Location and Core Motion frameworks?").
I tried all the three methods (Core Location,Device Motion and Core Motion) but none of them gets the same results as in android TYPE_MAGNETIC_FIELD.