-
Notifications
You must be signed in to change notification settings - Fork 319
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
Add targeting to PresentedOfferingContext
#3730
Add targeting to PresentedOfferingContext
#3730
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments but LGTM!
Sources/Purchasing/Offerings.swift
Outdated
@@ -41,6 +41,16 @@ import Foundation | |||
} | |||
} | |||
|
|||
internal final class Targeting: NSObject { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a struct? (maybe not, not entirely sure if it needs to be an NSObject)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably should 😅 Not sure why I did the extra work of making this an NSObject
...
/// Initialize a ``PresentedOfferingContext``. | ||
@objc | ||
public init( | ||
offeringIdentifier: String, | ||
placementIdentifier: String? | ||
placementIdentifier: String?, | ||
targetingContext: TargetingContext? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to say this could be a breaking change, but I believe the base change hasn't been merged yet, so it should be ok 👍
Tests/TestingApps/PaywallsTester/PaywallsTester/Views/UpsellView.swift
Outdated
Show resolved
Hide resolved
@@ -602,6 +602,7 @@ platform :ios do | |||
|
|||
desc "Run BackendIntegrationTests" | |||
lane :backend_integration_tests do |options| | |||
fetch_snapshots |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm is this needed? The snapshot tests for paywalls should be independent of these test I thought?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI tests keep failing on UI Snapshots tests are missing in the backend tests so this was my test to see if this fixed it 🤷♂️ Will remove it stops the flakey
04abfe4
to
3eb9898
Compare
…g-context` - ios-13 (#3737) Requested by @joshdholtz for [add-targeting-to-presented-offering-context](https://github.com/RevenueCat/purchases-ios/tree/add-targeting-to-presented-offering-context)
…g-context` - ios-14 (#3736) Requested by @joshdholtz for [add-targeting-to-presented-offering-context](https://github.com/RevenueCat/purchases-ios/tree/add-targeting-to-presented-offering-context)
…g-context` - ios-12 (#3735) Requested by @joshdholtz for [add-targeting-to-presented-offering-context](https://github.com/RevenueCat/purchases-ios/tree/add-targeting-to-presented-offering-context)
…g-context` - ios-16 (#3734) Requested by @joshdholtz for [add-targeting-to-presented-offering-context](https://github.com/RevenueCat/purchases-ios/tree/add-targeting-to-presented-offering-context)
…g-context` - ios-17 (#3733) Requested by @joshdholtz for [add-targeting-to-presented-offering-context](https://github.com/RevenueCat/purchases-ios/tree/add-targeting-to-presented-offering-context)
…g-context` - ios-15 (#3732) Requested by @joshdholtz for [add-targeting-to-presented-offering-context](https://github.com/RevenueCat/purchases-ios/tree/add-targeting-to-presented-offering-context)
…g-context` - macos (#3731) Requested by @joshdholtz for [add-targeting-to-presented-offering-context](https://github.com/RevenueCat/purchases-ios/tree/add-targeting-to-presented-offering-context)
4e60748
to
05d4981
Compare
**This is an automatic release.** ### New Features * Paywalls: add `updateWithDisplayCloseButton` to `PaywallViewController` (#3708) via Cesar de la Vega (@vegaro) * New `syncAttributesAndOfferingsIfNeeded` method (#3709) via Burdock (@lburdock) * Add targeting to `PresentedOfferingContext` (#3730) via Josh Holtz (@joshdholtz) * Add `currentOffering(forPlacement: String)` to `Offerings` (#3707) via Guido Torres (@guido732) * New `Package.presentedOfferingContext` (#3712) via Josh Holtz (@joshdholtz) ### Bugfixes * Mark methods with StaticString for appUserID as deprecated (#3739) via Mark Villacampa (@MarkVillacampa) ### Other Changes * [EXTERNAL] Spelling typo fix to comment (#3713) via @vdeaugustine (#3740) via Mark Villacampa (@MarkVillacampa) --------- Co-authored-by: Josh Holtz <me@joshholtz.com>
Motivation
Get more context with targeting information
Description
Offerings
Offerings.current
getCurrentOffering(forPlacement: String)