Question

Is there a way to add metadata to a package

  • 26 August 2021
  • 5 replies
  • 36 views

Badge

Let’s say I need to add additional information about a package - I can display the title of a package, I can display the description but where can I fetch additional information about the package? For example the colour or the weight.

 

Is this currently possible or do I need another way of storing and fetching this information?


5 replies

Userlevel 2
Badge +6

It isn’t possible (yet) to attach arbitrary metadata to a package outside of its description, so you probably need another way to store and fetch this information. This is on our backlog but I don’t have an ETA of when we’ll release it. I’ll mention @Jens so that it’s on his radar.

@sharif How do we get the package description? I don’t see that available in Flutter

I see this: https://github.com/RevenueCat/purchases-flutter/issues/35

 

so it was an oversight but logged about a year ago ...so is it just not happening? This really makes building the dynamic paywall a bit tough

Userlevel 2
Badge +6

We definitely hear you but the package description was really meant for dashboard use, not SDK use. It’s still definitely on our backlog to implement but the issue is that the package description isn’t returned in our offerings API endpoint, which makes it impossible for the SDK to pull it from RevenueCat. We try to be very conservative with the updates we make to our REST API in order to maintain backwards compatibility, so a package description field would be scheduled for a larger v2.0 release of our API.

For now we recommend relying on the offering description to describe the packages as a whole (for example you could have a paywall with a heading displaying the offering description and buttons for the monthly and yearly packages.) You can make more than one offering to group similar packages together so that the description can cover all of the packages in the offering.

Otherwise you could host a simple map of packages to descriptions on a basic web server and fetch that map in your app (this is what we recommend for more advanced use cases, e.g. a catalog of consumable products.)

Let me know if you have any other questions.

@sharif A bit strange but understood. Another workaround for us might be the ability to get introductory pricing info from the the Flutter SDK but that also doesn’t seem possible. I logged this bug:

https://github.com/RevenueCat/purchases-flutter/issues/243

Reply