Skip to main content
Solved

How to implement 2 'annual' subscription packages? (SwiftUI)

  • December 30, 2021
  • 3 replies
  • 262 views

Forum|alt.badge.img+3

Apologies if this is a newbie question, but I’m struggling with implementing what I consider a rather simple auto-renewable subscription offering consisting of two packages on iOS with SwiftUI:

  • Annual Individual Plan (family sharing disabled)
  • Annual Family Plan (family sharing enabled)

When I create the second package, RC refuses to create it, because the ‘Annual’ identifier is already taken.

I solved it temporarily with a custom identifier (“Annual Family”), but RC does not automatically recognise the subscription length (annual) and throws WARN: ⚠️ Unknown subscription length for package:default, ignoring.

Any advice on how to implement the above scenario (two annual packages) is much appreciated, thank you!

Best answer by sharif

You can only have one of each type of labeled package (annual, monthly, weekly, etc.) per offering. So a package can only have one iOS product with the “annual” label. In your case you’ll want to use a custom package for one of the annual plans. The one that you choose to label as “annual” can be what you consider as the “default” annual package. Alternatively, you can:

  1. Create both as custom packages if it doesn’t make sense to label just one as “annual”.
  2. Create two separate offerings, one for the individual plan and one for the family plan.

Using custom packages shouldn’t make your app less dynamic - you can still iterate over the available packages in an offering and display them on your paywall. Just check the underlying product’s duration if your paywall needs that info.

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

3 replies

sharif
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 513 replies
  • Answer
  • January 10, 2022

You can only have one of each type of labeled package (annual, monthly, weekly, etc.) per offering. So a package can only have one iOS product with the “annual” label. In your case you’ll want to use a custom package for one of the annual plans. The one that you choose to label as “annual” can be what you consider as the “default” annual package. Alternatively, you can:

  1. Create both as custom packages if it doesn’t make sense to label just one as “annual”.
  2. Create two separate offerings, one for the individual plan and one for the family plan.

Using custom packages shouldn’t make your app less dynamic - you can still iterate over the available packages in an offering and display them on your paywall. Just check the underlying product’s duration if your paywall needs that info.


Forum|alt.badge.img+3
  • Author
  • Helper
  • 3 replies
  • January 15, 2022
sharif wrote:

You can only have one of each type of labeled package (annual, monthly, weekly, etc.) per offering. So a package can only have one iOS product with the “annual” label. In your case you’ll want to use a custom package for one of the annual plans. The one that you choose to label as “annual” can be what you consider as the “default” annual package. Alternatively, you can:

  1. Create both as custom packages if it doesn’t make sense to label just one as “annual”.
  2. Create two separate offerings, one for the individual plan and one for the family plan.

Using custom packages shouldn’t make your app less dynamic - you can still iterate over the available packages in an offering and display them on your paywall. Just check the underlying product’s duration if your paywall needs that info.

Thank you. Yes, everything appears to be working fine with the custom identifier. I just wanted to silence the warning.


Forum|alt.badge.img+4

Is it ok to have that warning in the console? Will things break?

Unknown subscription length for package 'default'

 

I have that now and I have two packages, one the default Annual and the other AnnualFamily. Both set to be annual. They appear fine in my UI when I iterate over the packages.


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