Skip to main content
Solved

I don't understand RCPackageType

  • December 19, 2021
  • 4 replies
  • 125 views

Marc Palmer
Forum|alt.badge.img+5

Hi,

I’m developing on iOS and using StoreKit testing right now. I’m getting my offerings + packages from the RC API no problem now.

However, the `packagetType` is `PackageType.custom`. I don’t understand where the package type is set or whether it should be automatic. The docs here list values for the type such as `ANNUAL`:

https://docs.revenuecat.com/docs/displaying-products

...but there’s nowhere to configure these in RC that I can find. So… presumably it is meant to be working this out from the App Store products… but isn’t because I’m using StoreKit?

Either way, this seems very confusing.

Best answer by ryan

Hey @Marc Palmer!

 

The PackageType is set when the package is created in RevenueCat. These are reserved IDs that map to the most common subscription durations that work for most apps. You can use custom identifiers if you have a more complex setup like multiple monthly packages.

The PackageType cannot be changed after it’s created, so you may need to spin up a new package and set one of the reserved IDs.

 

View original
Did this post help you find an answer to your question?
This post has been closed for comments

4 replies

ryan
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 391 replies
  • Answer
  • December 21, 2021

Hey @Marc Palmer!

 

The PackageType is set when the package is created in RevenueCat. These are reserved IDs that map to the most common subscription durations that work for most apps. You can use custom identifiers if you have a more complex setup like multiple monthly packages.

The PackageType cannot be changed after it’s created, so you may need to spin up a new package and set one of the reserved IDs.

 


Marc Palmer
Forum|alt.badge.img+5
  • Author
  • Member
  • 9 replies
  • December 21, 2021

Hi @ryan 

Yes I worked this out last night. However… I have mine set to Monthly and Annual in RC and when using StoreKit packagetype still comes through as Custom. I switched to using the SKProduct subscription period instead. Not sure if this is StoreKit testing specific or not, but it’s definitely not working for me.


Marc Palmer
Forum|alt.badge.img+5
  • Author
  • Member
  • 9 replies
  • December 21, 2021

I would suggest that mention of this is added to the docs where it talks about querying for offerings/packages. I read it several times and totally did not pick up this detail - it lists the possible values (from a JSON API perspective) but not from an iOS perspective, and does not say this is where it is set up.


cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 501 replies
  • January 5, 2022

Hey @Marc Palmer!

We’ll work on clarifying this in our docs - I double checked, and am seeing the API returning monthly and annual package identifiers rather than custom, so I think we’re returning the expected values.

Are you still seeing these default package IDs as custom on iOS? If so, can you provide debug logs reproducing this?


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