Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Adds managementUrl param to CustomerInfo and appUserId config function #6

Merged
merged 1 commit into from
Mar 31, 2024

Conversation

Qw4z1
Copy link
Contributor

@Qw4z1 Qw4z1 commented Mar 30, 2024

The managementUrl param is mostly for convenience and API coverage.

The appUserId overload is used to avoid using anonymous RevenueCat IDs. See documentation for more information.

@Qw4z1
Copy link
Contributor Author

Qw4z1 commented Mar 30, 2024

Api check failed? What is this, how do I fix it and where can I learn more about it? =)

@mirzemehdi mirzemehdi self-requested a review March 31, 2024 17:11
@@ -100,7 +100,8 @@ internal fun RCEntitlementInfo.asEntitlementInfo(): EntitlementInfo {
public fun RCCustomerInfo.asCustomerInfo(): CustomerInfo {
return CustomerInfo(
originalAppUserId = originalAppUserId(),
entitlements = entitlements().asEntitlementInfos()
entitlements = entitlements().asEntitlementInfos(),
managementURL = managementURL().toString()
Copy link
Owner

Choose a reason for hiding this comment

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

I am not sure if absoluteString and toString for NSUrl is the same.

Copy link
Owner

Choose a reason for hiding this comment

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

Replaced toString with absoluteString

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice! Now that you mention it, maybe I was a bit too fast when implementing this to be a String in CustomerInfo. Might actually be nice to add a wrapper class that could return the url as a String and have nativeUrl property exposing the original Uri on Android and the original NSURL on iOS.

Firebase-kotlin-sdk does this.

@mirzemehdi mirzemehdi merged commit 07ce475 into mirzemehdi:main Mar 31, 2024
5 of 6 checks passed
@mirzemehdi
Copy link
Owner

@Qw4z1 Thanks for this pull request. Looks good to me. I'll release new version with these changes. Please, let me know also if above toString comment would be issue.

apiCheck is for confirming that new public api is not affected from changes. It ensures that when releasing new version, it doesn't break anything for backward compatibility. When public api is changed we need to run ./gradlew apiDump if we are sure that library is backward compatible.

You can read more about it here:

https://github.com/Kotlin/binary-compatibility-validator

https://proandroiddev.com/android-library-compatibility-and-public-api-management-with-binary-compatibility-validator-971762957594

Repository owner deleted a comment from r4m-mirze Mar 31, 2024
Repository owner deleted a comment from r4m-mirze Mar 31, 2024
@mirzemehdi
Copy link
Owner

These changes are available in version 0.1.0 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants