Swift Magnetometer Example Code

Hello

I bought just Location Based Estimate Beacons and them have Magnetometer feature. I want to develop Magnetometer app and i didn’t find any Magnetometer example codes in github.

Someone have any Magnetometer example codes for swift ?

Thanks

Also i sent mail to estimate but nobody reply me yet ! Im waiting to reply ASAP from estimate. If i got any codes and examples i will share here. I bought that beacons to use magnetometer feature i still waiting…

Thank you !

The best way to read magnetometer data is through Estimote Telemetry:

Use the ESTTelemetryNotificationMagnetometer class.

The callback-block will be called with ESTTelemetryInfoMagnetometer object:

@interface ESTTelemetryInfoMagnetometer : ESTTelemetryInfo

/**
 * Strength of magnetic field in X axis in normalized values (-1, 1).
 */
@property (nonatomic, strong, readonly) NSNumber *normalizedMagneticFieldX;

/**
 * Strength of magnetic field in Y axis in normalized values (-1, 1).
 */
@property (nonatomic, strong, readonly) NSNumber *normalizedMagneticFieldY;

/**
 * Strength of magnetic field in Z axis in normalized values (-1, 1).
 */
@property (nonatomic, strong, readonly) NSNumber *normalizedMagneticFieldZ;

@end

Hello

Thank you but i using Swift ? Can you give me swift codes please ?

Im using IOS-SDK-Master/Examples/Swift/Notification

Project

Thank you

Still waiting i didnt got any swift example codes for estimote beacons Magnetometer feature !

ESTIMOTE replied me and said

WE DONT HAVE YET SWIFT CODES FOR MAGNOMETER !

Also heypiotr just you write here property codes where get values codes for magnometer ?
Can you please write here working full REAL magnometer codes or shared working project !

BAD SERVICE , BAD FEEDBACK ! BAD SUPPORT EVER ! IM WAITING ABOUT 1 MONTH !

Thank you !

We didn’t use all caps though (;

Check out our recently-added Telemetry tutorial:
http://developer.estimote.com/sensors/estimote-telemetry/#detecting-estimote-telemetry-packets

can you write sample codes for ;

How we can get that values ;

normalizedMagneticFieldX
normalizedMagneticFieldY
normalizedMagneticFieldZ

??

I think you should consider it a training exercise in your programming skills to take the tutorial I linked to above, and adapt it from reading temperature to reading magnetometer data. (:

WHAT IS YOUR PROGRAMMING SKILLS ?? U SELLING BEACONS WITH MAGNETOMETER FEATURE BUT YOU DIDNT GIVE ANY EXAMPLE ??

YOU SAY ME HAVE TUTORIAL , I SAW IT DONT HAVE ANY EXAMPLE FOR MAGNETOMETER ! JUST HAVE METHOD NAMES , ALSO YOU SENT ME E-MAIL;

Piotr Krawiec (Estimote, Inc.)
Aug 17, 12:46 CEST
There you go! (: What do you want to do with the magnetic field value?
// remember to hold a strong reference to the device manager for as long as you
// want to receive the telemetry notifications
// e.g., make it a class property, and not a local variable, so that it won't get
// prematurely deallocated
let deviceManager = ESTDeviceManager()
// ...
let magnNotification = ESTTelemetryNotificationMagnetometer { (m) in
    print("x: \(m.normalizedMagneticFieldX), y: \(m.normalizedMagneticFieldY), z: \(m.normalizedMagneticFieldZ)")
}
deviceManager.registerForTelemetryNotification(magnNotification)
Piotr Krawiec • @heypiotr • Developer Experience

AND your sent that codes WRONG ! DONT WORK ! PLEASE FIX YOUR THAT CODES ! WHY YOU SENDING WRONG CODES ?

let magnNotification = ESTTelemetryNotificationMagnetometer { (m) in

LINE

gives

Argument passed to call that takes no arguments ERROR

ASAP ! Im waiting to fix your sent me wrong codes !

I understand you’re frustrated because you can’t get it to work, but I’d appreciate it if you could keep the conversation civil. ALL CAPS is commonly regarded as shouting on the Internet, and nobody likes being shouted at, which long-term might result in there being less people wanting to help you.

Back to the point though: I investigated a bit more and found a small bug in our SDK which results in this “Argument passed to call that takes no arguments” error. I already fixed it, and it will go out in the next SDK release. Apologies for the trouble!