I have seen some apps using ports opened by XD and Listening to them to get some data How we can achieve that functionality message me if anyone knows because i was trying to develop an app with these features
@kerrishotts @ashryan @afuchs @pklaschka
does anyone know about these
Can you be more specific as to where you’ve seen this?
That said, you can create a websocket in your plugin that can be used to communicate with your application. The websocket can be started at launch, and persists until the document is closed. And, because you can get selection
without having a command invoked, you can send changes across that websocket on a periodic basis whenever you want. (Note: you can’t make changes to the XD document without a command being invoked, though.)
they sending their app id and version to that socket to opened socket of xd app
@kerrishotts
and regarding the web socket show some snippet how to do this or message me a snippet
@kerrishotts could you give me snippet on how it starts on application starts
i have seen this on an app named design mirror
How to do this, setInterval not supported is there any supported methods ?
Sorry – can you provide a link to the app? My search engine isn’t giving me useful results for “Design mirror”
For periodic updates, you could have the host send a heartbeat to your plugin so that it can send information back.
As for as setTimeout
and friends, I believe they’re coming in XD 16.
i figured that early and already working on it
and the link of app
http://psmirror.cn/en
also could you try to explain me how app is doing that far without api in simple
@kerrishotts
Following may help your team about the app
App is checking for open port of XD by searching XD Folder and opening port found in Folder your team know where port can be found and sending some data to that port and getting list of opened documents and some info, if that facility is provided by XD where it can be found
@PramUkesh What you are describing is a private API that predates the officially supported plugins feature in Adobe XD. Please do not attempt to use it for anything, as it’s not supported and we may remove it or block your access to it at any time without advance warning. It is deprecated and it will be removed in the near future.
The only supported way to create XD plugins is by following the public documentation here: https://adobexdplatform.com/plugin-docs/. As Kerri described, you can connect to another desktop app by running a websocket server in that app and then connecting to the websocket from XD. Several popular plugins are already using this approach today.
What’d be extremely helpful is some way in a plugin manifest to specify another desktop app to start up, if it’s not already running.