Skip to content

Opening terms or privacy link from paywall opens in a sidebar on iPad #3518

Description

@stuart-j-williams

Describe the bug
When tapping on the terms or privacy link at the bottom of a paywall displayed in a sheet on an iPad results in a split-screen view with the content loading in the sidebar (see attached screenshot)
IMG_0003 2

  1. Environment
    1. Platform: iPadOS
    2. SDK version: 4.31.3
    3. StoreKit version:
      • StoreKit 1
      • StoreKit 2 (enabled with usesStoreKit2IfAvailable(true))
    4. OS version: 17.3 (21D5026f)
    5. Xcode version: 15.1 (15C65)
    6. Device and/or simulator:
      • Device
      • [x ] Simulator
    7. Environment:
      • [ x] Sandbox
      • TestFight
      • Production
    8. How widespread is the issue. Percentage of devices affected. 100% of iPad devices/simulators but only test devices as I don't have this version of the SDK in production yet
  2. Debug logs that reproduce the issue. Complete logs with Purchases.logLevel = .verbose will help us debug this issue.
    Nothing appears in logs relating to this issue
Logs here
  1. Steps to reproduce, with a description of expected vs. actual behavior

Tap the terms or privacy link at the bottom of a paywall and a split screen sheet appears with the content loaded in the sidebar. Should not load as split screen.

  1. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

  2. Additional context
    I've noticed that the incorrect behaviour only occurs when the paywall is displayed within a sheet and then launched through a NavigationLink

  Section {
            NavigationLink(destination: PaywallProductSelectionView(tabSelection: paywallTab), isActive: $showIAP) {
                HStack {
                    Image(systemName: "purchased").accessibilityHidden(true)
                    Text("Subscription Options")
                }.font(ai.body)
            }
            
        } header: {Text("In-app purchases").font(ai.sectionHeader) }

and then using the .paywallFooter option, e.g.

   .paywallFooter(offering: offering, condensed: isCondensed) { customerInfo in
            let entitlements = customerInfo.entitlements.active
            if entitlements.count > 0 {
                dismiss()
            }
        } restoreCompleted: { customerInfo in
            let entitlements = customerInfo.entitlements.active
            if entitlements.count > 0 {
                dismiss()
            }
        }

Seems to work fine when the paywall is just displayed in a sheet (which is ok for me on initial launch and purchase), but not when I re-display the paywall via a settings menu to allow the user to switch subscription tier.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions