Feature / Add host-owned offer view controllers - #9
Open
levochkaa wants to merge 2 commits into
Open
Conversation
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Author
|
Appreciate this, @levochkaa. The gap is real: a publisher already driving a UIKit navigation flow has no way to make Encore one screen in it, and chained onboarding is where that hurts most. We are taking the feature. Three notes:
Good API shape, and the reasoning in the body made it easy to review. Thanks again. 🙏 |
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.
Context
PlacementBuilder.show()owns presentation through Encore's overlay window. Publishers that already coordinate a UIKit navigation flow cannot currently push Encore as one screen in that flow or decide how the controller should be removed when the offer resolves.This is especially limiting for chained onboarding, reward, and post-action flows where the next screen should be pushed before the previous controller is removed from the navigation stack.
API
Changes
makeViewController()andmakeViewController(resume:)toPlacementBuilderProtocol.show().nilfor placements that cannot be built while still delivering the corresponding.notPresentedresult toresume.UIHostingControllerinstead of creating an Encore window.resumebefore automatic controller dismissal so the host can push its next screen and remove or replace the Encore controller in the same navigation update.Compatibility
show()andshow(resume:)behavior remains unchanged.PlacementBuilderProtocolconformers receive a default implementation for the new requirement.Risks
resume; automatic dismissal handles standard navigation and modal presentation hierarchies.