Does SubscriptionStoreView .storeButton(for:.policies) work?

I've added .storeButton(.visible, for:.policies) to my SubscriptionStoreView, and the buttons do appear, but when I tap on them I get a sheet that just says "Terms of Service Unavailable / Somethng went wrong. Try Again.". (similar for Privacy Policy).

Is this expected in development? Will these start working correctly in production? (and, more importantly, in App Review?)

The docs say that these use the values (i.e. URLs) set in App Store Connect, but that I can override those. This is a new app. Is that wrong, do I need to set the URLs explicitly?

Edited to add: the console reports: Failed to fetch terms of service and privacy policy: Error Domain=NSURLErrorDomain Code=-1011 "(null)"

I think you need to specify a destination view as well…

      TermsView()
            })
            .subscriptionStorePolicyDestination(for: .privacyPolicy, destination: {
                PrivacyView()
            })

where TermsView() and PrivacyView() are views provided by you.

Thanks for the reply.

I think you need to specify a destination view as well…

I didn't need to do that; I just needed to add the URLs.

Where did you add the URLs? I added both Terms of Use and Privacy Policy URLs in App Store Connect but when I tap on these buttons there were added using storeButton, same unavailable kind of page shows.

Having the same doubt. Did you successfully publish the app? @endecotp

Hello @endecotp,

Thanks for sharing that you got it working. I’m running into the same issue — I see the store buttons using .storeButton(.visible, for: .policies) in my SubscriptionStoreView, but tapping them just shows a sheet with “Terms of Service Unavailable” or “Something went wrong.”

You mentioned you solved it by adding the URL — I really appreciate that info. Just wanted to ask: where exactly did you add the URLs? Did you set them explicitly in App Store Connect, or did you change the code to point to them manually?

Thanks in advance

This is how I fixed the issue, simply add the additional modifiers and specify the url

.subscriptionStorePolicyDestination(url: URL(string: "https://www.quonsepto.com/")!, for: .privacyPolicy) .subscriptionStorePolicyDestination(url: URL(string: "https://www.quonsepto.com/")!, for: .termsOfService)

Does SubscriptionStoreView .storeButton(for:.policies) work?
 
 
Q