Hello!
Thanks for your feedback, I updated the docs to say “when Purchases.configure() is called” instead of “app launch” as that is more correct.
It’s impossible to set attributes before configure is called so you have to wait until after configure, but I would recommend setting the attributes as soon as you have them. Really what’s going on here is efficient batching and sending of subscriber attributes, so it’s less about timing and more about adding attributes to the queue as soon as you have them so that the next time the SDK sends attributes to the API, your attributes get sent.
You can sidestep this behavior by calling our API endpoint directly, although you lose out on efficiency and simplicity.
It’s impossible to set attributes before configure is called so you have to wait until after configure, but I would recommend setting the attributes as soon as you have them.
Well, in my case that would be before I call configure
To clarify, if I do…
Purchases.configure(‘SDK_KEY’);
Purchases.setAttributes({"age" : "24", "custom_group_id" : "abc123"});
...will the attributes be set immediately or only the next time the app is backgrounded or there is a change to the user/subscription (purchase/restore/renewal/cancelation/etc)?