Skip to main content
Solved

PublishStatus


Graham_Paterson

Looking for some details about PublishStatus and getPublishStatusAsync().

As far as I can tell getPublishStatusAsync() always returns UNPUBLISHED outside of the library file itself. Am I missing something here?

Steps I took

  1. create new file that has access to team library
  2. Insert instance from library (by dragging from asset panel)
  3. get main component from instance using getMainComponentAsync()
  4. run getPublishStatusAsync() on main component
  5. results UNPUBLISHED

Best answer by tank666

That’s right. This API is designed for library files.

View original
This topic has been closed for comments

4 replies

tank666
  • 4863 replies
  • Answer
  • March 25, 2024

That’s right. This API is designed for library files.


Graham_Paterson

Ah okay, just to confirm using pseudocode below:

Library File
↳ ❖ Published Component
↳ ◇ Instance (of ❖ Published Component)

instance.mainComponent.getPublishStatus == 'CURRENT' | 'CHANGED'

Working File
↳ ◇ Instance (of ❖ Published Component)

instance.mainComponent.getPublishStatus == 'UNPUBLISHED'

tank666
  • 4863 replies
  • March 25, 2024

The UNPUBLISHED value can also be present in a library file.

Right!


Graham_Paterson

Okay great, thanks for the help!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings