Adding new Services to the Spatial Toolbox

@ben do you think it’s possible to add services to the iOS Spatial Toolbox App in a similar way as we do it with the Addon?

Right now, it’s possible to add new services to the app if you add a content_scripts folder to an addon on the edge server that gets compiled into the app. There’s an example in the bottom of this README. You can listen to different events from other services and add new functionality to the app.

But right now, it only works if you recompile the app with that addon. It doesn’t load addon services from other edge servers running in the network. Do you think this should be possible?

So basically when I add the edge server to the iOS app and add such an addon into the addons folder from the edge server, then the userinterface will load that content script into the userinterface? Or should I add this addon directly into the userinterface?

If that works, my answer was answered :slight_smile:

Yes, exactly! It will load any javascript files you put into the content_scripts folder as if they were part of the src directory, and automatically include them in the index.html.

You can thank @jhobin for this feature :slight_smile:

1 Like

That’s Perfect! @jhobin :+1:

I think it would be a possible security issue if the spatial toolbox would load services code from edge servers. It would compromise the Sandboxing of edge server tools. I think the way it’s currently implemented is perfect.

1 Like

In the future we could allow downloading add-ons from a trusted cloud service/trusted edge servers but I agree that it shouldn’t automatically load all local add-ons.