Comments (6)
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
from purchases-ios.
Have you tried overriding .environment(\.dismiss, yourAction)
?
from purchases-ios.
@NachoSoto Yes, here is what I tried:
1.
PaywallView(fonts: Font.Provider(), displayCloseButton: false)
.environment(\.dismiss, {})
Gives the error: Cannot convert value of type '() -> ()' to expected argument type 'DismissAction'
DismissAction doesn't have a public initializer
- Define my own
DismissAction
struct DismissAction: EnvironmentKey {
static var defaultValue: () -> Void = {}
}
extension EnvironmentValues {
var dismiss: () -> Void {
get { self[DismissAction.self] }
set { self[DismissAction.self] = newValue }
}
}
Used as follow:
PaywallView()
.environment(\.dismiss, {
})
That didn't work, the view was still dismissed. Note that this actually prevents the view from being dismissed if used on one of my views, but it doesn't work on RevenueCatUI views like PaywallView
.
from purchases-ios.
Hi @NachoSoto, to fix this issue what do you think of passing a dismiss closure so that can be handle by the caller. The one presenting the view / vc should be the one responsible for dismissing it, right?
Since I cannot use it the onboarding, this issue prevents me from using the templates all together.
Thanks for the great work on this project!
from purchases-ios.
Hi @lionel-alves we just released a new view modifier onRequestedDismissal
you can use to handle the dismissal
Please note if this is set, the paywall will not be dismissed automatically and it's your responsability to dismiss it.
I think this fixes this issue, so I am closing it. Let us know if you face any problems.
Thanks!
from purchases-ios.
This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.
from purchases-ios.
Related Issues (20)
- NonSubscriptionTransaction.transactionIdentifier Does not match StoreTransaction.identifier HOT 3
- Paywall shows in English despite iPhone being set to German HOT 8
- Paywall bug for visionOS, Template 4, not enough room for "Monthly" split over two lines HOT 1
- RevenueCat randomly can't fetch offerings for ONE of my devices (iPadOS 17.4 beta) HOT 9
- ErrorCode description should be localized HOT 3
- Invalid reason on xcprivacy report file: Privacy Accessed API Types USERDEFAULT HOT 3
- purchases-ios stuck fetching in Xcode HOT 4
- SPM install takes forever HOT 17
- /v1/receipts api returns status_code 529 HOT 7
- Paywall language changes on every app re-install HOT 6
- "can't find package" error. HOT 4
- Add support for the native macOS platform to the RevenueCat Paywalls HOT 2
- Way to test Promotions in-app purchases from Store HOT 1
- Unable to fetch offering on real device when using Storekit file HOT 5
- Weird state of checkTrialOrIntroDiscountEligibility HOT 6
- Bug: Writing Keys out of container HOT 7
- macOS App hanging for at least 2000 ms because of check for macOS app running on the main thread. HOT 2
- CustomerInfo needs subscriptions. HOT 6
- Subtle Paywall localization issue HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purchases-ios.