In-App Purchase - AutoRenewPreference gives ID - subscription status is expired and expirationReason == .autoRenewDisabled

I am testing in-app subscription by installing x-code build locally.

Everything works fine until I cancel subscription from phone's settings->app-store->manage.

I have two issues then.

  1. How many times I run the app, re-build and re-run from xcode it shows the status 'subscribed'.
  2. If I delete the app from my phone and then re-install it shows the right status as 'expired. It also shows the expirationReason as 'autoRenewDisabled'. But renewalInfo.autoRenewPreference, which should be nil, still gives the product ID.

The documentaton clearly states as below, but it does not follow the documentation!

/// If the user disabled auto renewing, this property will be nil. public let autoRenewPreference: String?

In-App Purchase - AutoRenewPreference gives ID - subscription status is expired and expirationReason == .autoRenewDisabled
 
 
Q