I'm lost. I am totally lost. If I install Geode on Firefox 3.0.X for Mac OS X, the Loki lib living inside Geode sees me at:


Wonderful. That's very accurate.

Now, let me extract Loki.xpt and loki.dylib from the Geode XPI, and make a very small xulrunner app based on xulrunner, so similar to my Firefox 3.0.6 for Mac. Let it ping loki and get the same geolocation. Again, same XPT, same dylib. Result:


Hum to say the least... If you have Firefox 3.0.x (warning, it will crash with FF3.1) installed on your mac, here are steps to reproduce:

  1. download http://glazman.org/tmp/testGeoloc.tar
  2. untar it wherever you want, it creates a xulapp directory
  3. go into that directory
  4. make sure to disable Geode in Firefox is you have it installed
  5. call
    /Applications/Firefox.app/Contents/MacOS/firefox-bin -app `pwd`/application.ini
  6. that will show a small window with a button inside, click that button
  7. first alert should show you a JS object
  8. second alert should show your longitude and latitude if it's possible to determine your location based on your wifi context ; integers are VERY unlikely here so if you see integers, that's the bug...

Does anyone understand this ? Why am I getting double floats in FF 3.0.6 and integers with the SAME xpt and libs outside of FF 3.0.6 ? There's no useragent detection in the lib, it does not check the caller to verify it's firefox, xpt_dump will show you the xpt is ok, and Skyhook guys are helpless here.

The Skyhook SDK gives same result ; it contains a c++ example linked to wpsapi.dylib. That example, if built by myself gives perfectly accurate results. If I use the dylib in a Firefox extension or xulrunner app, bang, I get integers too...

I'm lost. Any clue highly welcome....