adaptyteam / AdaptySDK-Flutter

SDK for growing mobile in-app purchases
https://docs.adapty.io/docs/quickstart
MIT License
88 stars 15 forks source link

Setting user attributes unclear documentation #103

Closed PetrKubes97 closed 5 months ago

PetrKubes97 commented 5 months ago

Hi,

I'm currently connecting Amplitude to Adapty. When user logs in, I get the user id. Then, I set the Amplitude userId and update Adapty profile.

final builder = AdaptyProfileParametersBuilder()
      ..setAmplitudeUserId(await amplitude.getUserId());
    try {
      Adapty().updateProfile(builder.build());}...

From the documentation at https://docs.adapty.io/docs/setting-user-attributes, it is not clear that the previous attributes that I've set on initialization (such as device id) won't be reset. Is that the case? If so, would be nice to mention it in docs.

x401om commented 5 months ago

Hi, @PetrKubes97! I apologize if our documentation was unclear. We've added an additional note to clarify. Essentially, when you call updateProfile, all previously set attributes will remain unchanged. Please note that if you wish to delete a custom attribute, you can use the .withRemoved(customAttributeForKey:) method in the AdaptyProfileParametersBuilder.

PetrKubes97 commented 5 months ago

Thanks 👍