-
Notifications
You must be signed in to change notification settings - Fork 6
Adds managementUrl param to CustomerInfo and appUserId config function #6
Adds managementUrl param to CustomerInfo and appUserId config function #6
Conversation
…configure with custom appUserId. See [documentation](https://www.revenuecat.com/docs/customers/user-ids#how-to-only-use-custom-app-user-ids) for more information.
Api check failed? What is this, how do I fix it and where can I learn more about it? =) |
@@ -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() |
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 am not sure if absoluteString
and toString
for NSUrl is the same.
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.
Replaced toString
with absoluteString
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.
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.
@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 |
These changes are available in version |
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.