The optical fiber-based magnetic field sensor possesses outstanding characteristics of compactness, long-distance interrogation, low cost and high sensitivity, which has attracted intensive interest.