-
Notifications
You must be signed in to change notification settings - Fork 25
RefactorUI: Clean API Architecture #682
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
Merged
Merged
Changes from all commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
53e264a
Add RevenueCatUI package
facumenzella f9683a5
revert code
facumenzella 0a407d2
Add minimum
facumenzella 151ef83
Moved files to RevenueCat/Android
facumenzella 45ad7d0
Moved files from Runtime to Scripts
facumenzella c4ac9de
Use SimpleJSON
facumenzella e20e4ce
delete extra .meta
facumenzella cdd8ea2
Updated bool IsSupported(); doc
facumenzella be566dd
Added pure code options, removed GameObjecft
facumenzella c550a2e
Split callback
facumenzella d1d075e
added debug logs
facumenzella 1a0e59c
Remove StubPaywallPresenter.cs
facumenzella 8b7784b
Delete RevenueCatUICallbackHandler.cs
facumenzella 69096d4
Add missing pieces
facumenzella c191052
Merge branch 'main' into feat/add-revenuecatui
facumenzella 1ee5dcc
ready
facumenzella 2cbfef6
remove reference to ui package
facumenzella 160ed40
rename to com.revenuecat.unity.ui
facumenzella e03df34
Merge branch 'main' into feat/add-revenuecatui
facumenzella c3bd377
Update Subtester/Assets/Scenes/Main.unity
facumenzella 0ad7ba1
Remove extra Stub.meta
facumenzella a8591ee
Remove README
facumenzella ffca566
Rename .asmdef files
facumenzella 5417e16
Remove customer center code
facumenzella 9ec1edf
Merge branch 'feat/add-revenuecatui' of github.com:RevenueCat/purchas…
facumenzella 6a43d86
remove _isSupportedCache
facumenzella 0a829d0
Update Subtester/Packages/manifest.json
facumenzella 18b9ba1
renamed editor asmdef and deleted extra files
facumenzella 21ac4df
Merge branch 'feat/add-revenuecatui' of github.com:RevenueCat/purchas…
facumenzella 17aed4a
revert Subtester
facumenzella d3cca45
Update Subtester/Assets/Plugins/Android/mainTemplate.gradle
facumenzella f51be9e
Update Subtester/ProjectSettings/AndroidResolverDependencies.xml
facumenzella 1e1ee01
Make properties internal
facumenzella 0143afe
Merge branch 'feat/add-revenuecatui' of github.com:RevenueCat/purchas…
facumenzella 2693a44
minimal paywalls presentation
vegaro 97dec08
clean up
vegaro 980a0e5
Merge branch 'main' into paywalls-android-poc
vegaro b9bb1e0
clean up
vegaro b048332
clean up
vegaro cfbc8d9
move into androidlib
vegaro 1c4c865
add local dependency
vegaro f072bde
updated mainTemplate.gradle
vegaro 2457709
update PurchasesListener
vegaro 44bc909
gitignore
vegaro eb27acf
add log to AndroidPaywallPresenter
vegaro 5da75f8
add displayCloseButton
vegaro 56258da
fix compilation of Subtester when exporting package
vegaro be4ef13
use componentActivity
vegaro 649cff4
presentPaywallIfNeeded
vegaro e55f375
add close button to log
vegaro 26961f3
add PresentPaywallIfNeeded to PurchasesListener
vegaro 07afd3d
update AndroidResolverDependencies
vegaro dde2af5
implements PaywallResultHandler
vegaro 96d73f6
rename to PaywallTrampolineActivity and made transparent
vegaro cf1a839
remove unneeded comment
vegaro 09651b4
TODOs on logs
vegaro 8065057
remove UnityBridge
vegaro 82643ac
Paywalls iOS (#675)
facumenzella 36133cc
Add UI static approach
facumenzella 02dae19
rename namespace
facumenzella f2ce43a
Merge branch 'main' into feat/revui-mono-nonmono
facumenzella 79a708f
Remove gameobjedct
facumenzella 92d1631
revert RevenueCatUIDependencies.xml
facumenzella 22640ce
delete RevenueCatUI/Tests.meta
facumenzella c953a71
delete RevenueCatUI/Tests/UITests.cs.meta
facumenzella b5334a5
delete RevenueCatUI/Tests/revenuecat.purchases-unity-ui.Tests.asmdef.…
facumenzella 23b6ea6
delte tests
facumenzella 692be3b
use new API
facumenzella 2fe6caa
last refactor
facumenzella 9d07906
add async
facumenzella d733dda
rename final names ultimate
facumenzella 8e08756
nits
facumenzella File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| using System.Threading.Tasks; | ||
| using UnityEngine; | ||
|
|
||
| namespace RevenueCatUI | ||
| { | ||
| /// <summary> | ||
| /// MonoBehaviour helper that forwards to the static PaywallsPresenter API so paywalls can be driven from scenes. | ||
| /// </summary> | ||
| public class PaywallsBehaviour : MonoBehaviour | ||
| { | ||
| /// <summary> | ||
| /// Presents a paywall configured in the RevenueCat dashboard. | ||
| /// </summary> | ||
| /// <param name="options">Options for presenting the paywall.</param> | ||
| /// <returns>A <see cref="PaywallResult"/> describing the outcome.</returns> | ||
| public async Task<PaywallResult> PresentPaywall(PaywallOptions options = null) | ||
| { | ||
| return await PaywallsPresenter.Present(options); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Presents a paywall only if the user does not have the specified entitlement. | ||
| /// </summary> | ||
| /// <param name="requiredEntitlementIdentifier">Entitlement identifier to check before presenting.</param> | ||
| /// <param name="options">Options for presenting the paywall.</param> | ||
| /// <returns>A <see cref="PaywallResult"/> describing the outcome.</returns> | ||
| public async Task<PaywallResult> PresentPaywallIfNeeded(string requiredEntitlementIdentifier, PaywallOptions options = null) | ||
| { | ||
| return await PaywallsPresenter.PresentIfNeeded(requiredEntitlementIdentifier, options); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Checks if the Paywall UI is available on the current platform. | ||
| /// Returns true on iOS/Android device builds when paywall is supported; otherwise false. | ||
| /// </summary> | ||
| /// <returns>True if UI is supported on this platform, otherwise false.</returns> | ||
| public bool IsSupported() | ||
| { | ||
| return PaywallsPresenter.IsSupported(); | ||
| } | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
2 changes: 1 addition & 1 deletion
2
RevenueCatUI/Scripts/RevenueCatUI.cs.meta → RevenueCatUI/Scripts/UI.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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.
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.
is this needed?
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.
oh yes for
PaywallsPresenter