Desktop App - User Location

Is there a way to get longitude and latitude in an Xojo desktop app?
This is easily done in Xcode (using Swift) so seems like it should be in Xojo as well.
I read how to do it with web apps, but nothing for Xojo Desktop apps.

Thanks

Hi,
Maybe you can take a look at MBS. @Christian_Schmitz has a sample code in /MacFrameworks/CoreLocation/CoreLocation to find computer location

2 Likes

You mean the CLLocationMBS and CLLocationManagerMBS classes.

1 Like

Thank you for your reply.

I downloaded MBS-Xojo-Plugins234
I copied MBS Xojo Main Plugin.xojo_plugin to Plugins folder
I copied MBS Xojo MacCI Plugin.xojo_plugin to Plugins folder

I ran the supplied demo app called “CoreLocation to find computer location”

I received the attached error. Am I doing something wrong?

Screenshot 2023-10-26 at 10.49.28 PM

You may need this? Monkeybread Xojo plugin - CGImageMBS class

We have dependencies:

  • MBS MacCI Plugin
    • MBS Main Plugin
    • MBS MacCG Plugin
    • MBS MacBase Plugin
    • MBS MacCF Plugin

So please add the missing plugin files.

Christian even has a webpage that shows all the plugin dependencies.
https://www.monkeybreadsoftware.net/plugindeps.shtml

I never could get this to work. I want to give it another try.
All I need is the longitude and latitude.
Is there someplace that shows step-by-step exactly what I need to do to get longitude and latitude without reading 400 pages not related to longitude and latitude ?

Thanks!