XD 14 new and updated plugin APIs

XD 14 was released today and includes some great enhancements for plugin developers. Most notably:

  • Store metadata in XD documents or attached to individual scenegraph nodes
  • Text nodes: create/modify area text; get/set paragraph spacing; shortcut APIs for simple text styling
  • Pan and zoom the viewport
  • Get links to latest shared prototypes & design specs
  • Improved search in the “Discover Plugins” UI
  • …plus bug fixes and other smaller changes

For more details on what’s new, see the updated changelog page or this complete diff of all docs changes. There’s also a longer blog post discussing these updates.

If you build a plugin that relies on any of these new APIs, don’t forget to set your manifest.json file to specify "minVersion": "14.0.0".

We’re excited to see what cool things you’re going to build with these new APIs!

5 Likes

What would happen if we’d release an update increasing the minVersion? Would the old version still be availabe for XD 13 or would it “disappear” in those versions? Thank you very much in advance.

On that note: Could we make a minVersion of 13 and then manually check if certain APIs are available in our code via application.version (or will that get blocked in the review process)?

2 Likes

Unless I’m misunderstanding you, what you’re describing is a valid practice.

The main thing is to make sure the user experience is still good on any version of the host app that you support. So if your plugin, say, uses metadata APIs in version 14, you’ll need to figure out what that means for the plugin in version 13.

2 Likes

I’m not totally sure how Plugin Manager will react in that case – if you have an existing plugin that supports XD 13 and you’re publishing an update that requires XD 14. I’ll look into that and post back here with what I find out.

In the meantime though the safest bet for your plugin to have the broadest possible reach would be what Ash alluded to: continue to have the plugin support XD 13 and gracefully degrade functionality when running on that version.

1 Like

Update – here’s the best practice we’d like everyone to follow when using newly-added APIs in your plugin:

If your plugin absolutely requires XD 14 APIs in order to function at all, set minVersion to 14 in your manifest.json
This is allowed and the review team should accept it. However, be aware that there’s a bug right now where XD 13 users will still see the plugin available for download, but will get a generic error message if they try to install it. XD 14 has a better error message for this, and in February we’re expecting a backend fix will hide unsupported plugins from the listing altogether (that fix will cover all XD versions including 13).

If your plugin can gracefully degrade to still provide some value on older XD, leave minVersion at 13 and dynamically adjust your plugin’s behavior based on XD version
You can do this either by checking application.version or by just checking if a given API is undefined. Please try to test your plugin on XD 13 (using a computer that hasn’t updated yet) if at all possible though so you’re not advertising that the plugin works on older XD when it’s actually buggy there.

1 Like