This new SDK provides better handling for an app which has multiple users using the same device.
The way the app should use the APIs is as follows:
- If the user ID is known at the time of SDK initialization (for example when the user is known or when the app initializes the SDK only upon login), simply initiate the SDK with the visitorId, accountId and user data.
- If the user ID is known only later in the flow, the SDK can be initialized with an anonymous visitor. In this case, once the user is known, the app should call setVisitor with the new visitor's details. This method re-initializes the SDK with the new visitor and fetches the guides for this visitor.
- If the user logs out, clearVisitor can be called.
- visitorId property changed to read-only;
- setVisitiorId API changed to setVisitor:accountId: Once called new inserts are fetched for the new visitor
- clearVisitor API exposed.