Skip to content

Added APIs for hybrid SDKs to set presentedOfferingContext#5491

Merged
rickvdl merged 2 commits into
mainfrom
add-hybrid-apis-set-presented-offering-context
Aug 21, 2025
Merged

Added APIs for hybrid SDKs to set presentedOfferingContext#5491
rickvdl merged 2 commits into
mainfrom
add-hybrid-apis-set-presented-offering-context

Conversation

@rickvdl

@rickvdl rickvdl commented Aug 21, 2025

Copy link
Copy Markdown
Member

Checklist

  • If applicable, unit tests
  • If applicable, create follow-up issues for purchases-android and hybrids

Motivation

Based on PR #2610 for Android, adds similar internal APIs for the hybrid SDKs for iOS. Allows the hybrid SDKs to pass PresentedOfferingContext when launching paywalls by passing a specific offering

Description

This PR implements the internal APIs, and uses the given PresentedOfferingContext when passing an offeringIdentifier from the hybrid SDKs to enrich the freshly fetched Offering with the given presentation context.

@rickvdl rickvdl requested review from a team and tonidero August 21, 2025 12:04

@JayShortway JayShortway left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff! 💪 Thanks for taking care of this!

Just some minor comments only.

Comment thread RevenueCatUI/PaywallView.swift Outdated
Comment thread RevenueCatUI/UIKit/PaywallViewController.swift Outdated
Comment thread RevenueCatUI/UIKit/PaywallViewController.swift
Comment thread Sources/Purchasing/Offering.swift Outdated
Comment thread Tests/StoreKitUnitTests/OfferingTests.swift
Comment thread RevenueCat.xcodeproj/project.pbxproj

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing to add to @JayShortway's comment. Looks great!! Thanks for doing this 🙌

Comment thread RevenueCatUI/UIKit/PaywallFooterViewController.swift Outdated
@rickvdl rickvdl merged commit 6f4f37d into main Aug 21, 2025
12 checks passed
@rickvdl rickvdl deleted the add-hybrid-apis-set-presented-offering-context branch August 21, 2025 14:50
This was referenced Aug 21, 2025
rickvdl added a commit to RevenueCat/purchases-hybrid-common that referenced this pull request Sep 3, 2025
…nting paywalls (#1246)

Adds the `presentedOfferingContext` parameter implemented in the native
SDKs (for context,
[iOS](RevenueCat/purchases-ios#5491) and
[Android](RevenueCat/purchases-android#2610)
PRs)

Also deprecated the old APIs and added the new APIs to the API test.
vegaro pushed a commit to RevenueCat/purchases-hybrid-common that referenced this pull request Oct 16, 2025
…nting paywalls (#1246)

Adds the `presentedOfferingContext` parameter implemented in the native
SDKs (for context,
[iOS](RevenueCat/purchases-ios#5491) and
[Android](RevenueCat/purchases-android#2610)
PRs)

Also deprecated the old APIs and added the new APIs to the API test.
# Conflicts:
#	ios/PurchasesHybridCommon/PurchasesHybridCommonUI/Paywalls/PaywallProxy.swift
vegaro pushed a commit to RevenueCat/purchases-hybrid-common that referenced this pull request Oct 17, 2025
…nting paywalls (#1246)

Adds the `presentedOfferingContext` parameter implemented in the native
SDKs (for context,
[iOS](RevenueCat/purchases-ios#5491) and
[Android](RevenueCat/purchases-android#2610)
PRs)

Also deprecated the old APIs and added the new APIs to the API test.
vegaro pushed a commit to RevenueCat/purchases-hybrid-common that referenced this pull request Oct 17, 2025
…nting paywalls (#1246)

Adds the `presentedOfferingContext` parameter implemented in the native
SDKs (for context,
[iOS](RevenueCat/purchases-ios#5491) and
[Android](RevenueCat/purchases-android#2610)
PRs)

Also deprecated the old APIs and added the new APIs to the API test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants