Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 of 5 tasks
stuart-j-williams opened this issue Dec 14, 2023 · 5 comments · Fixed by #3524
Closed
2 of 5 tasks

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

stuart-j-williams opened this issue Dec 14, 2023 · 5 comments · Fixed by #3524
Labels
bug pr:RevenueCatUI status: needs-additional-info Issues that are missing steps from bug template

Comments

@stuart-j-williams
Copy link

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.

@RCGitBot
Copy link
Contributor

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@NachoSoto
Copy link
Contributor

Thanks for filing this! I'm still unable to reproduce. Where are you attaching the .paywallFooter modifier? It would help if you can provide some more code, it's not clear how your PaywallProductSelectionView connects to the paywall footer 🙏🏻

@NachoSoto NachoSoto added status: needs-additional-info Issues that are missing steps from bug template pr:RevenueCatUI labels Dec 14, 2023
@stuart-j-williams
Copy link
Author

stuart-j-williams commented Dec 14, 2023 via email

@NachoSoto
Copy link
Contributor

You could go back to version 4.31.2.

Mind sending me an e-mail? 🙏🏻 nacho@revenuecat.com
As soon as I can reproduce it I'll get a fix and we can release an update with it today.

Copy link

This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug pr:RevenueCatUI status: needs-additional-info Issues that are missing steps from bug template
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants