Paywalls: fix PaywallViewControllerDelegate access from Objective-C#3510
Merged
Conversation
Public variables must be exposed with `@objc` to be accessible outside of Swift. This change is necessary to set delegate from host project so that we may dismiss the paywall.
NachoSoto
pushed a commit
that referenced
this pull request
Dec 12, 2023
**This is an automatic release.** ### RevenueCatUI * `Paywalls`: improve image caching (#3498) via NachoSoto (@NachoSoto) * `Paywalls`: change style of CTA button to be consistent with other platforms (#3507) via NachoSoto (@NachoSoto) * `Paywalls`: open footer links on Safari on Catalyst (#3508) via NachoSoto (@NachoSoto) * `Paywalls`: fix compilation on Xcode < 14.3 (#3513) via NachoSoto (@NachoSoto) * Fix typo in zh-Hans localization of RevenueCatUI (#3512) via Francis Feng (@francisfeng) * `Paywalls`: fix PaywallViewControllerDelegate access from Objective-C (#3510) via noncenz (@noncenz) * `Paywalls`: open Terms and Privacy Policy links in-app (#3475) via Andy Boedo (@aboedo) * `Paywalls`: fix empty description when using `custom` package type and `{{ sub_period }}` (#3495) via Andy Boedo (@aboedo) * `Paywalls`: use `HEIC` images (#3496) via NachoSoto (@NachoSoto) * Paywalls: disable the close button when an action is in progress (#3474) via Andy Boedo (@aboedo) * `Paywalls`: adjusted German translations (#3476) via Tensei (@tensei) * Paywalls: Improve Chinese localization (#3489) via Andy Boedo (@aboedo) ### Other Changes * `CircleCI`: add git credentials to snapshot generation (#3506) via NachoSoto (@NachoSoto) * `StoreProduct`: improve `priceFormatter` documentation (#3500) via NachoSoto (@NachoSoto) * `Paywalls`: fix tests (#3499) via NachoSoto (@NachoSoto) * `Optimization`: changed `first` to `first(where:)` (#3467) via NachoSoto (@NachoSoto)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Public variables must be exposed with
@objcto be accessible outside of Swift. This change is necessary to set delegate from host project so that we may dismiss the paywall.Checklist
purchases-androidand hybridsMotivation
Paywall doesn't seem to be usable in an Objective-C project as there is no way to receive the callback to drop the paywall other than by setting a delegate.
Description
Added code to expose the public variable
delegatein PaywallViewController to Objective-C.Tested by setting delegate and receiving delegate method callbacks in Obj-C code.