Solved

I don't understand RCPackageType

  • 19 December 2021
  • 4 replies
  • 73 views

Badge +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.

icon

Best answer by ryan 21 December 2021, 01:26

View original

4 replies

Userlevel 5
Badge +9

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.

 

Badge +5

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.

Badge +5

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.

Userlevel 6
Badge +8

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?

Reply