Solved

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

  • 30 December 2021
  • 2 replies
  • 27 views

Badge

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!

icon

Best answer by sharif 10 January 2022, 18:28

View original

2 replies

Userlevel 4
Badge +9

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.

Badge

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.

Reply